PRODUCT ID, CURRENT LEVEL,
PRICING TYPE, SELLING PRICE,
PACK SIZE,  MOQ

select i.item_id,i.item_code as 'product_id', i.art_no as 'item_code', pt.type_name, isp.selling_price, isp.pack_size, isp.moq
from 0p4_item i
left join 0p4_item_selling_price isp on i.item_id=isp.item_id
left join 0p4_pricing_type pt on pt.id=isp.pricing_type_id
where i.isDeleted != 1;


select i.item_id,i.item_code as 'product_id', i.art_no as 'item_code', i.current_stock as 'current_level'
from 0p4_item i
where i.isDeleted != 1;


select i.item_id,i.item_code as 'Product ID', i.art_no as 'Item Code', i.description , i.current_stock as 'Current Level'
from 0p4_item i
where i.isDeleted != 1;

select i.item_id,isp.id as "item_selling_price_id", i.item_code as 'Product ID', i.art_no as 'Item Code', pt.type_name,u.uom_name, isp.selling_price, isp.pack_size, isp.moq  from 0p4_item_selling_price isp
left join 0p4_item i on i.item_id=isp.item_id
left join 0p4_pricing_type pt on pt.id=isp.pricing_type_id
left join 0p4_uom u on u.uom_id=isp.uom_id
where i.isDeleted != 1;


select i.item_id,isp.id as "item_selling_price_id", i.item_code as 'Product ID', i.art_no as 'Item Code', pt.type_name,u.uom_name, isp.selling_price, isp.pack_size, isp.moq  from 0p4_item i 
left join 0p4_item_selling_price isp on i.item_id=isp.item_id
left join 0p4_pricing_type pt on pt.id=isp.pricing_type_id
left join 0p4_uom u on u.uom_id=isp.uom_id
where i.isDeleted != 1;



select i.item_id,i.item_code as "Product ID",i.art_no as "Item Code" ,i.brand,g.id as 'category_id', g.name as "Category" from 0p4_item i
left join 0p4_chart_account c on c.chart_account_id=i.selling_gl_code_id
left join 0p4_chart_account pc on pc.chart_account_id=i.purchase_gl_code_id
left join 0p4_item_category g on g.id=i.item_category_id
where i.isDeleted != 1 limit 10;
