#1810 El método listPackaging filtrar por isPackagingReturnable

This commit is contained in:
Bernat 2019-10-21 09:16:52 +02:00
parent 6adeb689eb
commit 939c507fba
2 changed files with 4 additions and 4 deletions

View File

@ -666,9 +666,9 @@ INSERT INTO `vn`.`expedition`(`id`, `agencyModeFk`, `ticketFk`, `isBox`, `create
INSERT INTO `vn`.`packaging`(`id`, `volume`, `width`, `height`, `depth`, `isPackageReturnable`, `created`, `itemFk`, `price`)
VALUES
(1, 0.00, 10, 10, 0, 0, CURDATE(), 6, 1.50),
(2, 100.00, 20, 20, 0, 0, CURDATE(), 7, 1.00),
(3, 14000.00, 0, 0, 0, 0, CURDATE(), NULL, 0),
(1, 0.00, 10, 10, 0, 1, CURDATE(), 6, 1.50),
(2, 100.00, 20, 20, 0, 1, CURDATE(), 7, 1.00),
(3, 14000.00, 0, 0, 0, 1, CURDATE(), NULL, 0),
(4, 218000.00, 0, 0, 0, 0, CURDATE(), NULL, 0),
(5, 292000.00, 0, 0, 0, 0, CURDATE(), NULL, 0),
(94, 140875.00, 49.00, 115.00, 25.00, 0, CURDATE(), 71, 0.00);

View File

@ -29,7 +29,7 @@ module.exports = Self => {
FROM (SELECT i.name, i.id itemFk, p.id packagingFk
FROM item i
JOIN packaging p ON i.id = p.itemFk
WHERE i.name <> '') p`
WHERE i.name <> '' AND p.isPackageReturnable) p`
);
stmt.merge(conn.makeSuffix(filter));