Expand sales, treasury, and parties modules with Jalali calendar and FunZone integrations
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -35,6 +35,8 @@ export interface Voucher {
|
||||
|
||||
export type PartyKind = 'customer' | 'supplier'
|
||||
|
||||
export type PartyExternalSource = '' | 'funzone_customer' | 'funzone_owner'
|
||||
|
||||
export interface Party {
|
||||
id: ID
|
||||
kind: PartyKind
|
||||
@@ -43,6 +45,21 @@ export interface Party {
|
||||
economicCode: string
|
||||
address: string
|
||||
openingBalance: number
|
||||
/** FunZone user id when synced from the platform. */
|
||||
externalId?: ID
|
||||
externalSource?: PartyExternalSource
|
||||
firstName?: string
|
||||
lastName?: string
|
||||
username?: string
|
||||
email?: string
|
||||
nationalCode?: string
|
||||
iban?: string
|
||||
walletBalance?: number
|
||||
isActive?: boolean
|
||||
isVerified?: boolean
|
||||
birthday?: string | null
|
||||
/** Venue names for owner/supplier records. */
|
||||
venues?: string[]
|
||||
}
|
||||
|
||||
export interface Product {
|
||||
@@ -56,6 +73,29 @@ export interface Product {
|
||||
reorderLevel: number
|
||||
}
|
||||
|
||||
export type SalesDocumentType = 'proforma' | 'invoice' | 'return'
|
||||
|
||||
export interface SalesType {
|
||||
id: ID
|
||||
code: string
|
||||
name: string
|
||||
description: string
|
||||
active: boolean
|
||||
}
|
||||
|
||||
export type AdjustmentKind = 'debit' | 'credit'
|
||||
|
||||
/** Debit/credit notice adjusting customer receivable (اعلامیه بدهکار/بستانکار). */
|
||||
export interface PartyAdjustment {
|
||||
id: ID
|
||||
number: number
|
||||
partyId: ID
|
||||
kind: AdjustmentKind
|
||||
date: string
|
||||
amount: number
|
||||
description: string
|
||||
}
|
||||
|
||||
export interface InvoiceLine {
|
||||
id: ID
|
||||
productId: ID
|
||||
@@ -71,8 +111,11 @@ export type InvoiceStatus = 'draft' | 'confirmed' | 'paid'
|
||||
export interface Invoice {
|
||||
id: ID
|
||||
kind: InvoiceKind
|
||||
documentType: SalesDocumentType
|
||||
number: number
|
||||
partyId: ID
|
||||
salesTypeId?: ID
|
||||
relatedInvoiceId?: ID
|
||||
date: string
|
||||
status: InvoiceStatus
|
||||
note: string
|
||||
@@ -90,8 +133,14 @@ export interface TreasuryTxn {
|
||||
date: string
|
||||
partyId: ID | null
|
||||
amount: number
|
||||
/** Event ticket fee split (FunZone): tax 10%, platform profit 14%, owner net 76%. */
|
||||
taxAmount?: number
|
||||
platformProfitAmount?: number
|
||||
ownerNetAmount?: number
|
||||
reference: string
|
||||
description: string
|
||||
/** Set when imported from FunZone platform (dedup key). */
|
||||
source?: string
|
||||
}
|
||||
|
||||
export interface Employee {
|
||||
@@ -148,6 +197,8 @@ export interface AppData {
|
||||
parties: Party[]
|
||||
products: Product[]
|
||||
invoices: Invoice[]
|
||||
salesTypes: SalesType[]
|
||||
partyAdjustments: PartyAdjustment[]
|
||||
treasury: TreasuryTxn[]
|
||||
employees: Employee[]
|
||||
payslips: Payslip[]
|
||||
|
||||
Reference in New Issue
Block a user