[Minor] Employee Separation Fix (#14867)

* delete associated task & project forcefully
in Employee Seapration cancel trigger

* remove leftover print statement

* remove console statements
This commit is contained in:
Zarrar
2018-07-11 14:34:55 +05:30
committed by Nabin Hait
parent e8345f9ae0
commit 9a3b785a03
4 changed files with 3 additions and 8 deletions

View File

@@ -17,8 +17,6 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
onload: function() { onload: function() {
var me = this; var me = this;
this._super(); this._super();
console.log("class erpnext.accounts.SalesInvoiceController, onload this->", this);
if(!this.frm.doc.__islocal && !this.frm.doc.customer && this.frm.doc.debit_to) { if(!this.frm.doc.__islocal && !this.frm.doc.customer && this.frm.doc.debit_to) {
// show debit_to in print format // show debit_to in print format

View File

@@ -71,8 +71,8 @@ class EmployeeBoardingController(Document):
def on_cancel(self): def on_cancel(self):
# delete task project # delete task project
for task in frappe.get_all("Task", filters={"project": self.project}): for task in frappe.get_all("Task", filters={"project": self.project}):
frappe.delete_doc("Task", task.name) frappe.delete_doc("Task", task.name, force=1)
frappe.delete_doc("Project", self.project) frappe.delete_doc("Project", self.project, force=1)
self.db_set('project', '') self.db_set('project', '')
for activity in self.activities: for activity in self.activities:
activity.db_set("task", "") activity.db_set("task", "")

View File

@@ -613,7 +613,6 @@ erpnext.taxes_and_totals = erpnext.payments.extend({
this.frm.doc.paid_amount : this.frm.doc.base_paid_amount; this.frm.doc.paid_amount : this.frm.doc.base_paid_amount;
this.frm.doc.outstanding_amount = flt(total_amount_to_pay - flt(paid_amount) + this.frm.doc.outstanding_amount = flt(total_amount_to_pay - flt(paid_amount) +
flt(this.frm.doc.change_amount * this.frm.doc.conversion_rate), precision("outstanding_amount")); flt(this.frm.doc.change_amount * this.frm.doc.conversion_rate), precision("outstanding_amount"));
console.log("set the outstanding amount");
} }
}, },
@@ -653,7 +652,6 @@ erpnext.taxes_and_totals = erpnext.payments.extend({
this.frm.doc.paid_amount = flt(paid_amount, precision("paid_amount")); this.frm.doc.paid_amount = flt(paid_amount, precision("paid_amount"));
this.frm.doc.base_paid_amount = flt(base_paid_amount, precision("base_paid_amount")); this.frm.doc.base_paid_amount = flt(base_paid_amount, precision("base_paid_amount"));
console.log("paid amount set as -> ", paid_amount, base_paid_amount);
}, },
calculate_change_amount: function(){ calculate_change_amount: function(){

View File

@@ -570,7 +570,6 @@ class TestDeliveryNote(unittest.TestCase):
self.assertEqual(dn.name, dt.delivery_stops[0].delivery_note) self.assertEqual(dn.name, dt.delivery_stops[0].delivery_note)
def create_delivery_note(**args): def create_delivery_note(**args):
print (frappe.session.user)
dn = frappe.new_doc("Delivery Note") dn = frappe.new_doc("Delivery Note")
args = frappe._dict(args) args = frappe._dict(args)
dn.posting_date = args.posting_date or nowdate() dn.posting_date = args.posting_date or nowdate()