Merge branch 'develop' into develop
This commit is contained in:
commit
4993ab5191
@ -79,10 +79,12 @@ class TestLoan(unittest.TestCase):
|
||||
"qty": 4000.00,
|
||||
}]
|
||||
|
||||
loan_application = create_loan_application('_Test Company', self.applicant2, 'Stock Loan', pledge, "Repay Over Number of Periods", 12)
|
||||
loan_application = create_loan_application('_Test Company', self.applicant2,
|
||||
'Stock Loan', pledge, "Repay Over Number of Periods", 12)
|
||||
create_pledge(loan_application)
|
||||
|
||||
loan = create_loan_with_security(self.applicant2, "Stock Loan", "Repay Over Number of Periods", 12, loan_application)
|
||||
loan = create_loan_with_security(self.applicant2, "Stock Loan", "Repay Over Number of Periods",
|
||||
12, loan_application)
|
||||
self.assertEquals(loan.loan_amount, 1000000)
|
||||
|
||||
def test_loan_disbursement(self):
|
||||
@ -92,6 +94,7 @@ class TestLoan(unittest.TestCase):
|
||||
}]
|
||||
|
||||
loan_application = create_loan_application('_Test Company', self.applicant2, 'Stock Loan', pledge, "Repay Over Number of Periods", 12)
|
||||
|
||||
create_pledge(loan_application)
|
||||
|
||||
loan = create_loan_with_security(self.applicant2, "Stock Loan", "Repay Over Number of Periods", 12, loan_application)
|
||||
@ -217,7 +220,8 @@ class TestLoan(unittest.TestCase):
|
||||
"qty": 2000.00
|
||||
}]
|
||||
|
||||
loan_application = create_loan_application('_Test Company', self.applicant2, 'Stock Loan', pledges)
|
||||
loan_application = create_loan_application('_Test Company', self.applicant2, 'Stock Loan', pledges,
|
||||
"Repay Over Number of Periods", 12)
|
||||
create_pledge(loan_application)
|
||||
|
||||
loan = create_loan_with_security(self.applicant2, "Stock Loan", "Repay Over Number of Periods", 12, loan_application,
|
||||
@ -247,7 +251,9 @@ class TestLoan(unittest.TestCase):
|
||||
"haircut": 50,
|
||||
}]
|
||||
|
||||
loan_application = create_loan_application('_Test Company', self.applicant2, 'Stock Loan', pledges)
|
||||
loan_application = create_loan_application('_Test Company', self.applicant2,
|
||||
'Stock Loan', pledges, "Repay Over Number of Periods", 12)
|
||||
|
||||
create_pledge(loan_application)
|
||||
|
||||
loan = create_loan_with_security(self.applicant2, "Stock Loan", "Repay Over Number of Periods", 12, loan_application)
|
||||
|
@ -105,7 +105,7 @@ class TestSalarySlip(unittest.TestCase):
|
||||
#Gross pay calculation based on attendances
|
||||
gross_pay = 78000 - ((78000 / (days_in_month - no_of_holidays)) * flt(ss.leave_without_pay))
|
||||
|
||||
self.assertEqual(ss.gross_pay, gross_pay)
|
||||
self.assertEqual(flt(ss.gross_pay, 2), flt(gross_pay, 2))
|
||||
|
||||
frappe.db.set_value("Payroll Settings", None, "payroll_based_on", "Leave")
|
||||
|
||||
|
@ -11,14 +11,17 @@ def update_itemised_tax_data(doc):
|
||||
|
||||
for row in doc.items:
|
||||
tax_rate = 0.0
|
||||
item_tax_rate = frappe.parse_json(row.item_tax_rate)
|
||||
item_tax_rate = 0.0
|
||||
|
||||
if row.item_tax_rate:
|
||||
item_tax_rate = frappe.parse_json(row.item_tax_rate)
|
||||
|
||||
# First check if tax rate is present
|
||||
# If not then look up in item_wise_tax_detail
|
||||
if item_tax_rate:
|
||||
for account, rate in iteritems(item_tax_rate):
|
||||
tax_rate += rate
|
||||
elif itemised_tax.get(row.item_code):
|
||||
elif row.item_code and itemised_tax.get(row.item_code):
|
||||
tax_rate = sum([tax.get('tax_rate', 0) for d, tax in itemised_tax.get(row.item_code).items()])
|
||||
|
||||
row.tax_rate = flt(tax_rate, row.precision("tax_rate"))
|
||||
|
Loading…
x
Reference in New Issue
Block a user