Hello!
Price rate not picking up from corresponding Price List when creating PO from Material Request.
It works as intended when make PO from Sales Order without material request.
If that kind of bug?
FHenry
August 5, 2021, 5:40pm
2
Yes same bug here,
It a know bug already fix, but it come again
opened 05:14AM - 18 Mar 15 UTC
closed 07:07AM - 23 Mar 15 UTC
When converting a Material Request to a Purchase Order, the default Supplier is … applied correctly, however the default Price List for that supplier is not - instead, Standard Buying is applied (see picture).
In the example, the Roberd's Price List should be applied.
The issue does not occur when creating a new Purchase Order from scratch (without converting from Material Request).
When converting from a Quote to a Purchase Order, the issue does not occur either.
Taken via discuss https://discuss.frappe.io/t/default-price-list-issue-when-converting-from-material-request/4997
Sadly nabinhait says fix, but didn’t explain how (commit number)
I’ve track it until what I can, erpnext/stock/get_item_details.py method get_item_details received the customer of Materials request as args, and get_price_list_rate look for good buying price list but with customer reference instead of supplier ref.
I re-open another issue( without few hopes of solving)
opened 05:27PM - 05 Aug 21 UTC
closed 12:08PM - 17 Feb 22 UTC
bug
to-validate
Standard selling price list
Item 1 / Rate : 500 €
Standard buying pric… e list
Item 1 / Rate : 0.50 €
Item 1 / Supplier 1 / Rate : 0.30 €
Create Purchase Order PO0001 for Supplier 1 with Item 1, Qty 1 => Item Rate 0.30 € **OK**
Create Sales Order SAL0001 for Customer 1 with Item 1, Qty 1 => Item Rate 500 € **OK**
Create Material Request MAT0001 from SAL0001
Create Purchase Order PO0002 from MAT0001 (select Supplier 1 on popup) => Item Rate 500 € **KO**, should be 0.30
Create Purchase Order PO0003 for Supplier 1
Use "Get Item from Open Material request", Check MAT0001 => Item Rate 500 € **KO**, should be 0.30
Item 1 rate is 0.50 instead of 1000€
I've track it until what I can, erpnext/stock/get_item_details.py method get_item_details received the Customer 1 in args and get_price_list_rate make bad sql request
select name, price_list_rate, uom
from `tabItem Price` where item_code=%(item_code)s
and price_list=%(price_list)s
and coalesce(uom, '') in ('', %(uom)s) and **customer=%(customer)s** and %(transaction_date)s between
coalesce(valid_from, '2000-01-01') and coalesce(valid_upto, '2500-12-31')
order by valid_from desc, uom desc
{'item_code': 'Item 1', 'price_list': 'Buying Standard', 'customer': 'Customer 1', 'supplier': 'Supplier 1', 'uom': 'Unit', 'transaction_date': '2021-08-05'}
Test customer instead of supplier
Related to #2964 close in 2015 ?
![image](https://user-images.githubusercontent.com/1050053/128393352-1cb6b2e6-d233-4928-a104-0692548783d8.png)
![image](https://user-images.githubusercontent.com/1050053/128393495-a1b5b631-47d8-4469-b0cc-6d2751187b14.png)
https://discuss.erpnext.com/t/sales-order-material-request-purchase-order-no-price-rate-picked-up-from-price-list/72109/2