[RAPID] 수주통합등록 품목 필드 소수점 2자리 포맷 및 우측정렬 통일
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -68,7 +68,7 @@
|
||||
|
||||
// 숫자만 입력 처리
|
||||
$("input:text[numberOnly]").on("keyup", function() {
|
||||
if($(this).hasClass("item-order-quantity") || $(this).attr("id") === "facility_qty") {
|
||||
if($(this).attr("id") === "facility_qty") {
|
||||
$(this).val(formatInteger($(this).val().replace(/[^0-9]/g, "")));
|
||||
} else {
|
||||
$(this).val(fnc_addComma($(this).val().replace(/[^0-9.]/g, "")));
|
||||
@@ -77,7 +77,7 @@
|
||||
$("input:text[numberOnly]").on("blur", function() {
|
||||
var val = $(this).val();
|
||||
if(val && val !== '') {
|
||||
if($(this).hasClass("item-order-quantity") || $(this).attr("id") === "facility_qty") {
|
||||
if($(this).attr("id") === "facility_qty") {
|
||||
$(this).val(formatInteger(removeComma(val)));
|
||||
} else {
|
||||
$(this).val(formatMoney(removeComma(val)));
|
||||
@@ -338,30 +338,30 @@
|
||||
// 수주수량 (Machine이고 프로젝트가 있으면 readonly)
|
||||
html += '<td style="padding:5px; border:1px solid #ddd;">';
|
||||
if(isMachine && hasProject) {
|
||||
html += '<input type="text" name="item_order_quantity[]" class="item-order-quantity" style="width:90%; padding:5px; background:#f5f5f5;" required numberOnly readonly title="Machine 제품은 프로젝트 생성 후 수량 변경이 불가능합니다." />';
|
||||
html += '<input type="text" name="item_order_quantity[]" class="item-order-quantity" style="width:90%; padding:5px; text-align:right; background:#f5f5f5;" required numberOnly readonly title="Machine 제품은 프로젝트 생성 후 수량 변경이 불가능합니다." />';
|
||||
} else {
|
||||
html += '<input type="text" name="item_order_quantity[]" class="item-order-quantity" style="width:90%; padding:5px;" required numberOnly />';
|
||||
html += '<input type="text" name="item_order_quantity[]" class="item-order-quantity" style="width:90%; padding:5px; text-align:right;" required numberOnly />';
|
||||
}
|
||||
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;" numberOnly />';
|
||||
html += '<input type="text" name="item_order_unit_price[]" class="item-order-unit-price" style="width:90%; padding:5px; text-align:right;" numberOnly />';
|
||||
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 />';
|
||||
html += '<input type="text" name="item_order_supply_price[]" class="item-order-supply-price" style="width:90%; padding:5px; text-align:right;" numberOnly />';
|
||||
html += '</td>';
|
||||
|
||||
|
||||
// 수주부가세 (자동계산 + 수정가능)
|
||||
html += '<td style="padding:5px; border:1px solid #ddd;">';
|
||||
html += '<input type="text" name="item_order_vat[]" class="item-order-vat" style="width:90%; padding:5px;" numberOnly />';
|
||||
html += '<input type="text" name="item_order_vat[]" class="item-order-vat" style="width:90%; padding:5px; text-align:right;" numberOnly />';
|
||||
html += '</td>';
|
||||
|
||||
|
||||
// 수주총액 (자동계산 + 수정가능)
|
||||
html += '<td style="padding:5px; border:1px solid #ddd;">';
|
||||
html += '<input type="text" name="item_order_total_amount[]" class="item-order-total-amount" style="width:90%; padding:5px;" numberOnly />';
|
||||
html += '<input type="text" name="item_order_total_amount[]" class="item-order-total-amount" style="width:90%; padding:5px; text-align:right;" numberOnly />';
|
||||
html += '</td>';
|
||||
|
||||
// 삭제 버튼
|
||||
@@ -450,7 +450,7 @@
|
||||
}
|
||||
|
||||
// 수주 정보 설정
|
||||
if(existingData.orderQuantity) $("#" + itemId + " .item-order-quantity").val(formatInteger(existingData.orderQuantity));
|
||||
if(existingData.orderQuantity) $("#" + itemId + " .item-order-quantity").val(addComma(existingData.orderQuantity));
|
||||
if(existingData.orderUnitPrice) $("#" + itemId + " .item-order-unit-price").val(addComma(existingData.orderUnitPrice));
|
||||
if(existingData.orderSupplyPrice) $("#" + itemId + " .item-order-supply-price").val(addComma(existingData.orderSupplyPrice));
|
||||
if(existingData.orderVat) $("#" + itemId + " .item-order-vat").val(addComma(existingData.orderVat));
|
||||
@@ -551,22 +551,22 @@
|
||||
// 수주 정보 (Machine이고 프로젝트가 있으면 수량 readonly)
|
||||
html += '<td style="padding:5px; border:1px solid #ddd;">';
|
||||
if(isMachine && hasProject) {
|
||||
html += '<input type="text" name="item_order_quantity[]" class="item-order-quantity" style="width:90%; padding:5px; background:#f5f5f5;" required numberOnly readonly title="Machine 제품은 프로젝트 생성 후 수량 변경이 불가능합니다." value="' + (orderQuantity ? formatInteger(orderQuantity) : '') + '" />';
|
||||
html += '<input type="text" name="item_order_quantity[]" class="item-order-quantity" style="width:90%; padding:5px; text-align:right; background:#f5f5f5;" required numberOnly readonly title="Machine 제품은 프로젝트 생성 후 수량 변경이 불가능합니다." value="' + (orderQuantity ? addComma(orderQuantity) : '') + '" />';
|
||||
} else {
|
||||
html += '<input type="text" name="item_order_quantity[]" class="item-order-quantity" style="width:90%; padding:5px;" required numberOnly value="' + (orderQuantity ? formatInteger(orderQuantity) : '') + '" />';
|
||||
html += '<input type="text" name="item_order_quantity[]" class="item-order-quantity" style="width:90%; padding:5px; text-align:right;" required numberOnly value="' + (orderQuantity ? addComma(orderQuantity) : '') + '" />';
|
||||
}
|
||||
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;" numberOnly value="' + (orderUnitPrice ? addComma(orderUnitPrice) : '') + '" />';
|
||||
html += '<input type="text" name="item_order_unit_price[]" class="item-order-unit-price" style="width:90%; padding:5px; text-align:right;" 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) : '') + '" />';
|
||||
html += '<input type="text" name="item_order_supply_price[]" class="item-order-supply-price" style="width:90%; padding:5px; text-align:right;" numberOnly value="' + (orderSupplyPrice ? addComma(orderSupplyPrice) : '') + '" />';
|
||||
html += '</td>';
|
||||
html += '<td style="padding:5px; border:1px solid #ddd;">';
|
||||
html += '<input type="text" name="item_order_vat[]" class="item-order-vat" style="width:90%; padding:5px;" numberOnly value="' + (orderVat ? addComma(orderVat) : '') + '" />';
|
||||
html += '<input type="text" name="item_order_vat[]" class="item-order-vat" style="width:90%; padding:5px; text-align:right;" numberOnly value="' + (orderVat ? addComma(orderVat) : '') + '" />';
|
||||
html += '</td>';
|
||||
html += '<td style="padding:5px; border:1px solid #ddd;">';
|
||||
html += '<input type="text" name="item_order_total_amount[]" class="item-order-total-amount" style="width:90%; padding:5px;" numberOnly value="' + (orderTotalAmount ? addComma(orderTotalAmount) : '') + '" />';
|
||||
html += '<input type="text" name="item_order_total_amount[]" class="item-order-total-amount" style="width:90%; padding:5px; text-align:right;" numberOnly value="' + (orderTotalAmount ? addComma(orderTotalAmount) : '') + '" />';
|
||||
html += '</td>';
|
||||
|
||||
html += '<td style="text-align:center; padding:5px; border:1px solid #ddd;">';
|
||||
@@ -703,7 +703,7 @@
|
||||
totalVat += parseFloat(removeComma($(this).find(".item-order-vat").val())) || 0;
|
||||
totalAmount += parseFloat(removeComma($(this).find(".item-order-total-amount").val())) || 0;
|
||||
});
|
||||
$("#totalOrderQuantity").text(addCommaInt(totalQty));
|
||||
$("#totalOrderQuantity").text(addComma(totalQty));
|
||||
$("#totalOrderSupplyPrice").text(addComma(totalSupply));
|
||||
$("#totalOrderVat").text(addComma(totalVat));
|
||||
$("#totalOrderTotalAmount").text(addComma(totalAmount));
|
||||
|
||||
Reference in New Issue
Block a user