7383-testToMaster #2445

Merged
alexm merged 233 commits from 7383-testToMaster into master 2024-05-14 05:44:13 +00:00
1 changed files with 9 additions and 0 deletions
Showing only changes of commit 7e488ee601 - Show all commits

View File

@ -6,11 +6,20 @@ BEGIN
DECLARE vIsVirtual BOOL;
DECLARE vPrintedCount INT;
DECLARE vHasDistinctWarehouses BOOL;
DECLARE vEntryFkCount INT;
IF NEW.isBooked = OLD.isBooked THEN
CALL entry_checkBooked(OLD.id);
END IF;
IF NEW.isBooked = 1 THEN
SELECT COUNT(*) INTO vEntryFkCount
FROM buy WHERE entryFk = NEW.id;
IF vEntryFkCount = 0 THEN
CALL util.throw('The entry cannot be marked as booked if it does not have lines');
END IF;
END IF;
SET NEW.editorFk = account.myUser_getId();
IF NOT (NEW.travelFk <=> OLD.travelFk) THEN