Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Commit

Permalink
Fixed exception e.name.indexOf is not a function on inventory reports
Browse files Browse the repository at this point in the history
Fixes #454
  • Loading branch information
jkleinsc committed May 11, 2016
1 parent c10e068 commit 2960db3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/inventory/reports/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -964,16 +964,16 @@ export default AbstractReportController.extend(LocationName, ModalHelper, Number
if (this._includeTransaction(reportType, request.transactionType) && this._hasIncludedLocation(request.locationsAffected)) {
var deliveryLocation = this.getDisplayLocationName(request.deliveryLocation, request.deliveryAisle),
locations = [],
num = this._getValidNumber(location.quantity),
num = this._getValidNumber(request.quantity),
totalCost = (this._getValidNumber(request.quantity) * this._getValidNumber(request.costPerUnit));
locations = request.locationsAffected.map(function(location) {
if (reportType === 'detailedTransfer') {
return {
name: i18n.t('inventory.reports.rows.transfer2', { source: location.name, target: deliveryLocation })
name: i18n.t('inventory.reports.rows.transfer2', { source: location.name, target: deliveryLocation }).toString()
};
} else {
return {
name: i18n.t('inventory.reports.rows.transfer1', { quantity: num, location: location.name })
name: i18n.t('inventory.reports.rows.transfer1', { quantity: num, location: location.name }).toString()
};
}
}.bind(this));
Expand Down Expand Up @@ -1338,4 +1338,4 @@ export default AbstractReportController.extend(LocationName, ModalHelper, Number
}.bind(this));
}
}
});
});

0 comments on commit 2960db3

Please sign in to comment.