diff --git a/src/app/loans/loans-view/transactions/export-transactions/export-transactions.component.ts b/src/app/loans/loans-view/transactions/export-transactions/export-transactions.component.ts index 4f3fd31ca..51973a79c 100644 --- a/src/app/loans/loans-view/transactions/export-transactions/export-transactions.component.ts +++ b/src/app/loans/loans-view/transactions/export-transactions/export-transactions.component.ts @@ -63,7 +63,7 @@ export class ExportTransactionsComponent implements OnInit { createTransactionsReportForm() { this.transactionsReportForm = this.formBuilder.group({ 'fromDate': ['', Validators.required], - 'toDate': ['', Validators.required], + 'toDate': [this.settingsService.businessDate, Validators.required], }); } @@ -71,13 +71,14 @@ export class ExportTransactionsComponent implements OnInit { * Generates client loans transactions report. */ generate() { + const dateFormat = this.settingsService.dateFormat; const data = { 'output-type': 'PDF', - R_startDate: this.dateUtils.formatDate(this.transactionsReportForm.value.fromDate, 'yyyy-MM-dd'), - R_endDate: this.dateUtils.formatDate(this.transactionsReportForm.value.toDate, 'yyyy-MM-dd'), + R_startDate: this.dateUtils.formatDate(this.transactionsReportForm.value.fromDate, dateFormat), + R_endDate: this.dateUtils.formatDate(this.transactionsReportForm.value.toDate, dateFormat), R_selectLoan: this.loansAccountId }; - this.reportsService.getPentahoRunReportData('Client Loan Account Schedule', data, 'default', 'en', 'dd MMMM yyyy') + this.reportsService.getPentahoRunReportData('Client Loan Account Schedule', data, 'default', 'en', dateFormat) .subscribe( (res: any) => { const contentType = res.headers.get('Content-Type'); const file = new Blob([res.body], {type: contentType}); diff --git a/src/app/organization/bulk-import/view-bulk-import/view-bulk-import.component.ts b/src/app/organization/bulk-import/view-bulk-import/view-bulk-import.component.ts index 78d193094..26fab52f4 100644 --- a/src/app/organization/bulk-import/view-bulk-import/view-bulk-import.component.ts +++ b/src/app/organization/bulk-import/view-bulk-import/view-bulk-import.component.ts @@ -129,7 +129,7 @@ export class ViewBulkImportComponent implements OnInit { legalFormType = 'CLIENTS_PERSON'; break; case 'Entity': - legalFormType = 'CLIENTS_ENTTTY'; + legalFormType = 'CLIENTS_ENTITY'; break; } this.organizationService.getImportTemplate(this.bulkImport.urlSuffix, officeId, staffId, legalFormType).subscribe( (res: any) => { @@ -158,7 +158,7 @@ export class ViewBulkImportComponent implements OnInit { /** Only for Client Bulk Imports */ if (this.bulkImport.name === 'Clients') { if (this.template.name.toLowerCase().includes('entity')) { - legalFormType = 'CLIENTS_ENTTTY'; + legalFormType = 'CLIENTS_ENTITY'; } else if (this.template.name.toLowerCase().includes('person')) { legalFormType = 'CLIENTS_PERSON'; }