public.invoices
Description
Labels
svc-smarttab
Columns
| Name | Type | Default | Nullable | Children | Parents | Comment |
|---|---|---|---|---|---|---|
| id | integer | nextval('receipts_id_seq'::regclass) | false | |||
| bill_id | uuid | false | public.bills | |||
| customer_id | integer | false | public.customers | |||
| invoice_number | varchar(50) | false | ||||
| invoice_date | date | CURRENT_DATE | false | |||
| invoice_type | varchar(20) | 'standard'::character varying | false | |||
| status | varchar(50) | false | ||||
| total_amount | numeric(12,2) | false | ||||
| recipient_name | text | false | ||||
| company_name | varchar(255) | true | ||||
| tax_id | varchar(50) | true | ||||
| address | text | true | ||||
| due_date | date | true | ||||
| issued_at | timestamp with time zone | true | ||||
| notes | text | true | ||||
| created_at | timestamp with time zone | now() | true |
Viewpoints
| Name | Definition |
|---|---|
| Receipts & Slips | Receipt and credit card slip generation and delivery |
Constraints
| Name | Type | Definition |
|---|---|---|
| invoices_type_check | CHECK | CHECK (((invoice_type)::text = ANY ((ARRAY['standard'::character varying, 'tax_invoice'::character varying, 'simplified'::character varying])::text[]))) |
| receipts_customer_id_fkey | FOREIGN KEY | FOREIGN KEY (customer_id) REFERENCES customers(id) ON DELETE RESTRICT |
| receipts_bill_id_fkey | FOREIGN KEY | FOREIGN KEY (bill_id) REFERENCES bills(id) ON DELETE RESTRICT |
| receipts_pkey | PRIMARY KEY | PRIMARY KEY (id) |
| receipts_invoice_number_key | UNIQUE | UNIQUE (invoice_number) |
Indexes
| Name | Definition |
|---|---|
| receipts_pkey | CREATE UNIQUE INDEX receipts_pkey ON public.invoices USING btree (id) |
| receipts_invoice_number_key | CREATE UNIQUE INDEX receipts_invoice_number_key ON public.invoices USING btree (invoice_number) |
| ix_invoices_bill_id | CREATE INDEX ix_invoices_bill_id ON public.invoices USING btree (bill_id) |
| ix_invoices_customer_id | CREATE INDEX ix_invoices_customer_id ON public.invoices USING btree (customer_id) |
| ix_invoices_status | CREATE INDEX ix_invoices_status ON public.invoices USING btree (status) |
Relations
Generated by tbls