# Column Name Nullable Data Type Max Length Description
1non_gl_stock_detail_idbigint0The primary key of this table, which is also a serial field.
2non_gl_stock_master_idbigint0
3value_datedate0
4item_idinteger0Foreign key to the table core.items.
5quantityinteger0
6unit_idinteger0Foreign key to the table core.items.
7base_quantitynumeric0
8base_unit_idinteger0
9pricemoney_strict0
10discountmoney_strict20
11shipping_chargemoney_strict20
12sales_tax_idinteger0
13taxmoney_strict20
14audit_user_idinteger0Contains the id of the user who last inserted or updated the corresponding row.
15audit_tstimestamp with time zone0Contains the date and timestamp of the last insert or update action.

Foreign Keys

# 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

Indices

Index Name Owner Access Method Definition Description
non_gl_stock_details_pkey postgres btree non_gl_stock_detail_id

Check Constraints

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)

Default Values

# 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()

Triggers

Trigger Name Targets On Event Timing Condition Order Orientation Description