diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json
index 0011cede6..4c534a1f1 100644
--- a/client/src/translations/en_us/common.json
+++ b/client/src/translations/en_us/common.json
@@ -295,7 +295,8 @@
"dailypainttarget": "Scoreboard - Daily Paint Target",
"default_adjustment_rate": "Default Labor Deduction Adjustment Rate",
"deliver": {
- "templates": "Delivery Templates"
+ "templates": "Delivery Templates",
+ "require_actual_delivery_date": "Require Actual Delivery"
},
"dms": {
"apcontrol": "AP Control Number",
@@ -1139,6 +1140,8 @@
"download": "Download",
"edit": "Edit",
"login": "Login",
+ "next": "Next",
+ "previous": "Previous",
"print": "Print",
"refresh": "Refresh",
"remove": "Remove",
diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json
index 463e310e6..d9d1accce 100644
--- a/client/src/translations/es/common.json
+++ b/client/src/translations/es/common.json
@@ -295,7 +295,8 @@
"dailypainttarget": "",
"default_adjustment_rate": "",
"deliver": {
- "templates": ""
+ "templates": "",
+ "require_actual_delivery_date": ""
},
"dms": {
"apcontrol": "",
@@ -1139,6 +1140,8 @@
"download": "",
"edit": "Editar",
"login": "",
+ "next": "",
+ "previous": "",
"print": "",
"refresh": "",
"remove": "",
diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json
index 8ddbeef43..b44021dd2 100644
--- a/client/src/translations/fr/common.json
+++ b/client/src/translations/fr/common.json
@@ -295,7 +295,8 @@
"dailypainttarget": "",
"default_adjustment_rate": "",
"deliver": {
- "templates": ""
+ "templates": "",
+ "require_actual_delivery_date": ""
},
"dms": {
"apcontrol": "",
@@ -1139,6 +1140,8 @@
"download": "",
"edit": "modifier",
"login": "",
+ "next": "",
+ "previous": "",
"print": "",
"refresh": "",
"remove": "",
diff --git a/server/job/job-costing.js b/server/job/job-costing.js
index 8b966140e..f8cbd2515 100644
--- a/server/job/job-costing.js
+++ b/server/job/job-costing.js
@@ -318,7 +318,9 @@ function GenerateCostingData(job) {
if (!partsProfitCenter)
console.log("Unknown cost/profit center mapping for parts.", val.line_desc, val.part_type);
const partsAmount = Dinero({
- amount: val.act_price_before_ppc ? Math.round(val.act_price_before_ppc * 100) : Math.round(val.act_price * 100)
+ amount: val.act_price_before_ppc
+ ? Math.round(val.act_price_before_ppc * 100)
+ : Math.round(val.act_price * 100)
})
.multiply(val.part_qty || 1)
.add(
@@ -327,7 +329,9 @@ function GenerateCostingData(job) {
? val.prt_dsmk_m
? Dinero({ amount: Math.round(val.prt_dsmk_m * 100) })
: Dinero({
- amount: val.act_price_before_ppc ? Math.round(val.act_price_before_ppc * 100) : Math.round(val.act_price * 100)
+ amount: val.act_price_before_ppc
+ ? Math.round(val.act_price_before_ppc * 100)
+ : Math.round(val.act_price * 100)
})
.multiply(val.part_qty || 0)
.percentage(Math.abs(val.prt_dsmk_p || 0))
@@ -368,7 +372,10 @@ function GenerateCostingData(job) {
}
//Additional Profit Center
- if ((!val.part_type && !val.mod_lbr_ty) || (!val.part_type && val.mod_lbr_ty)) {
+ if (
+ (!val.part_type && !val.mod_lbr_ty) ||
+ (!val.part_type && val.mod_lbr_ty && val.act_price > 0 && val.lbr_op !== "OP14")
+ ) {
//Does it already have a defined profit center?
//If so, use it, otherwise try to use the same from the auto-allocate logic in IO app jobs-close-auto-allocate.
const partsProfitCenter = val.profitcenter_part || getAdditionalCostCenter(val, defaultProfits) || "Unknown";
diff --git a/server/job/job-totals-USA.js b/server/job/job-totals-USA.js
index c8bcdf2a8..ed9441d9d 100644
--- a/server/job/job-totals-USA.js
+++ b/server/job/job-totals-USA.js
@@ -909,6 +909,25 @@ function CalculateTaxesTotals(job, otherTotals) {
}
});
+ if (job.adjustment_bottom_line) {
+ const subtotal_before_adjustment = subtotal.add(Dinero({ amount: Math.round(job.adjustment_bottom_line * -100) }));
+ const percent_of_adjustment =
+ Math.round(
+ subtotal_before_adjustment.toUnit() /
+ (job.adjustment_bottom_line > 0 ? job.adjustment_bottom_line : job.adjustment_bottom_line * -1)
+ ) / 100;
+
+ Object.keys(taxableAmountsByTier).forEach((taxTierKey) => {
+ taxable_adjustment = taxableAmountsByTier[taxTierKey].multiply(percent_of_adjustment);
+ console.log("🚀 ~ taxableAmountsByTier ~ taxable_adjustment:", taxable_adjustment)
+ if (job.adjustment_bottom_line > 0) {
+ taxableAmountsByTier[taxTierKey] = taxableAmountsByTier[taxTierKey].add(taxable_adjustment);
+ } else {
+ taxableAmountsByTier[taxTierKey] = taxableAmountsByTier[taxTierKey].subtract(taxable_adjustment);
+ }
+ });
+ }
+
const remainingTaxableAmounts = taxableAmountsByTier;
console.log("*** Taxable Amounts by Tier***");
console.table(JSON.parse(JSON.stringify(taxableAmountsByTier)));