mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-07 23:22:52 +00:00
fix: Drop Shipping address based on customer shopping address
This commit is contained in:
@@ -1419,9 +1419,17 @@ def make_purchase_order(source_name, selected_items=None, target_doc=None):
|
||||
target.payment_schedule = []
|
||||
|
||||
if is_drop_ship_order(target):
|
||||
target.customer = source.customer
|
||||
target.customer_name = source.customer_name
|
||||
target.shipping_address = source.shipping_address_name
|
||||
if source.shipping_address_name:
|
||||
target.shipping_address = source.shipping_address_name
|
||||
target.shipping_address_display = source.shipping_address
|
||||
else:
|
||||
target.shipping_address = source.customer_address
|
||||
target.shipping_address_display = source.address_display
|
||||
|
||||
target.customer_contact_person = source.contact_person
|
||||
target.customer_contact_display = source.contact_display
|
||||
target.customer_contact_mobile = source.contact_mobile
|
||||
target.customer_contact_email = source.contact_email
|
||||
else:
|
||||
target.customer = target.customer_name = target.shipping_address = None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user