Compare commits
2 Commits
ycplm_node
...
V20260210
| Author | SHA1 | Date | |
|---|---|---|---|
| ed261664ef | |||
| c4eeec1450 |
@@ -265,7 +265,7 @@
|
||||
html += '<td><input type="text" class="item-quantity" value="' + (item.ORDER_QUANTITY || item.QUANTITY || '') + '" numberOnly required /></td>';
|
||||
}
|
||||
// ORDER_UNIT_PRICE 수정 가능
|
||||
html += '<td><input type="text" class="item-unit-price" value="' + (item.ORDER_UNIT_PRICE || '') + '" numberOnly required /></td>';
|
||||
html += '<td><input type="text" class="item-unit-price" value="' + (item.ORDER_UNIT_PRICE || '') + '" numberOnly /></td>';
|
||||
// ORDER_SUPPLY_PRICE 자동 계산
|
||||
html += '<td><input type="text" class="item-supply-price" value="' + (item.ORDER_SUPPLY_PRICE || '') + '" numberOnly readonly style="background:#f5f5f5;" /></td>';
|
||||
// ORDER_VAT 수정 가능
|
||||
|
||||
@@ -133,37 +133,37 @@ var columns = [
|
||||
else if(cn.includes('유로') || cn === 'EUR') s = '€';
|
||||
else if(cn.includes('엔') || cn === 'JPY') s = '¥';
|
||||
else if(cn.includes('위안') || cn === 'CNY') s = '¥';
|
||||
return s + Number(value).toLocaleString();
|
||||
}
|
||||
},
|
||||
{headerHozAlign : 'center', hozAlign : 'right', minWidth : 90, widthGrow : 1, title : '입고금액', field : 'TOTAL_DELIVERY_PRICE',
|
||||
formatter: function(cell) {
|
||||
var value = cell.getValue();
|
||||
if(!value || value === '' || value === '0') return '';
|
||||
var cn = cell.getRow().getData().CURRENCY_NAME || '';
|
||||
var s = '';
|
||||
if(cn.includes('원') || cn === 'KRW') s = '₩';
|
||||
else if(cn.includes('달러') || cn === 'USD') s = '$';
|
||||
else if(cn.includes('유로') || cn === 'EUR') s = '€';
|
||||
else if(cn.includes('엔') || cn === 'JPY') s = '¥';
|
||||
else if(cn.includes('위안') || cn === 'CNY') s = '¥';
|
||||
return s + Number(value).toLocaleString();
|
||||
}
|
||||
},
|
||||
{headerHozAlign : 'center', hozAlign : 'right', minWidth : 90, widthGrow : 1, title : '미입고금액', field : 'TOTAL_NOT_DELIVERY_PRICE',
|
||||
formatter: function(cell) {
|
||||
var value = cell.getValue();
|
||||
if(!value || value === '' || value === '0') return '';
|
||||
var cn = cell.getRow().getData().CURRENCY_NAME || '';
|
||||
var s = '';
|
||||
if(cn.includes('원') || cn === 'KRW') s = '₩';
|
||||
else if(cn.includes('달러') || cn === 'USD') s = '$';
|
||||
else if(cn.includes('유로') || cn === 'EUR') s = '€';
|
||||
else if(cn.includes('엔') || cn === 'JPY') s = '¥';
|
||||
else if(cn.includes('위안') || cn === 'CNY') s = '¥';
|
||||
return s + Number(value).toLocaleString();
|
||||
}
|
||||
},
|
||||
return s + Number(value).toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2});
|
||||
}
|
||||
},
|
||||
{headerHozAlign : 'center', hozAlign : 'right', minWidth : 90, widthGrow : 1, title : '입고금액', field : 'TOTAL_DELIVERY_PRICE',
|
||||
formatter: function(cell) {
|
||||
var value = cell.getValue();
|
||||
if(!value || value === '' || value === '0') return '';
|
||||
var cn = cell.getRow().getData().CURRENCY_NAME || '';
|
||||
var s = '';
|
||||
if(cn.includes('원') || cn === 'KRW') s = '₩';
|
||||
else if(cn.includes('달러') || cn === 'USD') s = '$';
|
||||
else if(cn.includes('유로') || cn === 'EUR') s = '€';
|
||||
else if(cn.includes('엔') || cn === 'JPY') s = '¥';
|
||||
else if(cn.includes('위안') || cn === 'CNY') s = '¥';
|
||||
return s + Number(value).toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2});
|
||||
}
|
||||
},
|
||||
{headerHozAlign : 'center', hozAlign : 'right', minWidth : 90, widthGrow : 1, title : '미입고금액', field : 'TOTAL_NOT_DELIVERY_PRICE',
|
||||
formatter: function(cell) {
|
||||
var value = cell.getValue();
|
||||
if(!value || value === '' || value === '0') return '';
|
||||
var cn = cell.getRow().getData().CURRENCY_NAME || '';
|
||||
var s = '';
|
||||
if(cn.includes('원') || cn === 'KRW') s = '₩';
|
||||
else if(cn.includes('달러') || cn === 'USD') s = '$';
|
||||
else if(cn.includes('유로') || cn === 'EUR') s = '€';
|
||||
else if(cn.includes('엔') || cn === 'JPY') s = '¥';
|
||||
else if(cn.includes('위안') || cn === 'CNY') s = '¥';
|
||||
return s + Number(value).toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2});
|
||||
}
|
||||
},
|
||||
{headerHozAlign : 'center', hozAlign : 'center', minWidth : 100, widthGrow : 1, title : '업체성적서', field : 'INSPECTION_FILE_CNT',
|
||||
formatter:fnc_subInfoValueFormatter,
|
||||
cellClick:function(e, cell){
|
||||
@@ -269,9 +269,9 @@ function fn_calculateTotalAmount(){
|
||||
}
|
||||
|
||||
// 합계 표시
|
||||
$("#totalOrderAmount").text(Number(Math.round(totalOrderAmount)).toLocaleString());
|
||||
$("#deliveredAmount").text(Number(Math.round(totalDeliveredAmount)).toLocaleString());
|
||||
$("#notDeliveredAmount").text(Number(Math.round(totalNotDeliveredAmount)).toLocaleString());
|
||||
$("#totalOrderAmount").text(Number(totalOrderAmount).toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}));
|
||||
$("#deliveredAmount").text(Number(totalDeliveredAmount).toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}));
|
||||
$("#notDeliveredAmount").text(Number(totalNotDeliveredAmount).toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}));
|
||||
}
|
||||
|
||||
//수입검사등록
|
||||
|
||||
@@ -172,27 +172,39 @@ $(document).ready(function(){
|
||||
changeMonth: true,
|
||||
changeYear: true
|
||||
});
|
||||
// 기존 데이터 세팅
|
||||
if(taxType) $('#swal_taxType').val(taxType);
|
||||
if(taxInvoiceDate) $('#swal_taxInvoiceDate').val(taxInvoiceDate);
|
||||
if(exportDeclNo) $('#swal_exportDeclNo').val(exportDeclNo);
|
||||
if(loadingDate) $('#swal_loadingDate').val(loadingDate);
|
||||
if(foreignType) $('#swal_foreignType').val(foreignType);
|
||||
if(duty) $('#swal_duty').val(duty);
|
||||
if(importVat) $('#swal_importVat').val(importVat);
|
||||
if(exchangeRate) $('#swal_exchangeRate').val(exchangeRate);
|
||||
// 기존 데이터 세팅
|
||||
if(taxType) $('#swal_taxType').val(taxType);
|
||||
if(taxInvoiceDate) $('#swal_taxInvoiceDate').val(taxInvoiceDate);
|
||||
if(exportDeclNo) $('#swal_exportDeclNo').val(exportDeclNo);
|
||||
if(loadingDate) $('#swal_loadingDate').val(loadingDate);
|
||||
if(foreignType) $('#swal_foreignType').val(foreignType);
|
||||
if(duty) $('#swal_duty').val(formatMoney(duty));
|
||||
if(importVat) $('#swal_importVat').val(formatMoney(importVat));
|
||||
if(exchangeRate) $('#swal_exchangeRate').val(formatMoney(exchangeRate));
|
||||
|
||||
// 금액 입력 필드 포맷 (keyup: 천단위 콤마, blur: 소수점 2자리)
|
||||
$('#swal_exchangeRate, #swal_duty, #swal_importVat').on('keyup', function(){
|
||||
var val = this.value.replace(/[^0-9.]/g, '');
|
||||
var parts = val.split('.');
|
||||
if(parts.length > 2) val = parts[0] + '.' + parts.slice(1).join('');
|
||||
if(parts[0]) parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
||||
this.value = parts.join('.');
|
||||
}).on('blur', function(){
|
||||
var v = this.value.replace(/,/g, '');
|
||||
if(v && !isNaN(v)) this.value = formatMoney(v);
|
||||
});
|
||||
},
|
||||
preConfirm: function() {
|
||||
return {
|
||||
taxType: $('#swal_taxType').val(),
|
||||
taxInvoiceDate: $('#swal_taxInvoiceDate').val(),
|
||||
exportDeclNo: $('#swal_exportDeclNo').val(),
|
||||
loadingDate: $('#swal_loadingDate').val(),
|
||||
foreignType: $('#swal_foreignType').val(),
|
||||
duty: $('#swal_duty').val(),
|
||||
importVat: $('#swal_importVat').val(),
|
||||
exchangeRate: $('#swal_exchangeRate').val()
|
||||
};
|
||||
return {
|
||||
taxType: $('#swal_taxType').val(),
|
||||
taxInvoiceDate: $('#swal_taxInvoiceDate').val(),
|
||||
exportDeclNo: $('#swal_exportDeclNo').val(),
|
||||
loadingDate: $('#swal_loadingDate').val(),
|
||||
foreignType: $('#swal_foreignType').val(),
|
||||
duty: removeComma($('#swal_duty').val()),
|
||||
importVat: removeComma($('#swal_importVat').val()),
|
||||
exchangeRate: removeComma($('#swal_exchangeRate').val())
|
||||
};
|
||||
}
|
||||
}).then(function(result) {
|
||||
if (result.isConfirmed) {
|
||||
@@ -307,7 +319,7 @@ var columns = [
|
||||
else if(cn.includes('유로') || cn === 'EUR') s = '€';
|
||||
else if(cn.includes('엔') || cn === 'JPY') s = '¥';
|
||||
else if(cn.includes('위안') || cn === 'CNY') s = '¥';
|
||||
return s + Number(value).toLocaleString();
|
||||
return s + Number(value).toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2});
|
||||
}
|
||||
},
|
||||
// {headerHozAlign:'center', hozAlign:'right', minWidth:90, widthGrow:1, title:'미입고금액', field:'TOTAL_NOT_DELIVERY_PRICE',
|
||||
@@ -322,13 +334,19 @@ var columns = [
|
||||
},
|
||||
{headerHozAlign:'center', hozAlign:'center', minWidth:100, widthGrow:1.2, title:'계정과목', field:'SUB_LOCATION_NAME'},
|
||||
{headerHozAlign:'center', hozAlign:'center', minWidth:100, widthGrow:1.2, title:'국내/해외', field:'FOREIGN_TYPE_NAME'},
|
||||
{headerHozAlign:'center', hozAlign:'right', minWidth:100, widthGrow:1.2, title:'환율', field:'EXCHANGE_RATE'},
|
||||
{headerHozAlign:'center', hozAlign:'right', minWidth:100, widthGrow:1.2, title:'환율', field:'EXCHANGE_RATE',
|
||||
formatter: function(cell){ var v = cell.getValue(); if(!v || v === '') return ''; return formatMoney(v); }
|
||||
},
|
||||
{headerHozAlign:'center', hozAlign:'center', minWidth:100, widthGrow:1.2, title:'과세구분', field:'TAX_TYPE_NAME'},
|
||||
{headerHozAlign:'center', hozAlign:'center', minWidth:100, widthGrow:1.2, title:'세금계산서발행일', field:'TAX_INVOICE_DATE'},
|
||||
{headerHozAlign:'center', hozAlign:'center', minWidth:100, widthGrow:1.2, title:'수출신고필증신고번호', field:'EXPORT_DECL_NO'},
|
||||
{headerHozAlign:'center', hozAlign:'center', minWidth:100, widthGrow:1.2, title:'선적일자', field:'LOADING_DATE'},
|
||||
{headerHozAlign:'center', hozAlign:'right', minWidth:100, widthGrow:1.2, title:'관세', field:'DUTY'},
|
||||
{headerHozAlign:'center', hozAlign:'right', minWidth:100, widthGrow:1.2, title:'수입부가세', field:'IMPORT_VAT'},
|
||||
{headerHozAlign:'center', hozAlign:'right', minWidth:100, widthGrow:1.2, title:'관세', field:'DUTY',
|
||||
formatter: function(cell){ var v = cell.getValue(); if(!v || v === '') return ''; return formatMoney(v); }
|
||||
},
|
||||
{headerHozAlign:'center', hozAlign:'right', minWidth:100, widthGrow:1.2, title:'수입부가세', field:'IMPORT_VAT',
|
||||
formatter: function(cell){ var v = cell.getValue(); if(!v || v === '') return ''; return formatMoney(v); }
|
||||
},
|
||||
{headerHozAlign:'center', hozAlign:'center', minWidth:85, widthGrow:0.6, title:'매입마감', field:'PURCHASE_CLOSE_DATE'}
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user