Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,9 @@ def create_invoice(self, from_date: date, to_date: date) -> SalesInvoice:
invoice = frappe.new_doc("Sales Invoice")
invoice.company = self.company
invoice.customer = self.customer
invoice.customer_address = self.customer_address
invoice.shipping_address_name = self.shipping_address_name
# '' is not None, so update_if_missing() in set_missing_values() would keep it and skip the default
invoice.customer_address = self.customer_address or None
invoice.shipping_address_name = self.shipping_address_name or None
invoice.selling_price_list = self.get_price_list()
for row in self.items:
invoice.append(
Expand All @@ -125,7 +126,7 @@ def create_invoice(self, from_date: date, to_date: date) -> SalesInvoice:
"qty": row.qty,
},
)
invoice.taxes_and_charges = self.taxes_and_charges
invoice.taxes_and_charges = self.taxes_and_charges or None
Comment thread
HenningWendtland marked this conversation as resolved.
invoice.from_date = from_date
invoice.to_date = to_date
invoice.simple_subscription = self.name
Expand Down
Loading