commit de compras
This commit is contained in:
@@ -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);}
|
||||
}
|
||||
Reference in New Issue
Block a user