- aggiungo campo "sfuso"

- aggiunto totale al carrello
This commit is contained in:
Surya Paolo
2024-02-11 16:33:00 +01:00
parent e7b0fd1d95
commit 9ca9ea6eaa
14 changed files with 41 additions and 17 deletions

View File

@@ -54,6 +54,9 @@ const orderSchema = new Schema({
type: Number,
default: 0,
},
TotalPriceProductstr: {
type: String,
},
TotalPriceProductCalc: {
type: Number,
default: 0,
@@ -362,6 +365,7 @@ module.exports.updateTotals = function (order) {
order.TotalPriceProductCalc += mypricecalc;
order.TotalPriceProduct += mypricecalc;
order.TotalPriceProductstr = parseFloat(order.TotalPriceProduct.toFixed(2));
return order;