IO-745 Add ins co and class to ccc conversion.

This commit is contained in:
Patrick Fic
2021-03-08 15:46:39 -08:00
parent f90efd21a5
commit 0930702da8
4 changed files with 69 additions and 28 deletions

View File

@@ -2,8 +2,8 @@ const Dinero = require("dinero.js");
const queries = require("../graphql-client/queries");
const GraphQLClient = require("graphql-request").GraphQLClient;
Dinero.defaultCurrency = "USD";
Dinero.globalLocale = "en-CA";
// Dinero.defaultCurrency = "USD";
// Dinero.globalLocale = "en-CA";
Dinero.globalRoundingMode = "HALF_UP";
exports.totalsSsu = async function (req, res) {
@@ -336,6 +336,7 @@ function CalculateTaxesTotals(job, otherTotals) {
0) * 100
)
);
console.log("A", additionalItemsTax.toJSON());
} else {
statePartsTax = statePartsTax.add(
Dinero({ amount: Math.round((val.act_price || 0) * 100) })
@@ -347,6 +348,7 @@ function CalculateTaxesTotals(job, otherTotals) {
0) * 100
)
);
console.log("S", statePartsTax.toJSON());
}
});