Thank you PabloZ
I have to hide based on condition only but not isActive of invoice section
define(
'Dev.RepairsExtension.PurchaseOrderModule', [
'OrderWizard.Module.PaymentMethod.PurchaseNumber', 'Utils', 'underscore', 'Backbone', 'jQuery'
],
function(
PurchaseOrderModuleView, Utils, _, Backbone, jQuery
) {
'use strict';
_.extend(PurchaseOrderModuleView.prototype, {
initialize: function(options) {
this.cart = LiveOrderModel.getInstance();
this.application = options.container;
this.on('afterViewRender', this.hidePurchaseOrder, this);
},
hidePurchaseOrder: function() {
debugger;
var hide = false;
try {
this.cart.get('lines').each(function(e) {
var options = e.attributes.item.attributes.custitem_sr_repair;
if (options) {
hide = true;
}
});
} catch (e) {
console.log(e);
}
if (hide) {
//hiding in here
}
}
});
});
this is how iam extending module