update expense item name

This commit is contained in:
2026-05-29 13:25:38 +07:00
parent f7399fd0e7
commit 1b7bec4f81
14 changed files with 77 additions and 37 deletions
+2 -2
View File
@@ -129,6 +129,6 @@ type ExpenseCategoryTotal struct {
}
type OperationalExpenseItem struct {
Description string
Amount float64
Item string
Amount float64
}
-1
View File
@@ -12,7 +12,6 @@ type Expense struct {
ID uuid.UUID `gorm:"type:uuid;primary_key;default:gen_random_uuid()" json:"id"`
OrganizationID uuid.UUID `gorm:"type:uuid;not null;index" json:"organization_id"`
OutletID uuid.UUID `gorm:"type:uuid;not null;index" json:"outlet_id"`
ExpenseName string `gorm:"not null;size:255" json:"expense_name"`
Receiver string `gorm:"not null;size:255" json:"receiver"`
TransactionDate time.Time `gorm:"type:date;not null" json:"transaction_date"`
CodeNumber string `gorm:"not null;size:50" json:"code_number"`
+1
View File
@@ -12,6 +12,7 @@ type ExpenseItem struct {
ID uuid.UUID `gorm:"type:uuid;primary_key;default:gen_random_uuid()" json:"id"`
ExpenseID uuid.UUID `gorm:"type:uuid;not null;index" json:"expense_id"`
ChartOfAccountID uuid.UUID `gorm:"type:uuid;not null;index" json:"chart_of_account_id"`
Item string `gorm:"not null;size:255" json:"item"`
Description *string `gorm:"type:text" json:"description"`
Amount float64 `gorm:"type:decimal(15,2);not null;default:0" json:"amount"`
CreatedAt time.Time `gorm:"autoCreateTime" json:"created_at"`