@accounter/server
Version:
Accounter GraphQL server
38 lines (37 loc) • 1.48 kB
TypeScript
import type { Injector } from 'graphql-modules';
import type { AccountantStatus, Pcn874RecordType } from '../../../__generated__/types.js';
import { type Currency } from '../../../shared/enums.js';
import type { IGetChargesByIdsResult } from '../../charges/types.js';
import type { IGetDocumentsByFiltersResult } from '../../documents/types.js';
import type { IGetBusinessesByIdsResult } from '../../financial-entities/types.js';
export type VatReportRecordSources = {
charge: IGetChargesByIdsResult;
doc: IGetDocumentsByFiltersResult;
business: IGetBusinessesByIdsResult;
};
export type RawVatReportRecord = {
localAmountBeforeVAT?: number;
foreignAmountBeforeVAT?: number;
businessId: string | null;
chargeAccountantStatus: AccountantStatus;
chargeDate: Date;
chargeId: string;
currencyCode: Currency;
documentAmount: string;
documentId: string;
documentDate: Date | null;
documentSerial: string | null;
documentUrl: string | null;
eventLocalAmount?: number;
isExpense: boolean;
isProperty: boolean;
roundedVATToAdd?: number;
foreignVat: number | null;
localVat: number | null;
foreignVatAfterDeduction?: number;
localVatAfterDeduction?: number;
vatNumber?: string | null;
allocationNumber?: string | null;
pcn874RecordType?: Pcn874RecordType;
};
export declare function adjustTaxRecord(rawRecord: VatReportRecordSources, injector: Injector): Promise<RawVatReportRecord>;