Expense Add

This commit is contained in:
efrilm
2025-09-10 15:45:34 +07:00
parent 420df71452
commit afa4cfad0d
12 changed files with 980 additions and 249 deletions
-11
View File
@@ -1,11 +0,0 @@
export type ExpenseType = {
id: number
date: string
number: string
reference: string
benefeciaryName: string
benefeciaryCompany: string
status: string
balanceDue: number
total: number
}
+68
View File
@@ -0,0 +1,68 @@
export type ExpenseType = {
id: number
date: string
number: string
reference: string
benefeciaryName: string
benefeciaryCompany: string
status: string
balanceDue: number
total: number
}
export interface ExpenseRecipient {
id: string
name: string
}
export interface ExpenseAccount {
id: string
name: string
code: string
}
export interface ExpenseTax {
id: string
name: string
rate: number
}
export interface ExpenseTag {
id: string
name: string
color: string
}
export interface ExpenseItem {
id: number
account: ExpenseAccount | null
description: string
tax: ExpenseTax | null
total: number
}
export interface ExpenseFormData {
// Header fields
paidFrom: string // "Dibayar Dari"
payLater: boolean // "Bayar Nanti" toggle
recipient: ExpenseRecipient | null // "Penerima"
transactionDate: string // "Tgl. Transaksi"
// Reference fields
number: string // "Nomor"
reference: string // "Referensi"
tag: ExpenseTag | null // "Tag"
includeTax: boolean // "Harga termasuk pajak"
// Expense items
expenseItems: ExpenseItem[]
// Totals
subtotal: number
total: number
// Optional sections
showMessage: boolean
showAttachment: boolean
message: string
}