diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 0a6655d4bb0..120bda7b1da 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -2,7 +2,7 @@ from __future__ import unicode_literals import frappe -__version__ = '7.0.7' +__version__ = '7.0.8' def get_default_company(user=None): '''Get default company for user''' diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index 28978cdbaf3..3eed70cbccf 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -251,8 +251,8 @@ class PaymentEntry(AccountsController): self.unallocated_amount = party_amount - self.total_allocated_amount def set_difference_amount(self): - base_unallocated_amount = flt(self.unallocated_amount) * \ - (self.source_exchange_rate if self.payment_type=="Receive" else self.target_exchange_rate) + base_unallocated_amount = flt(self.unallocated_amount) * (flt(self.source_exchange_rate) + if self.payment_type=="Receive" else flt(self.target_exchange_rate)) base_party_amount = flt(self.base_total_allocated_amount) + flt(base_unallocated_amount) @@ -672,7 +672,7 @@ def get_payment_entry(dt, dn, party_amount=None, bank_account=None, bank_amount= pe.setup_party_account_field() pe.set_missing_values() - if bank: + if party_account and bank: pe.set_exchange_rate() pe.set_amounts() return pe \ No newline at end of file diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 6971e0df1d9..e700bea5dcd 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -304,3 +304,4 @@ erpnext.patches.v7_0.remove_administrator_role_in_doctypes erpnext.patches.v7_0.rename_fee_amount_to_fee_component erpnext.patches.v7_0.calculate_total_costing_amount erpnext.patches.v7_0.fix_nonwarehouse_ledger_gl_entries_for_transactions +execute:frappe.db.sql("""update `tabOpportunity` set status='Quotation' where status='Converted'""") \ No newline at end of file diff --git a/erpnext/patches/v7_0/fix_nonwarehouse_ledger_gl_entries_for_transactions.py b/erpnext/patches/v7_0/fix_nonwarehouse_ledger_gl_entries_for_transactions.py index ba1d067116c..174bb119c1a 100644 --- a/erpnext/patches/v7_0/fix_nonwarehouse_ledger_gl_entries_for_transactions.py +++ b/erpnext/patches/v7_0/fix_nonwarehouse_ledger_gl_entries_for_transactions.py @@ -15,6 +15,8 @@ def execute(): and (warehouse is null or warehouse = '')""") if warehouses: warehouses = set_warehouse_for_stock_account(warehouses) + if not warehouses: + return stock_vouchers = frappe.db.sql("""select distinct sle.voucher_type, sle.voucher_no from `tabStock Ledger Entry` sle diff --git a/erpnext/public/js/utils.js b/erpnext/public/js/utils.js index ece82844be5..4081ca2be55 100644 --- a/erpnext/public/js/utils.js +++ b/erpnext/public/js/utils.js @@ -33,13 +33,13 @@ $.extend(erpnext, { setup_serial_no: function() { var grid_row = cur_frm.open_grid_row(); - if(!grid_row || !grid_row.fields_dict.serial_no || - grid_row.fields_dict.serial_no.get_status()!=="Write") return; + if(!grid_row || !grid_row.grid_form.fields_dict.serial_no || + grid_row.grid_form.fields_dict.serial_no.get_status()!=="Write") return; var $btn = $('') .appendTo($("