Merge branch 'develop' into email-campaign
This commit is contained in:
commit
34b4b77920
@ -121,7 +121,12 @@ def get_balance_on(account=None, date=None, party_type=None, party=None, company
|
|||||||
|
|
||||||
allow_cost_center_in_entry_of_bs_account = get_allow_cost_center_in_entry_of_bs_account()
|
allow_cost_center_in_entry_of_bs_account = get_allow_cost_center_in_entry_of_bs_account()
|
||||||
|
|
||||||
if cost_center and (allow_cost_center_in_entry_of_bs_account or acc.report_type =='Profit and Loss'):
|
if account:
|
||||||
|
report_type = acc.report_type
|
||||||
|
else:
|
||||||
|
report_type = ""
|
||||||
|
|
||||||
|
if cost_center and (allow_cost_center_in_entry_of_bs_account or report_type =='Profit and Loss'):
|
||||||
cc = frappe.get_doc("Cost Center", cost_center)
|
cc = frappe.get_doc("Cost Center", cost_center)
|
||||||
if cc.is_group:
|
if cc.is_group:
|
||||||
cond.append(""" exists (
|
cond.append(""" exists (
|
||||||
@ -138,7 +143,7 @@ def get_balance_on(account=None, date=None, party_type=None, party=None, company
|
|||||||
if not frappe.flags.ignore_account_permission:
|
if not frappe.flags.ignore_account_permission:
|
||||||
acc.check_permission("read")
|
acc.check_permission("read")
|
||||||
|
|
||||||
if acc.report_type == 'Profit and Loss':
|
if report_type == 'Profit and Loss':
|
||||||
# for pl accounts, get balance within a fiscal year
|
# for pl accounts, get balance within a fiscal year
|
||||||
cond.append("posting_date >= '%s' and voucher_type != 'Period Closing Voucher'" \
|
cond.append("posting_date >= '%s' and voucher_type != 'Period Closing Voucher'" \
|
||||||
% year_start_date)
|
% year_start_date)
|
||||||
|
@ -207,10 +207,10 @@ def bom(doctype, txt, searchfield, start, page_len, filters):
|
|||||||
idx desc, name
|
idx desc, name
|
||||||
limit %(start)s, %(page_len)s """.format(
|
limit %(start)s, %(page_len)s """.format(
|
||||||
fcond=get_filters_cond(doctype, filters, conditions).replace('%', '%%'),
|
fcond=get_filters_cond(doctype, filters, conditions).replace('%', '%%'),
|
||||||
mcond=get_match_cond(doctype),
|
mcond=get_match_cond(doctype).replace('%', '%%'),
|
||||||
key=frappe.db.escape(searchfield)),
|
key=searchfield),
|
||||||
{
|
{
|
||||||
'txt': "%"+frappe.db.escape(txt)+"%",
|
'txt': '%' + txt + '%',
|
||||||
'_txt': txt.replace("%", ""),
|
'_txt': txt.replace("%", ""),
|
||||||
'start': start or 0,
|
'start': start or 0,
|
||||||
'page_len': page_len or 20
|
'page_len': page_len or 20
|
||||||
|
@ -33,8 +33,8 @@ class LoanApplication(Document):
|
|||||||
if self.repayment_amount - min_repayment_amount < 0:
|
if self.repayment_amount - min_repayment_amount < 0:
|
||||||
frappe.throw(_("Repayment Amount must be greater than " \
|
frappe.throw(_("Repayment Amount must be greater than " \
|
||||||
+ str(flt(min_repayment_amount, 2))))
|
+ str(flt(min_repayment_amount, 2))))
|
||||||
self.repayment_periods = math.ceil(math.log(self.repayment_amount) -
|
self.repayment_periods = math.ceil((math.log(self.repayment_amount) -
|
||||||
math.log(self.repayment_amount - min_repayment_amount) /(math.log(1 + monthly_interest_rate)))
|
math.log(self.repayment_amount - min_repayment_amount)) /(math.log(1 + monthly_interest_rate)))
|
||||||
else:
|
else:
|
||||||
self.repayment_periods = self.loan_amount / self.repayment_amount
|
self.repayment_periods = self.loan_amount / self.repayment_amount
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ def create_columns():
|
|||||||
def get_record():
|
def get_record():
|
||||||
data = []
|
data = []
|
||||||
loans = frappe.get_all("Loan",
|
loans = frappe.get_all("Loan",
|
||||||
filters=[("status", "=", "Fully Disbursed")],
|
filters=[("status", "=", "Disbursed")],
|
||||||
fields=["applicant", "applicant_name", "name", "loan_amount", "rate_of_interest",
|
fields=["applicant", "applicant_name", "name", "loan_amount", "rate_of_interest",
|
||||||
"total_payment", "monthly_repayment_amount", "total_amount_paid"]
|
"total_payment", "monthly_repayment_amount", "total_amount_paid"]
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user