Start adding MonthlyInventory

This commit is contained in:
2016-09-16 12:22:50 -04:00
parent 3bdd202e81
commit 679ef75152
6 changed files with 38 additions and 5 deletions
@@ -0,0 +1,11 @@
(function () {
'use strict';
window.app.controller('MonthlyInventoryReportController', MonthlyInventoryReportController);
MonthlyInventoryReportController.$inject = ['$scope', 'reportSvc'];
function MonthlyInventoryReportController($scope, reportSvc) {
var vm = this;
vm.monthlyInventoryData = reportSvc.monthlyInventoryData;
}
})();
+10 -1
View File
@@ -4,13 +4,15 @@
reportSvc.$inject = ['$http'];
function reportSvc($http) {
var distributionData = [];
var monthlyInventoryData = [];
var svc = {
distributionData: distributionData,
monthlyInventoryData: monthlyInventoryData,
loadDistributionReport: loadDistributionReport
};
//loadDistributionReport({ startDate: '2015-06-01', endDate: '2016-01-01' });
loadDistributionReport({ startDate: '2015-05-01', endDate: '2016-01-01' });
return svc;
function loadDistributionReport(query) {
@@ -19,5 +21,12 @@
angular.copy(data, distributionData);
});
}
function loadMonthlyInventoryData(query) {
return $http.post('/Report/MonthlyInventory', query)
.success(function (data) {
angular.copy(data, monthlyInventoryData);
});
}
}
})();