2 Commits 34d34dd987 ... ce722376f5

Tác giả SHA1 Thông báo Ngày
  hokky ce722376f5 240725-1544-Kim 4 tháng trước cách đây
  hokky e7326c57ce 240725-1543-Kim 4 tháng trước cách đây

+ 1 - 14
public/js/modals-controller/b-type/common.js

@@ -218,7 +218,6 @@
     };
 
     Btype.enterPressedinCell = async function (event, type = 1, namespace = 'window') {
-        console.log('enterPressedinCell');
         if ((event.which && event.which == 13) || event.keyCode && event.keyCode == 13) {
             document.activeElement.blur();
             let query, input_class;
@@ -244,7 +243,6 @@
                 $(`.${namespace}.item-modal-btn`).trigger('click');
             } else {
                 let item = response.data.Page[0];
-
                 let next_input = eval(namespace).set_item_data_to_textbox(item);
                 next_input.focus();
             }
@@ -265,7 +263,6 @@
     };
 
     Btype.get_item_id = async function (item_id, namespace = 'window') {
-        console.log('get_item_id');
         let response = await get_api_data('item-pick', {
             Page : [
                 {Id: item_id }
@@ -320,7 +317,6 @@
     };
 
     Btype.handleEnterPressedinTabCell = function (event) {
-        console.log('handleEnterPressedinTabCell');
         if ((event.which && event.which == 13) || event.keyCode && event.keyCode == 13) {
             let table = $(event.target).closest('table');
             let cursor = $($(event.target).closest('tr')).find('td:eq(0) input').attr('name')
@@ -330,7 +326,6 @@
             if (index == Btype.get_last_input_th_index(table)) {
                 $(tr).children(`td:eq(${index})`).find('input').blur();
             }
-
             $(tr).children(`td:eq(${Btype.get_next_tab_index(index, table)})`).find('input').focus();
             $(tr).children(`td:eq(${Btype.get_next_tab_index(index, table)})`).find('input').select();
         }
@@ -379,13 +374,10 @@
     Btype.custom_sum_amt = function (callback) {
         let tr = $(`input[name='bd-cursor-state']:checked`).closest('tr')
         let index = $(tr).prevAll().length
-
         let sum_amt = parseFloat(minusComma($(tr).children('td:eq(10)').find('input').val()));
-
         if (isNaN(sum_amt)) return;
 
         $(tr).children('td:eq(10)').find('input').val(sum_amt.toFixed(window.User['PurchAmtPoint']))
-
         callback(sum_amt, index)
     };
 
@@ -616,7 +608,6 @@
     };
 
     Btype.check_the_checkbox_when_changing = function ($this, checked = true, namespace = 'window') {
-        console.log('check_the_checkbox_when_changing');
         let tr = $($this).closest('tr');
         let index = $(tr).prevAll().length
 
@@ -645,14 +636,11 @@
     };
 
     Btype.fetch_slip_form_book = async function (slip_no, namespace = 'window', callback = undefined) {
-        console.log('fetch_slip_form_book');
         let response = await call_slip_form_book(eval(namespace).formB['General']['PickApi'],
             eval(namespace).formB['QueryVars']['QueryName'], slip_no, menuCode);
         if (isEmpty(callback)) {
-            console.log('1 : ', response);
             eval(namespace).update_hd_ui(response);
         } else {
-            console.log('2');
             callback(response);
         }
     };
@@ -700,7 +688,6 @@
             });
             return false;
         }
-        console.log('save : ', get_parameter());
         Btype.call_act_api(eval(namespace).get_parameter(), function() {
             if (! isEmpty(callback)) { callback(); }
         }, undefined, argObj, namespace);
@@ -722,7 +709,7 @@
         });
         const page = response.data.Page
         if (page) {
-            console.log('page : ', page);
+            // console.log(page);
             set_as_response_id(page[0].Id, argObj)
             return true
         } else {

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

@@ -106,7 +106,6 @@ const slip = (function ($, window, document, undefined) {
                 make_pagination('slip', d.PageVars.QueryCnt, page, modal_class_name);
                 let no = get_table_no(d.PageVars.QueryCnt, page, limit);
                 for (let i in d.Page) {
-                    console.log('d.Page : ', d.Page);
                     const onclick = `${$this.data('clicked')}('${d.Page[i].SlipNo}')`;
                     html +=
                     `<tr>

+ 1 - 0
public/js/utils/check-dom.js

@@ -129,6 +129,7 @@ function activate_button_group(argObj = null) {
 }
 
 function input_box_reset_for(argObj, exception_name = [], attr_name = 'id') {
+    console.log('input_box_reset_for');
     // id 초기화
     $(argObj).find('input[name="Id"]').val(0)
     $(argObj).find('#remarks-preview').html('')

+ 1 - 2
resources/views/front/dabory/erp/purchase/porder.blade.php

@@ -506,8 +506,7 @@
                 Ref2: bd.Ref2,
                 PorderMemo: bd.PorderMemo,
                 IsEnd: parseInt(bd.IsEnd),
-                Ip: window.User['Ip'],
-                FirstThumb: bd.TurboThumb
+                Ip: window.User['Ip']
             }
             if (id < 0) {
                 parameter = { Id: id }

+ 128 - 47
resources/views/front/dabory/erp/revenue/sales.blade.php

@@ -361,9 +361,16 @@
         window.onload = async function () {
             ThumbArr = [];
             make_dynamic_table_css('.sales-table', make_dynamic_table_px(formB['ListVars']['Size']))
+<<<<<<< HEAD
+
+            $('#sales-date').val(date_to_sting(new Date()))
+            $('#stock-date').val(date_to_sting(new Date()))
+            var test = Btype.get_storage_name_and_branch_name()
+=======
             $('#sales-date').val(date_to_sting(new Date()))
             $('#stock-date').val(date_to_sting(new Date()))
             Btype.get_storage_name_and_branch_name()
+>>>>>>> 34d34dd987216b37bfdf5b9f01963501a217140c
             let sgroup_pick = await get_api_data('sgroup-pick', { Page: [ { Id:  parseInt(window.User['SgroupId']) } ] });
             window.User['SgroupName'] = sgroup_pick['data']['Page'][0]['SgroupName'];
 
@@ -481,13 +488,14 @@
         function save_data_when_entering_text() {
             let tr = $(`input[name='bd-cursor-state']:checked`).closest('tr')
             let index = $(tr).prevAll().length
-
-            bd_page[index].ConfirmDate = $(tr).children('td:eq(12)').find('input').val()
-            bd_page[index].DeliDate = $(tr).children('td:eq(13)').find('input').val()
+            // bd_page[index].ConfirmDate = $(tr).children('td:eq(12)').find('input').val()
+            // bd_page[index].DeliDate = $(tr).children('td:eq(13)').find('input').val()
             bd_page[index].Ref1 = $(tr).children('td:eq(14)').find('input').val()
             bd_page[index].Ref2 = $(tr).children('td:eq(15)').find('input').val()
         }
 
+<<<<<<< HEAD
+=======
         // start body act btn
         function override_btn_bd_act_multi_update() {
             Btype.btn_bd_act_multi_update('.sales-table')
@@ -503,18 +511,20 @@
             bd_page[index].Ref2 = $(tr).children('td:eq(15)').find('input').val()
         }
 
+>>>>>>> 34d34dd987216b37bfdf5b9f01963501a217140c
         async function btn_bd_act_add() {
-            console.log('btn_bd_act_add');
-            if (parseInt($(`#frm`).find(`input[name="Id"]`).val()) == 0) {
-                iziToast.error({
-                    title: 'Error',
-                    message: @json(_e('Action failed')),
-                });
-                return;
-            }
-            if (! Btype.last_item_added_check('#sales-table-body')) {
-                add_tr();
-            }
+            Btype.btn_act_save('#sales-form #frm', async function () {
+                if (parseInt($(`#frm`).find(`input[name="Id"]`).val()) == 0) {
+                    iziToast.error({
+                        title: 'Error',
+                        message: @json(_e('Action failed')),
+                    });
+                    return;
+                }
+                if (! Btype.last_item_added_check('#sales-table-body')) {
+                    add_tr();
+                }
+            });
         }
 
         function btn_bd_act_body_copy(parameter_name) {
@@ -538,6 +548,8 @@
         }
 
         function btn_act_new() {
+<<<<<<< HEAD
+=======
 <<<<<<< HEAD
             data_init()
             if (formB['SlipCommonSetup']['IsNewRecAutoSlipNo']) {
@@ -545,12 +557,16 @@
             }
 =======
             console.log('btn_act_new');
+>>>>>>> 34d34dd987216b37bfdf5b9f01963501a217140c
             data_init()
-
-            // if (formB['SlipCommonSetup']['IsNewRecAutoSlipNo']) {
+            if (formB['SlipCommonSetup']['IsNewRecAutoSlipNo']) {
                 get_last_slip_no()
+<<<<<<< HEAD
+            }
+=======
             // }
 >>>>>>> 79e2e07b19fcabaccbe8bd7b4812a3a803613323
+>>>>>>> 34d34dd987216b37bfdf5b9f01963501a217140c
         }
 
         function btn_act_copy_to_another(parameter_name) {
@@ -609,6 +625,8 @@
                     first_thumb = first_sales['TurboThumb']
                 }
             }
+<<<<<<< HEAD
+=======
 <<<<<<< HEAD
             const itmtot_amt = bd_page.reduce((accumulator, bd) => {
                 return accumulator + parseFloat(bd.SalesSupply) + parseFloat(bd.SalesVat) // 합계금액 (공급가액 + 세액)
@@ -619,15 +637,21 @@
             }, 0)
 =======
             // console.log('first_sales : ', bd_page[0]);
+>>>>>>> 34d34dd987216b37bfdf5b9f01963501a217140c
             const itmtot_amt = bd_page.reduce((accumulator, bd) => {
-                // return accumulator + parseFloat(bd.SalesSupply) + parseFloat(bd.SalesVat) // 합계금액 (공급가액 + 세액)
-                return accumulator + parseFloat(bd.SalesSupply)
+                return accumulator + parseFloat(bd.SalesSupply) + parseFloat(bd.SalesVat) // 합계금액 (공급가액 + 세액)
             }, 0)
 
+<<<<<<< HEAD
+            const total_qty = bd_page.reduce((accumulator, bd) => {
+                return accumulator + parseFloat(bd.SalesQty)
+            }, 0)
+=======
             // const total_qty = bd_page.reduce((accumulator, bd) => {
             //     return accumulator + parseFloat(bd.PorderQty)
             // }, 0)
 >>>>>>> 79e2e07b19fcabaccbe8bd7b4812a3a803613323
+>>>>>>> 34d34dd987216b37bfdf5b9f01963501a217140c
             let id = parseInt($(`#frm`).find(`input[name="Id"]`).val());
             let parameter = {
                 Id: id,
@@ -662,16 +686,22 @@
                 VatName: vat_name,
                 SgroupName: window.User['SgroupName'],
 <<<<<<< HEAD
+=======
+<<<<<<< HEAD
+>>>>>>> 34d34dd987216b37bfdf5b9f01963501a217140c
                 // FirstThumb : first_thumb,
                 TotalQty : String(Number(total_qty) - 0)
             }
 
             if (typeof first_thumb !== 'undefined') {
                 parameter.FirstThumb = first_thumb;
+<<<<<<< HEAD
+=======
 =======
                 //TotalQty : String(Number(total_qty) - 0),
                 FirstThumb : first_thumb
 >>>>>>> 79e2e07b19fcabaccbe8bd7b4812a3a803613323
+>>>>>>> 34d34dd987216b37bfdf5b9f01963501a217140c
             }
             if (id < 0) {
                 parameter = { Id: id }
@@ -681,11 +711,14 @@
                 delete parameter.UpdatedOn;
             }
 <<<<<<< HEAD
+=======
+<<<<<<< HEAD
 =======
 
             console.log('save : ', parameter);
 
 >>>>>>> 79e2e07b19fcabaccbe8bd7b4812a3a803613323
+>>>>>>> 34d34dd987216b37bfdf5b9f01963501a217140c
             return parameter;
         }
 
@@ -762,6 +795,8 @@
             $('#our-contact-select').html(our_contact);
         }
 
+<<<<<<< HEAD
+=======
 <<<<<<< HEAD
 =======
         // function set_vat_type_rate($this, msg = true) {
@@ -773,6 +808,7 @@
         // }
 
 >>>>>>> 79e2e07b19fcabaccbe8bd7b4812a3a803613323
+>>>>>>> 34d34dd987216b37bfdf5b9f01963501a217140c
         function set_vat_type_rate($this, msg = true) {
             let vate_rate = $($this).find('option:selected').data('viewvatrate');
             $('#vat-type-rate-text').val(vate_rate + '%')
@@ -805,6 +841,9 @@
                 SalesVat: String(bd.SalesVat),
                 SalesSum: String(bd.SalesSum),
 <<<<<<< HEAD
+=======
+<<<<<<< HEAD
+>>>>>>> 34d34dd987216b37bfdf5b9f01963501a217140c
                 // ConfirmDate: isEmpty(bd.ConfirmDate) ? '' : moment(bd.ConfirmDate).format('YYYYMMDD'),
                 // DeliDate: isEmpty(bd.DeliDate) ? '' : moment(bd.DeliDate).format('YYYYMMDD'),
                 // DiscountRate: String(discount_rate),
@@ -814,11 +853,14 @@
                 Ref2: bd.Ref2,
                 SorderMemo: bd.SorderMemo,
                 Ip: window.User['Ip']
+<<<<<<< HEAD
+=======
 =======
                 CostPrc: String(bd.CostPrc),
                 Ip: window.User['Ip'],
                 FirstThumb: bd.TurboThumb
 >>>>>>> 79e2e07b19fcabaccbe8bd7b4812a3a803613323
+>>>>>>> 34d34dd987216b37bfdf5b9f01963501a217140c
             }
 
             if (id < 0) {
@@ -852,6 +894,9 @@
                 let tr = $(`input[name='bd-cursor-state']:checked`).closest('tr')
                 let index = $(tr).prevAll().length
 <<<<<<< HEAD
+=======
+<<<<<<< HEAD
+>>>>>>> 34d34dd987216b37bfdf5b9f01963501a217140c
                 // if (bd_page[index].SorderBdId == 0) {
                 //     console.log('bd_page[index] : ', bd_page[index]);
                 //     iziToast.error({
@@ -860,6 +905,8 @@
                 //     });
                 //     return;
                 // };
+<<<<<<< HEAD
+=======
 
                 // 필수텍스트가 안비어있으고 focus out == 다음 tr 추가
                 if (bd_page[index].ItemId != 0 && ! dom_required_check($(tr).find(`input`))) {
@@ -871,17 +918,10 @@
                         bd_page[index].Id = page[0].Id;
 
 =======
+>>>>>>> 34d34dd987216b37bfdf5b9f01963501a217140c
 
-                if (bd_page[index].SorderBdId == 0) {
-                    iziToast.error({
-                        title: 'Error',
-                        message: @json(_e('Action failed')),
-                    });
-                    return;
-                };
-
-                // 필수텍스트가 안비어있으고 fouces out == 다음 tr 추가
-                if (! dom_required_check($(tr).find(`input`))) {
+                // 필수텍스트가 안비어있으고 focus out == 다음 tr 추가
+                if (bd_page[index].ItemId != 0 && ! dom_required_check($(tr).find(`input`))) {
                     if ($($this).data('last')) {
                         let seq_no = await Btype.get_last_seq_no('sales', $('#auto-slip-no-txt').val())
                         bd_page[index].SeqNo = seq_no;
@@ -967,7 +1007,6 @@
         }
 
         function create_bd_page() {
-            console.log('create_bd_page()');
             let html = []
             let qty_total = 0, supply_total = 0, vat_amt_vat_total = 0, sum_total = 0;
             bd_page.forEach(bd => {
@@ -1017,11 +1056,15 @@
                     <td onkeydown="Btype.handleEnterPressedinTabCell(event)"
                         class="text-${formB.ListVars['Align'].SorderPrc}" ${formB.ListVars['Hidden'].SorderPrc}
                         >
+<<<<<<< HEAD
+                        <input type="text" class="text-${formB.ListVars['Align'].SorderPrc} border-0 bg-white" value="${format_conver_for(bd.CostPrc, formB.ListVars['Format'].SorderPrc)}" readonly
+=======
 <<<<<<< HEAD
                         <input type="text" class="text-${formB.ListVars['Align'].SorderPrc} border-0 bg-white" value="${format_conver_for(bd.CostPrc, formB.ListVars['Format'].SorderPrc)}" readonly
 =======
                         <input type="text" class="text-${formB.ListVars['Align'].SorderPrc} border-0 bg-white" value="${format_conver_for(bd.SorderPrc, formB.ListVars['Format'].SorderPrc)}" readonly
 >>>>>>> 79e2e07b19fcabaccbe8bd7b4812a3a803613323
+>>>>>>> 34d34dd987216b37bfdf5b9f01963501a217140c
                         onchange="Btype.check_the_checkbox_when_changing(this)"
                         onfocusout="override_amt_calc_txt_is_changed()"
                         require>
@@ -1045,11 +1088,15 @@
                     <td onkeydown="Btype.handleEnterPressedinTabCell(event)"
                         class="text-${formB.ListVars['Align'].SumAmt}" ${formB.ListVars['Hidden'].SumAmt}
                         >
+<<<<<<< HEAD
+                        <input type="text" class="text-${formB.ListVars['Align'].SumAmt} border-0 bg-white" value="${format_conver_for(bd.SalesSum, formB.ListVars['Format'].SumAmt)}" readonly
+=======
 <<<<<<< HEAD
                         <input type="text" class="text-${formB.ListVars['Align'].SumAmt} border-0 bg-white" value="${format_conver_for(bd.SalesSum, formB.ListVars['Format'].SumAmt)}" readonly
 =======
                         <input type="text" class="text-${formB.ListVars['Align'].SumAmt} border-0 bg-white" value="${format_conver_for(bd.SorderSum, formB.ListVars['Format'].SumAmt)}" readonly
 >>>>>>> 79e2e07b19fcabaccbe8bd7b4812a3a803613323
+>>>>>>> 34d34dd987216b37bfdf5b9f01963501a217140c
                         onchange="Btype.check_the_checkbox_when_changing(this)"
                         onfocusout="override_custom_sum_amt()"
                         required>
@@ -1058,6 +1105,8 @@
                         class="text-${formB.ListVars['Align'].StdSalesPrc}" ${formB.ListVars['Hidden'].StdSalesPrc}>${format_conver_for(bd.StdSalesPrc, formB.ListVars['Format'].StdSalesPrc)}
                     </td>
 <<<<<<< HEAD
+=======
+<<<<<<< HEAD
 =======
 
                     <td onkeydown="Btype.handleEnterPressedinTabCell(event)"
@@ -1069,6 +1118,7 @@
                         required>
                     </td>
 >>>>>>> 79e2e07b19fcabaccbe8bd7b4812a3a803613323
+>>>>>>> 34d34dd987216b37bfdf5b9f01963501a217140c
                     <td onkeydown="Btype.handleEnterPressedinTabCell(event)"
                         class="text-${formB.ListVars['Align'].Ref1}" ${formB.ListVars['Hidden'].Ref1}
                         >
@@ -1085,11 +1135,15 @@
                         onfocusout="save_data_when_entering_text()">
                     </td>
                     <td
+<<<<<<< HEAD
+                        class="text-${formB.ListVars['Align'].SalesMemo}" ${formB.ListVars['Hidden'].SorderMemo}>
+=======
 <<<<<<< HEAD
                         class="text-${formB.ListVars['Align'].SorderMemo}" ${formB.ListVars['Hidden'].SorderMemo}>
 =======
                         class="text-${formB.ListVars['Align'].SorderMemo}" ${formB.ListVars['Hidden'].SordderMemo}>
 >>>>>>> 79e2e07b19fcabaccbe8bd7b4812a3a803613323
+>>>>>>> 34d34dd987216b37bfdf5b9f01963501a217140c
                         <textarea style="max-height: 30px;" class="rounded w-100 bg-white memo-textarea" id="memo-textarea-${bd.Id}"
                             ondblclick="Btype.dblclick_memo_textarea(this, ${bd.Id})" role="button" readonly>${bd.SorderMemo}</textarea>
                     </td>
@@ -1185,6 +1239,9 @@
                     class="text-${formB.ListVars['Align'].StdSalesPrc}" ${formB.ListVars['Hidden'].StdSalesPrc}>
                 </td>
 <<<<<<< HEAD
+
+=======
+<<<<<<< HEAD
 =======
                 <td onkeydown="Btype.handleEnterPressedinTabCell(event)"
                     class="text-${formB.ListVars['Align'].DeliDate}" ${formB.ListVars['Hidden'].DeliDate}
@@ -1196,6 +1253,7 @@
                     required>
                 </td>
 >>>>>>> 79e2e07b19fcabaccbe8bd7b4812a3a803613323
+>>>>>>> 34d34dd987216b37bfdf5b9f01963501a217140c
                 <td onkeydown="Btype.handleEnterPressedinTabCell(event)"
                     class="text-${formB.ListVars['Align'].Ref1}" ${formB.ListVars['Hidden'].Ref1}
                     >
@@ -1251,6 +1309,8 @@
         }
 
         function set_item_data_to_textbox(item) {
+<<<<<<< HEAD
+=======
 <<<<<<< HEAD
             let tr = $(`input[name='bd-cursor-state']:checked`).closest('tr')
             $(tr).children('td:eq(2)').find('input').val(item.ItemCode)
@@ -1286,37 +1346,52 @@
             //     bd_page[index].SalesMemo = item.ItemMemo
 =======
             console.log('item : ', item);
+>>>>>>> 34d34dd987216b37bfdf5b9f01963501a217140c
             let tr = $(`input[name='bd-cursor-state']:checked`).closest('tr')
-            // $(tr).children('td:eq(2)').find('input').val(item.ItemCode)
-            // $(tr).children('td:eq(3)').find('input').val(item.ItemName)
-            // $(tr).children('td:eq(4)').text(item.SubName)
-            // $(tr).children('td:eq(5)').text(item.CountUnit)
-            // $(tr).children('td:eq(6)').find('input').val()
-            // $(tr).children('td:eq(7)').find('input').val(parseFloat(item.PurchPrc).toFixed(window.User['PurchPrcPoint']))
-            // $(tr).children('td:eq(11)').text(parseFloat(item.PurchPrc).toFixed(window.User['PurchPrcPoint']))
-            // let index = $(tr).prevAll().length;
-            // bd_page[index].ItemId = item.Id
-            // bd_page[index].ItemCode = item.ItemCode
-            // bd_page[index].ItemName = item.ItemName
-            // bd_page[index].SubName = item.SubName
-            // bd_page[index].CountUnit = item.CountUnit
-            // bd_page[index].StdSalesPrc = item.PurchPrc
-            // bd_page[index].StdPurchPrc = item.PurchPrc// override_amt_calc_txt_is_changed();
-            // bd_page[index].TurboThumb = item.TurboThumb
+            $(tr).children('td:eq(2)').find('input').val(item.ItemCode)
+            $(tr).children('td:eq(3)').find('input').val(item.ItemName)
+            $(tr).children('td:eq(4)').text(item.SubName)
+            $(tr).children('td:eq(5)').text(item.CountUnit)
+            $(tr).children('td:eq(6)').find('input').val()
+            $(tr).children('td:eq(7)').find('input').val(parseFloat(item.PurchPrc).toFixed(window.User['PurchPrcPoint']))
+            $(tr).children('td:eq(11)').text(parseFloat(item.SalesPrc).toFixed(window.User['PurchPrcPoint']))
+            let index = $(tr).prevAll().length;
+            bd_page[index].ItemId = item.Id
+            bd_page[index].ItemCode = item.ItemCode
+            bd_page[index].ItemName = item.ItemName
+            bd_page[index].SubName = item.SubName
+            bd_page[index].CountUnit = item.CountUnit
+            bd_page[index].SorderPrc = item.SalesPrc
+            bd_page[index].CurrPurchPrc = item.SalesPrc
+            bd_page[index].CurrSalesPrc = item.PurchPrc// override_amt_calc_txt_is_changed();
+
+<<<<<<< HEAD
+            if (!ThumbArr) { // item 받아왔을 때만 bd_page에 TurboThumb 저장
+                bd_page[index].TurboThumb = item.TurboThumb
+            }
 
+            if (bd_page[index].Id === 0) {
+                $(tr).children('td:eq(16)').find('textarea').val(item.ItemMemo)
+                bd_page[index].SorderMemo = item.ItemMemo
+            }
+
+            if (bd_page[index].Id === 0) {
+                $(tr).children('td:eq(16)').find('textarea').val(item.ItemMemo)
+                bd_page[index].SalesMemo = item.ItemMemo
+            }
+=======
             // if (bd_page[index].Id === 0) {
             //     $(tr).children('td:eq(16)').find('textarea').val(item.ItemMemo)
             //     bd_page[index].PorderMemo = item.ItemMemo
 >>>>>>> 79e2e07b19fcabaccbe8bd7b4812a3a803613323
             // }
+>>>>>>> 34d34dd987216b37bfdf5b9f01963501a217140c
 
             return $(tr).children('td:eq(6)').find('input')
         }
 
         function update_hd_ui(response) {
-            console.log('update_hd_ui');
             if (isEmpty(response.data) || response.data.apiStatus) {
-                console.log('isEmpty(response.data) || response.data.apiStatus');
                 $('#modal-slip').modal('hide');
                 return;
             }
@@ -1326,15 +1401,21 @@
             let hd_page = response.data.HdPage[0]
             bd_page = response.data.BdPage ?? []
 <<<<<<< HEAD
+=======
+<<<<<<< HEAD
+>>>>>>> 34d34dd987216b37bfdf5b9f01963501a217140c
             let thumb = response.data.HdPage[0]['FirstThumb']
 
             if(!thumb){
                 ThumbArr = thumb;
             }
 
+<<<<<<< HEAD
+=======
 =======
             console.log('response : ', response);
 >>>>>>> 79e2e07b19fcabaccbe8bd7b4812a3a803613323
+>>>>>>> 34d34dd987216b37bfdf5b9f01963501a217140c
             $('#Id').val(hd_page.Id)
             $('#auto-slip-no-txt').val(hd_page.SalesNo)
             $('#sales-date').val(moment(to_date(hd_page.SalesDate)).format('YYYY-MM-DD'))

+ 18 - 1
resources/views/front/dabory/erp/revenue/sorder.blade.php

@@ -330,7 +330,11 @@
 <<<<<<< HEAD
             ThumbArr = [];
 =======
+<<<<<<< HEAD
+            ThumbArr = [];
+=======
 >>>>>>> 79e2e07b19fcabaccbe8bd7b4812a3a803613323
+>>>>>>> 34d34dd987216b37bfdf5b9f01963501a217140c
             //await Btype.fetch_slip_form_book(query['QueryVars']['FilterValue']);
             make_dynamic_table_css('.sorder-table', make_dynamic_table_px(formB['ListVars']['Size']))
 
@@ -339,7 +343,6 @@
             Btype.get_storage_name_and_branch_name()
             // let data = await Btype.get_slip_form_init()
             slipInit = @json($slipFormInitCacheData);
-            // console.log('slipInit : ', slipInit);
             formB['SlipCommonSetup'] = slipInit['SlipCommonSetup']
             await Btype.create_deal_type_select_box_options(slipInit.DealTypePage)
             await Btype.create_vat_type_select_box_options(slipInit.VatRatePage)
@@ -516,11 +519,15 @@
         }
 
         async function add_td_last_tap_out($this, id) {
+<<<<<<< HEAD
+            Btype.btn_act_save('#sorder-form #frm', async function () {
+=======
 <<<<<<< HEAD
             Btype.btn_act_save('#sorder-form #frm', async function () {
 =======
             Btype.btn_act_save('#squote-form #frm', async function () {
 >>>>>>> 79e2e07b19fcabaccbe8bd7b4812a3a803613323
+>>>>>>> 34d34dd987216b37bfdf5b9f01963501a217140c
                 let tr = $(`input[name='bd-cursor-state']:checked`).closest('tr')
                 let index = $(tr).prevAll().length
 
@@ -529,9 +536,12 @@
                     if ($($this).data('last')) {
                         let seq_no = await Btype.get_last_seq_no('sorder', $('#auto-slip-no-txt').val())
 <<<<<<< HEAD
+=======
+<<<<<<< HEAD
 =======
                         console.log('seq_no : ', seq_no);
 >>>>>>> 79e2e07b19fcabaccbe8bd7b4812a3a803613323
+>>>>>>> 34d34dd987216b37bfdf5b9f01963501a217140c
                         bd_page[index].SeqNo = seq_no;
                     }
 
@@ -540,9 +550,12 @@
                         body_act_success_callback($this, tr);
                         Btype.check_the_checkbox_when_changing($this, false)
 <<<<<<< HEAD
+=======
+<<<<<<< HEAD
 =======
                         // Btype.btn_act_save('#sorder-form #frm');
 >>>>>>> 79e2e07b19fcabaccbe8bd7b4812a3a803613323
+>>>>>>> 34d34dd987216b37bfdf5b9f01963501a217140c
                     });
                 } else {
                     iziToast.error({
@@ -683,6 +696,7 @@
             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 = ''
+            let first_thumb = ''
 
             if (bd_page.length > 0) {
                 const first_sorder = bd_page[0]
@@ -752,10 +766,13 @@
                 delete parameter.UpdatedOn;
             }
 
+<<<<<<< HEAD
+=======
 <<<<<<< HEAD
 =======
             console.log('save : ', parameter)
 >>>>>>> 79e2e07b19fcabaccbe8bd7b4812a3a803613323
+>>>>>>> 34d34dd987216b37bfdf5b9f01963501a217140c
             return parameter;
         }
 

+ 3 - 7
resources/views/front/dabory/erp/sales/squote.blade.php

@@ -283,6 +283,7 @@
     <script>
         window.onload = async function () {
             make_dynamic_table_css('.squote-table', make_dynamic_table_px(formB['ListVars']['Size']))
+
             $('#squote-date').val(date_to_sting(new Date()))
 
             let sgroup_pick = await get_api_data('sgroup-pick', { Page: [ { Id:  parseInt(window.User['SgroupId']) } ] });
@@ -430,7 +431,7 @@
 
             // $(`#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];
             $('.sales').find('.modal-btn').data('target', 'bodycopy')
             $('.sales').find('.modal-btn').data('variable', data['Parameter'])
@@ -444,7 +445,6 @@
         function btn_act_copy_to_another(parameter_name) {
             let data = formB['HeadSelectOptions'].filter(selectOption => selectOption['ModalClassName'] == parameter_name)[0];
             // $(`#modal-copy-to-another.${parameter_name}`).find('.target-slip-no-txt').data('slip-no', $('#auto-slip-no-txt').val())
-            console.log('parameter : ', data['Parameter']);
             $(`#modal-copy-to-another.${parameter_name}`).find('.source-slip-no-txt').val($('#auto-slip-no-txt').val())
             $('.sales').find('.modal-btn').data('target', 'copy-to-another')
             $('.sales').find('.modal-btn').data('variable', data['Parameter'])
@@ -487,23 +487,19 @@
             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']
-            console.log('vat_name : ', vat_name);
 
             let first_item = ''
             if (bd_page.length > 0) {
-                console.log('bd_page : ', bd_page[0]);
                 const first_squote = bd_page[0]
                 first_item = first_squote['ItemCode'] + '_' + first_squote['ItemName']
                 if (first_squote['SubName']) {
                     first_item += '_' + first_squote['SubName']
                 }
-                squote_vat=first_squote['SquoteVat'];
                 first_item += '(' + bd_page.length + ')'
             }
             const itmtot_amt = bd_page.reduce((accumulator, bd) => {
                 return accumulator + parseFloat(bd.SquoteSupply) + parseFloat(bd.SquoteVat) // 합계금액 (공급가액 + 세액)
             }, 0)
-
             let id = parseInt($(`#frm`).find(`input[name="Id"]`).val());
             let parameter = {
                 Id: id,
@@ -629,7 +625,7 @@
         function set_vat_type_rate($this, msg = true) {
             let vate_rate = $($this).find('option:selected').data('viewvatrate');
             $('#vat-type-rate-text').val(vate_rate + '%')
-            console.log('vate_rate : ', vate_rate);
+
             if (parseInt($(`#frm`).find(`input[name="Id"]`).val()) == 0 || ! msg) return;
             Btype.call_act_api(get_parameter(), function() { });