hokky преди 4 месеца
родител
ревизия
734a26832a
променени са 26 файла, в които са добавени 135 реда и са изтрити 713 реда
  1. 9 2
      .htaccess
  2. 2 2
      app/Http/Controllers/Api/BlankerController.php
  3. 1 0
      app/Http/Controllers/Front/Dabory/Erp/Purchase/PorderController.php
  4. 1 1
      dabory/para/erp/ko_KR/copy/body-copy/stock/genio-genio.json
  5. 4 3
      dabory/para/erp/ko_KR/list/list-type1/post/1to1-input.json
  6. 4 3
      dabory/para/erp/ko_KR/list/list-type1/post/certificate-input.json
  7. 4 3
      dabory/para/erp/ko_KR/list/list-type1/post/contactus-input.json
  8. 4 3
      dabory/para/erp/ko_KR/list/list-type1/post/event-input.json
  9. 4 3
      dabory/para/erp/ko_KR/list/list-type1/post/faq-input.json
  10. 4 3
      dabory/para/erp/ko_KR/list/list-type1/post/news-input.json
  11. 4 3
      dabory/para/erp/ko_KR/list/list-type1/post/notice-input.json
  12. 4 3
      dabory/para/erp/ko_KR/list/list-type1/post/product-input.json
  13. 4 3
      dabory/para/erp/ko_KR/list/list-type1/post/qna-input.json
  14. 0 2
      down
  15. 3 3
      index.html
  16. 18 0
      public/js/modals-controller/b-type/slip.js
  17. 0 1
      public/js/utils/lib.js
  18. 0 645
      public/printing-curr-price-req.json
  19. 19 1
      resources/views/auth/login.blade.php
  20. 40 7
      resources/views/front/dabory/erp/purchase/porder.blade.php
  21. 0 2
      resources/views/front/dabory/erp/sales/squote.blade.php
  22. 3 8
      resources/views/front/dabory/erp/stock/genio.blade.php
  23. 1 2
      resources/views/front/dabory/erp/stock/tab/genio-correct.blade.php
  24. 1 5
      resources/views/front/outline/static/body-copy.blade.php
  25. 1 1
      resources/views/front/outline/static/slip.blade.php
  26. 0 4
      start

+ 9 - 2
.htaccess

@@ -16,6 +16,12 @@ RewriteCond %{REQUEST_FILENAME} !-d
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteRule ^ index.php [L]
 </IfModule>
+
+<IfModule mod_headers.c>
+    Header always unset X-Frame-Options
+</IfModule>
+
+
 ###Start Kloxo PHP config Area
 ### begin content - please not remove this line
 #<IfModule mod_rewrite.c>
@@ -24,7 +30,7 @@ RewriteRule ^ index.php [L]
 #</FilesMatch>
 ### MR -- using php version different with default php
 ### 1. Using suphp
-### - Copy between '#<FilesMatch \.php$>' to '#</FilesMatch>' and 
+### - Copy between '#<FilesMatch \.php$>' to '#</FilesMatch>' and
 ###   then remove '#' from '#<FilesMatch', '#</FilesMatch>' and one of '#SetHandler'
 #<FilesMatch \.php$>
 	#SetHandler x-httpd-php
@@ -33,7 +39,7 @@ RewriteRule ^ index.php [L]
 #</FilesMatch>
 ### OR
 ### 2. Using fcgid
-### - Copy from '#Options' to '#FCGIWrapper' and 
+### - Copy from '#Options' to '#FCGIWrapper' and
 ###   then remove '#' for one of '#FCGIWrapper'
 #Options +ExecCGI
 #<FilesMatch \.php$>
@@ -44,3 +50,4 @@ RewriteRule ^ index.php [L]
 #FCGIWrapper /usr/bin/php73m-cgi .php
 ### end content - please not remove this line
 ###End Kloxo PHP config Area
+

+ 2 - 2
app/Http/Controllers/Api/BlankerController.php

@@ -25,7 +25,7 @@ class BlankerController
 
     public function currPrice()
     {
-        $printingJson = request('PrintingJson');
+        $printingJson = json_decode(base64_decode(request('PrintingJson')), true);
         $result = response()->json($this->blankerService->colrow(
             $printingJson['p'],
             $printingJson['p3'],
@@ -63,7 +63,7 @@ class BlankerController
         $item = $response['Page'][0];
         return response()->json([
             'ItemName' => $item['ItemName'],
-            'CurrPrice' => $result['total_op'],
+            'CurrPrice' => (float)$result['total_op'],
         ]);
     }
 }

+ 1 - 0
app/Http/Controllers/Front/Dabory/Erp/Purchase/PorderController.php

@@ -18,6 +18,7 @@ class PorderController extends Controller
         try {
             $formB = new FormB(request('bpa'));
             $porderModal = (new Modal('/search/slip-search/purch/porder'))->getData();
+            // dd(porderModal);
             $companyModal = (new Modal('/search/company-search/supplier'))->getData();
             $itemModal = (new Modal('/search/item-search/supplier'))->getData();
         } catch (ParameterException $e) {

+ 1 - 1
dabory/para/erp/ko_KR/copy/body-copy/stock/genio-genio.json

@@ -1,6 +1,6 @@
 {
     "General": {
-        "Title": "재고 항목 복사",
+        "Title": "재고 항목복사",
         "PageApi": "body-copy-page",
         "ActApi": "body-copy-mact"
     },

+ 4 - 3
dabory/para/erp/ko_KR/list/list-type1/post/1to1-input.json

@@ -9,9 +9,10 @@
 
     "QueryVars": {
         "QueryName": "post/1to1-input",
-        "FilterName": "mx.post_type_id",
-        "FilterValue": "6",
-        "FilterDate": ""
+        "FilterName": "",
+        "FilterValue": "",
+        "FilterDate": "",
+        "SimpleFilter": "mx.post_type_id=6"
     },
 
     "HeadSelectOptions": [

+ 4 - 3
dabory/para/erp/ko_KR/list/list-type1/post/certificate-input.json

@@ -9,9 +9,10 @@
 
     "QueryVars": {
         "QueryName": "post/standard-input",
-        "FilterName": "mx.post_type_id",
-        "FilterValue": "32",
-        "FilterDate": ""
+        "FilterName": "",
+        "FilterValue": "",
+        "FilterDate": "",
+        "SimpleFilter": "mx.post_type_id=32"
     },
 
     "HeadSelectOptions": [

+ 4 - 3
dabory/para/erp/ko_KR/list/list-type1/post/contactus-input.json

@@ -9,9 +9,10 @@
 
     "QueryVars": {
         "QueryName": "post/contactus-input",
-        "FilterName": "mx.post_type_id",
-        "FilterValue": "7",
-        "FilterDate": ""
+        "FilterName": "",
+        "FilterValue": "",
+        "FilterDate": "",
+        "SimpleFilter": "mx.post_type_id=7"
     },
 
     "HeadSelectOptions": [

+ 4 - 3
dabory/para/erp/ko_KR/list/list-type1/post/event-input.json

@@ -9,9 +9,10 @@
 
     "QueryVars": {
         "QueryName": "post/event-input",
-        "FilterName": "mx.post_type_id",
-        "FilterValue": "3",
-        "FilterDate": ""
+        "FilterName": "",
+        "FilterValue": "",
+        "FilterDate": "",
+        "SimpleFilter": "mx.post_type_id=3"
     },
 
     "HeadSelectOptions": [

+ 4 - 3
dabory/para/erp/ko_KR/list/list-type1/post/faq-input.json

@@ -9,9 +9,10 @@
 
     "QueryVars": {
         "QueryName": "post/standard-input",
-        "FilterName": "mx.post_type_id",
-        "FilterValue": "9",
-        "FilterDate": ""
+        "FilterName": "",
+        "FilterValue": "",
+        "FilterDate": "",
+        "SimpleFilter": "mx.post_type_id=9"
     },
 
     "HeadSelectOptions": [

+ 4 - 3
dabory/para/erp/ko_KR/list/list-type1/post/news-input.json

@@ -9,9 +9,10 @@
 
     "QueryVars": {
         "QueryName": "post/standard-input",
-        "FilterName": "mx.post_type_id",
-        "FilterValue": "34",
-        "FilterDate": ""
+        "FilterName": "",
+        "FilterValue": "",
+        "FilterDate": "",
+        "SimpleFilter": "mx.post_type_id=34"
     },
 
     "HeadSelectOptions": [

+ 4 - 3
dabory/para/erp/ko_KR/list/list-type1/post/notice-input.json

@@ -9,9 +9,10 @@
 
     "QueryVars": {
         "QueryName": "post/standard-input",
-        "FilterName": "mx.post_type_id",
-        "FilterValue": "1",
-        "FilterDate": ""
+        "FilterName": "",
+        "FilterValue": "",
+        "FilterDate": "",
+        "SimpleFilter": "mx.post_type_id=1"
     },
 
     "HeadSelectOptions": [

+ 4 - 3
dabory/para/erp/ko_KR/list/list-type1/post/product-input.json

@@ -9,9 +9,10 @@
 
     "QueryVars": {
         "QueryName": "post/standard-input",
-        "FilterName": "mx.post_type_id",
-        "FilterValue": "31",
-        "FilterDate": ""
+        "FilterName": "",
+        "FilterValue": "",
+        "FilterDate": "",
+        "SimpleFilter": "mx.post_type_id=31"
     },
 
     "HeadSelectOptions": [

+ 4 - 3
dabory/para/erp/ko_KR/list/list-type1/post/qna-input.json

@@ -9,9 +9,10 @@
 
     "QueryVars": {
         "QueryName": "post/standard-input",
-        "FilterName": "mx.post_type_id",
-        "FilterValue": "4",
-        "FilterDate": ""
+        "FilterName": "",
+        "FilterValue": "",
+        "FilterDate": "",
+        "SimpleFilter": "mx.post_type_id=4"
     },
 
     "HeadSelectOptions": [

+ 0 - 2
down

@@ -1,2 +0,0 @@
-docker-compose down
-

+ 3 - 3
index.html

@@ -1,7 +1,7 @@
 <html>
 
 <head>
-<title>Kloxo-MR : Default Page for newerp.daboryhost.com</title>
+<title>KloxoNG : Default Page for solution.dabory.com</title>
 </head>
 
 <style>
@@ -71,7 +71,7 @@ table.content_title td {
 		<td>
 			<table class="content">
 				<tr>
-					<td><a href="http://mratwork.com/" title="Go to Kloxo-MR website"><img style="margin:5px; padding:5px; height:50px" class="logo" src="./images/kloxo-mr.png" alt="kloxo-mr-logo"></a></td>
+					<td><a href="http://kloxong.org" title="Go to Kloxo Next Generation website"><img style="margin:5px; padding:5px; height:50px" class="logo" src="./images/kloxong.png" alt="kloxong-logo"></a></td>
 				</tr>
 
 			</table>
@@ -87,7 +87,7 @@ table.content_title td {
 			<tr>
 				<td><br>
 				<br>
-				<b>Kloxo-MR Default Page for newerp.daboryhost.com</b> </td>
+				<b>Kloxo Next Generation Default Page for solution.dabory.com</b> </td>
 			</tr>
 		</table>
 		<br>

+ 18 - 0
public/js/modals-controller/b-type/slip.js

@@ -59,6 +59,7 @@ const slip = (function ($, window, document, undefined) {
 
 
     slip_open = (limit, offset, page = 1) => {
+        console.log('slip_open');
         let html = ''
         let menu_code = (typeof menuCode === 'undefined') ? false : menuCode
         let modal_class_name = $(id).data('class') || ''
@@ -73,6 +74,23 @@ const slip = (function ($, window, document, undefined) {
 
         $(id).find('.slip-save-spinner-btn').show()
         $(id).find('.slip-search-btn').hide()
+        console.log(moealSetFile['General']['PageApi']);
+        console.log('FilterName : ', $(id).find('#filter-name-select').val());
+        console.log('FilterValue : ', $(id).find('#filter-value-txt').val());
+        console.log('SimpleFilter : ', $(id).find('#simple-filter-select').val());
+        console.log('StartDate : ', start_date);
+        console.log('EndDate : ', end_date);
+        console.log('QuerySpeed : ', $(id).find(`input:radio[name=${modal_class_name}query-speed]:checked`).val());
+        console.log('SlipNo : ', $(id).find('.slip-no').val());
+        console.log('CompanyName : ', $(id).find('.company-name').val());
+        console.log('ItemCode : ', $(id).find('.item-code').val());
+        console.log('OrderBy : ', $(id).find('.modal-order-by-select').val());
+
+        console.log('SlipDateField : ', moealSetFile['SlipSearchFields']['SlipDateField']);
+        console.log('SlipNoField : ', moealSetFile['SlipSearchFields']['SlipNoField']);
+
+        console.log('Limit : ', parseInt(limit));
+        console.log('Offset : ', parseInt(offset));
 
         $.when(get_api_data(moealSetFile['General']['PageApi'], {
             QueryVars: {

+ 0 - 1
public/js/utils/lib.js

@@ -275,7 +275,6 @@ function format_result(data, format, display_vars = undefined) {
 }
 
 function format_conver_for(data, format, display_vars = undefined, is_split_column = false) {
-    console.log('format_conver_for');
     if (is_split_column) {
         if (format.includes('|')) {
             let data_list = data.split('|||');

Файловите разлики са ограничени, защото са твърде много
+ 0 - 645
public/printing-curr-price-req.json


+ 19 - 1
resources/views/auth/login.blade.php

@@ -83,12 +83,30 @@
 </div>
 <!-- /login card -->
 @endsection
-
+<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/rollups/aes.js"></script>
 <script>
     window.onload = function() {
         history.pushState(null, null, location.href);
         window.onpopstate = function(event) {
             history.go(1);
         };
+
+        // let passData = { returnValue : 200 };
+        // window.parent.postMessage(passData, 'http://localhost:8000');
     }
+
+    // window.addEventListener('message', function(e) {
+    //     //e.data ==> 수신 받은 데이터
+    //     //e.origin ==> 허용된 도메인
+    //     const req = JSON.parse(decoding(e.data))
+    //     console.log(req)
+    //     console.log(JSON.parse(decoding(req['PrintingJson'])))
+    // });
+
+    // function decoding(encoded){
+    //     //base64 decrypt
+    //     var parsedWordArray = CryptoJS.enc.Base64.parse(encoded);
+    //     var decoded = parsedWordArray.toString(CryptoJS.enc.Utf8);
+    //     return decoded;
+    // }
 </script>

+ 40 - 7
resources/views/front/dabory/erp/purchase/porder.blade.php

@@ -353,11 +353,14 @@
             Btype.get_storage_name_and_branch_name()
             let data = await Btype.get_slip_form_init()
             // console.log(data)
-            formB['SlipCommonSetup'] = data['SlipCommonSetup']
-            await Btype.create_deal_type_select_box_options(data.DealTypePage)
-            await Btype.create_vat_type_select_box_options(data.VatRatePage)
-            await Btype.create_sgroup_select_box_options(data.SgroupPage)
-            await create_etc_select_box_options(data)
+
+            slipInit = await Btype.get_slip_form_init()
+            // formB['SlipCommonSetup'] = data['SlipCommonSetup']
+            formB['SlipCommonSetup'] = slipInit['SlipCommonSetup']
+            await Btype.create_deal_type_select_box_options(slipInit.DealTypePage)
+            await Btype.create_vat_type_select_box_options(slipInit.VatRatePage)
+            await Btype.create_sgroup_select_box_options(slipInit.SgroupPage)
+            await create_etc_select_box_options(slipInit)
             $('#user-txt').val(window.User['NickName'])
 
             if (formB['SlipCommonSetup']['IsLastSlipGet']) {
@@ -373,7 +376,6 @@
             $('#porder-table-body').on('click', 'tr', function() {
                 // Find the input element with name="bd-cursor-state" within the clicked row
                 const $bdCursorStateInput = $(this).find('input[name="bd-cursor-state"]');
-                console.log('bdCursorStateInput : ', $bdCursorStateInput)
                 if ($bdCursorStateInput.length) {
                     $($bdCursorStateInput).prop('checked', true)
                     Btype.bd_cursor_click($bdCursorStateInput)
@@ -656,6 +658,24 @@
         }
 
         function get_parameter() {
+            console.log('get_parameter()');
+            const deal_name = slipInit['DealTypePage'].filter(page => page['Id'] === Number($('#deal-type-select').val()))[0]['DealName']
+            const vat_rate = $('#vat-type-select').find('option:selected').data('vatrate')
+            const vat_name = slipInit['VatRatePage'].filter(page => page['Id'] === Number($('#vat-type-select').val()))[0]['VatName']
+            let first_item = ''
+
+            if (bd_page.length > 0) {
+                const first_porder = bd_page[0]
+                first_item = first_porder['ItemCode'] + '_' + first_porder['ItemName']
+                if (first_porder['SubName']) {
+                    first_item += '_' + first_porder['SubName']
+                }
+                first_item += '(' + bd_page.length + ')'
+            }
+            const itmtot_amt = bd_page.reduce((accumulator, bd) => {
+                return accumulator + parseFloat(bd.PorderSupply)
+            }, 0)
+
             let id = parseInt($(`#frm`).find(`input[name="Id"]`).val());
             let parameter = {
                 Id: id,
@@ -682,8 +702,19 @@
                 // Remarks: $('#remarks-preview').html(),
                 Remarks: $('#remarks-txt-area').val(),
                 PayPeriod: '',
-                Ip: window.User['Ip']
+                Ip: window.User['Ip'],
+
+                FirstItem: first_item,
+                ItmtotAmt: String(itmtot_amt),
+                DiscountAmt: '0',
+                TotalAmt: String(Number(itmtot_amt) - 0),
+                DealName: deal_name,
+                VatRate: vat_rate,
+                VatName: vat_name,
+                SgroupName: window.User['SgroupName']
             }
+
+            console.log('parameter : ', parameter);
             if (id < 0) {
                 parameter = { Id: id }
             } else if (id > 0) {
@@ -750,6 +781,7 @@
         }
 
         function set_vat_type_rate($this, msg = true) {
+            console.log('set_vat_type_rate');
             let vate_rate = $($this).find('option:selected').data('viewvatrate');
             $('#vat-type-rate-text').val(vate_rate + '%')
 
@@ -1168,5 +1200,6 @@
         const pickCacheData = {!! json_encode($pickCacheData) !!};
         var formB = {!! json_encode($formB) !!};
         var bd_page = [];
+        let slipInit = null;
     </script>
 @endsection

+ 0 - 2
resources/views/front/dabory/erp/sales/squote.blade.php

@@ -282,9 +282,7 @@
 <script src="{{ csset('/js/modals-controller/b-type/common.js') }}"></script>
     <script>
         window.onload = async function () {
-            console.log('bd_page : ', bd_page)
             make_dynamic_table_css('.squote-table', make_dynamic_table_px(formB['ListVars']['Size']))
-            console.log('vat_name : ', $('#vat-type-select'))
             $('#squote-date').val(date_to_sting(new Date()))
 
             let sgroup_pick = await get_api_data('sgroup-pick', { Page: [ { Id:  parseInt(window.User['SgroupId']) } ] });

+ 3 - 8
resources/views/front/dabory/erp/stock/genio.blade.php

@@ -296,6 +296,7 @@
             }
 
             $('.genio-act').on('click', function () {
+                // console.log($(this).data('value'))
                 switch( $(this).data('value') ) {
                     case 'save': Btype.btn_act_save('#genio-form #frm'); break;
                     case 'new': btn_act_new(); break;
@@ -344,6 +345,7 @@
         }
 
         function get_parameter() {
+            console.log('get_parameter()');
             const deal_name = slipInit['DealTypePage'].filter(page => page['Id'] === Number($('#deal-type-select').val()))[0]['DealName']
             const vat_rate = $('#vat-type-select').find('option:selected').data('vatrate')
             const vat_name = slipInit['VatRatePage'].filter(page => page['Id'] === Number($('#vat-type-select').val()))[0]['VatName']
@@ -454,6 +456,7 @@
         }
 
         function set_vat_type_rate($this, msg = true) {
+            console.log('set_vat_type_rate');
             let vate_rate = $($this).find('option:selected').data('viewvatrate');
             $('#vat-type-rate-text').val(vate_rate + '%')
 
@@ -493,7 +496,6 @@
             $('#auto-slip-no-txt').val(hd_page.GenioNo)
             $('#genio-date').val(moment(to_date(hd_page.GenioDate)).format('YYYY-MM-DD'))
             $('#deal-type-select').val(hd_page.DealTypeId)
-
             $('#supplier-txt').val(hd_page.CompanyName)
             $('#supplier-txt').data('id', hd_page.CompanyId)
             $('#supplier-txt').data('contact', hd_page.CompanyContact)
@@ -525,12 +527,5 @@
         var formB = {!! json_encode($formB) !!};
         let slipInit = null;
 
-        console.log('genioModal : ', genioModal);
-        console.log('companyModal : ', companyModal);
-        console.log('itemModal : ', itemModal);
-        console.log('slipCacheData : ', slipCacheData);
-        console.log('pickCacheData : ', pickCacheData);
-        console.log('formB : ', formB);
-
     </script>
 @endsection

+ 1 - 2
resources/views/front/dabory/erp/stock/tab/genio-correct.blade.php

@@ -120,7 +120,6 @@
         $('#genio-table-body').on('click', 'tr', function() {
                 // Find the input element with name="bd-cursor-state" within the clicked row
                 const $bdCursorStateInput = $(this).find('input[name="bd-cursor-state"]');
-                console.log('bdCursorStateInput : ', $bdCursorStateInput)
                 if ($bdCursorStateInput.length) {
                     $($bdCursorStateInput).prop('checked', true)
                     Btype.bd_cursor_click($bdCursorStateInput)
@@ -188,8 +187,8 @@
 
             // $(`#modal-bodycopy.${parameter_name}`).find('.slip_no-txt').val($('#auto-slip-no-txt').val())
             $(`#modal-bodycopy.${parameter_name}`).find('.company_name-txt').val($('#supplier-txt').val())
-            console.log('parameter_name : ', parameter_name);
             let data = formB['BodySelectOptions'].filter(selectOption => selectOption['ModalClassName'] == parameter_name)[0];
+            // console.log('data : ', data);
             $('.stock').find('.modal-btn').data('target', 'bodycopy')
             $('.stock').find('.modal-btn').data('variable', data['Parameter'])
             $('.stock').find('.modal-btn').data('class', parameter_name)

+ 1 - 5
resources/views/front/outline/static/body-copy.blade.php

@@ -1,7 +1,5 @@
 <!--- body-copy-search --->
-@php $modalClassName = $modalClassName ?? '';
-    //var_dump($moealSetFile['BodyCopyPageVars'])
-@endphp
+@php $modalClassName = $modalClassName ?? ''; @endphp
 
 <div class="modal fade modal-red {{ $modalClassName }}" id="modal-bodycopy" aria-hidden="true" data-backdrop="static" style="display: none; z-index: 1050;">
     <div class="modal-dialog m-auto pt-4" style="max-width: 1250px;">
@@ -157,8 +155,6 @@
 <script>
     function body_copy_show_modal(modal_class_name, key) {
         let func_name = `get_${bodyCopy[modal_class_name]['BodyCopyPopupVars']['Filter'][key]}`;
-
-        console.log('func_name : ',  func_name);
         // 첫 번째 show 했을 때만 호출
         if (! $(`#modal-bodycopy.${modal_class_name}`).find('.modal-btn').data('first')) {
             first_slip_date_rang(`#${modal_class_name}slip-date-navi-div`)

+ 1 - 1
resources/views/front/outline/static/slip.blade.php

@@ -4,7 +4,7 @@
 <div class="modal fade modal-brown {{ $modalClassName }}" id="modal-slip" aria-hidden="true" data-backdrop="static" style="display: none; z-index: 1060;">
     <div class="modal-dialog m-auto pt-4" style="max-width: 1250px !important;">
         <div class="modal-content">
-            <div class="modal-header bg-primary test111"><!--p-2-->
+            <div class="modal-header bg-primary"><!--p-2-->
                 <h4 class="modal-title text-white" id="myModalLabel"></h4>
                 <button type="button" class="close" data-dismiss="modal" aria-label="Close"><i class="fas fa-times"></i></button>
             </div>

+ 0 - 4
start

@@ -1,4 +0,0 @@
-
-docker_id="$1"
-
-docker-compose up -d --"${docker_id}"

Някои файлове не бяха показани, защото твърде много файлове са промени