Merge pull request #25928 from nextchamp-saqib/pos-fixes-8
fix(pos): multiple pos issues
diff --git a/erpnext/accounts/general_ledger.py b/erpnext/accounts/general_ledger.py
index f1717c5..d4b2494 100644
--- a/erpnext/accounts/general_ledger.py
+++ b/erpnext/accounts/general_ledger.py
@@ -185,10 +185,10 @@
for d in gl_map:
if d.account == round_off_account:
round_off_gle = d
- if d.debit_in_account_currency:
- debit_credit_diff -= flt(d.debit_in_account_currency)
+ if d.debit:
+ debit_credit_diff -= flt(d.debit)
else:
- debit_credit_diff += flt(d.credit_in_account_currency)
+ debit_credit_diff += flt(d.credit)
round_off_account_exists = True
if round_off_account_exists and abs(debit_credit_diff) <= (1.0 / (10**precision)):
diff --git a/erpnext/crm/doctype/opportunity/opportunity.json b/erpnext/crm/doctype/opportunity/opportunity.json
index 2e09a76..4ba4140 100644
--- a/erpnext/crm/doctype/opportunity/opportunity.json
+++ b/erpnext/crm/doctype/opportunity/opportunity.json
@@ -280,7 +280,6 @@
"read_only": 1
},
{
- "depends_on": "eval:",
"fieldname": "territory",
"fieldtype": "Link",
"label": "Territory",
@@ -431,7 +430,7 @@
"icon": "fa fa-info-sign",
"idx": 195,
"links": [],
- "modified": "2021-01-06 19:42:46.190051",
+ "modified": "2021-06-04 10:11:22.831139",
"modified_by": "Administrator",
"module": "CRM",
"name": "Opportunity",
diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py
index f1292d8..83ba324 100644
--- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py
+++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py
@@ -497,7 +497,7 @@
def update_billing_status(self, update_modified=True):
updated_pr = [self.name]
for d in self.get("items"):
- if d.purchase_invoice and d.purchase_invoice_item:
+ if d.get("purchase_invoice") and d.get("purchase_invoice_item"):
d.db_set('billed_amt', d.amount, update_modified=update_modified)
elif d.purchase_order_item:
updated_pr += update_billed_amount_based_on_po(d.purchase_order_item, update_modified)
@@ -748,4 +748,3 @@
account.base_amount * item.get(based_on_field) / total_item_cost
return item_account_wise_cost
-