-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(reports): extra data toggles for Open Debtors
This commit implements two extra toggles for the Open Debtors report: 1. Show Unverified Transactions - includes the Posting Journal in query. 2. Show Columns for Last Dates of Invoicing and Payment - includes extra columns for the last payment date and last invoice date. This is part of the refactor of the Open Debtors report. The date limit still remains to be implemented.
- Loading branch information
Showing
8 changed files
with
162 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
client/src/modules/reports/generate/open_debtors/open_debtors.service.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
angular.module('bhima.services') | ||
.service('OpenDebtorsReportService', OpenDebtorsReportService); | ||
|
||
/** | ||
* @class OpenDebtorsReportService | ||
* | ||
* @description | ||
* An object that contains keys/properties relevant to rendering the Open | ||
* Debtors Report. | ||
*/ | ||
function OpenDebtorsReportService() { | ||
var service = this; | ||
|
||
var ASC = 1; | ||
var DESC = 0; | ||
|
||
service.ASC = ASC; | ||
service.DESC = DESC; | ||
|
||
service.orders = [{ | ||
label : 'REPORT.ORDER.LAST_PAYMENT', | ||
value : 'payment-date-asc', | ||
direction : ASC, | ||
}, { | ||
label : 'REPORT.ORDER.LAST_PAYMENT', | ||
value : 'payment-date-desc', | ||
direction : DESC, | ||
}, { | ||
label : 'REPORT.ORDER.LAST_INVOICE', | ||
value : 'invoice-date-asc', | ||
direction : ASC, | ||
}, { | ||
label : 'REPORT.ORDER.LAST_INVOICE', | ||
value : 'invoice-date-desc', | ||
direction : DESC, | ||
}, { | ||
label : 'REPORT.ORDER.PATIENT_NAME', | ||
value : 'patient-name-asc', | ||
direction : ASC, | ||
}, { | ||
label : 'REPORT.ORDER.PATIENT_NAME', | ||
value : 'patient-name-desc', | ||
direction : DESC, | ||
}, { | ||
label : 'REPORT.ORDER.TOTAL_DEBT', | ||
value : 'debt-asc', | ||
direction : ASC, | ||
}, { | ||
label : 'REPORT.ORDER.TOTAL_DEBT', | ||
value : 'debt-desc', | ||
direction : DESC, | ||
}]; | ||
|
||
return service; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters