chore: implenet the external invoice 2
This commit is contained in:
@@ -6,7 +6,7 @@ import { catchError, firstValueFrom } from "rxjs";
|
||||
import { SmsMessage } from "../../../common/enums/message.enum";
|
||||
import { ISmsConfigs } from "../../../configs/sms.config";
|
||||
import { SMS_CONFIG } from "../constants";
|
||||
import { numberFormat } from "./international.utils";
|
||||
import { dateFormat, numberFormat } from "./international.utils";
|
||||
import { truncateIfLong } from "./string.utils";
|
||||
import { ISmsGetLineResponse, ISmsVerifyBody, ISmsVerifyResponse } from "../interfaces/ISms";
|
||||
|
||||
@@ -341,7 +341,7 @@ export class SmsService {
|
||||
const smsData: ISmsVerifyBody = {
|
||||
Parameters: [
|
||||
{ name: "invoiceId", value: invoiceId },
|
||||
{ name: "price", value: Intl.NumberFormat("fa-IR").format(price) },
|
||||
{ name: "price", value: numberFormat(price) },
|
||||
{ name: "dueDate", value: dueDate },
|
||||
],
|
||||
Mobile: mobile,
|
||||
@@ -368,12 +368,12 @@ export class SmsService {
|
||||
}
|
||||
}
|
||||
//************************************************* */
|
||||
async sendInvoicePaidSms(mobile: string, invoiceId: string, amount: number, paidDate: string) {
|
||||
async sendInvoicePaidSms(mobile: string, invoiceId: string, price: number, paidDate: string) {
|
||||
const smsData: ISmsVerifyBody = {
|
||||
Parameters: [
|
||||
{ name: "invoiceId", value: invoiceId },
|
||||
{ name: "amount", value: numberFormat(amount) },
|
||||
{ name: "paidDate", value: paidDate },
|
||||
{ name: "price", value: numberFormat(price) },
|
||||
{ name: "date", value: dateFormat(paidDate) },
|
||||
],
|
||||
Mobile: mobile,
|
||||
TemplateId: this.smsConfigs.SMS_PATTERN_INVOICE_PAID,
|
||||
@@ -401,11 +401,11 @@ export class SmsService {
|
||||
|
||||
//************************************************* */
|
||||
|
||||
async sendInvoicePaymentReminderSms(mobile: string, invoiceId: string, amount: number, dueDate: string) {
|
||||
async sendInvoicePaymentReminderSms(mobile: string, invoiceId: string, price: number, dueDate: string) {
|
||||
const smsData: ISmsVerifyBody = {
|
||||
Parameters: [
|
||||
{ name: "invoiceId", value: invoiceId },
|
||||
{ name: "amount", value: numberFormat(amount) },
|
||||
{ name: "price", value: numberFormat(price) },
|
||||
{ name: "dueDate", value: dueDate },
|
||||
],
|
||||
Mobile: mobile,
|
||||
|
||||
Reference in New Issue
Block a user