IO-3001 Add UI adjustments.
This commit is contained in:
@@ -476,7 +476,7 @@ function GenerateCostingData(job) {
|
||||
if (!hasMapaLine) {
|
||||
if (!jobLineTotalsByProfitCenter.additional[defaultProfits["MAPA"]])
|
||||
jobLineTotalsByProfitCenter.additional[defaultProfits["MAPA"]] = Dinero();
|
||||
|
||||
|
||||
jobLineTotalsByProfitCenter.additional[defaultProfits["MAPA"]] = jobLineTotalsByProfitCenter.additional[
|
||||
defaultProfits["MAPA"]
|
||||
].add(
|
||||
@@ -809,6 +809,41 @@ function GenerateCostingData(job) {
|
||||
gppercent: formatGpPercent(0)
|
||||
});
|
||||
}
|
||||
//Push adjustments to bottom line.
|
||||
if (job.job_totals.totals.ttl_adjustment) {
|
||||
//Add to totals.
|
||||
const Adjustment = Dinero(job.job_totals.totals.ttl_adjustment); //Need to invert, since this is being assigned as a cost.
|
||||
summaryData.totalAdditionalSales = summaryData.totalAdditionalSales.add(Adjustment);
|
||||
summaryData.totalSales = summaryData.totalSales.add(Adjustment);
|
||||
//Add to lines.
|
||||
costCenterData.push({
|
||||
id: "Adj",
|
||||
cost_center: "Adjustment",
|
||||
sale_labor: Dinero().toFormat(),
|
||||
sale_labor_dinero: Dinero(),
|
||||
sale_parts: Dinero().toFormat(),
|
||||
sale_parts_dinero: Dinero(),
|
||||
sale_additional: Adjustment.toFormat(),
|
||||
sale_additional_dinero: Adjustment,
|
||||
sale_sublet: Dinero(),
|
||||
sale_sublet_dinero: Dinero(),
|
||||
sales: Adjustment.toFormat(),
|
||||
sales_dinero: Adjustment,
|
||||
cost_parts: Dinero().toFormat(),
|
||||
cost_parts_dinero: Dinero(),
|
||||
cost_labor: Dinero().toFormat(), //Adjustment.toFormat(),
|
||||
cost_labor_dinero: Dinero(), // Adjustment,
|
||||
cost_additional: Dinero(),
|
||||
cost_additional_dinero: Dinero(),
|
||||
cost_sublet: Dinero(),
|
||||
cost_sublet_dinero: Dinero(),
|
||||
costs: Dinero().toFormat(),
|
||||
costs_dinero: Dinero(),
|
||||
gpdollars_dinero: Dinero(),
|
||||
gpdollars: Dinero().toFormat(),
|
||||
gppercent: formatGpPercent(0)
|
||||
});
|
||||
}
|
||||
|
||||
//Final summary data massaging.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user