fixes #4928 Supplier payMethod notify #1202
No reviewers
Labels
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: verdnatura/salix#1202
Loading…
Reference in New Issue
No description provided.
Delete Branch "4928-supplier-payMethod-notify"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ -0,0 +17,4 @@
FROM payMethod
WHERE id = NEW.payMethodFk;
SET vHasChange = (NEW.payMethodFk <=> OLD.payMethodFk);
Deuria ser NOT(...) Aixina despres no fiques !vHasChange
@ -0,0 +37,4 @@
SET vHasChange = (NEW.payDemFk <=> OLD.payDemFk) OR (NEW.payDay <=> OLD.payDay);
IF vPayMethodHasVerified AND !vHasChange THEN
SET vHasChange = (NEW.payMethodFk <=> OLD.payMethodFk);
Com esta, se repetiria este SET.
He estat refactoritzant i crec q aixina se qdaria mes curt
Ho he provat i va be, pero provau per si de cas
@ -0,0 +45,4 @@
END$$
DELIMITER ;
INSERT INTO `util`.`notification` (`id`, `name`,`description`)
Poner en fixture pq es siempre necesario y poner aparte cuando se suba a producción
@ -2,13 +2,7 @@ const models = require('vn-loopback/server/server').models;
const LoopBackContext = require('loopback-context');
describe('loopback model Supplier', () => {
let supplierOne;
Volver a poner
@ -62,2 +73,3 @@
await supplierTwo.updateAttribute('isPayMethodChecked', true, options);
await supplierTwo.updateAttribute('payMethodFk', 5, options);
const result = await models.Supplier.findById(442);
Utilizar byId