UNPKG

@tomei/finance

Version:

NestJS package for finance module

97 lines 5.82 kB
import { LoginUserBase, ObjectBase } from '@tomei/general'; import Account from '../account/account'; import JournalEntry from '../journal-entry/journal-entry'; import FinanceCustomerBase from '../customer/customer'; import Document from '../document/document'; import { IAccountSystem } from '../interfaces'; import { PaymentStatus } from '../enum'; import Payment from '../payment/payment'; import PaymentMethod from '../payment-method/payment-method'; import { LoginUser } from '@tomei/sso'; import { Tax } from '../tax/tax'; import { CollectPaymentType } from '../enum/collect-payment-type'; import FinanceCustomerModel from '../models/customer.entity'; import { Tag } from '../tag/tag'; import { TagGroup } from '../tag-group/tag-group'; export default class FinanceCompany extends ObjectBase { private _CompanyId; private _CompSystemCode; private _CompSystemRefId; private _AccSystemCode; private _AccSystemRefId; private _PostedToAccSystemYN; private _PostedById; private _PostedDateTime; private readonly _ObjectType; private static readonly _htFinanceCompanyIds; private static readonly _htFinanceCompanies; private static readonly _financeCompanyRepository; private static readonly _PaymentRepository; private static readonly _PaymentItemRepository; private static readonly _PaymentPaidWithRepository; private static readonly _PaymentMethodRepository; private static readonly _PaymentMethodTypeRepository; private static readonly _DocumentRepository; private static readonly _DocumentItemRepository; private static readonly _FinanceCustomerRepository; private static readonly _LedgerTransactionRepository; private static readonly _AccountRepository; private static readonly _TaxRepository; private _AccountingSystem; private _DbTransaction; private _PaymentMethods; private _Taxes; get ObjectType(): string; get CompSystemCode(): string; private set CompSystemCode(value); get CompSystemRefId(): string; set CompSystemRefId(id: string); get AccSystemCode(): string; get AccSystemRefId(): string; set AccSystemRefId(id: string); get PostedToAccSystemYN(): string; set PostedToAccSystemYN(value: string); get PostedById(): string; set PostedById(id: string); get PostedDateTime(): any; set PostedDateTime(date: any); private set AccSystemCode(value); get CompanyId(): string; get ObjectId(): string; private set ObjectId(value); get ObjectName(): string; get TableName(): string; get AccountingSystem(): IAccountSystem; set AccountingSystem(system: IAccountSystem); constructor(compSystemCode: string, compSystemRefId: string, accSystemCode: string); static getFinanceCompanyId(compSystemCode: string, compSystemRefId: string, accSystemCode: string): Promise<string>; static getFinanceCompany(companyId: string): Promise<FinanceCompany>; static createFinanceCompany(dbTransaction: any, loginUser: LoginUserBase, companyId: string, compSystemCode: string, compSystemRefId: string, accSystemCode: string, accSystemRefId?: string, postedToAccSystemYN?: string): Promise<any>; static findAccount(loginUser: LoginUserBase, dbTransaction: any, accountNo: string): Promise<Account>; createCustomer<T extends FinanceCustomerBase>(dbTransaction: any, custSystemCode: string, custSystemRefId: string, customer: T, loginUser: LoginUser): Promise<T>; postJournal(dbTransaction: any, journalEntry: JournalEntry, loginUser: LoginUserBase): Promise<void>; createAccount(dbTransaction: any, account: Account, loginUser: LoginUserBase): Promise<Account>; issueInvoice<C extends FinanceCustomerBase>(dbTransaction: any, invoice: Document, loginUser?: LoginUser, customer?: C, dtAccountNo?: string, tags?: Tag[], discount?: { type: 'percentage' | 'fixed'; value: number; }): Promise<Document>; static findCustomer(custSystemRefId: string, dbTransaction?: any): Promise<FinanceCustomerModel>; issueDebitNote(dbTransaction: any, loginUser: LoginUserBase, invoice: Document, customer: FinanceCustomerBase, dtAccountNo?: string): Promise<Document>; issueCreditNote(dbTransaction: any, loginUser: LoginUserBase, creditNote: Document, customer: FinanceCustomerBase, ctAccountNo?: string): Promise<Document>; private getAccSystemCreditNoteItems; collectPayment(dbTransaction: any, loginUser: LoginUserBase, payment: Payment, collectPaymentType?: CollectPaymentType): Promise<Payment>; makePayment(dbTransaction: any, loginUser: LoginUserBase, payment: Payment, customer: FinanceCustomerBase, dtAccountNo?: string): Promise<Payment>; getPaymentMethods(transaction?: any): Promise<PaymentMethod[]>; getTaxCodes(dbTransaction: any): Promise<Tax[]>; LoadPaymentMethods(companyId: string, paymentMethods: any, transaction?: any): Promise<void>; LoadTaxCodes(companyId: string, companyTaxes: any, transaction?: any): Promise<void>; collectPaymentForMultipleCustomers(dbTransaction: any, loginUser: LoginUserBase, payment: Payment, creditTransaction: { AccountNo: string; Currency: string; Amount: number; }[], receiptNo?: string, collectPaymentType?: CollectPaymentType): Promise<Payment>; confirmPayment(dbTransaction: any, loginUser: LoginUserBase, customer: FinanceCustomerBase, payment: Payment, status: PaymentStatus.CONFIRMED | PaymentStatus.REJECTED | PaymentStatus.FAILED, remarks: string, ctAccountNo?: string, receiptNo?: string): Promise<void>; createTagGroup(tagGroupName: string, loginUser: LoginUser, dbTransaction: any): Promise<TagGroup>; createTag(tagName: string, tagGroupName: string, loginUser: LoginUser, dbTransaction: any): Promise<Tag>; } //# sourceMappingURL=finance-company.d.ts.map