feat: integrate Stripe payment to invoices

This commit is contained in:
Ahmed Bouhuolia
2024-09-18 19:24:01 +02:00
parent df706d2573
commit 4665f529e6
24 changed files with 540 additions and 80 deletions

View File

@@ -5,6 +5,24 @@ import { IDynamicListFilter } from '@/interfaces/DynamicFilter';
import { IItemEntry, IItemEntryDTO } from './ItemEntry';
import { AttachmentLinkDTO } from './Attachments';
export interface PaymentIntegrationTransactionLink {
id: number;
enable: true;
paymentIntegrationId: number;
referenceType: string;
referenceId: number;
}
export interface PaymentIntegrationTransactionLinkEventPayload {
tenantId: number;
enable: true;
paymentIntegrationId: number;
referenceType: string;
referenceId: number;
saleInvoiceId: number;
trx?: Knex.Transaction
}
export interface ISaleInvoice {
id: number;
amount: number;
@@ -50,6 +68,8 @@ export interface ISaleInvoice {
invoiceMessage: string;
pdfTemplateId?: number;
paymentMethods?: Array<PaymentIntegrationTransactionLink>;
}
export interface ISaleInvoiceDTO {
@@ -223,7 +243,6 @@ export interface ISaleInvoiceMailSent {
messageOptions: SendInvoiceMailDTO;
}
// Invoice Pdf Document
export interface InvoicePdfLine {
item: string;
@@ -241,9 +260,9 @@ export interface InvoicePdfTax {
export interface InvoicePdfTemplateAttributes {
primaryColor: string;
secondaryColor: string;
companyName: string;
showCompanyLogo: boolean;
companyLogo: string;
@@ -301,4 +320,4 @@ export interface InvoicePdfTemplateAttributes {
billedToAddress: string[];
billedFromAddres: string[];
}
}