Merge branch 'hotfix'
This commit is contained in:
commit
d45a036b5e
@ -2,7 +2,7 @@
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
|
||||
__version__ = '8.0.38'
|
||||
__version__ = '8.0.39'
|
||||
|
||||
|
||||
def get_default_company(user=None):
|
||||
|
@ -8,7 +8,7 @@ import datetime
|
||||
from frappe import _, msgprint, scrub
|
||||
from frappe.defaults import get_user_permissions
|
||||
from frappe.utils import add_days, getdate, formatdate, get_first_day, date_diff, \
|
||||
add_years, get_timestamp, nowdate
|
||||
add_years, get_timestamp, nowdate, flt
|
||||
from frappe.geo.doctype.address.address import get_address_display, get_default_address
|
||||
from frappe.email.doctype.contact.contact import get_contact_details, get_default_contact
|
||||
from erpnext.exceptions import PartyFrozen, InvalidCurrency, PartyDisabled, InvalidAccountCurrency
|
||||
@ -389,10 +389,10 @@ def get_dashboard_info(party_type, party):
|
||||
where party_type = %s and party=%s""", (party_type, party))
|
||||
|
||||
info = {}
|
||||
info["billing_this_year"] = billing_this_year[0][0] if billing_this_year else 0
|
||||
info["billing_this_year"] = flt(billing_this_year[0][0]) if billing_this_year else 0
|
||||
info["currency"] = party_account_currency
|
||||
info["total_unpaid"] = total_unpaid[0][0] if total_unpaid else 0
|
||||
info["total_unpaid"] = flt(total_unpaid[0][0]) if total_unpaid else 0
|
||||
if party_type == "Supplier":
|
||||
info["total_unpaid"] = -1 * info["total_unpaid"]
|
||||
|
||||
return info
|
||||
return info
|
||||
|
@ -462,7 +462,8 @@ class calculate_taxes_and_totals(object):
|
||||
|
||||
if self.doc.is_pos:
|
||||
for payment in self.doc.get('payments'):
|
||||
payment.base_amount = flt(payment.amount * self.doc.conversion_rate)
|
||||
payment.amount = flt(payment.amount)
|
||||
payment.base_amount = payment.amount * flt(self.doc.conversion_rate)
|
||||
paid_amount += payment.amount
|
||||
base_paid_amount += payment.base_amount
|
||||
elif not self.doc.is_return:
|
||||
|
@ -27,7 +27,8 @@ class JobApplicant(Document):
|
||||
|
||||
def validate(self):
|
||||
self.check_email_id_is_unique()
|
||||
validate_email_add(self.email_id, True)
|
||||
if self.email_id:
|
||||
validate_email_add(self.email_id, True)
|
||||
|
||||
if not self.applicant_name and self.email_id:
|
||||
guess = self.email_id.split('@')[0]
|
||||
|
Loading…
x
Reference in New Issue
Block a user