Start adding MonthlyInventory
This commit is contained in:
@@ -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;
|
||||
}
|
||||
})();
|
||||
@@ -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);
|
||||
});
|
||||
}
|
||||
}
|
||||
})();
|
||||
Reference in New Issue
Block a user