refs #7191 check isBooked in entry_BeforeUpdate #2329
Labels
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: verdnatura/salix#2329
Loading…
Reference in New Issue
No description provided.
Delete Branch "7191-entry_BeforeUpdate-isBooked"
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?
@ -6,11 +6,20 @@ BEGIN
DECLARE vIsVirtual BOOL;
DECLARE vPrintedCount INT;
DECLARE vHasDistinctWarehouses BOOL;
DECLARE vEntryFkCount INT;
El que estem contant son buy no entry, seria més descriptiu buyCounter ó totalBuy
@ -11,3 +12,4 @@
CALL entry_checkBooked(OLD.id);
END IF;
IF NEW.isBooked = 1 THEN
No es te que mirar sempre que siga TRUE, es deu de mirar sempre que cambie de valor y el nou siga TRUE
@ -12,0 +15,4 @@
SELECT COUNT(*) INTO vTotalBuy
FROM buy
WHERE entryFk = NEW.id;
IF vTotalBuy = 0 THEN
IF NOT vTotalBuy THEN
@ -12,0 +16,4 @@
FROM buy
WHERE entryFk = NEW.id;
IF vTotalBuy = 0 THEN
CALL util.throw('The entry cannot be marked as booked if it does not have lines');
Acortar msg del throw, lo máximo que permite el procedimiento son 55 carácteres