|
@@ -73,7 +73,7 @@
|
|
<div class="d-flex">
|
|
<div class="d-flex">
|
|
<input type="hidden" id="seller-id-txt" value="1">
|
|
<input type="hidden" id="seller-id-txt" value="1">
|
|
<input type="text" id="buyer-txt" data-id="0" class="rounded w-100 radius-r0" autocomplete="off"
|
|
<input type="text" id="buyer-txt" data-id="0" class="rounded w-100 radius-r0" autocomplete="off"
|
|
- onkeydown="company_model_show_cell_enter_key(event)"
|
|
|
|
|
|
+ onkeydown="company_model_show_cell_enter_key(event, '')"
|
|
maxlength="{{ $formB['FormVars']['MaxLength']['Buyer'] }}"
|
|
maxlength="{{ $formB['FormVars']['MaxLength']['Buyer'] }}"
|
|
{{ $formB['FormVars']['Required']['Buyer'] }}>
|
|
{{ $formB['FormVars']['Required']['Buyer'] }}>
|
|
<button type="button"
|
|
<button type="button"
|
|
@@ -748,14 +748,18 @@
|
|
$('#auto-slip-no-txt').val(moment(new Date()).format('YYMMDD') + '-' + response.data.LastSlipNo)
|
|
$('#auto-slip-no-txt').val(moment(new Date()).format('YYMMDD') + '-' + response.data.LastSlipNo)
|
|
}
|
|
}
|
|
|
|
|
|
- async function get_override_supplier_id(supplier_id, dom_val = '#supplier-txt') {
|
|
|
|
|
|
+
|
|
|
|
+ async function get_override_supplier_id(company_id) {
|
|
|
|
+ await get_local_supplier_id(company_id, '#buyer-txt');
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ async function get_local_supplier_id(supplier_id, dom_val = '#supplier-txt') {
|
|
let response = await get_api_data('company-pick', {
|
|
let response = await get_api_data('company-pick', {
|
|
Page : [
|
|
Page : [
|
|
{Id: Number(supplier_id) }
|
|
{Id: Number(supplier_id) }
|
|
]
|
|
]
|
|
})
|
|
})
|
|
|
|
|
|
- // console.log(response)
|
|
|
|
if (response.data.Page) {
|
|
if (response.data.Page) {
|
|
const company = response.data.Page[0];
|
|
const company = response.data.Page[0];
|
|
$(dom_val).data('id', company.Id);
|
|
$(dom_val).data('id', company.Id);
|