IO-1654 add discount for 900500 lines.

This commit is contained in:
Patrick Fic
2022-01-20 08:12:12 -08:00
parent 83255cd316
commit 968da48399
5 changed files with 27 additions and 6 deletions

View File

@@ -123,7 +123,7 @@ export function JobsDocumentsDownloadButton({
a.click();
}
};
console.log("🚀 ~ file: jobs-document-gallery.download.component.jsx ~ line 131 ~ imagesToDownload", imagesToDownload)
return (
<>
<Button

View File

@@ -1598,6 +1598,18 @@ export const TemplateList = (type, context) => {
//idtype: "vendor",
disabled: false,
},
production_by_technician_one: {
title: i18n.t(
"reportcenter.templates.production_by_technician_one"
),
description: "",
subject: i18n.t(
"reportcenter.templates.production_by_technician_one"
),
key: "production_by_technician_one",
//idtype: "vendor",
disabled: false,
},
production_by_category: {
title: i18n.t("reportcenter.templates.production_by_category"),
description: "",

View File

@@ -38,7 +38,9 @@ exports.default = function ({
if (
(jobline.prt_dsmk_p && jobline.prt_dsmk_p !== 0) ||
((jobline.db_ref === "900511" || jobline.db_ref === "900510") &&
((jobline.db_ref === "900511" ||
jobline.db_ref === "900510" ||
jobline.db_ref === "900500") &&
jobline.prt_dsmk_m &&
jobline.prt_dsmk_m !== 0)
) {

View File

@@ -72,7 +72,9 @@ exports.default = async function (socket, jobid) {
if (
(val.prt_dsmk_p && val.prt_dsmk_p !== 0) ||
((val.db_ref === "900511" || val.db_ref === "900510") &&
((val.db_ref === "900511" ||
val.db_ref === "900510" ||
val.db_ref === "900500") &&
val.prt_dsmk_m &&
val.prt_dsmk_m !== 0)
) {

View File

@@ -271,7 +271,8 @@ function CalculatePartsTotals(jobLines) {
.multiply(value.part_qty || 0)
.add(
(value.db_ref === "900511" ||
value.db_ref === "900510") &&
value.db_ref === "900510" ||
value.db_ref === "900500") &&
value.prt_dsmk_m &&
value.prt_dsmk_m !== 0
? Dinero({ amount: Math.round(value.prt_dsmk_m * 100) })
@@ -298,7 +299,9 @@ function CalculatePartsTotals(jobLines) {
parts: {
...acc.parts,
prt_dsmk_total: acc.parts.prt_dsmk_total.add(
(value.db_ref === "900511" || value.db_ref === "900510") &&
(value.db_ref === "900511" ||
value.db_ref === "900510" ||
value.db_ref === "900500") &&
value.prt_dsmk_m &&
value.prt_dsmk_m !== 0
? Dinero({ amount: Math.round(value.prt_dsmk_m * 100) })
@@ -344,7 +347,9 @@ function CalculatePartsTotals(jobLines) {
}).multiply(value.part_qty || 0)
)
.add(
(value.db_ref === "900511" || value.db_ref === "900510") &&
(value.db_ref === "900511" ||
value.db_ref === "900510" ||
value.db_ref === "900500") &&
value.prt_dsmk_m &&
value.prt_dsmk_m !== 0
? Dinero({ amount: Math.round(value.prt_dsmk_m * 100) })