diff --git a/posnext/doc_events/pos_profile.py b/posnext/doc_events/pos_profile.py index 4ecc494..c434a31 100644 --- a/posnext/doc_events/pos_profile.py +++ b/posnext/doc_events/pos_profile.py @@ -3,9 +3,7 @@ def validate_pf(doc, method): - if not doc.custom_edit_rate_and_uom: - doc.custom_use_discount_percentage = 0 - doc.custom_use_discount_amount = 0 + pass @frappe.whitelist() diff --git a/posnext/doc_events/sales_invoice.py b/posnext/doc_events/sales_invoice.py index 464055a..3307e37 100644 --- a/posnext/doc_events/sales_invoice.py +++ b/posnext/doc_events/sales_invoice.py @@ -1,12 +1,7 @@ import frappe -from frappe import _ def validate_si(doc, method): - if doc.pos_profile: - show_branch = frappe.db.get_value("POS Profile", doc.pos_profile, "show_branch") - if "branch" not in doc.__dict__ and show_branch == 1: - frappe.throw(_("Create Branch Accounting Dimensions.")) if doc.is_return and doc.is_pos: doc.update_outstanding_for_self = 0 if doc.payments: diff --git a/posnext/overrides/pos_invoice_merge_log.py b/posnext/overrides/pos_invoice_merge_log.py index 8de5cf7..cce9598 100644 --- a/posnext/overrides/pos_invoice_merge_log.py +++ b/posnext/overrides/pos_invoice_merge_log.py @@ -13,7 +13,7 @@ class PosnextPOSInvoiceMergeLog(POSInvoiceMergeLog): def serial_and_batch_bundle_reference_for_pos_invoice(self): for d in self.pos_invoices: - pos_invoice = frappe.get_doc("Sales Invoice", d.pos_invoice) + pos_invoice = frappe.get_doc("POS Invoice", d.pos_invoice) for table_name in ["items", "packed_items"]: pos_invoice.set_serial_and_batch_bundle(table_name)