diff --git a/src/app/accounting/closing-entries/create-closure/create-closure.component.ts b/src/app/accounting/closing-entries/create-closure/create-closure.component.ts
index 70496bd8d..3460513fb 100644
--- a/src/app/accounting/closing-entries/create-closure/create-closure.component.ts
+++ b/src/app/accounting/closing-entries/create-closure/create-closure.component.ts
@@ -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 });
diff --git a/src/app/accounting/create-journal-entry/create-journal-entry.component.ts b/src/app/accounting/create-journal-entry/create-journal-entry.component.ts
index be0a92792..34b0f2ce4 100644
--- a/src/app/accounting/create-journal-entry/create-journal-entry.component.ts
+++ b/src/app/accounting/create-journal-entry/create-journal-entry.component.ts
@@ -41,22 +41,22 @@ export class CreateJournalEntryComponent 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,
- currencies: any,
- paymentTypes: any,
- glAccounts: any
- }) => {
- this.officeData = data.offices;
- this.currencyData = data.currencies.selectedCurrencyOptions;
- this.paymentTypeData = data.paymentTypes;
- this.glAccountData = data.glAccounts;
- });
+ offices: any,
+ currencies: any,
+ paymentTypes: any,
+ glAccounts: any
+ }) => {
+ this.officeData = data.offices;
+ this.currencyData = data.currencies.selectedCurrencyOptions;
+ this.paymentTypeData = data.paymentTypes;
+ this.glAccountData = data.glAccounts;
+ });
}
/**
@@ -142,7 +142,7 @@ export class CreateJournalEntryComponent implements OnInit {
journalEntry.locale = this.settingsService.language.code;
journalEntry.dateFormat = this.settingsService.dateFormat;
if (journalEntry.transactionDate) {
- journalEntry.transactionDate = this.dateUtils.getDate(journalEntry.transactionDate);
+ journalEntry.transactionDate = this.dateUtils.formatDate(journalEntry.transactionDate, this.settingsService.dateFormat);
}
this.accountingService.createJournalEntry(journalEntry).subscribe(response => {
this.router.navigate(['../transactions/view', response.transactionId], { relativeTo: this.route });
diff --git a/src/app/accounting/frequent-postings/frequent-postings.component.ts b/src/app/accounting/frequent-postings/frequent-postings.component.ts
index 087f1870c..dd0f8c696 100644
--- a/src/app/accounting/frequent-postings/frequent-postings.component.ts
+++ b/src/app/accounting/frequent-postings/frequent-postings.component.ts
@@ -173,7 +173,7 @@ export class FrequentPostingsComponent implements OnInit {
journalEntry.locale = this.settingsService.language.code;
journalEntry.dateFormat = this.settingsService.dateFormat;
if (journalEntry.transactionDate instanceof Date) {
- journalEntry.transactionDate = this.dateUtils.getDate(journalEntry.transactionDate);
+ journalEntry.transactionDate = this.dateUtils.formatDate(journalEntry.transactionDate, this.settingsService.dateFormat);
}
this.accountingService.createJournalEntry(journalEntry).subscribe(response => {
this.router.navigate(['../transactions/view', response.transactionId], { relativeTo: this.route });
diff --git a/src/app/accounting/migrate-opening-balances/migrate-opening-balances.component.ts b/src/app/accounting/migrate-opening-balances/migrate-opening-balances.component.ts
index 043aed38a..b63b660a6 100644
--- a/src/app/accounting/migrate-opening-balances/migrate-opening-balances.component.ts
+++ b/src/app/accounting/migrate-opening-balances/migrate-opening-balances.component.ts
@@ -46,18 +46,18 @@ export class MigrateOpeningBalancesComponent 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,
- currencies: any
- }) => {
- this.officeData = data.offices;
- this.currencyData = data.currencies.selectedCurrencyOptions;
- });
+ offices: any,
+ currencies: any
+ }) => {
+ this.officeData = data.offices;
+ this.currencyData = data.currencies.selectedCurrencyOptions;
+ });
}
/**
@@ -111,13 +111,13 @@ export class MigrateOpeningBalancesComponent implements OnInit {
openingBalancesData.glAccounts = openingBalancesData.assetAccountOpeningBalances
.concat(openingBalancesData.liabityAccountOpeningBalances,
- openingBalancesData.equityAccountOpeningBalances,
- openingBalancesData.incomeAccountOpeningBalances,
- openingBalancesData.expenseAccountOpeningBalances);
+ openingBalancesData.equityAccountOpeningBalances,
+ openingBalancesData.incomeAccountOpeningBalances,
+ openingBalancesData.expenseAccountOpeningBalances);
openingBalancesData.glAccounts.forEach((glAccount: any) => {
- entry.push(this.createGLAccountEntryForm(glAccount));
- });
+ entry.push(this.createGLAccountEntryForm(glAccount));
+ });
this.openingBalancesData = openingBalancesData;
@@ -142,7 +142,7 @@ export class MigrateOpeningBalancesComponent implements OnInit {
openingBalances.locale = this.settingsService.language.code;
openingBalances.dateFormat = this.settingsService.dateFormat;
if (openingBalances.transactionDate instanceof Date) {
- openingBalances.transactionDate = this.dateUtils.getDate(openingBalances.transactionDate);
+ openingBalances.transactionDate = this.dateUtils.formatDate(openingBalances.transactionDate, this.settingsService.dateFormat);
}
openingBalances.debits = [];
openingBalances.credits = [];
diff --git a/src/app/accounting/periodic-accruals/periodic-accruals.component.ts b/src/app/accounting/periodic-accruals/periodic-accruals.component.ts
index 4c341138c..c3eb4ead9 100644
--- a/src/app/accounting/periodic-accruals/periodic-accruals.component.ts
+++ b/src/app/accounting/periodic-accruals/periodic-accruals.component.ts
@@ -32,11 +32,11 @@ export class PeriodicAccrualsComponent 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) { }
/**
* Creates periodic accruals form.
@@ -65,7 +65,7 @@ export class PeriodicAccrualsComponent implements OnInit {
periodicAccruals.locale = this.settingsService.language.code;
periodicAccruals.dateFormat = this.settingsService.dateFormat;
if (periodicAccruals.tillDate instanceof Date) {
- periodicAccruals.tillDate = this.dateUtils.getDate(periodicAccruals.tillDate);
+ periodicAccruals.tillDate = this.dateUtils.formatDate(periodicAccruals.tillDate, this.settingsService.dateFormat);
}
this.accountingService.executePeriodicAccruals(periodicAccruals).subscribe(() => {
this.router.navigate(['../'], { relativeTo: this.route });
diff --git a/src/app/accounting/provisioning-entries/create-provisioning-entry/create-provisioning-entry.component.ts b/src/app/accounting/provisioning-entries/create-provisioning-entry/create-provisioning-entry.component.ts
index a8f1ddc84..c0954585d 100644
--- a/src/app/accounting/provisioning-entries/create-provisioning-entry/create-provisioning-entry.component.ts
+++ b/src/app/accounting/provisioning-entries/create-provisioning-entry/create-provisioning-entry.component.ts
@@ -32,11 +32,11 @@ export class CreateProvisioningEntryComponent 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) { }
/**
* Creates the provisioning entry form.
@@ -66,7 +66,7 @@ export class CreateProvisioningEntryComponent implements OnInit {
provisioningEntry.locale = this.settingsService.language.code;
provisioningEntry.dateFormat = this.settingsService.dateFormat;
if (provisioningEntry.date instanceof Date) {
- provisioningEntry.date = this.dateUtils.getDate(provisioningEntry.date);
+ provisioningEntry.date = this.dateUtils.formatDate(provisioningEntry.date, this.settingsService.dateFormat);
}
this.accountingService.createProvisioningEntry(provisioningEntry)
.subscribe((response: any) => {
diff --git a/src/app/accounting/search-journal-entry/search-journal-entry.component.html b/src/app/accounting/search-journal-entry/search-journal-entry.component.html
index f5be252a2..0f2af174a 100644
--- a/src/app/accounting/search-journal-entry/search-journal-entry.component.html
+++ b/src/app/accounting/search-journal-entry/search-journal-entry.component.html
@@ -38,6 +38,20 @@
+