V20260210 #179

Merged
hjjeong merged 4 commits from V20260210 into main 2026-03-20 08:49:06 +00:00
9 changed files with 96 additions and 71 deletions

View File

@@ -6625,10 +6625,12 @@ FROM(
<!-- 마감정보 -->
,COALESCE(AP.tax_type, '') AS TAX_TYPE
,COALESCE((SELECT CODE_NAME FROM COMM_CODE CC WHERE CC.CODE_ID = AP.tax_type), '') AS TAX_TYPE_NAME
,COALESCE(AP.tax_invoice_date, '') AS TAX_INVOICE_DATE
,COALESCE(AP.export_decl_no, '') AS EXPORT_DECL_NO
,COALESCE(AP.loading_date, '') AS LOADING_DATE
,COALESCE(AP.foreign_type, '') AS FOREIGN_TYPE
,COALESCE((SELECT CODE_NAME FROM COMM_CODE CC WHERE CC.CODE_ID = AP.foreign_type), '') AS FOREIGN_TYPE_NAME
,COALESCE(AP.duty, 0) AS DUTY
,COALESCE(AP.exchange_rate, 0) AS EXCHANGE_RATE
,COALESCE(AP.import_vat, 0) AS IMPORT_VAT

View File

@@ -218,12 +218,6 @@
$row.find(".item-order-quantity").focus();
return false;
}
if(orderUnitPrice == "" || orderUnitPrice == "0") {
alert((i+1) + "번째 품목의 수주단가를 입력해주세요.");
$row.find(".item-order-unit-price").focus();
return false;
}
}
return true;
@@ -344,7 +338,7 @@
// 수주단가
html += '<td style="padding:5px; border:1px solid #ddd;">';
html += '<input type="text" name="item_order_unit_price[]" class="item-order-unit-price" style="width:90%; padding:5px;" required numberOnly />';
html += '<input type="text" name="item_order_unit_price[]" class="item-order-unit-price" style="width:90%; padding:5px;" numberOnly />';
html += '</td>';
// 수주공급가액 (자동계산 + 수정가능)
@@ -554,7 +548,7 @@
}
html += '</td>';
html += '<td style="padding:5px; border:1px solid #ddd;">';
html += '<input type="text" name="item_order_unit_price[]" class="item-order-unit-price" style="width:90%; padding:5px;" required numberOnly value="' + (orderUnitPrice ? addComma(orderUnitPrice) : '') + '" />';
html += '<input type="text" name="item_order_unit_price[]" class="item-order-unit-price" style="width:90%; padding:5px;" numberOnly value="' + (orderUnitPrice ? addComma(orderUnitPrice) : '') + '" />';
html += '</td>';
html += '<td style="padding:5px; border:1px solid #ddd;">';
html += '<input type="text" name="item_order_supply_price[]" class="item-order-supply-price" style="width:90%; padding:5px;" numberOnly value="' + (orderSupplyPrice ? addComma(orderSupplyPrice) : '') + '" />';
@@ -1482,7 +1476,7 @@
<th style="text-align:center; padding:8px; border:1px solid #ddd; background:#e3f2fd;">고객요청사항</th>
<th style="text-align:center; padding:8px; border:1px solid #ddd; background:#e3f2fd;">반납사유</th>
<th style="text-align:center; padding:8px; border:1px solid #ddd; background:#fff3e0;">수주수량 <span style="color:red;">*</span></th>
<th style="text-align:center; padding:8px; border:1px solid #ddd; background:#fff3e0;">수주단가 <span style="color:red;">*</span></th>
<th style="text-align:center; padding:8px; border:1px solid #ddd; background:#fff3e0;">수주단가 </th>
<th style="text-align:center; padding:8px; border:1px solid #ddd; background:#fff3e0;">수주공급가액</th>
<th style="text-align:center; padding:8px; border:1px solid #ddd; background:#fff3e0;">수주부가세</th>
<th style="text-align:center; padding:8px; border:1px solid #ddd; background:#fff3e0;">수주총액</th>

View File

@@ -471,7 +471,8 @@ var columns = [
},
// 17. 품번
{headerHozAlign : 'center', hozAlign : 'center', minWidth: 80, widthGrow: 1, title : '품번', field : 'PART_NO' },
// 18. 작성자
{headerHozAlign : 'center', hozAlign : 'center', minWidth: 70, widthGrow: 0.8, title : '작성자', field : 'WRITER_NAME' },
/* 아래는 주석처리된 컬럼들 - 필요시 활성화 */
/*
// 제품구분
@@ -486,7 +487,6 @@ var columns = [
// {headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '설비대수', field : 'FACILITY_QTY' },
// {headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '설비타입', field : 'FACILITY_TYPE' },
// {headerHozAlign : 'center', hozAlign : 'center', width : '90', title : '설비길이', field : 'FACILITY_DEPTH' },
// {headerHozAlign : 'center', hozAlign : 'center', width : '70', title : '담당자', field : 'WRITER_NAME' },
// {headerHozAlign : 'center', hozAlign : 'center', width : '90', title : '등록일', field : 'REG_DATE' },
// {headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '첨부파일', field : 'CU01_CNT',
// formatter:fnc_subInfoValueFormatter,

View File

@@ -1387,9 +1387,7 @@ function fn_save() {
<tr>
<td class="label">수신인</td>
<td class="editable">
<select id="contact_person" style="width: 100%; border: none; font-size: 9pt; padding: 2px;">
<option value="">담당자 선택</option>
</select>
<input type="text" id="contact_person" value="">
</td>
</tr>
<tr>

View File

@@ -362,6 +362,9 @@ var columns = [
// 21. 품번
{headerHozAlign : 'center', hozAlign : 'center', minWidth : 70, widthGrow: 0.8, title : '품번', field : 'PART_NO' },
// 22. 작성자
{headerHozAlign : 'center', hozAlign : 'center', minWidth : 100, widthGrow: 1.2, title : '작성자', field : 'WRITER_NAME' },
/* 주석처리된 컬럼 - 필요시 활성화 */
/*
{headerHozAlign : 'center', hozAlign : 'center', minWidth : 55, widthGrow: 0.6, title : '제품구분', field : 'PRODUCT_NAME' },

View File

@@ -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 수정 가능
@@ -518,7 +518,7 @@
<th style="text-align:center; padding:8px; border:1px solid #ddd;">품명</th>
<th style="text-align:center; padding:8px; border:1px solid #ddd;">S/N</th>
<th style="text-align:center; padding:8px; border:1px solid #ddd;">수주수량 <span style="color:red;">*</span></th>
<th style="text-align:center; padding:8px; border:1px solid #ddd;">수주단가 <span style="color:red;">*</span></th>
<th style="text-align:center; padding:8px; border:1px solid #ddd;">수주단가 </th>
<th style="text-align:center; padding:8px; border:1px solid #ddd;">수주공급가액</th>
<th style="text-align:center; padding:8px; border:1px solid #ddd;">수주부가세</th>
<th style="text-align:center; padding:8px; border:1px solid #ddd;">수주총액</th>

View File

@@ -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}));
}
//수입검사등록

View File

@@ -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',
@@ -320,7 +332,21 @@ var columns = [
{headerHozAlign:'center', hozAlign:'right', minWidth:100, widthGrow:0.9, title:'확정입고수량', field:'CONFIRMED_QTY',
formatter:"money", formatterParams:{thousand:",", symbolAfter:"p", precision:false}
},
{headerHozAlign:'center', hozAlign:'left', minWidth:100, widthGrow:1.2, title:'계정과목', field:'SUB_LOCATION_NAME'},
{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',
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',
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'}
];

View File

@@ -6625,10 +6625,12 @@ FROM(
<!-- 마감정보 -->
,COALESCE(AP.tax_type, '') AS TAX_TYPE
,COALESCE((SELECT CODE_NAME FROM COMM_CODE CC WHERE CC.CODE_ID = AP.tax_type), '') AS TAX_TYPE_NAME
,COALESCE(AP.tax_invoice_date, '') AS TAX_INVOICE_DATE
,COALESCE(AP.export_decl_no, '') AS EXPORT_DECL_NO
,COALESCE(AP.loading_date, '') AS LOADING_DATE
,COALESCE(AP.foreign_type, '') AS FOREIGN_TYPE
,COALESCE((SELECT CODE_NAME FROM COMM_CODE CC WHERE CC.CODE_ID = AP.foreign_type), '') AS FOREIGN_TYPE_NAME
,COALESCE(AP.duty, 0) AS DUTY
,COALESCE(AP.exchange_rate, 0) AS EXCHANGE_RATE
,COALESCE(AP.import_vat, 0) AS IMPORT_VAT