commit de compras

This commit is contained in:
2026-11-04 09:37:20 +02:00
parent fcf31e8d48
commit 0b05a1192c
741 changed files with 114127 additions and 116 deletions
+9
View File
@@ -0,0 +1,9 @@
/** Resolve after the explicit module transition; this startup only performs reads. */
export async function openReceiptMovement({movement,resolve,open,current,error}) {
const epoch=current();
try {
const value=await resolve(movement);if(current()!==epoch)return;
if(value?.movement_id!==movement||value?.read_only!==true||![value.order_id,value.receipt_id].every(id=>Number.isSafeInteger(id)&&id>0))throw Error('A origem do movimento exige nova conferência.');
await open(value.order_id,value.receipt_id);
}catch(e){if(current()===epoch)error(e.message);}
}