diff --git a/client/item/src/diary/index.html b/client/item/src/diary/index.html index 09e9339e0..ecc4170ac 100644 --- a/client/item/src/diary/index.html +++ b/client/item/src/diary/index.html @@ -24,10 +24,10 @@ Date - State - Origin - Reference - Worker + Id + State + Reference + Worker In Out Balance @@ -37,9 +37,9 @@ {{::sale.date | date:'dd/MM/yyyy HH:mm' }} - {{::sale.alertLevel | dashIfEmpty}} {{::sale.origin | dashIfEmpty}} - {{::sale.reference | dashIfEmpty}} + {{::sale.stateName | dashIfEmpty}} + {{::sale.reference | dashIfEmpty}} {{sale.name | dashIfEmpty}} {{::sale.in | dashIfEmpty}} {{::sale.out | dashIfEmpty}} diff --git a/client/ticket/src/fetched-tags/index.html b/client/ticket/src/fetched-tags/index.html index a40073577..7b6515d7c 100644 --- a/client/ticket/src/fetched-tags/index.html +++ b/client/ticket/src/fetched-tags/index.html @@ -1,6 +1,6 @@ {{::$ctrl.sale.concept}} - +
= vDateInventory + AND vWarehouse = tr.warehouseInFk + AND b.itemFk = vItemId + AND e.isInventory = 0 + + UNION ALL + + SELECT tr.shipped as date, + NULL as `in`, + b.quantity as `out`, + IF(tr.isReceived != FALSE,3, IF(tr.isDelivered,1,0)) as alertLevel, + st.name AS stateName, + s.name as name, + e.ref as reference, + e.id as origin + FROM vn.buy b + JOIN vn.entry e ON e.id = b.entryFk + JOIN vn.travel tr ON tr.id = e.travelFk + JOIN vn.warehouse w ON w.id = tr.warehouseOutFk + JOIN vn.supplier s ON s.id = e.supplierFk + JOIN vn.alertLevel al ON al.alertLevel = + CASE + WHEN tr.isReceived != FALSE THEN 3 + WHEN tr.isDelivered THEN 1 + ELSE 0 + END + JOIN vn.state st ON st.code = al.code + WHERE tr.shipped >= vDateInventory + AND vWarehouse =tr.warehouseOutFk + AND s.id <> 4 + AND b.itemFk = vItemId + AND e.isInventory = 0 + AND w.isFeedStock = 0 + + UNION ALL + + SELECT t.shipped as date, + NULL as `in`, + s.quantity as `out`, + IF(t.shipped < vCurdate,3,IF(t.shipped > vCurdate, 0, IFNULL(ts.alertLevel,0))) as alertLevel, + st.name AS stateName, + t.nickname as name, + t.refFk as reference, + t.id as origin + FROM vn.sale s + JOIN vn.ticket t ON t.id = s.ticketFk + LEFT JOIN vn.ticketState ts ON ts.ticket = t.id + JOIN vn.client c ON c.id = t.clientFk + JOIN vn.alertLevel al ON al.alertLevel = + CASE + WHEN t.shipped < vCurdate THEN 3 + WHEN t.shipped > vCurdate THEN 0 + ELSE IFNULL(ts.alertLevel, 0) + END + JOIN vn.state st ON st.code = al.code + WHERE t.shipped >= vDateInventory + AND s.itemFk = vItemId + AND vWarehouse =t.warehouseFk + ) AS itemDiary + ORDER BY date, alertLevel, `in` DESC; +END$$ + +DELIMITER ; + diff --git a/services/loopback/common/methods/item/filter.js b/services/loopback/common/methods/item/filter.js index 1decb9c10..8eadd55e7 100644 --- a/services/loopback/common/methods/item/filter.js +++ b/services/loopback/common/methods/item/filter.js @@ -26,7 +26,6 @@ module.exports = Self => { }); Self.filter = async(filter, tags) => { - console.log(tags); return await Self.find(filter); }; }; diff --git a/services/mailer/application/config/datasources.json b/services/mailer/application/config/datasources.json index 6d489ec36..5bcaf6dae 100644 --- a/services/mailer/application/config/datasources.json +++ b/services/mailer/application/config/datasources.json @@ -3,8 +3,8 @@ "port": 3000, "debug": false, "defaultLanguage": "es", - "senderMail": "noreply@localhost", - "senderName": "MySender" + "senderMail": "joan@verdnatura.es", + "senderName": "VerdNatura" }, "mysql": { "host": "localhost", @@ -14,12 +14,12 @@ "password": "root" }, "smtp": { - "host": "localhost", + "host": "smtp.verdnatura.es", "port": 465, "secure": true, "auth": { - "user": "noreply", - "pass": "" + "user": "joan", + "pass": "CLed3ejl$" }, "tls": { "rejectUnauthorized": false