Search and Create Journal entry page is broken - Filtering by dates are broken #1496

This commit is contained in:
Adam Saghy
2022-08-05 12:31:31 +02:00
parent 1c8a772de6
commit c0dcf9bfb8
10 changed files with 113 additions and 62 deletions
@@ -35,11 +35,11 @@ export class CreateClosureComponent implements OnInit {
* @param {Router} router Router for navigation.
*/
constructor(private formBuilder: FormBuilder,
private accountingService: AccountingService,
private settingsService: SettingsService,
private dateUtils: Dates,
private route: ActivatedRoute,
private router: Router) {
private accountingService: AccountingService,
private settingsService: SettingsService,
private dateUtils: Dates,
private route: ActivatedRoute,
private router: Router) {
this.route.data.subscribe((data: { offices: any }) => {
this.officeData = data.offices;
});
@@ -74,7 +74,7 @@ export class CreateClosureComponent implements OnInit {
accountingClosure.locale = this.settingsService.language.code;
accountingClosure.dateFormat = this.settingsService.dateFormat;
if (accountingClosure.closingDate) {
accountingClosure.closingDate = this.dateUtils.getDate(accountingClosure.closingDate);
accountingClosure.closingDate = this.dateUtils.formatDate(accountingClosure.closingDate, this.settingsService.dateFormat);
}
this.accountingService.createAccountingClosure(accountingClosure).subscribe((response: any) => {
this.router.navigate(['../view', response.resourceId], { relativeTo: this.route });