The purpose of this lesson is to help you understand Price Lists.
Price List Overview
00:22:00 starts the discussion about Price List Schema and Base Price List
Note: if you flag a Price List as "Price Includes Tax", you will need to set the appropriate Sales Tax (Tax Rate) records as Document Level = Y (isDocumentLevel = 'Y') to have the Sales Order not add the tax to the total amount.
Plugin To Automatically Create Price List Records on New Product Save
The Price List feature is one of iDempiere's greatest assets and one of its greatest weaknesses. Attached is a plugin that automatically generates all possible Price List => Version => Product Price records when a Product is created. Doing so helps prevent users from needing to remember to do so.
If you already make heave use of Price Lists, this feature is not of much value. If you do not use Price Lists, this feature is awesome because is help you ignore them.
Link to Plugin Zip
SQL to Create Product Price Entries for all Products and Active Price List Versions
Some users do not care about price lists. Below is SQL to create Product window => Price sub-tab records for all Products that do not already have a record. Executing this scripts makes choosing Products in the user interface much less cumbersome. Since the below executes against a unique index, the execute should be fast.
insert into M_ProductPrice
select plv.m_pricelist_version_id,
p.m_product_id,
p.ad_client_id,
0,
'Y',
date_trunc('day',now()),
100,
date_trunc('day',now()),
100,
0,0,0,
generate_uuid(),
nextidfunc(165::integer,'Y'::character varying)
from m_product p
join m_pricelist pl on p.ad_client_id = pl.ad_client_id and pl.isactive = 'Y'
join m_priceList_version plv on pl.m_pricelist_id = plv.m_pricelist_id and plv.isactive='Y'
where p.ad_client_id <> 11
and not exists
(select * from m_productprice where m_product_id = p.m_product_id and m_pricelist_version_id = plv.m_pricelist_version_id)