
id : bigint(20) unsigned
|

invoice_number : varchar(100)
|

customer_id : bigint(20) unsigned
|

customer_name : varchar(190)
|

customer_phone : varchar(60)
|

customer_address : varchar(255)
|

quotation_id : bigint(20) unsigned
|

status : enum('draft','unpaid','partially_paid','paid','cancelled')
|

order_source : varchar(40)
|

invoice_date : date
|

warehouse_id : bigint(20) unsigned
|

vat_enabled : tinyint(1)
|

vat_rate : decimal(5,2)
|

subtotal : decimal(15,2)
|

discount_amount : decimal(15,2)
|

tax_amount : decimal(15,2)
|

total_amount : decimal(15,2)
|

paid_amount : decimal(15,2)
|

due_amount : decimal(15,2)
|

currency : varchar(10)
|

notes : text
|

template_code : varchar(100)
|

created_by : bigint(20) unsigned
|

approved_by : bigint(20) unsigned
|

approved_at : timestamp
|

created_at : timestamp
|

updated_at : timestamp
|

payment_method : varchar(50)
|

payment_fee_profile : varchar(60)
|

gateway_rate : decimal(8,4)
|

gateway_fee : decimal(12,2)
|

checkout_fee : decimal(12,2)
|

payment_fees_vat : decimal(12,2)
|

payment_fees_total : decimal(12,2)
|

payment_gateway_profile : varchar(50)
|

customer_shipping_fee : decimal(12,2)
|

merchant_shipping_cost : decimal(12,2)
|

cod_fee : decimal(12,2)
|

cod_fee_vat : decimal(12,2)
|

shipping_profit_loss : decimal(12,2)
|

cogs_total : decimal(12,2)
|

net_payout_before_cogs : decimal(12,2)
|

net_profit : decimal(12,2)
|

gateway_fee_rate : decimal(8,4)
|

gateway_fee_amount : decimal(12,2)
|

checkout_fee_amount : decimal(12,2)
|

fees_vat_amount : decimal(12,2)
|

payment_fee_amount : decimal(12,2)
|

net_amount_before_cost : decimal(12,2)
|

cost_of_goods_amount : decimal(12,2)
|

net_profit_amount : decimal(12,2)
|

sold_at : datetime
|