done
This commit is contained in:
parent
95d7c7b00b
commit
c8d2af7902
File diff suppressed because one or more lines are too long
|
@ -45,7 +45,7 @@
|
|||
|
||||
|
||||
|
||||
<script type="module" crossorigin src="/assets/index-CJfbdL2a.js"></script>
|
||||
<script type="module" crossorigin src="/assets/index-qn9aVrHm.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-iEl-il0E.css">
|
||||
</head>
|
||||
|
||||
|
|
|
@ -67,46 +67,63 @@ const Addproperty = () => {
|
|||
{ title: "Real Estates fees", price: "0" },
|
||||
],
|
||||
renovationCost: [
|
||||
{ title: "Demolition: Removing existing structures or finishes", price: "0"},
|
||||
{ title: "Framing: Making structural changes or additions", price: "0"},
|
||||
{ title: "Plumbing: Installing or modifying plumbing systems", price: "0"},
|
||||
{
|
||||
title: "Demolition: Removing existing structures or finishes",
|
||||
price: "0",
|
||||
},
|
||||
{ title: "Framing: Making structural changes or additions", price: "0" },
|
||||
{
|
||||
title: "Plumbing: Installing or modifying plumbing systems",
|
||||
price: "0",
|
||||
},
|
||||
{ title: "Electrical: Updating wiring and fixtures", price: "0" },
|
||||
{ title: "HVAC: Installing or upgrading heating and cooling systems", price: "0"},
|
||||
{
|
||||
title: "HVAC: Installing or upgrading heating and cooling systems",
|
||||
price: "0",
|
||||
},
|
||||
{ title: "Insulation: Adding or replacing insulation", price: "0" },
|
||||
{ title: "Drywall: Hanging and finishing drywall", price: "0" },
|
||||
{ title: "Interior Finishes: Painting, flooring, cabinetry, and fixtures", price: "0"},
|
||||
{ title:"Exterior Work: Addressing siding, roofing, or landscaping, if applicable", price: "0"},
|
||||
{ title: "Final Inspections: Ensuring everything meets codes", price: "0"},
|
||||
{
|
||||
title: "Interior Finishes: Painting, flooring, cabinetry, and fixtures",
|
||||
price: "0",
|
||||
},
|
||||
{
|
||||
title:
|
||||
"Exterior Work: Addressing siding, roofing, or landscaping, if applicable",
|
||||
price: "0",
|
||||
},
|
||||
{
|
||||
title: "Final Inspections: Ensuring everything meets codes",
|
||||
price: "0",
|
||||
},
|
||||
{ title: "Punch List: Completing any remaining task", price: "0" },
|
||||
],
|
||||
sellingPriceBtoC:"0",
|
||||
costPaidOutofClosing:[
|
||||
{ title: "Buyers Agent Commission", price: "0"},
|
||||
{ title: "Sellers Agent Commission", price: "0"},
|
||||
{ title: "Home Warranty", price: "0"},
|
||||
{ title: "Document Preparation", price: "0"},
|
||||
{ title: "Excise Tax", price: "0"},
|
||||
{ title: "Legal Fees", price: "0"},
|
||||
{ title: "Wire Fees/courier Fees", price: "0"},
|
||||
{ title: "County Taxes", price: "0"},
|
||||
{ title: "HOA Fee", price: "0"},
|
||||
{ title: "Payoff of 1st Mortgage", price: "0"},
|
||||
{ title: "Payoff of 2nd Mortgage", price: "0"},
|
||||
{ title: "Payoff 3rd Mortgage", price: "0"},
|
||||
sellingPriceBtoC: "0",
|
||||
costPaidOutofClosing: [
|
||||
{ title: "Buyers Agent Commission", price: "0" },
|
||||
{ title: "Sellers Agent Commission", price: "0" },
|
||||
{ title: "Home Warranty", price: "0" },
|
||||
{ title: "Document Preparation", price: "0" },
|
||||
{ title: "Excise Tax", price: "0" },
|
||||
{ title: "Legal Fees", price: "0" },
|
||||
{ title: "Wire Fees/courier Fees", price: "0" },
|
||||
{ title: "County Taxes", price: "0" },
|
||||
{ title: "HOA Fee", price: "0" },
|
||||
{ title: "Payoff of 1st Mortgage", price: "0" },
|
||||
{ title: "Payoff of 2nd Mortgage", price: "0" },
|
||||
{ title: "Payoff 3rd Mortgage", price: "0" },
|
||||
],
|
||||
adjustments:[
|
||||
{ title: "adjustments", price: "0"},
|
||||
adjustments: [{ title: "adjustments", price: "0" }],
|
||||
incomestatement: [
|
||||
{ title: "income statement", price: "0" },
|
||||
{ title: "income statement", price: "0" },
|
||||
],
|
||||
incomestatement:[
|
||||
{ title: "income statement", price: "0"},
|
||||
{ title: "income statement", price: "0"},
|
||||
],
|
||||
fundspriortoclosing:"0",
|
||||
shorttermrental:"0",
|
||||
OtherIncome:"0",
|
||||
InsuranceClaim:"0",
|
||||
LongTermRental:"0",
|
||||
FinancingCostClosingCost:"0",
|
||||
fundspriortoclosing: "0",
|
||||
shorttermrental: "0",
|
||||
OtherIncome: "0",
|
||||
InsuranceClaim: "0",
|
||||
LongTermRental: "0",
|
||||
FinancingCostClosingCost: "0",
|
||||
});
|
||||
|
||||
const [submitted, setSubmitted] = useState(false);
|
||||
|
@ -358,16 +375,15 @@ const Addproperty = () => {
|
|||
}, 0);
|
||||
};
|
||||
|
||||
const calculateTotalCashRequiredonSettlement= () => {
|
||||
const calculateTotalCashRequiredonSettlement = () => {
|
||||
const totalcashAdjustments = calculatecashAdjustments();
|
||||
const totalcredits = calculateTotalCredits();
|
||||
const totalPurchaseCosts= calculateTotalPurchaseCosts();
|
||||
const totalPurchaseCosts = calculateTotalPurchaseCosts();
|
||||
|
||||
// Sum up all the values from the three functions
|
||||
return totalcashAdjustments + totalcredits + totalPurchaseCosts;
|
||||
};
|
||||
|
||||
|
||||
const addincidentalCost = () => {
|
||||
setFormData((prevData) => ({
|
||||
...prevData,
|
||||
|
@ -437,9 +453,7 @@ const Addproperty = () => {
|
|||
};
|
||||
|
||||
const deletecarryCosts = (index) => {
|
||||
const updatedcarryCosts = formData.carryCosts.filter(
|
||||
(_, i) => i !== index
|
||||
);
|
||||
const updatedcarryCosts = formData.carryCosts.filter((_, i) => i !== index);
|
||||
setFormData((prevData) => ({
|
||||
...prevData,
|
||||
carryCosts: updatedcarryCosts,
|
||||
|
@ -448,7 +462,7 @@ const Addproperty = () => {
|
|||
|
||||
// Function to handle changes to incidentalCost title and price
|
||||
const handlecarryCostsTitle = (index, field, value) => {
|
||||
const updatedcarryCosts= [...formData.carryCosts];
|
||||
const updatedcarryCosts = [...formData.carryCosts];
|
||||
updatedcarryCosts[index][field] = value;
|
||||
setFormData((prevData) => ({
|
||||
...prevData,
|
||||
|
@ -464,21 +478,19 @@ const Addproperty = () => {
|
|||
|
||||
// If valid number, update state, otherwise show the alert
|
||||
if (isNumber || value === "") {
|
||||
const updatedcarryCosts = formData.carryCosts.map(
|
||||
(carryCosts, i) =>
|
||||
const updatedcarryCosts = formData.carryCosts.map((carryCosts, i) =>
|
||||
i === index
|
||||
? { ...carryCosts, price: value, isInvalid: false } // Reset isInvalid if valid number
|
||||
: carryCosts
|
||||
);
|
||||
setFormData({ ...formData, carryCosts: updatedcarryCosts });
|
||||
} else {
|
||||
const updatedcarryCosts = formData.carryCosts.map(
|
||||
(carryCosts, i) =>
|
||||
const updatedcarryCosts = formData.carryCosts.map((carryCosts, i) =>
|
||||
i === index
|
||||
? { ...carryCosts, isInvalid: true } // Set isInvalid true for invalid input
|
||||
: carryCosts
|
||||
);
|
||||
setFormData({ ...formData, carryCosts: updatedcarryCosts});
|
||||
setFormData({ ...formData, carryCosts: updatedcarryCosts });
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -560,20 +572,23 @@ const Addproperty = () => {
|
|||
return totalIncidentalCost + totalcarryCosts + totalRenovationCost;
|
||||
};
|
||||
|
||||
const calculatetotalCoststoBuyAtoB =() => {
|
||||
const totalRenovationsandHoldingCost = calculatetotalRenovationsandHoldingCost();
|
||||
const totalCashRequiredonSettlement = calculateTotalCashRequiredonSettlement();
|
||||
const calculatetotalCoststoBuyAtoB = () => {
|
||||
const totalRenovationsandHoldingCost =
|
||||
calculatetotalRenovationsandHoldingCost();
|
||||
const totalCashRequiredonSettlement =
|
||||
calculateTotalCashRequiredonSettlement();
|
||||
|
||||
// Sum up all the values from the three functions
|
||||
return totalRenovationsandHoldingCost + totalCashRequiredonSettlement;
|
||||
};
|
||||
|
||||
|
||||
|
||||
const addcostPaidOutofClosing = () => {
|
||||
setFormData((prevData) => ({
|
||||
...prevData,
|
||||
costPaidOutofClosing: [...prevData.costPaidOutofClosing, { title: "", price: "" }],
|
||||
costPaidOutofClosing: [
|
||||
...prevData.costPaidOutofClosing,
|
||||
{ title: "", price: "" },
|
||||
],
|
||||
}));
|
||||
};
|
||||
|
||||
|
@ -611,7 +626,10 @@ const Addproperty = () => {
|
|||
? { ...costPaidOutofClosing, price: value, isInvalid: false } // Reset isInvalid if valid number
|
||||
: costPaidOutofClosing
|
||||
);
|
||||
setFormData({ ...formData, costPaidOutofClosing: updatedcostPaidOutofClosing });
|
||||
setFormData({
|
||||
...formData,
|
||||
costPaidOutofClosing: updatedcostPaidOutofClosing,
|
||||
});
|
||||
} else {
|
||||
const updatedcostPaidOutofClosing = formData.costPaidOutofClosing.map(
|
||||
(costPaidOutofClosing, i) =>
|
||||
|
@ -619,27 +637,30 @@ const Addproperty = () => {
|
|||
? { ...costPaidOutofClosing, isInvalid: true } // Set isInvalid true for invalid input
|
||||
: costPaidOutofClosing
|
||||
);
|
||||
setFormData({ ...formData, costPaidOutofClosing: updatedcostPaidOutofClosing });
|
||||
setFormData({
|
||||
...formData,
|
||||
costPaidOutofClosing: updatedcostPaidOutofClosing,
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
// Calculate total from costPaidOutofClosing array
|
||||
const calculateTotalcostPaidOutofClosing = () => {
|
||||
return formData.costPaidOutofClosing.reduce((total, costPaidOutofClosing) => {
|
||||
return formData.costPaidOutofClosing.reduce(
|
||||
(total, costPaidOutofClosing) => {
|
||||
const price = parseFloat(costPaidOutofClosing.price);
|
||||
return total + (isNaN(price) ? 0 : price); // Ensure only valid numbers are added
|
||||
}, 0);
|
||||
},
|
||||
0
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
const calculateTotalCosttoSellBtoC =() => {
|
||||
const sekkingPriceBtoC= formData.sellingPriceBtoC;
|
||||
const calculateTotalCosttoSellBtoC = () => {
|
||||
const sekkingPriceBtoC = formData.sellingPriceBtoC;
|
||||
const costPaidOutofClosing = calculateTotalcostPaidOutofClosing();
|
||||
return sekkingPriceBtoC - costPaidOutofClosing;
|
||||
};
|
||||
|
||||
|
||||
|
||||
const addadjustments = () => {
|
||||
setFormData((prevData) => ({
|
||||
...prevData,
|
||||
|
@ -675,16 +696,14 @@ const Addproperty = () => {
|
|||
|
||||
// If valid number, update state, otherwise show the alert
|
||||
if (isNumber || value === "") {
|
||||
const updatedadjustments = formData.adjustments.map(
|
||||
(adjustments, i) =>
|
||||
const updatedadjustments = formData.adjustments.map((adjustments, i) =>
|
||||
i === index
|
||||
? { ...adjustments, price: value, isInvalid: false } // Reset isInvalid if valid number
|
||||
: adjustments
|
||||
);
|
||||
setFormData({ ...formData, adjustments: updatedadjustments });
|
||||
} else {
|
||||
const updatedadjustments = formData.adjustments.map(
|
||||
(adjustments, i) =>
|
||||
const updatedadjustments = formData.adjustments.map((adjustments, i) =>
|
||||
i === index
|
||||
? { ...adjustments, isInvalid: true } // Set isInvalid true for invalid input
|
||||
: adjustments
|
||||
|
@ -701,14 +720,12 @@ const Addproperty = () => {
|
|||
}, 0);
|
||||
};
|
||||
|
||||
const calculatefundsavailablefordistribution =() => {
|
||||
const sellingPriceBtoC= calculateTotalCosttoSellBtoC();
|
||||
const calculatefundsavailablefordistribution = () => {
|
||||
const sellingPriceBtoC = calculateTotalCosttoSellBtoC();
|
||||
const totaladjustments = calculateTotaladjustments();
|
||||
return sellingPriceBtoC + totaladjustments;
|
||||
};
|
||||
|
||||
|
||||
|
||||
const addincomestatement = () => {
|
||||
setFormData((prevData) => ({
|
||||
...prevData,
|
||||
|
@ -744,7 +761,7 @@ const Addproperty = () => {
|
|||
|
||||
// If valid number, update state, otherwise show the alert
|
||||
if (isNumber || value === "") {
|
||||
const updatedincomestatement= formData.incomestatement.map(
|
||||
const updatedincomestatement = formData.incomestatement.map(
|
||||
(incomestatement, i) =>
|
||||
i === index
|
||||
? { ...incomestatement, price: value, isInvalid: false } // Reset isInvalid if valid number
|
||||
|
@ -752,7 +769,7 @@ const Addproperty = () => {
|
|||
);
|
||||
setFormData({ ...formData, incomestatement: updatedincomestatement });
|
||||
} else {
|
||||
const updatedincomestatement= formData.incomestatement.map(
|
||||
const updatedincomestatement = formData.incomestatement.map(
|
||||
(incomestatement, i) =>
|
||||
i === index
|
||||
? { ...incomestatement, isInvalid: true } // Set isInvalid true for invalid input
|
||||
|
@ -770,32 +787,57 @@ const Addproperty = () => {
|
|||
}, 0);
|
||||
};
|
||||
|
||||
|
||||
const calculatenetBtoCsalevalue = () =>{
|
||||
const totalincomestatement= calculateTotalincomestatement();
|
||||
const totalcosttosellbtoc= calculateTotalCosttoSellBtoC();
|
||||
const calculatenetBtoCsalevalue = () => {
|
||||
const totalincomestatement = calculateTotalincomestatement();
|
||||
const totalcosttosellbtoc = calculateTotalCosttoSellBtoC();
|
||||
return totalincomestatement + totalcosttosellbtoc;
|
||||
}
|
||||
};
|
||||
|
||||
const calculateNetProfitBeforeFinancingCosts = () => {
|
||||
const netBtoCsalevalue = calculatenetBtoCsalevalue();
|
||||
const shorttermrental= formData.shorttermrental;
|
||||
const OtherIncome = formData.OtherIncome;
|
||||
const InsuranceClaim = formData.InsuranceClaim;
|
||||
const LongTermRental= formData.LongTermRental;
|
||||
const totalCoststoBuyAtoB=calculatetotalCoststoBuyAtoB();
|
||||
return netBtoCsalevalue + shorttermrental + OtherIncome + InsuranceClaim + LongTermRental - totalCoststoBuyAtoB;
|
||||
}
|
||||
// const netBtoCsalevalue = parseFloat(calculatenetBtoCsalevalue());
|
||||
// const shorttermrental = parseFloat(formData.shorttermrental);
|
||||
// const OtherIncome = parseFloat(formData.OtherIncome);
|
||||
// const InsuranceClaim = parseFloat(formData.InsuranceClaim);
|
||||
// const LongTermRental = parseFloat(formData.LongTermRental);
|
||||
// const totalCoststoBuyAtoB = parseFloat(calculatetotalCoststoBuyAtoB());
|
||||
const netBtoCsalevalue = isNaN(parseFloat(calculatenetBtoCsalevalue()))
|
||||
? 0
|
||||
: parseFloat(calculatenetBtoCsalevalue());
|
||||
const shorttermrental = isNaN(parseFloat(formData.shorttermrental))
|
||||
? 0
|
||||
: parseFloat(formData.shorttermrental);
|
||||
const OtherIncome = isNaN(parseFloat(formData.OtherIncome))
|
||||
? 0
|
||||
: parseFloat(formData.OtherIncome);
|
||||
const InsuranceClaim = isNaN(parseFloat(formData.InsuranceClaim))
|
||||
? 0
|
||||
: parseFloat(formData.InsuranceClaim);
|
||||
const LongTermRental = isNaN(parseFloat(formData.LongTermRental))
|
||||
? 0
|
||||
: parseFloat(formData.LongTermRental);
|
||||
const totalCoststoBuyAtoB = isNaN(
|
||||
parseFloat(calculatetotalCoststoBuyAtoB())
|
||||
)
|
||||
? 0
|
||||
: parseFloat(calculatetotalCoststoBuyAtoB());
|
||||
|
||||
// Calculate the sum first, then subtract the total costs
|
||||
const totalIncome =
|
||||
netBtoCsalevalue +
|
||||
shorttermrental +
|
||||
OtherIncome +
|
||||
InsuranceClaim +
|
||||
LongTermRental;
|
||||
const netProfitBeforeFinancingCosts = totalIncome - totalCoststoBuyAtoB;
|
||||
return netProfitBeforeFinancingCosts;
|
||||
};
|
||||
|
||||
const calculateNetProfit = () => {
|
||||
const NetProfitBeforeFinancingCosts = calculateNetProfitBeforeFinancingCosts();
|
||||
const FinancingCostClosingCost = formData.FinancingCostClosingCost ;
|
||||
const NetProfitBeforeFinancingCosts =
|
||||
calculateNetProfitBeforeFinancingCosts();
|
||||
const FinancingCostClosingCost = formData.FinancingCostClosingCost;
|
||||
return NetProfitBeforeFinancingCosts - FinancingCostClosingCost;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
const handleSubmit = () => {
|
||||
if (
|
||||
|
@ -839,23 +881,28 @@ const calculatenetBtoCsalevalue = () =>{
|
|||
formData.FinancingCostClosingCost
|
||||
) {
|
||||
const totalPurchaseCosts = calculateTotalPurchaseCosts();
|
||||
const totalPurchaseCostsaftercredits = calculateTotalPurchaseCostsWithCredits();
|
||||
const totalPurchaseCostsaftercredits =
|
||||
calculateTotalPurchaseCostsWithCredits();
|
||||
const totalcashAdjustments = calculatecashAdjustments();
|
||||
const totalincidentalCost = calculateTotalincidentalCost();
|
||||
const totalcredits = calculateTotalCredits();
|
||||
const totalcashrequiredonsettlement = calculateTotalCashRequiredonSettlement();
|
||||
const totalcashrequiredonsettlement =
|
||||
calculateTotalCashRequiredonSettlement();
|
||||
const totalcarryCosts = calculatetotalcarryCosts();
|
||||
const totalrenovationCost = calculaterenovationCost();
|
||||
const totalRenovationsandHoldingCost = calculatetotalRenovationsandHoldingCost();
|
||||
const totalRenovationsandHoldingCost =
|
||||
calculatetotalRenovationsandHoldingCost();
|
||||
const totalCoststoBuyAtoB = calculatetotalCoststoBuyAtoB();
|
||||
const costPaidOutofClosing = calculateTotalcostPaidOutofClosing();
|
||||
const totaladjustments = calculateTotaladjustments();
|
||||
const fundsavailablefordistribution = calculatefundsavailablefordistribution();
|
||||
const fundsavailablefordistribution =
|
||||
calculatefundsavailablefordistribution();
|
||||
const grossproceedsperHUD = calculateTotalCosttoSellBtoC();
|
||||
const totalCosttoSellBtoC = calculateTotalCosttoSellBtoC();
|
||||
const totalincomestatement = calculateTotalincomestatement();
|
||||
const netBtoCsalevalue = calculatenetBtoCsalevalue();
|
||||
const netprofitbeforefinancingcosts = calculateNetProfitBeforeFinancingCosts();
|
||||
const netprofitbeforefinancingcosts =
|
||||
calculateNetProfitBeforeFinancingCosts();
|
||||
const NetProfit = calculateNetProfit();
|
||||
|
||||
// Add user info to formData, including the propertyTaxInfo array
|
||||
|
@ -871,21 +918,21 @@ const calculatenetBtoCsalevalue = () =>{
|
|||
totalcredits: totalcredits,
|
||||
totalPurchaseCostsaftercredits: totalPurchaseCostsaftercredits,
|
||||
totalcashAdjustments: totalcashAdjustments,
|
||||
totalcashrequiredonsettlement:totalcashrequiredonsettlement,
|
||||
totalcashrequiredonsettlement: totalcashrequiredonsettlement,
|
||||
totalincidentalCost: totalincidentalCost,
|
||||
totalcarryCosts: totalcarryCosts,
|
||||
totalrenovationCost: totalrenovationCost,
|
||||
totalRenovationsandHoldingCost: totalRenovationsandHoldingCost,
|
||||
totalCoststoBuyAtoB: totalCoststoBuyAtoB,
|
||||
costPaidOutofClosing:costPaidOutofClosing,
|
||||
totaladjustments:totaladjustments,
|
||||
fundsavailablefordistribution:fundsavailablefordistribution,
|
||||
grossproceedsperHUD:grossproceedsperHUD,
|
||||
totalCosttoSellBtoC:totalCosttoSellBtoC,
|
||||
totalincomestatement:totalincomestatement,
|
||||
netBtoCsalevalue:netBtoCsalevalue,
|
||||
netprofitbeforefinancingcosts:netprofitbeforefinancingcosts,
|
||||
NetProfit:NetProfit
|
||||
costPaidOutofClosing: costPaidOutofClosing,
|
||||
totaladjustments: totaladjustments,
|
||||
fundsavailablefordistribution: fundsavailablefordistribution,
|
||||
grossproceedsperHUD: grossproceedsperHUD,
|
||||
totalCosttoSellBtoC: totalCosttoSellBtoC,
|
||||
totalincomestatement: totalincomestatement,
|
||||
netBtoCsalevalue: netBtoCsalevalue,
|
||||
netprofitbeforefinancingcosts: netprofitbeforefinancingcosts,
|
||||
NetProfit: NetProfit,
|
||||
};
|
||||
|
||||
// Check if propertyTaxInfo is an array and has values
|
||||
|
@ -948,7 +995,6 @@ const calculatenetBtoCsalevalue = () =>{
|
|||
}
|
||||
};
|
||||
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="container tabs-wrap">
|
||||
|
@ -1878,11 +1924,11 @@ const calculatenetBtoCsalevalue = () =>{
|
|||
required
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<div className="row gy-3">
|
||||
<div className="row gy-3">
|
||||
{/* Close Date B to C */}
|
||||
<div className="col-md-4">
|
||||
<input
|
||||
|
@ -1913,11 +1959,11 @@ const calculatenetBtoCsalevalue = () =>{
|
|||
required
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<div className="row gy-3 align-items-center">
|
||||
<div className="row gy-3 align-items-center">
|
||||
<span
|
||||
className="col-md-4"
|
||||
style={{
|
||||
|
@ -1954,7 +2000,7 @@ const calculatenetBtoCsalevalue = () =>{
|
|||
fontWeight: "bold",
|
||||
}}
|
||||
>
|
||||
Renovation Risk
|
||||
Renovation Risk
|
||||
</span>
|
||||
|
||||
<div className="col-md-7">
|
||||
|
@ -1984,7 +2030,7 @@ Renovation Risk
|
|||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr
|
||||
style={{
|
||||
|
@ -1995,8 +2041,7 @@ Renovation Risk
|
|||
}}
|
||||
/>
|
||||
|
||||
|
||||
<div className="row gy-3 align-items-center">
|
||||
<div className="row gy-3 align-items-center">
|
||||
<span
|
||||
className="col-md-4"
|
||||
style={{
|
||||
|
@ -2010,8 +2055,7 @@ Renovation Risk
|
|||
<div className="col-md-4">
|
||||
<input
|
||||
type="text"
|
||||
className={`form-control ${
|
||||
formData.isPurchaseCostInvalid ? "is-invalid" : ""
|
||||
className={`form-control ${formData.isPurchaseCostInvalid ? "is-invalid" : ""
|
||||
}`}
|
||||
value={formData.purchaseCost}
|
||||
name="purchaseCost"
|
||||
|
@ -2083,8 +2127,7 @@ Renovation Risk
|
|||
<div className="col-md-4">
|
||||
<input
|
||||
type="text"
|
||||
className={`form-control ${
|
||||
cost.isInvalid ? "is-invalid" : ""
|
||||
className={`form-control ${cost.isInvalid ? "is-invalid" : ""
|
||||
}`} // Apply 'is-invalid' class when invalid
|
||||
value={cost.price}
|
||||
onChange={(e) => handlePriceChange(e, index)} // Use a new handler for price validation
|
||||
|
@ -2191,8 +2234,7 @@ Renovation Risk
|
|||
<div className="col-md-4">
|
||||
<input
|
||||
type="text"
|
||||
className={`form-control ${
|
||||
credits.isInvalid ? "is-invalid" : ""
|
||||
className={`form-control ${credits.isInvalid ? "is-invalid" : ""
|
||||
}`} // Apply 'is-invalid' class when invalid
|
||||
value={credits.price}
|
||||
onChange={(e) => handleCreditPriceChange(e, index)} // New handler for price validation
|
||||
|
@ -2340,8 +2382,7 @@ Renovation Risk
|
|||
<div className="col-md-4">
|
||||
<input
|
||||
type="text"
|
||||
className={`form-control ${
|
||||
cost.isInvalid ? "is-invalid" : ""
|
||||
className={`form-control ${cost.isInvalid ? "is-invalid" : ""
|
||||
}`} // Apply 'is-invalid' class when invalid
|
||||
value={cost.price}
|
||||
onChange={(e) =>
|
||||
|
@ -2425,8 +2466,7 @@ Renovation Risk
|
|||
}}
|
||||
/>
|
||||
|
||||
|
||||
<div className="row gy-3 align-items-center">
|
||||
<div className="row gy-3 align-items-center">
|
||||
<span
|
||||
className="col-md-4"
|
||||
style={{
|
||||
|
@ -2455,8 +2495,6 @@ Renovation Risk
|
|||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<hr
|
||||
style={{
|
||||
borderColor: "#fda417", // Set the color of the line
|
||||
|
@ -2497,8 +2535,7 @@ Renovation Risk
|
|||
<div className="col-md-4">
|
||||
<input
|
||||
type="text"
|
||||
className={`form-control ${
|
||||
cost.isInvalid ? "is-invalid" : ""
|
||||
className={`form-control ${cost.isInvalid ? "is-invalid" : ""
|
||||
}`} // Apply 'is-invalid' class when invalid
|
||||
value={cost.price}
|
||||
onChange={(e) => handleincidentalCostChange(e, index)} // Use a new handler for price validation
|
||||
|
@ -2598,11 +2635,7 @@ Renovation Risk
|
|||
className="form-control"
|
||||
value={cost.title}
|
||||
onChange={(e) =>
|
||||
handlecarryCostsTitle(
|
||||
index,
|
||||
"title",
|
||||
e.target.value
|
||||
)
|
||||
handlecarryCostsTitle(index, "title", e.target.value)
|
||||
}
|
||||
placeholder="Title"
|
||||
required
|
||||
|
@ -2611,13 +2644,10 @@ Renovation Risk
|
|||
<div className="col-md-4">
|
||||
<input
|
||||
type="text"
|
||||
className={`form-control ${
|
||||
cost.isInvalid ? "is-invalid" : ""
|
||||
className={`form-control ${cost.isInvalid ? "is-invalid" : ""
|
||||
}`} // Apply 'is-invalid' class when invalid
|
||||
value={cost.price}
|
||||
onChange={(e) =>
|
||||
handlecarryCostsChange(e, index)
|
||||
} // Use a new handler for price validation
|
||||
onChange={(e) => handlecarryCostsChange(e, index)} // Use a new handler for price validation
|
||||
placeholder="Price"
|
||||
style={{ textAlign: "right" }}
|
||||
required
|
||||
|
@ -2731,8 +2761,7 @@ Renovation Risk
|
|||
<div className="col-md-4">
|
||||
<input
|
||||
type="text"
|
||||
className={`form-control ${
|
||||
cost.isInvalid ? "is-invalid" : ""
|
||||
className={`form-control ${cost.isInvalid ? "is-invalid" : ""
|
||||
}`} // Apply 'is-invalid' class when invalid
|
||||
value={cost.price}
|
||||
onChange={(e) => handlerenovationCostChange(e, index)} // Use a new handler for price validation
|
||||
|
@ -2895,8 +2924,7 @@ Renovation Risk
|
|||
}}
|
||||
/>
|
||||
|
||||
|
||||
<div className="row gy-3 align-items-center">
|
||||
<div className="row gy-3 align-items-center">
|
||||
<span
|
||||
className="col-md-4"
|
||||
style={{
|
||||
|
@ -2910,8 +2938,7 @@ Renovation Risk
|
|||
<div className="col-md-4">
|
||||
<input
|
||||
type="text"
|
||||
className={`form-control ${
|
||||
formData.isPurchaseCostInvalid ? "is-invalid" : ""
|
||||
className={`form-control ${formData.isPurchaseCostInvalid ? "is-invalid" : ""
|
||||
}`}
|
||||
name="sellingPriceBtoC"
|
||||
value={formData.sellingPriceBtoC}
|
||||
|
@ -2956,9 +2983,7 @@ Renovation Risk
|
|||
}}
|
||||
/>
|
||||
|
||||
|
||||
|
||||
<span
|
||||
<span
|
||||
style={{
|
||||
color: "#fda417",
|
||||
fontSize: "14px",
|
||||
|
@ -2989,11 +3014,12 @@ Renovation Risk
|
|||
<div className="col-md-4">
|
||||
<input
|
||||
type="text"
|
||||
className={`form-control ${
|
||||
cost.isInvalid ? "is-invalid" : ""
|
||||
className={`form-control ${cost.isInvalid ? "is-invalid" : ""
|
||||
}`} // Apply 'is-invalid' class when invalid
|
||||
value={cost.price}
|
||||
onChange={(e) => handlecostPaidOutofClosingChange(e, index)} // Use a new handler for price validation
|
||||
onChange={(e) =>
|
||||
handlecostPaidOutofClosingChange(e, index)
|
||||
} // Use a new handler for price validation
|
||||
placeholder="Price"
|
||||
style={{ textAlign: "right" }}
|
||||
required
|
||||
|
@ -3072,7 +3098,6 @@ Renovation Risk
|
|||
}}
|
||||
/>
|
||||
|
||||
|
||||
<div className="row gy-3 align-items-center">
|
||||
<span
|
||||
className="col-md-4"
|
||||
|
@ -3111,8 +3136,7 @@ Renovation Risk
|
|||
}}
|
||||
/>
|
||||
|
||||
|
||||
<div className="row gy-3 align-items-center">
|
||||
<div className="row gy-3 align-items-center">
|
||||
<span
|
||||
className="col-md-4"
|
||||
style={{
|
||||
|
@ -3150,8 +3174,6 @@ Renovation Risk
|
|||
}}
|
||||
/>
|
||||
|
||||
|
||||
|
||||
<span
|
||||
style={{
|
||||
color: "#fda417",
|
||||
|
@ -3170,11 +3192,7 @@ Renovation Risk
|
|||
className="form-control"
|
||||
value={cost.title}
|
||||
onChange={(e) =>
|
||||
handleadjustmentsTitle(
|
||||
index,
|
||||
"title",
|
||||
e.target.value
|
||||
)
|
||||
handleadjustmentsTitle(index, "title", e.target.value)
|
||||
}
|
||||
placeholder="Title"
|
||||
required
|
||||
|
@ -3183,8 +3201,7 @@ Renovation Risk
|
|||
<div className="col-md-4">
|
||||
<input
|
||||
type="text"
|
||||
className={`form-control ${
|
||||
cost.isInvalid ? "is-invalid" : ""
|
||||
className={`form-control ${cost.isInvalid ? "is-invalid" : ""
|
||||
}`} // Apply 'is-invalid' class when invalid
|
||||
value={cost.price}
|
||||
onChange={(e) => handleadjustmentsChange(e, index)} // Use a new handler for price validation
|
||||
|
@ -3266,8 +3283,7 @@ Renovation Risk
|
|||
}}
|
||||
/>
|
||||
|
||||
|
||||
<div className="row gy-3 align-items-center">
|
||||
<div className="row gy-3 align-items-center">
|
||||
<span
|
||||
className="col-md-4"
|
||||
style={{
|
||||
|
@ -3296,7 +3312,6 @@ Renovation Risk
|
|||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<hr
|
||||
style={{
|
||||
borderColor: "#fda417", // Set the color of the line
|
||||
|
@ -3313,7 +3328,7 @@ Renovation Risk
|
|||
fontWeight: "bold",
|
||||
}}
|
||||
>
|
||||
Income Statement Adjustments:
|
||||
Income Statement Adjustments:
|
||||
</span>
|
||||
|
||||
{formData.incomestatement.map((cost, index) => (
|
||||
|
@ -3337,8 +3352,7 @@ Income Statement Adjustments:
|
|||
<div className="col-md-4">
|
||||
<input
|
||||
type="text"
|
||||
className={`form-control ${
|
||||
cost.isInvalid ? "is-invalid" : ""
|
||||
className={`form-control ${cost.isInvalid ? "is-invalid" : ""
|
||||
}`} // Apply 'is-invalid' class when invalid
|
||||
value={cost.price}
|
||||
onChange={(e) => handleincomestatementChange(e, index)} // Use a new handler for price validation
|
||||
|
@ -3420,8 +3434,6 @@ Income Statement Adjustments:
|
|||
}}
|
||||
/>
|
||||
|
||||
|
||||
|
||||
<div className="row gy-3 align-items-center">
|
||||
<span
|
||||
className="col-md-4"
|
||||
|
@ -3448,7 +3460,6 @@ Income Statement Adjustments:
|
|||
// placeholder="Total Incidental Cost"
|
||||
required
|
||||
/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<hr
|
||||
|
@ -3460,9 +3471,6 @@ Income Statement Adjustments:
|
|||
}}
|
||||
/>
|
||||
|
||||
|
||||
|
||||
|
||||
<span
|
||||
style={{
|
||||
color: "#fda417",
|
||||
|
@ -3473,7 +3481,7 @@ Income Statement Adjustments:
|
|||
Net Profit Computation
|
||||
</span>
|
||||
|
||||
<div className="row gy-3 align-items-center">
|
||||
<div className="row gy-3 align-items-center">
|
||||
<div className="col-md-4">
|
||||
<input
|
||||
type="text"
|
||||
|
@ -3493,11 +3501,11 @@ Income Statement Adjustments:
|
|||
required
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<div className="row gy-3">
|
||||
<div className="row gy-3">
|
||||
<div className="col-md-4">
|
||||
<input
|
||||
type="text"
|
||||
|
@ -3511,8 +3519,7 @@ Income Statement Adjustments:
|
|||
<div className="col-md-4">
|
||||
<input
|
||||
type="text"
|
||||
className={`form-control ${
|
||||
formData.isfundspriortoclosingInvalid ? "is-invalid" : ""
|
||||
className={`form-control ${formData.isfundspriortoclosingInvalid ? "is-invalid" : ""
|
||||
}`}
|
||||
value={formData.fundspriortoclosing}
|
||||
name="fundspriortoclosing"
|
||||
|
@ -3545,10 +3552,10 @@ Income Statement Adjustments:
|
|||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<div className="row gy-3">
|
||||
<div className="row gy-3">
|
||||
<div className="col-md-4">
|
||||
<input
|
||||
type="text"
|
||||
|
@ -3569,11 +3576,11 @@ Income Statement Adjustments:
|
|||
required
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<div className="row gy-3">
|
||||
<div className="row gy-3">
|
||||
<div className="col-md-4">
|
||||
<input
|
||||
type="text"
|
||||
|
@ -3585,11 +3592,9 @@ Income Statement Adjustments:
|
|||
</div>
|
||||
|
||||
<div className="col-md-4">
|
||||
|
||||
<input
|
||||
type="text"
|
||||
className={`form-control ${
|
||||
formData.isPurchaseCostInvalid ? "is-invalid" : ""
|
||||
className={`form-control ${formData.isPurchaseCostInvalid ? "is-invalid" : ""
|
||||
}`}
|
||||
value={formData.shorttermrental}
|
||||
name="shorttermrental"
|
||||
|
@ -3621,12 +3626,11 @@ Income Statement Adjustments:
|
|||
Please enter a valid number.
|
||||
</div>
|
||||
)}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<div className="row gy-3">
|
||||
<div className="row gy-3">
|
||||
<div className="col-md-4">
|
||||
<input
|
||||
type="text"
|
||||
|
@ -3640,8 +3644,7 @@ Income Statement Adjustments:
|
|||
<div className="col-md-4">
|
||||
<input
|
||||
type="text"
|
||||
className={`form-control ${
|
||||
formData.isPurchaseCostInvalid ? "is-invalid" : ""
|
||||
className={`form-control ${formData.isPurchaseCostInvalid ? "is-invalid" : ""
|
||||
}`}
|
||||
value={formData.OtherIncome}
|
||||
name="OtherIncome"
|
||||
|
@ -3674,10 +3677,10 @@ Income Statement Adjustments:
|
|||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<div className="row gy-3">
|
||||
<div className="row gy-3">
|
||||
<div className="col-md-4">
|
||||
<input
|
||||
type="text"
|
||||
|
@ -3691,8 +3694,7 @@ Income Statement Adjustments:
|
|||
<div className="col-md-4">
|
||||
<input
|
||||
type="text"
|
||||
className={`form-control ${
|
||||
formData.isPurchaseCostInvalid ? "is-invalid" : ""
|
||||
className={`form-control ${formData.isPurchaseCostInvalid ? "is-invalid" : ""
|
||||
}`}
|
||||
value={formData.InsuranceClaim}
|
||||
name="InsuranceClaim"
|
||||
|
@ -3725,10 +3727,10 @@ Income Statement Adjustments:
|
|||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<div className="row gy-3">
|
||||
<div className="row gy-3">
|
||||
<div className="col-md-4">
|
||||
<input
|
||||
type="text"
|
||||
|
@ -3742,8 +3744,7 @@ Income Statement Adjustments:
|
|||
<div className="col-md-4">
|
||||
<input
|
||||
type="text"
|
||||
className={`form-control ${
|
||||
formData.isPurchaseCostInvalid ? "is-invalid" : ""
|
||||
className={`form-control ${formData.isPurchaseCostInvalid ? "is-invalid" : ""
|
||||
}`}
|
||||
value={formData.LongTermRental}
|
||||
name="LongTermRental"
|
||||
|
@ -3776,10 +3777,10 @@ Income Statement Adjustments:
|
|||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<div className="row gy-3 align-items-center">
|
||||
<div className="row gy-3 align-items-center">
|
||||
<span
|
||||
className="col-md-4"
|
||||
style={{
|
||||
|
@ -3808,9 +3809,9 @@ Income Statement Adjustments:
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<div className="row gy-3 align-items-center">
|
||||
<div className="row gy-3 align-items-center">
|
||||
<span
|
||||
className="col-md-4"
|
||||
style={{
|
||||
|
@ -3824,8 +3825,9 @@ Income Statement Adjustments:
|
|||
<div className="col-md-4">
|
||||
<input
|
||||
type="text"
|
||||
className={`form-control ${
|
||||
formData.isFinancingCostClosingCostInvalid ? "is-invalid" : ""
|
||||
className={`form-control ${formData.isFinancingCostClosingCostInvalid
|
||||
? "is-invalid"
|
||||
: ""
|
||||
}`}
|
||||
value={formData.FinancingCostClosingCost}
|
||||
name="FinancingCostClosingCost"
|
||||
|
@ -3860,10 +3862,9 @@ Income Statement Adjustments:
|
|||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<br />
|
||||
|
||||
<div className="row gy-3 align-items-center">
|
||||
<div className="row gy-3 align-items-center">
|
||||
<span
|
||||
className="col-md-4"
|
||||
style={{
|
||||
|
@ -3889,16 +3890,9 @@ Income Statement Adjustments:
|
|||
// placeholder="Total Incidental Cost"
|
||||
required
|
||||
/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div className="col-md-4">
|
||||
<button
|
||||
className="btn btn-primary back"
|
||||
|
|
Loading…
Reference in New Issue