[Fix] Test cases for asset
This commit is contained in:
parent
8d66f1e45d
commit
f270567c45
@ -40,7 +40,7 @@ class Asset(AccountsController):
|
||||
self.validate_cancellation()
|
||||
self.delete_depreciation_entries()
|
||||
self.set_status()
|
||||
delete_gl_entries()
|
||||
delete_gl_entries(voucher_type='Asset', voucher_no=self.name)
|
||||
self.db_set('booked_fixed_asset', 0)
|
||||
|
||||
def validate_item(self):
|
||||
|
@ -31,7 +31,7 @@ class TestAsset(unittest.TestCase):
|
||||
self.assertEqual(asset.purchase_invoice, pi.name)
|
||||
|
||||
expected_gle = (
|
||||
("_Test Fixed Asset - _TC", 100000.0, 0.0),
|
||||
("Asset Received But Not Billed - _TC", 100000.0, 0.0),
|
||||
("Creditors - _TC", 0.0, 100000.0)
|
||||
)
|
||||
|
||||
|
@ -152,8 +152,6 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
||||
onload: function() {
|
||||
var me = this;
|
||||
|
||||
this.setup_quality_inspection();
|
||||
|
||||
if(this.frm.doc.__islocal) {
|
||||
var currency = frappe.defaults.get_user_default("currency");
|
||||
|
||||
@ -230,6 +228,7 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
||||
erpnext.hide_company();
|
||||
this.set_dynamic_labels();
|
||||
this.setup_sms();
|
||||
this.setup_quality_inspection();
|
||||
},
|
||||
|
||||
apply_default_taxes: function() {
|
||||
|
@ -59,7 +59,6 @@ frappe.ui.form.on('Stock Entry', {
|
||||
});
|
||||
|
||||
frm.add_fetch("bom_no", "inspection_required", "inspection_required");
|
||||
frm.trigger("setup_quality_inspection");
|
||||
},
|
||||
|
||||
setup_quality_inspection: function(frm) {
|
||||
@ -189,6 +188,8 @@ frappe.ui.form.on('Stock Entry', {
|
||||
frm.trigger("make_retention_stock_entry");
|
||||
});
|
||||
}
|
||||
|
||||
frm.trigger("setup_quality_inspection");
|
||||
},
|
||||
|
||||
purpose: function(frm) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user