mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 05:40:31 +00:00
refactor: inventory to nestjs
This commit is contained in:
@@ -4,8 +4,9 @@ import moment, { unitOfTime } from 'moment';
|
||||
import { BaseModel } from '@/models/Model';
|
||||
import { getTransactionTypeLabel } from '@/modules/BankingTransactions/utils';
|
||||
import { TInventoryTransactionDirection } from '../types/InventoryCost.types';
|
||||
import { TenantBaseModel } from '@/modules/System/models/TenantBaseModel';
|
||||
|
||||
export class InventoryTransaction extends BaseModel {
|
||||
export class InventoryTransaction extends TenantBaseModel {
|
||||
date: Date | string;
|
||||
direction: TInventoryTransactionDirection;
|
||||
itemId: number;
|
||||
@@ -39,7 +40,7 @@ export class InventoryTransaction extends BaseModel {
|
||||
* Retrieve formatted reference type.
|
||||
* @return {string}
|
||||
*/
|
||||
get transcationTypeFormatted() {
|
||||
get transcationTypeFormatted(): string {
|
||||
return getTransactionTypeLabel(this.transactionType);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user