mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 22:30:31 +00:00
feat: wip preview invoice payment mail
This commit is contained in:
@@ -33,7 +33,7 @@ export class SaleInvoicePdf {
|
||||
* Retrieve sale invoice pdf content.
|
||||
* @param {number} tenantId - Tenant Id.
|
||||
* @param {ISaleInvoice} saleInvoice -
|
||||
* @returns {Promise<Buffer>}
|
||||
* @returns {Promise<[Buffer, string]>}
|
||||
*/
|
||||
public async saleInvoicePdf(
|
||||
tenantId: number,
|
||||
|
||||
@@ -48,11 +48,14 @@ export class SendSaleInvoiceMailCommon {
|
||||
tenantId,
|
||||
saleInvoice.customerId
|
||||
);
|
||||
const formatArgs = await this.getInvoiceFormatterArgs(tenantId, invoiceId);
|
||||
|
||||
return {
|
||||
...contactMailDefaultOptions,
|
||||
attachInvoice: true,
|
||||
subject: defaultSubject,
|
||||
message: defaultMessage,
|
||||
attachInvoice: true,
|
||||
formatArgs,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -103,7 +106,11 @@ export class SendSaleInvoiceMailCommon {
|
||||
tenantId,
|
||||
invoiceId
|
||||
);
|
||||
const commonArgs =
|
||||
await this.contactMailNotification.getCommonFormatArgs(tenantId);
|
||||
|
||||
return {
|
||||
...commonArgs,
|
||||
CustomerName: invoice.customer.displayName,
|
||||
InvoiceNumber: invoice.invoiceNo,
|
||||
InvoiceDueAmount: invoice.dueAmountFormatted,
|
||||
|
||||
@@ -15,9 +15,8 @@ import {
|
||||
parseMailOptions,
|
||||
validateRequiredMailOptions,
|
||||
} from '@/services/MailNotification/utils';
|
||||
import events from '@/subscribers/events';
|
||||
import { EventPublisher } from '@/lib/EventPublisher/EventPublisher';
|
||||
import { ParsedNumberSearch } from 'libphonenumber-js';
|
||||
import events from '@/subscribers/events';
|
||||
|
||||
@Service()
|
||||
export class SendSaleInvoiceMail {
|
||||
|
||||
Reference in New Issue
Block a user