[fix] Invoice/Delivery note customer po_no overwritten by Sales order null po_no (#15785)
This commit is contained in:
parent
49647bfecc
commit
667f0fbd6d
@ -345,7 +345,8 @@ class SellingController(StockController):
|
||||
sales_orders = list(set([d.get(ref_fieldname) for d in self.items if d.get(ref_fieldname)]))
|
||||
if sales_orders:
|
||||
po_nos = frappe.get_all('Sales Order', 'po_no', filters = {'name': ('in', sales_orders)})
|
||||
self.po_no = ', '.join(list(set([d.po_no for d in po_nos if d.po_no])))
|
||||
if po_nos and po_nos[0].get('po_no'):
|
||||
self.po_no = ', '.join(list(set([d.po_no for d in po_nos if d.po_no])))
|
||||
|
||||
def validate_items(self):
|
||||
# validate items to see if they have is_sales_item enabled
|
||||
|
Loading…
x
Reference in New Issue
Block a user