From 2a2346422d55773a38ff3101c6f1a547314b8024 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 27 Jul 2016 13:07:52 +0530 Subject: [PATCH 1/7] [fix] Set amounts only if party and bank account exists --- erpnext/accounts/doctype/payment_entry/payment_entry.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index 28978cdbaf..3eed70cbcc 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 From ee75d41da0e09f4b644f03029129f58099816d5f Mon Sep 17 00:00:00 2001 From: Neil Trini Lasrado Date: Wed, 27 Jul 2016 15:23:03 +0530 Subject: [PATCH 2/7] [Fix] Fixed issues in Fee records --- erpnext/schools/doctype/fees/fees.json | 6 ++++-- erpnext/schools/doctype/fees/fees.py | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/erpnext/schools/doctype/fees/fees.json b/erpnext/schools/doctype/fees/fees.json index 75e33153b2..ce911ad6d7 100644 --- a/erpnext/schools/doctype/fees/fees.json +++ b/erpnext/schools/doctype/fees/fees.json @@ -394,6 +394,7 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "default": "0", "fieldname": "total_amount", "fieldtype": "Currency", "hidden": 0, @@ -419,7 +420,7 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, - "default": "", + "default": "0", "fieldname": "paid_amount", "fieldtype": "Currency", "hidden": 0, @@ -445,6 +446,7 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "default": "0", "fieldname": "outstanding_amount", "fieldtype": "Currency", "hidden": 0, @@ -478,7 +480,7 @@ "istable": 0, "max_attachments": 0, "menu_index": 0, - "modified": "2016-07-25 08:44:33.595812", + "modified": "2016-07-27 03:52:28.509757", "modified_by": "Administrator", "module": "Schools", "name": "Fees", diff --git a/erpnext/schools/doctype/fees/fees.py b/erpnext/schools/doctype/fees/fees.py index 0f2db503bb..d2540f79bc 100644 --- a/erpnext/schools/doctype/fees/fees.py +++ b/erpnext/schools/doctype/fees/fees.py @@ -14,8 +14,9 @@ class Fees(Document): def calculate_total(self): """Calculates total amount.""" self.total_amount = 0 - for d in self.amount: + for d in self.components: self.total_amount += d.amount + self.outstanding_amount = self.total_amount def get_fee_list(doctype, txt, filters, limit_start, limit_page_length=20): user = frappe.session.user From 98151ce5b265cc311b03b4c88500afe3f25b31e4 Mon Sep 17 00:00:00 2001 From: Neil Trini Lasrado Date: Wed, 27 Jul 2016 15:58:16 +0530 Subject: [PATCH 3/7] [Patch] Change status in Opportunity to Quotation where status is converted --- erpnext/patches.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 6971e0df1d..e700bea5dc 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 From 7590b8fff1188541d1757514d724ed3688131dbe Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 27 Jul 2016 16:44:17 +0530 Subject: [PATCH 4/7] minor fix for stock ledger entry --- erpnext/stock/stock_ledger.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/stock_ledger.py b/erpnext/stock/stock_ledger.py index 03f2ee137f..a980ed0aff 100644 --- a/erpnext/stock/stock_ledger.py +++ b/erpnext/stock/stock_ledger.py @@ -250,7 +250,7 @@ class update_entries_after(object): self.valuation_rate = new_stock_value / new_stock_qty else: - self.valuation_rate = self.outgoing_rate + self.valuation_rate = sle.outgoing_rate else: if flt(self.qty_after_transaction) >= 0 and sle.outgoing_rate: From fa97b3cac7f443789d5cecf9d8f3887505451b73 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 27 Jul 2016 17:33:22 +0530 Subject: [PATCH 5/7] [fix] repost gle only if there is any stock account without warehouse --- .../v7_0/fix_nonwarehouse_ledger_gl_entries_for_transactions.py | 2 ++ 1 file changed, 2 insertions(+) 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 ba1d067116..174bb119c1 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 From 14384c2787b89fea0a446c817a3148828b00a8c9 Mon Sep 17 00:00:00 2001 From: akshay Date: Thu, 28 Jul 2016 13:53:17 +0530 Subject: [PATCH 6/7] [fix] serial no button --- erpnext/public/js/utils.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/erpnext/public/js/utils.js b/erpnext/public/js/utils.js index ece82844be..4081ca2be5 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($("
") .css({"margin-bottom": "10px", "margin-top": "10px"}) - .appendTo(grid_row.fields_dict.serial_no.$wrapper)); + .appendTo(grid_row.grid_form.fields_dict.serial_no.$wrapper)); $btn.on("click", function() { var d = new frappe.ui.Dialog({ @@ -69,7 +69,7 @@ $.extend(erpnext, { var serial_no = d.get_value("serial_no"); if(serial_no) { var val = (grid_row.doc.serial_no || "").split("\n").concat([serial_no]).join("\n"); - grid_row.fields_dict.serial_no.set_model_value(val.trim()); + grid_row.grid_form.fields_dict.serial_no.set_model_value(val.trim()); } d.hide(); return false; @@ -190,4 +190,4 @@ $(document).on('app_ready', function() { }); }); } -}); \ No newline at end of file +}); From ee70f26131726cd46232885ef778d821386a88de Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 28 Jul 2016 16:16:35 +0600 Subject: [PATCH 7/7] bumped to version 7.0.8 --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 0a6655d4bb..120bda7b1d 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'''