Merge pull request #1074 from bigcapitalhq/fix/financial-reports-base-currency
fix(server): use correct base currency in financial reports
This commit is contained in:
+1
@@ -38,6 +38,7 @@ export class APAgingSummarySheet extends AgingSummaryReport {
|
||||
|
||||
this.query = query;
|
||||
this.repository = repository;
|
||||
this.baseCurrency = meta.baseCurrency;
|
||||
this.numberFormat = this.query.numberFormat;
|
||||
this.dateFormat = meta.dateFormat || DEFAULT_REPORT_META.dateFormat;
|
||||
|
||||
|
||||
+1
@@ -44,6 +44,7 @@ export class ARAgingSummarySheet extends AgingSummaryReport {
|
||||
|
||||
this.query = query;
|
||||
this.repository = repository;
|
||||
this.baseCurrency = meta.baseCurrency;
|
||||
this.numberFormat = this.query.numberFormat;
|
||||
this.dateFormat = meta.dateFormat || DEFAULT_REPORT_META.dateFormat;
|
||||
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ import { IARAgingSummaryCustomer } from '../ARAgingSummary/ARAgingSummary.types'
|
||||
export abstract class AgingSummaryReport extends AgingReport {
|
||||
readonly contacts: ModelObject<Customer | Vendor>[];
|
||||
readonly agingPeriods: IAgingPeriod[] = [];
|
||||
readonly baseCurrency: string;
|
||||
public baseCurrency: string;
|
||||
readonly query: IAgingSummaryQuery;
|
||||
readonly overdueInvoicesByContactId: Record<
|
||||
number,
|
||||
|
||||
+1
@@ -33,6 +33,7 @@ export class InventoryValuationSheet extends FinancialSheet {
|
||||
|
||||
this.query = query;
|
||||
this.repository = repository;
|
||||
this.baseCurrency = meta.baseCurrency;
|
||||
this.numberFormat = this.query.numberFormat;
|
||||
this.dateFormat = meta.dateFormat || DEFAULT_REPORT_META.dateFormat;
|
||||
}
|
||||
|
||||
+1
@@ -31,6 +31,7 @@ export class SalesTaxLiabilitySummary extends FinancialSheet {
|
||||
|
||||
this.query = query;
|
||||
this.repository = repository;
|
||||
this.baseCurrency = meta.baseCurrency;
|
||||
this.dateFormat = meta.dateFormat || DEFAULT_REPORT_META.dateFormat;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@ export class VendorBalanceSummaryService {
|
||||
const reportInstance = new VendorBalanceSummaryReport(
|
||||
this.vendorBalanceSummaryRepository,
|
||||
filter,
|
||||
{ baseCurrency: this.vendorBalanceSummaryRepository.baseCurrency, dateFormat: meta.dateFormat },
|
||||
{ baseCurrency: meta.baseCurrency, dateFormat: meta.dateFormat },
|
||||
);
|
||||
|
||||
// Triggers `onVendorBalanceSummaryViewed` event.
|
||||
|
||||
Reference in New Issue
Block a user