done
This commit is contained in:
parent
0e7abb67d3
commit
5a9e2aec56
|
@ -214,6 +214,14 @@ const propertySchema = mongoose.Schema({
|
||||||
type: Number,
|
type: Number,
|
||||||
required: true, // Set to true if this field is mandatory
|
required: true, // Set to true if this field is mandatory
|
||||||
},
|
},
|
||||||
|
purchaseCost:{
|
||||||
|
type: Number,
|
||||||
|
required: true, // Set to true if this field is mandatory
|
||||||
|
},
|
||||||
|
grossproceedsperHUD:{
|
||||||
|
type: Number,
|
||||||
|
required: true, // Set to true if this field is mandatory
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const PropertyModal = mongoose.model("property", propertySchema);
|
const PropertyModal = mongoose.model("property", propertySchema);
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -45,7 +45,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<script type="module" crossorigin src="/assets/index-D_QrejLk.js"></script>
|
<script type="module" crossorigin src="/assets/index-AvLYi7ml.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="/assets/index-iEl-il0E.css">
|
<link rel="stylesheet" crossorigin href="/assets/index-iEl-il0E.css">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
|
@ -733,8 +733,8 @@ const Addproperty = () => {
|
||||||
formData.renovationRisk &&
|
formData.renovationRisk &&
|
||||||
formData.closeDateAtoB &&
|
formData.closeDateAtoB &&
|
||||||
formData.closeDateBtoC &&
|
formData.closeDateBtoC &&
|
||||||
formData.totalCosttoSellBtoC &&
|
formData.purchaseCost &&
|
||||||
formData.grossproceedsperHUD
|
formData.sellingPriceBtoC
|
||||||
) {
|
) {
|
||||||
const totalPurchaseCosts = calculateTotalPurchaseCosts();
|
const totalPurchaseCosts = calculateTotalPurchaseCosts();
|
||||||
const totalPurchaseCostsaftercredits = calculateTotalPurchaseCostsWithCredits();
|
const totalPurchaseCostsaftercredits = calculateTotalPurchaseCostsWithCredits();
|
||||||
|
@ -748,6 +748,9 @@ const Addproperty = () => {
|
||||||
const totalCoststoBuyAtoB = calculatetotalCoststoBuyAtoB();
|
const totalCoststoBuyAtoB = calculatetotalCoststoBuyAtoB();
|
||||||
const costPaidOutofClosing = calculateTotalcostPaidOutofClosing();
|
const costPaidOutofClosing = calculateTotalcostPaidOutofClosing();
|
||||||
const totaladjustments = calculateTotaladjustments();
|
const totaladjustments = calculateTotaladjustments();
|
||||||
|
const fundsavailablefordistribution = calculatefundsavailablefordistribution();
|
||||||
|
const grossproceedsperHUD = calculateTotalCosttoSellBtoC();
|
||||||
|
const totalCosttoSellBtoC = calculateTotalCosttoSellBtoC();
|
||||||
|
|
||||||
// Add user info to formData, including the propertyTaxInfo array
|
// Add user info to formData, including the propertyTaxInfo array
|
||||||
const formDataWithUserInfo = {
|
const formDataWithUserInfo = {
|
||||||
|
@ -769,7 +772,10 @@ const Addproperty = () => {
|
||||||
totalRenovationsandHoldingCost: totalRenovationsandHoldingCost,
|
totalRenovationsandHoldingCost: totalRenovationsandHoldingCost,
|
||||||
totalCoststoBuyAtoB: totalCoststoBuyAtoB,
|
totalCoststoBuyAtoB: totalCoststoBuyAtoB,
|
||||||
costPaidOutofClosing:costPaidOutofClosing,
|
costPaidOutofClosing:costPaidOutofClosing,
|
||||||
totaladjustments:totaladjustments
|
totaladjustments:totaladjustments,
|
||||||
|
fundsavailablefordistribution:fundsavailablefordistribution,
|
||||||
|
grossproceedsperHUD:grossproceedsperHUD,
|
||||||
|
totalCosttoSellBtoC:totalCosttoSellBtoC
|
||||||
};
|
};
|
||||||
|
|
||||||
// Check if propertyTaxInfo is an array and has values
|
// Check if propertyTaxInfo is an array and has values
|
||||||
|
@ -1897,6 +1903,7 @@ Renovation Risk
|
||||||
formData.isPurchaseCostInvalid ? "is-invalid" : ""
|
formData.isPurchaseCostInvalid ? "is-invalid" : ""
|
||||||
}`}
|
}`}
|
||||||
value={formData.purchaseCost}
|
value={formData.purchaseCost}
|
||||||
|
name="purchaseCost"
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
const value = e.target.value;
|
const value = e.target.value;
|
||||||
const isValid = /^\d*\.?\d*$/.test(value); // Regex to allow only numbers and decimal points
|
const isValid = /^\d*\.?\d*$/.test(value); // Regex to allow only numbers and decimal points
|
||||||
|
@ -2796,6 +2803,7 @@ Renovation Risk
|
||||||
className={`form-control ${
|
className={`form-control ${
|
||||||
formData.isPurchaseCostInvalid ? "is-invalid" : ""
|
formData.isPurchaseCostInvalid ? "is-invalid" : ""
|
||||||
}`}
|
}`}
|
||||||
|
name="sellingPriceBtoC"
|
||||||
value={formData.sellingPriceBtoC}
|
value={formData.sellingPriceBtoC}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
const value = e.target.value;
|
const value = e.target.value;
|
||||||
|
|
Loading…
Reference in New Issue