Merge branch 'develop' into shift_management

This commit is contained in:
Anurag Mishra 2020-08-14 12:11:41 +05:30 committed by GitHub
commit 6f1579da1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 16 deletions

View File

@ -302,10 +302,10 @@
"fieldname": "warehouse", "fieldname": "warehouse",
"fieldtype": "Link", "fieldtype": "Link",
"label": "Warehouse", "label": "Warehouse",
"mandatory_depends_on": "update_stock",
"oldfieldname": "warehouse", "oldfieldname": "warehouse",
"oldfieldtype": "Link", "oldfieldtype": "Link",
"options": "Warehouse", "options": "Warehouse"
"reqd": 1
}, },
{ {
"default": "0", "default": "0",
@ -350,4 +350,4 @@
], ],
"sort_field": "modified", "sort_field": "modified",
"sort_order": "DESC" "sort_order": "DESC"
} }

View File

@ -16,14 +16,16 @@ from six import string_types
class LoanApplication(Document): class LoanApplication(Document):
def validate(self): def validate(self):
validate_repayment_method(self.repayment_method, self.loan_amount, self.repayment_amount,
self.repayment_periods, self.is_term_loan)
self.validate_loan_type()
self.set_pledge_amount() self.set_pledge_amount()
self.set_loan_amount() self.set_loan_amount()
self.validate_loan_amount() self.validate_loan_amount()
if self.is_term_loan:
validate_repayment_method(self.repayment_method, self.loan_amount, self.repayment_amount,
self.repayment_periods, self.is_term_loan)
self.validate_loan_type()
self.get_repayment_details() self.get_repayment_details()
self.check_sanctioned_amount_limit() self.check_sanctioned_amount_limit()
@ -106,7 +108,7 @@ class LoanApplication(Document):
if self.is_secured_loan and self.proposed_pledges: if self.is_secured_loan and self.proposed_pledges:
self.maximum_loan_amount = 0 self.maximum_loan_amount = 0
for security in self.proposed_pledges: for security in self.proposed_pledges:
self.maximum_loan_amount += security.post_haircut_amount self.maximum_loan_amount += flt(security.post_haircut_amount)
if not self.loan_amount and self.is_secured_loan and self.proposed_pledges: if not self.loan_amount and self.is_secured_loan and self.proposed_pledges:
self.loan_amount = self.maximum_loan_amount self.loan_amount = self.maximum_loan_amount

View File

@ -94,13 +94,6 @@ frappe.ui.form.on("Timesheet", {
} }
}, },
company: function(frm) {
frappe.db.get_value('Company', { 'company_name' : frm.doc.company }, 'standard_working_hours')
.then(({ message }) => {
(frappe.working_hours = message.standard_working_hours || 0);
});
},
make_invoice: function(frm) { make_invoice: function(frm) {
let dialog = new frappe.ui.Dialog({ let dialog = new frappe.ui.Dialog({
title: __("Select Item (optional)"), title: __("Select Item (optional)"),