견적서 상세
This commit is contained in:
parent
4e05a7423d
commit
b1c896c01a
@ -760,14 +760,20 @@ export default function Estimate({ params }) {
|
|||||||
delete item.showSaleTotPrice
|
delete item.showSaleTotPrice
|
||||||
if (item.delFlg === '0') {
|
if (item.delFlg === '0') {
|
||||||
let amount = Number(item.amount?.replace(/[^0-9]/g, '').replaceAll(',', '')) || 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') {
|
if (item.moduleFlg === '1') {
|
||||||
const volKw = (item.pnowW * amount) / 1000
|
const volKw = (item.pnowW * amount) / 1000
|
||||||
totals.totVolKw += volKw
|
totals.totVolKw += volKw
|
||||||
}
|
}
|
||||||
totals.totAmount += amount
|
|
||||||
totals.supplyPrice += price
|
totals.supplyPrice += price
|
||||||
|
totals.totAmount += amount
|
||||||
|
|
||||||
if (item.openFlg === '1') {
|
if (item.openFlg === '1') {
|
||||||
item.showSalePrice = '0'
|
item.showSalePrice = '0'
|
||||||
@ -778,6 +784,8 @@ export default function Estimate({ params }) {
|
|||||||
|
|
||||||
totals.vatPrice = totals.supplyPrice * 0.1
|
totals.vatPrice = totals.supplyPrice * 0.1
|
||||||
totals.totPrice = totals.supplyPrice + totals.vatPrice
|
totals.totPrice = totals.supplyPrice + totals.vatPrice
|
||||||
|
|
||||||
|
// console.log('YJOD:::totlas:::', totals)
|
||||||
}
|
}
|
||||||
|
|
||||||
const calculateYJSSTotals = (itemList) => {
|
const calculateYJSSTotals = (itemList) => {
|
||||||
@ -787,11 +795,17 @@ export default function Estimate({ params }) {
|
|||||||
// console.log('YJSSS::', item)
|
// console.log('YJSSS::', item)
|
||||||
if (item.delFlg === '0') {
|
if (item.delFlg === '0') {
|
||||||
let amount = Number(item.amount?.replace(/[^0-9]/g, '').replaceAll(',', '')) || 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') {
|
if (item.moduleFlg === '1') {
|
||||||
const volKw = (item.pnowW * amount) / 1000
|
const volKw = (item.pnowW * amount) / 1000
|
||||||
totals.totVolKw += volKw
|
totals.totVolKw += volKw
|
||||||
}
|
}
|
||||||
|
if (amount === 0) {
|
||||||
|
salePrice = 0
|
||||||
|
} else {
|
||||||
|
salePrice = Number(item.salePrice?.replaceAll(',', '')) || 0
|
||||||
|
}
|
||||||
|
|
||||||
totals.totAmount += amount
|
totals.totAmount += amount
|
||||||
if (item.pkgMaterialFlg === '1') {
|
if (item.pkgMaterialFlg === '1') {
|
||||||
@ -812,6 +826,8 @@ export default function Estimate({ params }) {
|
|||||||
totals.supplyPrice = totals.addSupplyPrice + totals.pkgTotPrice
|
totals.supplyPrice = totals.addSupplyPrice + totals.pkgTotPrice
|
||||||
totals.vatPrice = totals.supplyPrice * 0.1
|
totals.vatPrice = totals.supplyPrice * 0.1
|
||||||
totals.totPrice = totals.supplyPrice + totals.vatPrice
|
totals.totPrice = totals.supplyPrice + totals.vatPrice
|
||||||
|
|
||||||
|
// console.log('YJOD:::totlas:::', totals)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (estimateContextState.estimateType === 'YJOD') {
|
if (estimateContextState.estimateType === 'YJOD') {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user