Autohouse update.
This commit is contained in:
@@ -168,7 +168,6 @@ exports.default = async (req, res) => {
|
|||||||
sendServerEmail({
|
sendServerEmail({
|
||||||
subject: `Autohouse Report ${moment().format("MM-DD-YY")}`,
|
subject: `Autohouse Report ${moment().format("MM-DD-YY")}`,
|
||||||
text: `Errors: ${allErrors.map((e) => JSON.stringify(e, null, 2))}
|
text: `Errors: ${allErrors.map((e) => JSON.stringify(e, null, 2))}
|
||||||
|
|
||||||
Uploaded: ${JSON.stringify(
|
Uploaded: ${JSON.stringify(
|
||||||
allxmlsToUpload.map((x) => x.filename),
|
allxmlsToUpload.map((x) => x.filename),
|
||||||
null,
|
null,
|
||||||
@@ -755,9 +754,13 @@ const CreateCosts = (job) => {
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
PartsTotalCost: Object.keys(billTotalsByCostCenters).reduce((acc, key) => {
|
PartsTotalCost: Object.keys(billTotalsByCostCenters).reduce((acc, key) => {
|
||||||
if (key !== defaultCosts.PAS && key !== defaultCosts.PASL)
|
if (
|
||||||
|
key !== defaultCosts.PAS &&
|
||||||
|
key !== defaultCosts.PASL &&
|
||||||
|
key !== defaultCosts.MAPA &&
|
||||||
|
key !== defaultCosts.MASH
|
||||||
|
)
|
||||||
return acc.add(billTotalsByCostCenters[key]);
|
return acc.add(billTotalsByCostCenters[key]);
|
||||||
|
|
||||||
return acc;
|
return acc;
|
||||||
}, Dinero()),
|
}, Dinero()),
|
||||||
PartsOemCost: (billTotalsByCostCenters[defaultCosts.PAN] || Dinero()).add(
|
PartsOemCost: (billTotalsByCostCenters[defaultCosts.PAN] || Dinero()).add(
|
||||||
|
|||||||
Reference in New Issue
Block a user