|
@@ -89,6 +89,21 @@
|
|
|
</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div class="form-group d-flex flex-column mb-2">
|
|
|
+ <label class="m-0">{{ $formB['FormVars']['Title']['SorderNo'] }}</label>
|
|
|
+ <div class="d-flex">
|
|
|
+ <input type="text" class="rounded w-100 radius-r0" id="sorder-no-txt"
|
|
|
+ maxlength="{{ $formB['FormVars']['MaxLength']['SorderNo'] }}"
|
|
|
+ {{ $formB['FormVars']['Required']['SorderNo'] }}>
|
|
|
+ <button type="button"
|
|
|
+ class="btn-dark rounded btn-open-modal border-0 radius-l0 col-3 window company-modal-btn"
|
|
|
+ data-target="sorder"
|
|
|
+ data-clicked="get_override_supplier_id"
|
|
|
+ data-variable="companyModal">
|
|
|
+ <i class="icon-folder-open"></i>
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -256,7 +271,7 @@
|
|
|
@endif
|
|
|
</div>
|
|
|
|
|
|
- <div class="table-responsive mt-2" style="height:400px;" id="scroll-area">
|
|
|
+ <div class="table-responsive mt-2" style="height:200px;" id="scroll-area">
|
|
|
<table class="table-row sales-table">
|
|
|
<thead id="sales-table-head">
|
|
|
@include('front.dabory.erp.partial.make-thead', [
|
|
@@ -361,9 +376,10 @@
|
|
|
window.onload = async function () {
|
|
|
ThumbArr = [];
|
|
|
make_dynamic_table_css('.sales-table', make_dynamic_table_px(formB['ListVars']['Size']))
|
|
|
+
|
|
|
$('#sales-date').val(date_to_sting(new Date()))
|
|
|
$('#stock-date').val(date_to_sting(new Date()))
|
|
|
- Btype.get_storage_name_and_branch_name()
|
|
|
+ var test = Btype.get_storage_name_and_branch_name()
|
|
|
let sgroup_pick = await get_api_data('sgroup-pick', { Page: [ { Id: parseInt(window.User['SgroupId']) } ] });
|
|
|
window.User['SgroupName'] = sgroup_pick['data']['Page'][0]['SgroupName'];
|
|
|
|
|
@@ -475,24 +491,6 @@
|
|
|
$('#up-btn').prop('disabled', false);
|
|
|
}
|
|
|
|
|
|
-<<<<<<< HEAD
|
|
|
-=======
|
|
|
-
|
|
|
- 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].Ref1 = $(tr).children('td:eq(14)').find('input').val()
|
|
|
- bd_page[index].Ref2 = $(tr).children('td:eq(15)').find('input').val()
|
|
|
- }
|
|
|
-
|
|
|
- // start body act btn
|
|
|
- function override_btn_bd_act_multi_update() {
|
|
|
- Btype.btn_bd_act_multi_update('.sales-table')
|
|
|
- }
|
|
|
->>>>>>> 79e2e07b19fcabaccbe8bd7b4812a3a803613323
|
|
|
|
|
|
function save_data_when_entering_text() {
|
|
|
let tr = $(`input[name='bd-cursor-state']:checked`).closest('tr')
|
|
@@ -504,17 +502,18 @@
|
|
|
}
|
|
|
|
|
|
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,19 +537,10 @@
|
|
|
}
|
|
|
|
|
|
function btn_act_new() {
|
|
|
-<<<<<<< HEAD
|
|
|
data_init()
|
|
|
if (formB['SlipCommonSetup']['IsNewRecAutoSlipNo']) {
|
|
|
get_last_slip_no()
|
|
|
}
|
|
|
-=======
|
|
|
- console.log('btn_act_new');
|
|
|
- data_init()
|
|
|
-
|
|
|
- // if (formB['SlipCommonSetup']['IsNewRecAutoSlipNo']) {
|
|
|
- get_last_slip_no()
|
|
|
- // }
|
|
|
->>>>>>> 79e2e07b19fcabaccbe8bd7b4812a3a803613323
|
|
|
}
|
|
|
|
|
|
function btn_act_copy_to_another(parameter_name) {
|
|
@@ -609,7 +599,6 @@
|
|
|
first_thumb = first_sales['TurboThumb']
|
|
|
}
|
|
|
}
|
|
|
-<<<<<<< HEAD
|
|
|
const itmtot_amt = bd_page.reduce((accumulator, bd) => {
|
|
|
return accumulator + parseFloat(bd.SalesSupply) + parseFloat(bd.SalesVat) // 합계금액 (공급가액 + 세액)
|
|
|
}, 0)
|
|
@@ -617,17 +606,6 @@
|
|
|
const total_qty = bd_page.reduce((accumulator, bd) => {
|
|
|
return accumulator + parseFloat(bd.SalesQty)
|
|
|
}, 0)
|
|
|
-=======
|
|
|
- // console.log('first_sales : ', bd_page[0]);
|
|
|
- const itmtot_amt = bd_page.reduce((accumulator, bd) => {
|
|
|
- // return accumulator + parseFloat(bd.SalesSupply) + parseFloat(bd.SalesVat) // 합계금액 (공급가액 + 세액)
|
|
|
- return accumulator + parseFloat(bd.SalesSupply)
|
|
|
- }, 0)
|
|
|
-
|
|
|
- // const total_qty = bd_page.reduce((accumulator, bd) => {
|
|
|
- // return accumulator + parseFloat(bd.PorderQty)
|
|
|
- // }, 0)
|
|
|
->>>>>>> 79e2e07b19fcabaccbe8bd7b4812a3a803613323
|
|
|
let id = parseInt($(`#frm`).find(`input[name="Id"]`).val());
|
|
|
let parameter = {
|
|
|
Id: id,
|
|
@@ -661,17 +639,12 @@
|
|
|
VatRate: vat_rate,
|
|
|
VatName: vat_name,
|
|
|
SgroupName: window.User['SgroupName'],
|
|
|
-<<<<<<< HEAD
|
|
|
// FirstThumb : first_thumb,
|
|
|
TotalQty : String(Number(total_qty) - 0)
|
|
|
}
|
|
|
|
|
|
if (typeof first_thumb !== 'undefined') {
|
|
|
parameter.FirstThumb = first_thumb;
|
|
|
-=======
|
|
|
- //TotalQty : String(Number(total_qty) - 0),
|
|
|
- FirstThumb : first_thumb
|
|
|
->>>>>>> 79e2e07b19fcabaccbe8bd7b4812a3a803613323
|
|
|
}
|
|
|
if (id < 0) {
|
|
|
parameter = { Id: id }
|
|
@@ -680,12 +653,6 @@
|
|
|
} else {
|
|
|
delete parameter.UpdatedOn;
|
|
|
}
|
|
|
-<<<<<<< HEAD
|
|
|
-=======
|
|
|
-
|
|
|
- console.log('save : ', parameter);
|
|
|
-
|
|
|
->>>>>>> 79e2e07b19fcabaccbe8bd7b4812a3a803613323
|
|
|
return parameter;
|
|
|
}
|
|
|
|
|
@@ -762,17 +729,6 @@
|
|
|
$('#our-contact-select').html(our_contact);
|
|
|
}
|
|
|
|
|
|
-<<<<<<< HEAD
|
|
|
-=======
|
|
|
- // function set_vat_type_rate($this, msg = true) {
|
|
|
- // let vate_rate = $($this).find('option:selected').data('viewvatrate');
|
|
|
- // console.log('vate_rate : ', vate_rate);
|
|
|
- // $('#vat-type-rate-text').val(vate_rate + '%')
|
|
|
-
|
|
|
- // if (parseInt($(`#frm`).find(`input[name="Id"]`).val()) == 0 || ! msg) return;
|
|
|
- // }
|
|
|
-
|
|
|
->>>>>>> 79e2e07b19fcabaccbe8bd7b4812a3a803613323
|
|
|
function set_vat_type_rate($this, msg = true) {
|
|
|
let vate_rate = $($this).find('option:selected').data('viewvatrate');
|
|
|
$('#vat-type-rate-text').val(vate_rate + '%')
|
|
@@ -804,7 +760,6 @@
|
|
|
SalesSupply: String(bd.SalesSupply),
|
|
|
SalesVat: String(bd.SalesVat),
|
|
|
SalesSum: String(bd.SalesSum),
|
|
|
-<<<<<<< HEAD
|
|
|
// ConfirmDate: isEmpty(bd.ConfirmDate) ? '' : moment(bd.ConfirmDate).format('YYYYMMDD'),
|
|
|
// DeliDate: isEmpty(bd.DeliDate) ? '' : moment(bd.DeliDate).format('YYYYMMDD'),
|
|
|
// DiscountRate: String(discount_rate),
|
|
@@ -814,11 +769,6 @@
|
|
|
Ref2: bd.Ref2,
|
|
|
SorderMemo: bd.SorderMemo,
|
|
|
Ip: window.User['Ip']
|
|
|
-=======
|
|
|
- CostPrc: String(bd.CostPrc),
|
|
|
- Ip: window.User['Ip'],
|
|
|
- FirstThumb: bd.TurboThumb
|
|
|
->>>>>>> 79e2e07b19fcabaccbe8bd7b4812a3a803613323
|
|
|
}
|
|
|
|
|
|
if (id < 0) {
|
|
@@ -851,7 +801,6 @@
|
|
|
Btype.btn_act_save('#sales-form #frm', async function () {
|
|
|
let tr = $(`input[name='bd-cursor-state']:checked`).closest('tr')
|
|
|
let index = $(tr).prevAll().length
|
|
|
-<<<<<<< HEAD
|
|
|
// if (bd_page[index].SorderBdId == 0) {
|
|
|
// console.log('bd_page[index] : ', bd_page[index]);
|
|
|
// iziToast.error({
|
|
@@ -870,26 +819,6 @@
|
|
|
Btype.call_bd_act_api([ get_bd_parameter(bd_page[index]) ], function (page) {
|
|
|
bd_page[index].Id = page[0].Id;
|
|
|
|
|
|
-=======
|
|
|
-
|
|
|
- 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`))) {
|
|
|
- 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;
|
|
|
- }
|
|
|
- Btype.call_bd_act_api([ get_bd_parameter(bd_page[index]) ], function (page) {
|
|
|
- bd_page[index].Id = page[0].Id;
|
|
|
-
|
|
|
->>>>>>> 79e2e07b19fcabaccbe8bd7b4812a3a803613323
|
|
|
body_act_success_callback($this, tr);
|
|
|
Btype.check_the_checkbox_when_changing($this, false)
|
|
|
});
|
|
@@ -900,6 +829,7 @@
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
+ scrollToTop();
|
|
|
}
|
|
|
|
|
|
function body_act_success_callback($this, tr) {
|
|
@@ -967,7 +897,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 +946,7 @@
|
|
|
<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
|
|
|
-=======
|
|
|
- <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
|
|
|
onchange="Btype.check_the_checkbox_when_changing(this)"
|
|
|
onfocusout="override_amt_calc_txt_is_changed()"
|
|
|
require>
|
|
@@ -1045,11 +970,7 @@
|
|
|
<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
|
|
|
-=======
|
|
|
- <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
|
|
|
onchange="Btype.check_the_checkbox_when_changing(this)"
|
|
|
onfocusout="override_custom_sum_amt()"
|
|
|
required>
|
|
@@ -1057,18 +978,6 @@
|
|
|
<td
|
|
|
class="text-${formB.ListVars['Align'].StdSalesPrc}" ${formB.ListVars['Hidden'].StdSalesPrc}>${format_conver_for(bd.StdSalesPrc, formB.ListVars['Format'].StdSalesPrc)}
|
|
|
</td>
|
|
|
-<<<<<<< HEAD
|
|
|
-=======
|
|
|
-
|
|
|
- <td onkeydown="Btype.handleEnterPressedinTabCell(event)"
|
|
|
- class="text-${formB.ListVars['Align'].DeliDate}" ${formB.ListVars['Hidden'].DeliDate}
|
|
|
- >
|
|
|
- <input type="date" class="text-${formB.ListVars['Align'].DeliDate} border-0 bg-white" value="${isEmpty(bd.DeliDate) ? '' : moment(bd.DeliDate).format('YYYY-MM-DD')}" readonly
|
|
|
- onchange="Btype.check_the_checkbox_when_changing(this)"
|
|
|
- onfocusout="save_data_when_entering_text()"
|
|
|
- required>
|
|
|
- </td>
|
|
|
->>>>>>> 79e2e07b19fcabaccbe8bd7b4812a3a803613323
|
|
|
<td onkeydown="Btype.handleEnterPressedinTabCell(event)"
|
|
|
class="text-${formB.ListVars['Align'].Ref1}" ${formB.ListVars['Hidden'].Ref1}
|
|
|
>
|
|
@@ -1085,11 +994,7 @@
|
|
|
onfocusout="save_data_when_entering_text()">
|
|
|
</td>
|
|
|
<td
|
|
|
-<<<<<<< HEAD
|
|
|
- class="text-${formB.ListVars['Align'].SorderMemo}" ${formB.ListVars['Hidden'].SorderMemo}>
|
|
|
-=======
|
|
|
- class="text-${formB.ListVars['Align'].SorderMemo}" ${formB.ListVars['Hidden'].SordderMemo}>
|
|
|
->>>>>>> 79e2e07b19fcabaccbe8bd7b4812a3a803613323
|
|
|
+ class="text-${formB.ListVars['Align'].SalesMemo}" ${formB.ListVars['Hidden'].SorderMemo}>
|
|
|
<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>
|
|
@@ -1184,18 +1089,7 @@
|
|
|
<td
|
|
|
class="text-${formB.ListVars['Align'].StdSalesPrc}" ${formB.ListVars['Hidden'].StdSalesPrc}>
|
|
|
</td>
|
|
|
-<<<<<<< HEAD
|
|
|
-=======
|
|
|
- <td onkeydown="Btype.handleEnterPressedinTabCell(event)"
|
|
|
- class="text-${formB.ListVars['Align'].DeliDate}" ${formB.ListVars['Hidden'].DeliDate}
|
|
|
- >
|
|
|
- <input type="date" class="text-${formB.ListVars['Align'].DeliDate} border-0 bg-white" readonly
|
|
|
- value="${moment().format('YYYY-MM-DD')}"
|
|
|
- onchange="Btype.check_the_checkbox_when_changing(this)"
|
|
|
- onfocusout="save_data_when_entering_text()"
|
|
|
- required>
|
|
|
- </td>
|
|
|
->>>>>>> 79e2e07b19fcabaccbe8bd7b4812a3a803613323
|
|
|
+
|
|
|
<td onkeydown="Btype.handleEnterPressedinTabCell(event)"
|
|
|
class="text-${formB.ListVars['Align'].Ref1}" ${formB.ListVars['Hidden'].Ref1}
|
|
|
>
|
|
@@ -1251,17 +1145,14 @@
|
|
|
}
|
|
|
|
|
|
function set_item_data_to_textbox(item) {
|
|
|
-<<<<<<< HEAD
|
|
|
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.SalesPrc).toFixed(window.User['PurchPrcPoint']))
|
|
|
- $(tr).children('td:eq(7)').find('input').val(parseFloat(item.PurchPrc).toFixed(window.User['SalesPrcPoint'])) //표준매출가
|
|
|
- $(tr).children('td:eq(10)').text(parseFloat(item.SalesPrc).toFixed(window.User['SalesPrcPoint']))
|
|
|
+ $(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
|
|
@@ -1269,8 +1160,8 @@
|
|
|
bd_page[index].SubName = item.SubName
|
|
|
bd_page[index].CountUnit = item.CountUnit
|
|
|
bd_page[index].SorderPrc = item.SalesPrc
|
|
|
- bd_page[index].CurrPurchPrc = item.PurchPrc
|
|
|
- bd_page[index].CurrSalesPrc = item.SalesPrc // override_amt_calc_txt_is_changed();
|
|
|
+ bd_page[index].CurrPurchPrc = item.SalesPrc
|
|
|
+ bd_page[index].CurrSalesPrc = item.PurchPrc// override_amt_calc_txt_is_changed();
|
|
|
|
|
|
if (!ThumbArr) { // item 받아왔을 때만 bd_page에 TurboThumb 저장
|
|
|
bd_page[index].TurboThumb = item.TurboThumb
|
|
@@ -1281,42 +1172,16 @@
|
|
|
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
|
|
|
-=======
|
|
|
- console.log('item : ', item);
|
|
|
- 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
|
|
|
-
|
|
|
- // if (bd_page[index].Id === 0) {
|
|
|
- // $(tr).children('td:eq(16)').find('textarea').val(item.ItemMemo)
|
|
|
- // bd_page[index].PorderMemo = item.ItemMemo
|
|
|
->>>>>>> 79e2e07b19fcabaccbe8bd7b4812a3a803613323
|
|
|
- // }
|
|
|
+ if (bd_page[index].Id === 0) {
|
|
|
+ $(tr).children('td:eq(16)').find('textarea').val(item.ItemMemo)
|
|
|
+ bd_page[index].SalesMemo = item.ItemMemo
|
|
|
+ }
|
|
|
|
|
|
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;
|
|
|
}
|
|
@@ -1325,16 +1190,12 @@
|
|
|
|
|
|
let hd_page = response.data.HdPage[0]
|
|
|
bd_page = response.data.BdPage ?? []
|
|
|
-<<<<<<< HEAD
|
|
|
let thumb = response.data.HdPage[0]['FirstThumb']
|
|
|
|
|
|
if(!thumb){
|
|
|
ThumbArr = thumb;
|
|
|
}
|
|
|
|
|
|
-=======
|
|
|
- console.log('response : ', response);
|
|
|
->>>>>>> 79e2e07b19fcabaccbe8bd7b4812a3a803613323
|
|
|
$('#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'))
|
|
@@ -1383,6 +1244,11 @@
|
|
|
$('#modal-slip').modal('hide');
|
|
|
}
|
|
|
|
|
|
+ function scrollToTop() {
|
|
|
+ var scrollArea = document.getElementById("scroll-area");
|
|
|
+ scrollArea.scrollTop = 0;
|
|
|
+ }
|
|
|
+
|
|
|
const salesModal = {!! json_encode($salesModal) !!};
|
|
|
const companyModal = {!! json_encode($companyModal) !!};
|
|
|
const itemModal = {!! json_encode($itemModal) !!};
|