견적서
This commit is contained in:
parent
eaa38270db
commit
3e57d53ec7
@ -702,6 +702,7 @@ export default function Estimate({ params }) {
|
|||||||
let vatPrice = 0
|
let vatPrice = 0
|
||||||
let totPrice = 0
|
let totPrice = 0
|
||||||
let addSupplyPrice = 0
|
let addSupplyPrice = 0
|
||||||
|
let pkgTotPrice = 0
|
||||||
if (estimateContextState.estimateType === 'YJOD') {
|
if (estimateContextState.estimateType === 'YJOD') {
|
||||||
estimateContextState.itemList.sort((a, b) => {
|
estimateContextState.itemList.sort((a, b) => {
|
||||||
return a.dispOrder - b.dispOrder
|
return a.dispOrder - b.dispOrder
|
||||||
@ -773,20 +774,16 @@ export default function Estimate({ params }) {
|
|||||||
if (item.moduleFlg === '1') {
|
if (item.moduleFlg === '1') {
|
||||||
//용량(Kw)은 모듈플래그 1만 합산
|
//용량(Kw)은 모듈플래그 1만 합산
|
||||||
const volKw = (item.pnowW * amount) / 1000
|
const volKw = (item.pnowW * amount) / 1000
|
||||||
// const volKw = item.pnowW * amount
|
|
||||||
totVolKw += volKw
|
totVolKw += volKw
|
||||||
}
|
}
|
||||||
setEstimateContextState({
|
|
||||||
pkgTotPrice: estimateContextState.pkgAsp.replaceAll(',', '') * totVolKw * 1000,
|
|
||||||
})
|
|
||||||
//pkgTotPrice
|
|
||||||
// const saleTotPrice
|
// const saleTotPrice
|
||||||
totAmount += amount
|
totAmount += amount
|
||||||
if (item.pkgMaterialFlg === '1') {
|
if (item.pkgMaterialFlg === '1') {
|
||||||
const pkgPrice = amount * salePrice
|
const saleTotPrice = amount * salePrice
|
||||||
//다시계산하기
|
//다시계산하기
|
||||||
//YJSS는 PKG제외상품들만(1) 모아서 수량 * 단가를 공급가액(supplyPrice)에 추가로 더해줌
|
//YJSS는 PKG제외상품들만(1) 모아서 수량 * 단가를 공급가액(supplyPrice)에 추가로 더해줌
|
||||||
addSupplyPrice += pkgPrice
|
addSupplyPrice += saleTotPrice
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!item.paDispOrder) {
|
if (!item.paDispOrder) {
|
||||||
@ -798,7 +795,12 @@ export default function Estimate({ params }) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
supplyPrice = addSupplyPrice + Number(estimateContextState.pkgTotPrice / 1000)
|
pkgTotPrice = estimateContextState.pkgAsp.replaceAll(',', '') * totVolKw * 1000
|
||||||
|
setEstimateContextState({
|
||||||
|
pkgTotPrice: pkgTotPrice,
|
||||||
|
})
|
||||||
|
|
||||||
|
supplyPrice = addSupplyPrice + pkgTotPrice
|
||||||
vatPrice = supplyPrice * 0.1
|
vatPrice = supplyPrice * 0.1
|
||||||
totPrice = supplyPrice + vatPrice
|
totPrice = supplyPrice + vatPrice
|
||||||
setEstimateContextState({
|
setEstimateContextState({
|
||||||
@ -811,6 +813,18 @@ export default function Estimate({ params }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setItemChangeYn(false)
|
setItemChangeYn(false)
|
||||||
|
} else {
|
||||||
|
estimateContextState.itemList.map((item) => {
|
||||||
|
if (estimateContextState.estimateType === 'YJSS') {
|
||||||
|
if (!item.paDispOrder) {
|
||||||
|
//paDispOrder
|
||||||
|
if (item.pkgMaterialFlg === '0') {
|
||||||
|
item.showSalePrice = '0'
|
||||||
|
item.showSaleTotPrice = '0'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}, [itemChangeYn, estimateContextState.itemList])
|
}, [itemChangeYn, estimateContextState.itemList])
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user