fix: price list when invoice created from timesheet

(cherry picked from commit 39d6df7c7d)
This commit is contained in:
Nihantra C. Patel
2024-04-11 12:09:27 +05:30
committed by Mergify
parent 225843265e
commit 536dc47eb0

View File

@@ -379,6 +379,9 @@ def make_sales_invoice(source_name, item_code=None, customer=None, currency=None
target.project = timesheet.parent_project
if customer:
target.customer = customer
customer_doc = frappe.get_doc("Customer", customer)
if customer_doc and customer_doc.default_price_list:
target.selling_price_list = customer_doc.default_price_list
if currency:
target.currency = currency