diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.py b/erpnext/buying/doctype/purchase_order/purchase_order.py index a828c117edb..ff0778f3687 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.py +++ b/erpnext/buying/doctype/purchase_order/purchase_order.py @@ -456,9 +456,8 @@ class PurchaseOrder(BuyingController): if not self.is_against_so(): return for item in removed_items: - prev_ordered_qty = ( + prev_ordered_qty = flt( frappe.get_cached_value("Sales Order Item", item.get("sales_order_item"), "ordered_qty") - or 0.0 ) frappe.db.set_value( diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 77d4db8504f..8f151b56394 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -2750,9 +2750,7 @@ def set_balance_in_account_currency( _("Account: {0} with currency: {1} can not be selected").format(gl_dict.account, account_currency) ) - gl_dict["account_currency"] = ( - company_currency if account_currency == company_currency else account_currency - ) + gl_dict["account_currency"] = account_currency # set debit/credit in account currency if not provided if flt(gl_dict.debit) and not flt(gl_dict.debit_in_account_currency): diff --git a/erpnext/stock/stock_ledger.py b/erpnext/stock/stock_ledger.py index 8547432b876..68c7c314091 100644 --- a/erpnext/stock/stock_ledger.py +++ b/erpnext/stock/stock_ledger.py @@ -496,7 +496,10 @@ class update_entries_after: elif dependant_sle.voucher_type == "Stock Entry" and is_transfer_stock_entry( dependant_sle.voucher_no ): - print(dependant_sle.voucher_no) + if self.distinct_item_warehouses[key].get("transfer_entry_to_repost"): + return + + val["transfer_entry_to_repost"] = True self.distinct_item_warehouses[key] = val self.new_items_found = True