Table core.item_selling_prices
This table stores information on selling price of an item and other information. PLEASE NOTE : THESE ARE THE MOST EFFECTIVE STOCK ITEM PRICES. THE PRICE IN THIS CATALOG IS ACTUALLY PICKED UP AT THE TIME OF PURCHASE AND SALES. A STOCK ITEM PRICE MAY BE DIFFERENT FOR DIFFERENT UNITS. FURTHER, A STOCK ITEM WOULD BE SOLD AT A HIGHER PRICE WHEN SOLD LOOSE THAN WHAT IT WOULD ACTUALLY COST IN A COMPOUND UNIT. EXAMPLE, ONE CARTOON (20 BOTTLES) OF BEER BOUGHT AS A UNIT WOULD COST 25% LESS FROM THE SAME STORE.
# Column Name Nullable Data Type Max Length Description
1item_selling_price_idbigint0The primary key of this table, which is also a serial field.
2item_idinteger0Foreign key to the table core.items.
3unit_idinteger0Foreign key to the table core.items.
4party_type_idinteger0
5price_type_idinteger0
6includes_taxboolean0
7pricemoney_strict0
8audit_user_idinteger0Contains the id of the user who last inserted or updated the corresponding row.
9audit_tstimestamp with time zone0Contains the date and timestamp of the last insert or update action.

Foreign Keys

# Column Name Key Name References
2 item_id item_selling_prices_item_id_fkey core.items.item_id
3 unit_id item_selling_prices_unit_id_fkey core.units.unit_id
4 party_type_id item_selling_prices_party_type_id_fkey core.party_types.party_type_id
5 price_type_id item_selling_prices_price_type_id_fkey core.price_types.price_type_id
8 audit_user_id item_selling_prices_audit_user_id_fkey office.users.user_id

Indices

Index Name Owner Access Method Definition Description
item_selling_prices_pkey postgres btree item_selling_price_id

Check Constraints

Constraint Name Description
item_selling_prices_unit_chk
CHECK (core.is_valid_unit(item_id, unit_id))

Default Values

# Column Name Default
1 item_selling_price_id nextval('core.item_selling_prices_item_selling_price_id_seq'::regclass)
6 includes_tax false
9 audit_ts now()

Triggers

Trigger Name Targets On Event Timing Condition Order Orientation Description