mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-26 01:29:48 +00:00
fix(inventory): update baseCurrency retrieval in InventoryDetailsService
- Replace tenantMetadata.baseCurrency with meta.baseCurrency in InventoryDetailsService to ensure consistent currency usage across reports.
This commit is contained in:
@@ -39,16 +39,12 @@ export class InventoryDetailsService {
|
|||||||
// Retrieve the meta first to get date format.
|
// Retrieve the meta first to get date format.
|
||||||
const meta = await this.inventoryDetailsMeta.meta(query);
|
const meta = await this.inventoryDetailsMeta.meta(query);
|
||||||
|
|
||||||
// Inventory details report mapper.
|
|
||||||
// Get tenant metadata for baseCurrency
|
|
||||||
const tenantMetadata = await this.tenancyContext.getTenantMetadata();
|
|
||||||
|
|
||||||
// Inventory details report mapper.
|
// Inventory details report mapper.
|
||||||
const inventoryDetailsInstance = new InventoryDetails(
|
const inventoryDetailsInstance = new InventoryDetails(
|
||||||
filter,
|
filter,
|
||||||
this.inventoryItemDetailsRepository,
|
this.inventoryItemDetailsRepository,
|
||||||
this.i18n,
|
this.i18n,
|
||||||
{ baseCurrency: tenantMetadata.baseCurrency, dateFormat: meta.dateFormat },
|
{ baseCurrency: meta.baseCurrency, dateFormat: meta.dateFormat },
|
||||||
);
|
);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user