mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 14:20:31 +00:00
refactor: events tracker to nestjs
This commit is contained in:
@@ -4,7 +4,6 @@ import * as R from 'ramda';
|
||||
import { omit } from 'lodash';
|
||||
import { events } from '@/common/events/events';
|
||||
import { InventoryAdjustment } from '../models/InventoryAdjustment';
|
||||
import { InventoryAdjustmentEntry } from '../models/InventoryAdjustmentEntry';
|
||||
import {
|
||||
IInventoryAdjustmentCreatingPayload,
|
||||
IInventoryAdjustmentEventCreatedPayload,
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
import { UnitOfWork } from '@/modules/Tenancy/TenancyDB/UnitOfWork.service';
|
||||
import { Knex } from 'knex';
|
||||
import { Inject } from '@nestjs/common';
|
||||
import { EventEmitter2 } from '@nestjs/event-emitter';
|
||||
import { UnitOfWork } from '@/modules/Tenancy/TenancyDB/UnitOfWork.service';
|
||||
import { InventoryAdjustment } from '../models/InventoryAdjustment';
|
||||
import { InventoryAdjustmentEntry } from '../models/InventoryAdjustmentEntry';
|
||||
import {
|
||||
IInventoryAdjustmentEventPublishedPayload,
|
||||
IInventoryAdjustmentPublishingPayload,
|
||||
} from '../types/InventoryAdjustments.types';
|
||||
import { events } from '@/common/events/events';
|
||||
import { Knex } from 'knex';
|
||||
import { ServiceError } from '@/modules/Items/ServiceError';
|
||||
|
||||
export class PublishInventoryAdjustmentService {
|
||||
@@ -22,8 +21,7 @@ export class PublishInventoryAdjustmentService {
|
||||
|
||||
/**
|
||||
* Publish the inventory adjustment transaction.
|
||||
* @param {number} tenantId
|
||||
* @param {number} inventoryAdjustmentId
|
||||
* @param {number} inventoryAdjustmentId - Inventory adjustment ID.
|
||||
*/
|
||||
public async publishInventoryAdjustment(
|
||||
inventoryAdjustmentId: number,
|
||||
|
||||
@@ -13,7 +13,12 @@ export class InventoryAdjustmentsGL {
|
||||
this.inventoryAdjustment = inventoryAdjustmentModel;
|
||||
}
|
||||
|
||||
setBaseCurrency(baseCurrency: string) {
|
||||
/**
|
||||
* Sets the base currency.
|
||||
* @param {string} baseCurrency - Base currency.
|
||||
* @returns {InventoryAdjustmentsGL}
|
||||
*/
|
||||
public setBaseCurrency(baseCurrency: string) {
|
||||
this.baseCurrency = baseCurrency;
|
||||
return this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user