diff --git a/back/methods/quadminds-api-config/sendOrders.js b/back/methods/quadminds-api-config/sendOrders.js index 179cad28e..ac434213d 100644 --- a/back/methods/quadminds-api-config/sendOrders.js +++ b/back/methods/quadminds-api-config/sendOrders.js @@ -48,9 +48,11 @@ module.exports = Self => { t.shipped date, 'PEDIDO' operation, t.totalWithVat totalAmount, - t.totalWithoutVat totalAmountWithoutTaxes + t.totalWithoutVat totalAmountWithoutTaxes, + SUM(sv.volume) volume FROM ticket t JOIN address a ON a.id = t.addressFk + JOIN saleVolume sv ON sv.ticketFk = t.id WHERE t.id IN (?) GROUP BY t.id `, [tickets]); @@ -63,7 +65,15 @@ module.exports = Self => { code: order.code.toString(), date: moment(order.date).format('YYYY-MM-DD'), totalAmount: order.totalAmount || undefined, - totalAmountWithoutTaxes: order.totalAmountWithoutTaxes || undefined + totalAmountWithoutTaxes: order.totalAmountWithoutTaxes || undefined, + timeWindow: [{ + from: '07:00', + to: '20:00' + }], + orderMeasures: [{ + constraintId: 3, // Volumen + value: order.volume + }] }; });