فینورا پرو - سامانه جامع حسابداری و صدور فاکتور

test(A01): compare endorsement double-entry independent of IndexedDB row order

davoodmehraban89 committed Oct 22, 2026 at 23:21 UTC affa4d38cb50ecc9e9a26c45ae4a04d8bc8fed88
1 file changed +1 -1
tests/retail-phase2.test.mjs
+1 -1
@@ -968,7 +968,7 @@ test('A01: cheque endorsement requires third-party identity and explicit confirm
968 const payable=(await db.getAll('account_chart')).find(x=>x.companyId===company&&x.code==='201');
969 const incoming=(await db.getAll('account_chart')).find(x=>x.companyId===company&&x.code==='105');
970 assert.ok(payable&&incoming);
971 - assert.deepEqual(journalLines.map(x=>({
971 + assert.deepEqual(journalLines.sort((a,b)=>b.debit-a.debit).map(x=>({
972 accountId:x.accountId,debit:x.debit,credit:x.credit,contactId:x.contactId
973 })),[
974 {accountId:payable.id,debit:370,credit:0,contactId:'endorsee-1'},