diff --git a/src/PowderCoating.Web/Controllers/QuotesController.cs b/src/PowderCoating.Web/Controllers/QuotesController.cs index bed043a..9c911fc 100644 --- a/src/PowderCoating.Web/Controllers/QuotesController.cs +++ b/src/PowderCoating.Web/Controllers/QuotesController.cs @@ -386,27 +386,29 @@ public class QuotesController : Controller // never displays "× 0 min" when the oven was priced against DefaultOvenCycleMinutes. quoteDto.PricingBreakdown = new QuotePricingBreakdownDto { - MaterialCosts = quote.MaterialCosts, - LaborCosts = quote.LaborCosts, - EquipmentCosts = quote.EquipmentCosts, - ItemsSubtotal = quote.ItemsSubtotal, - OvenBatchCost = quote.OvenBatchCost, - OvenBatches = quote.OvenBatches, - OvenCycleMinutes = quote.OvenCycleMinutes ?? operatingCosts?.DefaultOvenCycleMinutes ?? 0, - ShopSuppliesAmount = quote.ShopSuppliesAmount, - ShopSuppliesPercent = quote.ShopSuppliesPercent, - OverheadCosts = quote.OverheadAmount, - OverheadPercent = quote.OverheadPercent, - ProfitMargin = quote.ProfitMargin, - ProfitPercent = quote.ProfitPercent, - SubtotalBeforeDiscount = quote.SubTotal, - DiscountAmount = quote.DiscountAmount, - DiscountPercent = quote.DiscountPercent, - SubtotalAfterDiscount = quote.SubTotal - quote.DiscountAmount, - RushFee = quote.RushFee, - TaxPercent = quote.TaxPercent, - TaxAmount = quote.TaxAmount, - Total = quote.Total + MaterialCosts = quote.MaterialCosts, + LaborCosts = quote.LaborCosts, + EquipmentCosts = quote.EquipmentCosts, + ItemsSubtotal = quote.ItemsSubtotal, + OvenBatchCost = quote.OvenBatchCost, + OvenBatches = quote.OvenBatches, + OvenCycleMinutes = quote.OvenCycleMinutes ?? operatingCosts?.DefaultOvenCycleMinutes ?? 0, + FacilityOverheadCost = quote.FacilityOverheadCost, + FacilityOverheadRatePerHour = quote.FacilityOverheadRatePerHour, + ShopSuppliesAmount = quote.ShopSuppliesAmount, + ShopSuppliesPercent = quote.ShopSuppliesPercent, + OverheadCosts = quote.OverheadAmount, + OverheadPercent = quote.OverheadPercent, + ProfitMargin = quote.ProfitMargin, + ProfitPercent = quote.ProfitPercent, + SubtotalBeforeDiscount = quote.SubTotal, + DiscountAmount = quote.DiscountAmount, + DiscountPercent = quote.DiscountPercent, + SubtotalAfterDiscount = quote.SubTotal - quote.DiscountAmount, + RushFee = quote.RushFee, + TaxPercent = quote.TaxPercent, + TaxAmount = quote.TaxAmount, + Total = quote.Total }; // Load change history @@ -570,27 +572,29 @@ public class QuotesController : Controller // Populate pricing breakdown from stored snapshot values — never recalculate on load quoteDto.PricingBreakdown = new QuotePricingBreakdownDto { - MaterialCosts = quote.MaterialCosts, - LaborCosts = quote.LaborCosts, - EquipmentCosts = quote.EquipmentCosts, - ItemsSubtotal = quote.ItemsSubtotal, - OvenBatchCost = quote.OvenBatchCost, - OvenBatches = quote.OvenBatches, - OvenCycleMinutes = quote.OvenCycleMinutes ?? pdfOperatingCosts?.DefaultOvenCycleMinutes ?? 0, - ShopSuppliesAmount = quote.ShopSuppliesAmount, - ShopSuppliesPercent = quote.ShopSuppliesPercent, - OverheadCosts = quote.OverheadAmount, - OverheadPercent = quote.OverheadPercent, - ProfitMargin = quote.ProfitMargin, - ProfitPercent = quote.ProfitPercent, - SubtotalBeforeDiscount = quote.SubTotal, - DiscountAmount = quote.DiscountAmount, - DiscountPercent = quote.DiscountPercent, - SubtotalAfterDiscount = quote.SubTotal - quote.DiscountAmount, - RushFee = quote.RushFee, - TaxPercent = quote.TaxPercent, - TaxAmount = quote.TaxAmount, - Total = quote.Total + MaterialCosts = quote.MaterialCosts, + LaborCosts = quote.LaborCosts, + EquipmentCosts = quote.EquipmentCosts, + ItemsSubtotal = quote.ItemsSubtotal, + OvenBatchCost = quote.OvenBatchCost, + OvenBatches = quote.OvenBatches, + OvenCycleMinutes = quote.OvenCycleMinutes ?? pdfOperatingCosts?.DefaultOvenCycleMinutes ?? 0, + FacilityOverheadCost = quote.FacilityOverheadCost, + FacilityOverheadRatePerHour = quote.FacilityOverheadRatePerHour, + ShopSuppliesAmount = quote.ShopSuppliesAmount, + ShopSuppliesPercent = quote.ShopSuppliesPercent, + OverheadCosts = quote.OverheadAmount, + OverheadPercent = quote.OverheadPercent, + ProfitMargin = quote.ProfitMargin, + ProfitPercent = quote.ProfitPercent, + SubtotalBeforeDiscount = quote.SubTotal, + DiscountAmount = quote.DiscountAmount, + DiscountPercent = quote.DiscountPercent, + SubtotalAfterDiscount = quote.SubTotal - quote.DiscountAmount, + RushFee = quote.RushFee, + TaxPercent = quote.TaxPercent, + TaxAmount = quote.TaxAmount, + Total = quote.Total }; if (currentUser?.CompanyId == null) {