mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-06-06 18:09:00 +00:00
feat(server): implement tracking tags for GL entries and reporting
- Add tracking tags infrastructure with 5 database tables - Create TrackingTags module with CRUD API endpoints - Associate tags with invoice/bill line items and manual journal entries - Propagate tags to GL entries (accounts_transactions) via ledger storage - Add tracking tag filtering to all 12 GL-dependent financial reports: - General Ledger, Balance Sheet, Profit & Loss - Trial Balance, Journal Sheet, Cash Flow Statement - Customer/Vendor Balance Summary - Transactions by Customer/Vendor/Reference - Sales Tax Liability Summary - Add filterByTrackingTags query modifier to AccountTransaction model - Add sdk-ts types and fetch functions for tracking tags - Add React hooks (useTrackingTags, useCreateTrackingTag, etc.) - TypeScript typecheck passes across all packages
This commit is contained in:
@@ -2,6 +2,7 @@ import { ToNumber } from '@/common/decorators/Validators';
|
||||
import { DiscountType } from '@/common/types/Discount';
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import {
|
||||
IsArray,
|
||||
IsEnum,
|
||||
IsIn,
|
||||
IsInt,
|
||||
@@ -9,7 +10,10 @@ import {
|
||||
IsNumber,
|
||||
IsOptional,
|
||||
IsString,
|
||||
ValidateNested,
|
||||
} from 'class-validator';
|
||||
import { Type } from 'class-transformer';
|
||||
import { TrackingTagAssignmentDto } from '@/modules/TrackingTags/dtos/AssignTrackingTags.dto';
|
||||
|
||||
export class ItemEntryDto {
|
||||
@IsInt()
|
||||
@@ -153,4 +157,15 @@ export class ItemEntryDto {
|
||||
example: 1021,
|
||||
})
|
||||
costAccountId?: number;
|
||||
|
||||
@IsOptional()
|
||||
@IsArray()
|
||||
@ValidateNested({ each: true })
|
||||
@Type(() => TrackingTagAssignmentDto)
|
||||
@ApiProperty({
|
||||
description: 'The tracking tags of the item entry',
|
||||
type: [TrackingTagAssignmentDto],
|
||||
required: false,
|
||||
})
|
||||
trackingTags?: TrackingTagAssignmentDto[];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user