From 0c699f0726c133433402b43222ac47a290e436dd Mon Sep 17 00:00:00 2001 From: Suraj Shetty Date: Wed, 7 Aug 2019 10:17:05 +0530 Subject: [PATCH 1/3] fix: Paid amount 0 while creating advanced payment entry Paid amount is set 0 while creating advanced payment entry against multi-currency purchase order. Solution: Populate paid amount value after applying conversion rate --- erpnext/accounts/doctype/payment_entry/payment_entry.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index da6b167880..fd3f28f901 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -933,10 +933,15 @@ def get_payment_entry(dt, dn, party_amount=None, bank_account=None, bank_amount= paid_amount = abs(outstanding_amount) if bank_amount: received_amount = bank_amount + else: + received_amount = paid_amount * doc.conversion_rate else: received_amount = abs(outstanding_amount) if bank_amount: paid_amount = bank_amount + else: + # if party account currency and bank currency is different then populate paid amount as well + paid_amount = received_amount * doc.conversion_rate pe = frappe.new_doc("Payment Entry") pe.payment_type = payment_type From cab8e9be891dfa102656723a7851eab5454938b5 Mon Sep 17 00:00:00 2001 From: Suraj Shetty Date: Wed, 7 Aug 2019 10:40:29 +0530 Subject: [PATCH 2/3] fix(timesheet): Hours automatically used to set 0 - Case: If the company had standard working hour set and when the user creates a timesheet with same date for "To" and "From" then the hours field automatically used to get reset to 0 after saving the form. --- erpnext/projects/doctype/timesheet/timesheet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/projects/doctype/timesheet/timesheet.py b/erpnext/projects/doctype/timesheet/timesheet.py index df9a6baf38..3c719227bd 100644 --- a/erpnext/projects/doctype/timesheet/timesheet.py +++ b/erpnext/projects/doctype/timesheet/timesheet.py @@ -96,7 +96,7 @@ class Timesheet(Document): for time in self.time_logs: if time.from_time and time.to_time: - if flt(std_working_hours) > 0: + if flt(std_working_hours) and date_diff(time.to_time, time.from_time): time.hours = flt(std_working_hours) * date_diff(time.to_time, time.from_time) else: if not time.hours: From 8ac2a2f0c4f1ac3fae0bc23b1e7abdd1558d2126 Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Mon, 26 Aug 2019 13:00:17 +0530 Subject: [PATCH 3/3] fix: Set default Parent Item Group --- erpnext/setup/doctype/item_group/item_group.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/erpnext/setup/doctype/item_group/item_group.py b/erpnext/setup/doctype/item_group/item_group.py index 33ab992568..760b20a476 100644 --- a/erpnext/setup/doctype/item_group/item_group.py +++ b/erpnext/setup/doctype/item_group/item_group.py @@ -26,6 +26,10 @@ class ItemGroup(NestedSet, WebsiteGenerator): def validate(self): super(ItemGroup, self).validate() + + if not self.parent_item_group: + self.parent_item_group = 'All Item Groups' + self.make_route() def on_update(self):