mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-14 10:41:21 +00:00
Merge branch 'contacts-ref' of https://github.com/hrwx/erpnext into contacts-ref
This commit is contained in:
@@ -947,10 +947,15 @@ def get_payment_entry(dt, dn, party_amount=None, bank_account=None, bank_amount=
|
|||||||
paid_amount = abs(outstanding_amount)
|
paid_amount = abs(outstanding_amount)
|
||||||
if bank_amount:
|
if bank_amount:
|
||||||
received_amount = bank_amount
|
received_amount = bank_amount
|
||||||
|
else:
|
||||||
|
received_amount = paid_amount * doc.conversion_rate
|
||||||
else:
|
else:
|
||||||
received_amount = abs(outstanding_amount)
|
received_amount = abs(outstanding_amount)
|
||||||
if bank_amount:
|
if bank_amount:
|
||||||
paid_amount = 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 = frappe.new_doc("Payment Entry")
|
||||||
pe.payment_type = payment_type
|
pe.payment_type = payment_type
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ class Timesheet(Document):
|
|||||||
|
|
||||||
for time in self.time_logs:
|
for time in self.time_logs:
|
||||||
if time.from_time and time.to_time:
|
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)
|
time.hours = flt(std_working_hours) * date_diff(time.to_time, time.from_time)
|
||||||
else:
|
else:
|
||||||
if not time.hours:
|
if not time.hours:
|
||||||
|
|||||||
@@ -26,6 +26,10 @@ class ItemGroup(NestedSet, WebsiteGenerator):
|
|||||||
|
|
||||||
def validate(self):
|
def validate(self):
|
||||||
super(ItemGroup, self).validate()
|
super(ItemGroup, self).validate()
|
||||||
|
|
||||||
|
if not self.parent_item_group:
|
||||||
|
self.parent_item_group = 'All Item Groups'
|
||||||
|
|
||||||
self.make_route()
|
self.make_route()
|
||||||
|
|
||||||
def on_update(self):
|
def on_update(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user