Skip to content

Commit

Permalink
Merge pull request #560 from abdullahshafiq63/impac-905
Browse files Browse the repository at this point in the history
[IMPAC-905] Resolved bug with filtering past due invoices in invoices…
  • Loading branch information
agranado2k authored Jun 25, 2018
2 parents f8a83fb + 48038a0 commit e8a4fb7
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,11 @@ module.controller('WidgetAccountsInvoicesListCtrl', ($scope, $q, ImpacRoutes, Bo
$scope.trxList.changeOverdueFilter = (overdueFilter) ->
return if overdueFilter == $scope.trxList.overdue
$scope.trxList.overdue = overdueFilter
todays_date = moment().format('YYYY-MM-DD')
$scope.trxList.params.filter.balance = 'gt 0' if overdueFilter == 'overdue'
$scope.trxList.params.filter.due_date = "lte #{todays_date}" if overdueFilter == 'overdue'
delete $scope.trxList.params.filter.balance if overdueFilter == 'all'
delete $scope.trxList.params.filter.due_date if overdueFilter == 'all'
$scope.trxList.fetch()

$scope.trxList.changeQuery = (query) ->
Expand Down

0 comments on commit e8a4fb7

Please sign in to comment.