# | Column Name | Nullable | Data Type | Max Length | Description |
---|---|---|---|---|---|
1 | non_gl_stock_detail_id | bigint | 0 | The primary key of this table, which is also a serial field. | |
2 | non_gl_stock_master_id | bigint | 0 | ||
3 | value_date | date | 0 | ||
4 | item_id | integer | 0 | Foreign key to the table core.items. | |
5 | quantity | integer | 0 | ||
6 | unit_id | integer | 0 | Foreign key to the table core.items. | |
7 | base_quantity | numeric | 0 | ||
8 | base_unit_id | integer | 0 | ||
9 | price | money_strict | 0 | ||
10 | discount | money_strict2 | 0 | ||
11 | shipping_charge | money_strict2 | 0 | ||
12 | sales_tax_id | integer | 0 | ||
13 | tax | money_strict2 | 0 | ||
14 | audit_user_id | integer | 0 | Contains the id of the user who last inserted or updated the corresponding row. | |
15 | audit_ts | timestamp with time zone | 0 | Contains the date and timestamp of the last insert or update action. |
# | Column Name | Key Name | References |
---|---|---|---|
2 | non_gl_stock_master_id | non_gl_stock_details_non_gl_stock_master_id_fkey | transactions.non_gl_stock_master.non_gl_stock_master_id |
4 | item_id | non_gl_stock_details_item_id_fkey | core.items.item_id |
6 | unit_id | non_gl_stock_details_unit_id_fkey | core.units.unit_id |
8 | base_unit_id | non_gl_stock_details_base_unit_id_fkey | core.units.unit_id |
12 | sales_tax_id | non_gl_stock_details_sales_tax_id_fkey | core.sales_taxes.sales_tax_id |
14 | audit_user_id | non_gl_stock_details_audit_user_id_fkey | office.users.user_id |
Index Name | Owner | Access Method | Definition | Description |
---|---|---|---|---|
non_gl_stock_details_pkey | postgres | btree | non_gl_stock_detail_id |
Constraint Name | Description |
---|---|
non_gl_stock_details_unit_chk CHECK (core.is_valid_unit(item_id, unit_id)) | |
stock_details_tax_chk CHECK ( CASE WHEN tax::numeric > 0::numeric THEN sales_tax_id IS NOT NULL ELSE NULL::boolean END) |
# | Column Name | Default |
---|---|---|
1 | non_gl_stock_detail_id | nextval('transactions.non_gl_stock_details_non_gl_stock_detail_id_seq'::regclass) |
10 | discount | 0 |
11 | shipping_charge | 0 |
13 | tax | 0 |
15 | audit_ts | now() |
Trigger Name | Targets | On Event | Timing | Condition | Order | Orientation | Description |
---|