- aggiunta campi Gas data + fix
This commit is contained in:
@@ -38,6 +38,9 @@ const gasordineSchema = new Schema({
|
||||
dataora_chiusura_ordini: {
|
||||
type: Date,
|
||||
},
|
||||
data_arrivo_merce: {
|
||||
type: Date,
|
||||
},
|
||||
dataora_ritiro: {
|
||||
type: Date,
|
||||
},
|
||||
|
||||
@@ -258,6 +258,9 @@ module.exports.getOrderByID = function (id, callback) {
|
||||
module.exports.createOrder = async function (order) {
|
||||
|
||||
try {
|
||||
if (order.idGasordine === '') {
|
||||
order.idGasordine = undefined;
|
||||
}
|
||||
Order.updateTotals(order);
|
||||
return await Order.create(order)
|
||||
.then((ris) => {
|
||||
|
||||
@@ -10,7 +10,7 @@ const Storehouse = require('../models/storehouse');
|
||||
const Provider = require('../models/provider');
|
||||
const Gasordine = require('../models/gasordine');
|
||||
const Product = require('../models/product');
|
||||
const ProductInfo = require('../models/productinfo');
|
||||
const ProductInfo = require('../models/productInfo');
|
||||
|
||||
const tools = require('../tools/general');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user