- aggiungo campo "sfuso"
- aggiunto totale al carrello
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user