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

A01: validate immutable cheque due date before any journal or audit posting

davoodmehraban89 committed Oct 23, 2026 at 11:06 UTC f45635313d040ef609b2eabfdc6c89f281d82b78
1 file changed +7
src/core/RetailPostingService.js
+7
@@ -556,6 +556,13 @@ class RetailPostingServiceImpl {
556 return StorageService.transaction(FINANCE_STORES,async tx=>{
557 if(await tx.get('cheques',row.id))throw Error('چک تکراری است');
558 const ctx=await this.context(tx,company,row.issueDate);
559 + // Due date is a contractual property, not the accounting posting date.
560 + // An invalid or pre-issuance due date must never enter an immutable
561 + // financed cheque record even if the issue-date period is open.
562 + assertJalaliDate(row.dueDate);
563 + if(row.dueDate<row.issueDate) {
564 + throw Error('سررسید چک نمی‌تواند پیش از تاریخ صدور باشد');
565 + }
566 positiveAmount(row.amount);
567 if(!row.contactId)throw Error('چک باید طرف‌حساب معتبر داشته باشد');
568 sameCompany(await tx.get('contacts',row.contactId),company,'شخص چک');