The code to remove the Mark up item from the tax free section of purchase history detail page by extending the order history details view
_.extend(OrderHistoryDetailsView.prototype, {
getContext: _.wrap(OrderHistoryDetailsView.prototype.getContext, function (fn) {
try {
var originalRet = fn.apply(this, _.toArray(arguments).slice(1));
var models = originalRet.nonShippableLines;
var filteredModels = models.filter(function (model) {
return model.get('item').id != "9095";
});
originalRet.nonShippableLines = filteredModels;
if (filteredModels.length === 0) {
originalRet.showNonShippableLines = false;
} else {
originalRet.showNonShippableLines = true;
}
return originalRet;
} catch (e) {
console.log('Error in OrderHistoryDetailsView getContext', e);
}
})
});