Merge pull request #17819 from deepeshgarg007/module
fix: Add chart of accounts importer in data import module
diff --git a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py
index 01b935c..9a95e08 100644
--- a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py
+++ b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py
@@ -321,7 +321,7 @@
def remove_pricing_rule_for_item(pricing_rules, item_details, item_code=None):
from erpnext.accounts.doctype.pricing_rule.utils import get_apply_on_and_items
for d in pricing_rules.split(','):
- if not d: continue
+ if not d or not frappe.db.exists("Pricing Rule", d): continue
pricing_rule = frappe.get_doc('Pricing Rule', d)
if pricing_rule.price_or_product_discount == 'Price':
diff --git a/erpnext/accounts/doctype/pricing_rule/utils.py b/erpnext/accounts/doctype/pricing_rule/utils.py
index d3db130..8a8e329 100644
--- a/erpnext/accounts/doctype/pricing_rule/utils.py
+++ b/erpnext/accounts/doctype/pricing_rule/utils.py
@@ -480,10 +480,10 @@
rule_applied = {}
for item in doc.get("items"):
- if not item.pricing_rules:
- item.pricing_rules = item_row.pricing_rules
-
if item.get(apply_on) in items:
+ if not item.pricing_rules:
+ item.pricing_rules = item_row.pricing_rules
+
for field in ['discount_percentage', 'discount_amount', 'rate']:
if not pr_doc.get(field): continue
diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py
index f277a8b..7127663 100755
--- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py
+++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py
@@ -68,13 +68,13 @@
if self.filters.based_on_payment_terms:
columns.append({
- "label": "Payment Term",
+ "label": _("Payment Term"),
"fieldname": "payment_term",
"fieldtype": "Data",
"width": 120
})
columns.append({
- "label": "Invoice Grand Total",
+ "label": _("Invoice Grand Total"),
"fieldname": "invoice_grand_total",
"fieldtype": "Currency",
"options": "currency",
@@ -83,7 +83,7 @@
for label in ("Invoiced Amount", "Paid Amount", credit_or_debit_note, "Outstanding Amount"):
columns.append({
- "label": label,
+ "label": _(label),
"fieldname": frappe.scrub(label),
"fieldtype": "Currency",
"options": "currency",
diff --git a/erpnext/public/js/payment/pos_payment.html b/erpnext/public/js/payment/pos_payment.html
index 185d748..cb6971b 100644
--- a/erpnext/public/js/payment/pos_payment.html
+++ b/erpnext/public/js/payment/pos_payment.html
@@ -21,7 +21,7 @@
<hr>
<div class="row">
<div class="col-sm-6 ">
- <div class ="row multimode-payments">
+ <div class ="row multimode-payments" style = "margin-right:10px">
</div>
</div>
<div class="col-sm-6 payment-toolbar">