Unify FunZone voucher sync on the accounting documents page.
Consolidate sync buttons into one flow on ????? ????????, deduplicate treasury vs invoice and customer vouchers, add FunZone inventory lifecycle views, and improve stat card number display. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -20,3 +20,16 @@ export function eventNameFromTreasuryDescription(description: string): string |
|
||||
if (!raw || raw === '—') return undefined
|
||||
return raw === 'کیف پول' ? 'wallet' : raw
|
||||
}
|
||||
|
||||
/** Event label with category context for accounting "regarding" fields. */
|
||||
export function eventNameWithCategory(
|
||||
eventName: string | null | undefined,
|
||||
categoryName: string | null | undefined,
|
||||
): string {
|
||||
const rawEvent = eventName?.trim() ?? ''
|
||||
const rawCategory = categoryName?.trim() ?? ''
|
||||
if (!rawEvent) return ''
|
||||
if (rawEvent.toLowerCase() === 'wallet') return 'wallet'
|
||||
if (!rawCategory) return rawEvent
|
||||
return `${rawEvent} (${rawCategory})`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user