Purchase create
This commit is contained in:
@@ -10,46 +10,6 @@ export type PurchaseOrderType = {
|
||||
total: number
|
||||
}
|
||||
|
||||
export interface IngredientItem {
|
||||
id: number
|
||||
ingredient: { label: string; value: string } | null
|
||||
deskripsi: string
|
||||
kuantitas: number
|
||||
satuan: { label: string; value: string } | null
|
||||
harga: number
|
||||
total: number
|
||||
}
|
||||
|
||||
export interface PurchaseOrderFormData {
|
||||
vendor: { label: string; value: string } | null
|
||||
nomor: string
|
||||
tglTransaksi: string
|
||||
tglJatuhTempo: string
|
||||
referensi: string
|
||||
termin: { label: string; value: string } | null
|
||||
hargaTermasukPajak: boolean
|
||||
showShippingInfo: boolean
|
||||
tanggalPengiriman: string
|
||||
ekspedisi: { label: string; value: string } | null
|
||||
noResi: string
|
||||
showPesan: boolean
|
||||
showAttachment: boolean
|
||||
showTambahDiskon: boolean
|
||||
showBiayaPengiriman: boolean
|
||||
showBiayaTransaksi: boolean
|
||||
showUangMuka: boolean
|
||||
pesan: string
|
||||
ingredientItems: IngredientItem[]
|
||||
transactionCosts?: TransactionCost[]
|
||||
subtotal?: number
|
||||
discountType?: 'percentage' | 'fixed'
|
||||
downPaymentType?: 'percentage' | 'fixed'
|
||||
discountValue?: string
|
||||
shippingCost?: string
|
||||
transactionCost?: string
|
||||
downPayment?: string
|
||||
}
|
||||
|
||||
export interface TransactionCost {
|
||||
id: string
|
||||
type: string
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { IngredientItem } from './ingredient'
|
||||
import { Vendor } from './vendor'
|
||||
|
||||
export interface PurchaseOrderRequest {
|
||||
@@ -93,3 +94,27 @@ export interface PurchaseOrderFile {
|
||||
created_at: string
|
||||
updated_at: string
|
||||
}
|
||||
|
||||
export interface PurchaseOrderFormData {
|
||||
vendor: { label: string; value: string } | null
|
||||
po_number: string
|
||||
transaction_date: string
|
||||
due_date: string
|
||||
reference: string
|
||||
status: 'draft' | 'sent' | 'approved' | 'received' | 'cancelled'
|
||||
showPesan: boolean
|
||||
showAttachment: boolean
|
||||
message: string
|
||||
items: PurchaseOrderFormItem[]
|
||||
attachment_file_ids: string[]
|
||||
}
|
||||
|
||||
export interface PurchaseOrderFormItem {
|
||||
id: number // for UI tracking
|
||||
ingredient: { label: string; value: string; originalData?: IngredientItem } | null
|
||||
description: string
|
||||
quantity: number
|
||||
unit: { label: string; value: string } | null
|
||||
amount: number
|
||||
total: number // calculated field for UI
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user