6822-entryTransfer #3376
No reviewers
Labels
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: verdnatura/salix#3376
Loading…
Reference in New Issue
No description provided.
Delete Branch "6822-entryTransfer"
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 +30,4 @@
CALL entry_clone(vOriginalEntry, vNewEntryFk);
CALL util.tx_start(vIsRequiredTx);
bots de línea
@ -0,0 +32,4 @@
CALL util.tx_start(vIsRequiredTx);
-- Hay que crear un nuevo travel, con salida hoy y llegada mañana y asignar la entrada nueva al nuevo travel.
la línea es massa llarga
@ -0,0 +97,4 @@
JOIN entry e ON e.travelFk = t.id
WHERE e.id = vOriginalEntry;
-- Actualizar la nueva entrada con lo que no está ubicado HOY, descontando lo vendido HOY de esas ubicaciones
massa llarg
Si es gasta moltes vegades util.VN_CURDATE() es deuria de gastar una variable al igual que es fa en tomorrow
[newEntryFk]
@ -0,0 +33,4 @@
try {
await Self.rawSql('CALL vn.entry_transfer(?, @vNewEntry)', [id], myOptions);
const newEntryFk = await Self.rawSql('SELECT @vNewEntry newEntryFk', null, myOptions);
[newEntryFk]