Skip to content

Commit

Permalink
Merge pull request #992 from sriranjan-s/Dev-2.0
Browse files Browse the repository at this point in the history
Added the OBPS fix for malba
  • Loading branch information
sriranjan-s authored Mar 13, 2024
2 parents a86584c + 2e8b200 commit 319d755
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@ import {
const { data, address, owners, nocDocuments, documents, additionalDetails, subOccupancy,PrevStateDocuments,PrevStateNocDocuments,applicationNo } = value;
const isEditApplication = window.location.href.includes("editApplication");
useEffect(()=>{
console.log("mdmsData",mdmsData)
const LabourCess = sessionStorage.getItem("plotArea") > 909 ?mdmsData?.BPA?.LabourCess[1].rate * sessionStorage.getItem("plotArea") : sessionStorage.getItem("plotArea")*0
console.log("mdmsData",mdmsData,sessionStorage.getItem("plotArea"),typeof(sessionStorage.getItem("plotArea")))
let plotArea = parseInt(sessionStorage.getItem("plotArea"))
const LabourCess = plotArea > 909 ?mdmsData?.BPA?.LabourCess[1].rate * plotArea : 0
const GaushalaFees = mdmsData?.BPA?.GaushalaFees[0].rate
const Malbafees = (sessionStorage.getItem("plotArea") <=500 ?mdmsData?.BPA?.MalbaCharges[0].rate :sessionStorage.getItem("plotArea") >500 && sessionStorage.getItem("plotArea") <=1000 ?mdmsData?.MalbaCharges?.BPA[1].rate :mdmsData?.MalbaCharges?.BPA[2].rate || 500)
const Malbafees = (plotArea <=500 ?mdmsData?.BPA?.MalbaCharges[0].rate :plotArea >500 && plotArea <=1000 ?mdmsData?.MalbaCharges?.BPA[1].rate :mdmsData?.MalbaCharges?.BPA[2].rate || 500)
sessionStorage.setItem("Malbafees",Malbafees)
sessionStorage.setItem("WaterCharges",Malbafees/2)
sessionStorage.setItem("GaushalaFees",GaushalaFees)
Expand All @@ -45,6 +46,7 @@ setGaushalaFees(GaushalaFees)
setLabourCess(LabourCess)
setMalbafees(Malbafees)
setWaterCharges(Malbafees/2)
console.log("mdmsData",mdmsData,Malbafees,plotArea)
},[mdmsData])
// for application documents
let improvedDoc = [];
Expand Down Expand Up @@ -353,7 +355,7 @@ setWaterCharges(Malbafees/2)
))} */}
{/* <Row className="border-none" label={t(`BPA_COMMON_TOTAL_AMT`)} text={`₹ ${paymentDetails?.Bill?.[0]?.billDetails[0]?.amount || "0"}`} /> */}
<CardSubHeader>{t("BPA_P1_SUMMARY_FEE_EST")}</CardSubHeader>
<Row className="border-none" label={t(`BPA_COMMON_P1_AMT`)} text={`₹ ${data?.boundaryWallLength*2.5 + sessionStorage.getItem("plotArea") * 2.5}`} />
<Row className="border-none" label={t(`BPA_COMMON_P1_AMT`)} text={`₹ ${data?.boundaryWallLength*2.5 + parseInt(sessionStorage.getItem("plotArea")) * 2.5}`} />
<CardSubHeader>{t("BPA_P2_SUMMARY_FEE_EST")}</CardSubHeader>

<Row className="border-none" label={t(`BPA_COMMON_MALBA_AMT`)} text={`₹ ${malbafees}`} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ export const convertToBPAObject = (data, isOCBPA = false, isSendBackTOCitizen =
{"BPA_DEVELOPMENT_CHARGES":sessionStorage.getItem("lessAdjusment")},
{"BPA_OTHER_CHARGES":sessionStorage.getItem("otherCharges")}
],
P1charges:data?.data?.boundaryWallLength*2.5 + sessionStorage.getItem("plotArea") * 2.5,
P1charges:data?.data?.boundaryWallLength*2.5 + parseInt(sessionStorage.getItem("plotArea")) * 2.5,
GISPlaceName : data?.address?.placeName,
holdingNo: data?.data?.holdingNumber ? data?.data?.holdingNumber : data?.additionalDetails?.holdingNo,
boundaryWallLength:data?.data?.boundaryWallLength ? data?.data?.boundaryWallLength : data?.additionalDetails?.boundaryWallLength ,
Expand Down

0 comments on commit 319d755

Please sign in to comment.