From f7911687a05e28205f6f70a901043f28cc54ffe2 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Thu, 3 Dec 2015 08:09:27 +0530 Subject: [PATCH] [minor] fixes to patch --- .../accounts/doctype/journal_entry/journal_entry.py | 7 ++++++- .../journal_entry_account/journal_entry_account.json | 12 ++++++------ erpnext/patches/v4_4/make_email_accounts.py | 4 ++-- erpnext/patches/v6_8/move_drop_ship_to_po_items.py | 3 +++ 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.py b/erpnext/accounts/doctype/journal_entry/journal_entry.py index eefa0db1bb..8eaef8bd01 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry.py +++ b/erpnext/accounts/doctype/journal_entry/journal_entry.py @@ -350,7 +350,7 @@ class JournalEntry(AccountsController): elif frappe.db.get_value("Account", d.account, "account_type") in ["Bank", "Cash"]: total_amount += (d.debit_in_account_currency or d.credit_in_account_currency) bank_account_currency = d.account_currency - + self.set_total_amount(total_amount, bank_account_currency) def set_total_amount(self, amt, currency): @@ -743,6 +743,11 @@ def get_account_balance_and_party_type(account, date, company, debit=None, credi "exchange_rate": get_exchange_rate(account, account_details.account_currency, company, debit=debit, credit=credit, exchange_rate=exchange_rate) } + + # un-set party if not party type + if not party_type: + grid_values["party"] = "" + return grid_values @frappe.whitelist() diff --git a/erpnext/accounts/doctype/journal_entry_account/journal_entry_account.json b/erpnext/accounts/doctype/journal_entry_account/journal_entry_account.json index 348c444771..9277da5905 100644 --- a/erpnext/accounts/doctype/journal_entry_account/journal_entry_account.json +++ b/erpnext/accounts/doctype/journal_entry_account/journal_entry_account.json @@ -10,7 +10,7 @@ "fields": [ { "allow_on_submit": 0, - "bold": 0, + "bold": 1, "collapsible": 0, "fieldname": "account", "fieldtype": "Link", @@ -334,7 +334,7 @@ }, { "allow_on_submit": 0, - "bold": 0, + "bold": 1, "collapsible": 0, "fieldname": "debit_in_account_currency", "fieldtype": "Currency", @@ -359,7 +359,7 @@ }, { "allow_on_submit": 0, - "bold": 0, + "bold": 1, "collapsible": 0, "fieldname": "debit", "fieldtype": "Currency", @@ -408,7 +408,7 @@ }, { "allow_on_submit": 0, - "bold": 0, + "bold": 1, "collapsible": 0, "fieldname": "credit_in_account_currency", "fieldtype": "Currency", @@ -433,7 +433,7 @@ }, { "allow_on_submit": 0, - "bold": 0, + "bold": 1, "collapsible": 0, "fieldname": "credit", "fieldtype": "Currency", @@ -614,7 +614,7 @@ "issingle": 0, "istable": 1, "max_attachments": 0, - "modified": "2015-11-24 02:36:05.804010", + "modified": "2015-12-02 04:14:37.571883", "modified_by": "Administrator", "module": "Accounts", "name": "Journal Entry Account", diff --git a/erpnext/patches/v4_4/make_email_accounts.py b/erpnext/patches/v4_4/make_email_accounts.py index 1acd8de68c..126acfcd1e 100644 --- a/erpnext/patches/v4_4/make_email_accounts.py +++ b/erpnext/patches/v4_4/make_email_accounts.py @@ -35,7 +35,7 @@ def execute(): "enable_incoming": "sync_support_mails", "email_id": "mail_login", "password": "mail_password", - "pop3_server": "mail_server", + "email_server": "mail_server", "use_ssl": "use_ssl", "signature": "support_signature", "enable_auto_reply": "send_autoreply", @@ -59,7 +59,7 @@ def execute(): "enable_incoming": "extract_emails", "email_id": "username", "password": "password", - "pop3_server": "host", + "email_server": "host", "use_ssl": "use_ssl", } diff --git a/erpnext/patches/v6_8/move_drop_ship_to_po_items.py b/erpnext/patches/v6_8/move_drop_ship_to_po_items.py index 1c2a57a93b..06d158e4ec 100644 --- a/erpnext/patches/v6_8/move_drop_ship_to_po_items.py +++ b/erpnext/patches/v6_8/move_drop_ship_to_po_items.py @@ -4,6 +4,9 @@ def execute(): frappe.reload_doctype("Purchase Order") frappe.reload_doctype("Purchase Order Item") + if not frappe.db.has_column("Purchase Order", "delivered_by_supplier"): + return + for po in frappe.get_all("Purchase Order", filters={"delivered_by_supplier": 1}, fields=["name"]): purchase_order = frappe.get_doc("Purchase Order", po)