Skip to content

Commit

Permalink
chore: code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
RitvikSardana committed Sep 2, 2023
1 parent b6abf42 commit 87a390a
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,13 @@ def merge_pos_invoice_into(self, invoice, data):
frappe.db.get_value("POS Profile", invoice.pos_profile, "disable_rounded_total")
)
accounting_dimensions = get_accounting_dimensions()
dimension_values = frappe.db.get_all(
"POS Profile",
filters={"name": invoice.pos_profile},
fields=accounting_dimensions,
)[0]
for dimension in accounting_dimensions:
dimension_value = frappe.db.get_value("POS Profile", invoice.pos_profile, dimension)
dimension_value = dimension_values.get(dimension)
invoice.set(dimension, dimension_value)

if self.merge_invoices_based_on == "Customer Group":
Expand Down

0 comments on commit 87a390a

Please sign in to comment.