merge fixtures dinamicas para zoneCalendar
This commit is contained in:
parent
7bbabffc26
commit
f871879ee5
|
@ -1455,16 +1455,20 @@ INSERT INTO `vn`.`zoneCalendar`(`zoneFk`, `delivered`)
|
|||
(2, DATE_ADD(CURDATE(), INTERVAL (IF(DAYOFWEEK(CURDATE())<=4, 4, 11) - DAYOFWEEK(CURDATE())) DAY)),
|
||||
(2, DATE_ADD(CURDATE(), INTERVAL (IF(DAYOFWEEK(CURDATE())<=5, 5, 12) - DAYOFWEEK(CURDATE())) DAY)),
|
||||
(2, DATE_ADD(CURDATE(), INTERVAL (IF(DAYOFWEEK(CURDATE())<=6, 6, 13) - DAYOFWEEK(CURDATE())) DAY)),
|
||||
(3, DATE_ADD(CURDATE(), INTERVAL (IF(DAYOFWEEK(CURDATE())<=2, 2, 9 ) - DAYOFWEEK(CURDATE())) DAY)),
|
||||
(3, DATE_ADD(CURDATE(), INTERVAL (IF(DAYOFWEEK(CURDATE())<=3, 3, 10) - DAYOFWEEK(CURDATE())) DAY)),
|
||||
(3, DATE_ADD(CURDATE(), INTERVAL (IF(DAYOFWEEK(CURDATE())<=4, 4, 11) - DAYOFWEEK(CURDATE())) DAY)),
|
||||
(3, DATE_ADD(CURDATE(), INTERVAL (IF(DAYOFWEEK(CURDATE())<=5, 5, 12) - DAYOFWEEK(CURDATE())) DAY)),
|
||||
(3, DATE_ADD(CURDATE(), INTERVAL (IF(DAYOFWEEK(CURDATE())<=6, 6, 13) - DAYOFWEEK(CURDATE())) DAY)),
|
||||
(4, DATE_ADD(CURDATE(), INTERVAL (IF(DAYOFWEEK(CURDATE())<=2, 2, 9) - DAYOFWEEK(CURDATE())) DAY)),
|
||||
(4, DATE_ADD(CURDATE(), INTERVAL (IF(DAYOFWEEK(CURDATE())<=3, 3, 10) - DAYOFWEEK(CURDATE())) DAY)),
|
||||
(4, DATE_ADD(CURDATE(), INTERVAL (IF(DAYOFWEEK(CURDATE())<=4, 4, 11) - DAYOFWEEK(CURDATE())) DAY)),
|
||||
(4, DATE_ADD(CURDATE(), INTERVAL (IF(DAYOFWEEK(CURDATE())<=5, 5, 12) - DAYOFWEEK(CURDATE())) DAY)),
|
||||
(4, DATE_ADD(CURDATE(), INTERVAL (IF(DAYOFWEEK(CURDATE())<=6, 6, 13) - DAYOFWEEK(CURDATE())) DAY)),
|
||||
(3, CURDATE()),
|
||||
(3, DATE_ADD(CURDATE(), INTERVAL +1 DAY)),
|
||||
(3, DATE_ADD(CURDATE(), INTERVAL +2 DAY)),
|
||||
(3, DATE_ADD(CURDATE(), INTERVAL +3 DAY)),
|
||||
(3, DATE_ADD(CURDATE(), INTERVAL +4 DAY)),
|
||||
(3, DATE_ADD(CURDATE(), INTERVAL +5 DAY)),
|
||||
(3, DATE_ADD(CURDATE(), INTERVAL +6 DAY)),
|
||||
(4, CURDATE()),
|
||||
(4, DATE_ADD(CURDATE(), INTERVAL +1 DAY)),
|
||||
(4, DATE_ADD(CURDATE(), INTERVAL +2 DAY)),
|
||||
(4, DATE_ADD(CURDATE(), INTERVAL +3 DAY)),
|
||||
(4, DATE_ADD(CURDATE(), INTERVAL +4 DAY)),
|
||||
(4, DATE_ADD(CURDATE(), INTERVAL +5 DAY)),
|
||||
(4, DATE_ADD(CURDATE(), INTERVAL +6 DAY)),
|
||||
(5, CURDATE()),
|
||||
(5, DATE_ADD(CURDATE(), INTERVAL +1 DAY)),
|
||||
(5, DATE_ADD(CURDATE(), INTERVAL +2 DAY)),
|
||||
|
|
|
@ -8,7 +8,7 @@ module.exports = Self => {
|
|||
arg: 'params',
|
||||
type: 'object',
|
||||
required: true,
|
||||
description: 'ClientFk, Shipped, WharehouseFk, CompanyFk, AddressFk, AgencyModeFk, RouteFk, Landed, userId',
|
||||
description: 'ClientFk, Shipped, WarehouseFk, CompanyFk, AddressFk, AgencyModeFk, RouteFk, Landed, userId',
|
||||
http: {source: 'body'}
|
||||
}],
|
||||
returns: {
|
||||
|
@ -59,7 +59,8 @@ module.exports = Self => {
|
|||
params.shipped = await Self.app.models.Agency.getShipped({
|
||||
landed: params.landed,
|
||||
addressFk: address.id,
|
||||
agencyModeFk: agency.agencyModeFk
|
||||
agencyModeFk: agency.agencyModeFk,
|
||||
warehouseFk: params.warehouseFk
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -67,7 +68,8 @@ module.exports = Self => {
|
|||
params.landed = await Self.app.models.Agency.getLanded({
|
||||
shipped: params.shipped,
|
||||
addressFk: address.id,
|
||||
agencyModeFk: params.agencyModeFk
|
||||
agencyModeFk: params.agencyModeFk,
|
||||
warehouseFk: params.warehouseFk
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue