expense report pdf

This commit is contained in:
gandhimathi 2018-10-04 16:56:16 +05:30
parent e9e0918134
commit 49a75d8a4c

View File

@ -1,7 +1,7 @@
'use strict';
/*** controller***/
app.controller('report_expenseCtrl', ["$scope", "API_POINTS", "$http", "SweetAlert", "$state", 'md5', 'ipCookie', '$window', "dateListDescService",
function ($scope, apiPoint, $http, SweetAlert, $state, md5, ipCookie, $window, dateListDescService) {
app.controller('report_expenseCtrl', ["$scope", "API_POINTS", "$http", "SweetAlert", "$state", 'md5', 'ipCookie', '$window', "dateListDescService", "$filter",
function ($scope, apiPoint, $http, SweetAlert, $state, md5, ipCookie, $window, dateListDescService, $filter) {
// DataTables configurable options
@ -269,7 +269,8 @@ app.controller('report_expenseCtrl', ["$scope", "API_POINTS", "$http", "SweetAle
}
}
var f_date = $filter('date')(new Date($scope.filters.from_date), 'dd-MM-yyyy');
var t_date = $filter('date')(new Date($scope.filters.to_date), 'dd-MM-yyyy');
var docDefinition = {
pageMargins: [20, 85, 20, 50],
pageOrientation: 'landscape',
@ -278,7 +279,7 @@ app.controller('report_expenseCtrl', ["$scope", "API_POINTS", "$http", "SweetAle
margin: 0,
columns: [
{
text: ['Expense Report'],
text: ['Expense Report ' + f_date + ' to ' + t_date],
alignment: 'left', bold: true, margin: [20, 30, 0, 0], fontSize: 18
}
]