견적서 상세

This commit is contained in:
basssy 2024-12-04 18:04:46 +09:00
parent 4e05a7423d
commit b1c896c01a

View File

@ -760,14 +760,20 @@ export default function Estimate({ params }) {
delete item.showSaleTotPrice
if (item.delFlg === '0') {
let amount = Number(item.amount?.replace(/[^0-9]/g, '').replaceAll(',', '')) || 0
let price = Number(item.saleTotPrice?.replaceAll(',', '')) || 0
// let price = Number(item.saleTotPrice?.replaceAll(',', '')) || 0
let price
if (amount === 0) {
price = 0
} else {
price = Number(item.saleTotPrice?.replaceAll(',', '')) || 0
}
if (item.moduleFlg === '1') {
const volKw = (item.pnowW * amount) / 1000
totals.totVolKw += volKw
}
totals.totAmount += amount
totals.supplyPrice += price
totals.totAmount += amount
if (item.openFlg === '1') {
item.showSalePrice = '0'
@ -778,6 +784,8 @@ export default function Estimate({ params }) {
totals.vatPrice = totals.supplyPrice * 0.1
totals.totPrice = totals.supplyPrice + totals.vatPrice
// console.log('YJOD:::totlas:::', totals)
}
const calculateYJSSTotals = (itemList) => {
@ -787,11 +795,17 @@ export default function Estimate({ params }) {
// console.log('YJSSS::', item)
if (item.delFlg === '0') {
let amount = Number(item.amount?.replace(/[^0-9]/g, '').replaceAll(',', '')) || 0
let salePrice = Number(item.salePrice?.replaceAll(',', '')) || 0
// let salePrice = Number(item.salePrice?.replaceAll(',', '')) || 0
let salePrice
if (item.moduleFlg === '1') {
const volKw = (item.pnowW * amount) / 1000
totals.totVolKw += volKw
}
if (amount === 0) {
salePrice = 0
} else {
salePrice = Number(item.salePrice?.replaceAll(',', '')) || 0
}
totals.totAmount += amount
if (item.pkgMaterialFlg === '1') {
@ -812,6 +826,8 @@ export default function Estimate({ params }) {
totals.supplyPrice = totals.addSupplyPrice + totals.pkgTotPrice
totals.vatPrice = totals.supplyPrice * 0.1
totals.totPrice = totals.supplyPrice + totals.vatPrice
// console.log('YJOD:::totlas:::', totals)
}
if (estimateContextState.estimateType === 'YJOD') {