pub struct Bill {Show 21 fields
pub id: Uuid,
pub bill_number: String,
pub supplier_id: Uuid,
pub supplier_name: Option<String>,
pub purchase_order_id: Option<Uuid>,
pub status: BillStatus,
pub bill_date: DateTime<Utc>,
pub due_date: DateTime<Utc>,
pub payment_terms: Option<String>,
pub subtotal: Decimal,
pub tax_amount: Decimal,
pub shipping_amount: Decimal,
pub discount_amount: Decimal,
pub total_amount: Decimal,
pub amount_paid: Decimal,
pub amount_due: Decimal,
pub currency: CurrencyCode,
pub reference_number: Option<String>,
pub memo: Option<String>,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
}Expand description
A bill/invoice from a supplier.
Fields§
§id: UuidUnique identifier for this bill.
bill_number: StringSystem-generated or supplier-provided bill reference (e.g. "BILL-20240101-ABC123").
supplier_id: UuidSupplier who issued this bill.
supplier_name: Option<String>Denormalized supplier name for display.
purchase_order_id: Option<Uuid>Purchase order this bill fulfils, if any.
status: BillStatusCurrent payment lifecycle status.
bill_date: DateTime<Utc>Date the supplier issued the bill.
due_date: DateTime<Utc>Date by which payment must be made.
payment_terms: Option<String>Payment terms string (e.g. "Net 30").
subtotal: DecimalSum of line-item amounts before tax and adjustments.
tax_amount: DecimalTotal tax charged on the bill.
shipping_amount: DecimalFreight or shipping charges billed separately.
discount_amount: DecimalAny negotiated discount applied to the bill.
total_amount: DecimalFinal amount owed: subtotal + tax + shipping - discount.
amount_paid: DecimalAmount already paid against this bill.
amount_due: DecimalRemaining balance: total_amount - amount_paid.
currency: CurrencyCodeCurrency of all monetary amounts.
reference_number: Option<String>Supplier’s own invoice or reference number.
memo: Option<String>Free-text notes for internal use.
created_at: DateTime<Utc>Timestamp of record creation.
updated_at: DateTime<Utc>Timestamp of the last update.