Add FunZone sync for sales and purchases, voucher filters, and event-name support.

Manual sync buttons pull customer payments and owner payouts into treasury, invoices, and accounting vouchers; voucher page gains category, date, status, and search filters; supplier vouchers dedupe against treasury-backed entries.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Shayan Azadi
2026-07-06 22:09:08 +03:30
parent 4508be582a
commit f6b6e27294
24 changed files with 1258 additions and 90 deletions

View File

@@ -27,6 +27,8 @@ export interface Voucher {
number: number
date: string
description: string
/** Event or subject the voucher relates to (بابت). */
regarding?: string
status: VoucherStatus
lines: VoucherLine[]
/** Set when the voucher was generated automatically by another module. */
@@ -103,6 +105,8 @@ export interface InvoiceLine {
unitPrice: number
discount: number
taxRate: number
/** FunZone event the customer paid for (shown in کالا / بابت). */
eventName?: string
}
export type InvoiceKind = 'sale' | 'purchase'
@@ -139,6 +143,8 @@ export interface TreasuryTxn {
ownerNetAmount?: number
reference: string
description: string
/** FunZone event name when imported from customer payments. */
eventName?: string
/** Set when imported from FunZone platform (dedup key). */
source?: string
}