mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 04:40:32 +00:00
fix: rename interfaces to PaymentReceived
This commit is contained in:
@@ -2,7 +2,7 @@ import { Service, Inject } from 'typedi';
|
||||
import events from '@/subscribers/events';
|
||||
import { EventSubscriber } from '@/lib/EventPublisher/EventPublisher';
|
||||
import { PaymentReceivedIncrement } from '@/services/Sales/PaymentReceived/PaymentReceivedIncrement';
|
||||
import { IPaymentReceiveCreatedPayload } from '@/interfaces';
|
||||
import { IPaymentReceivedCreatedPayload } from '@/interfaces';
|
||||
|
||||
@Service()
|
||||
export default class PaymentReceiveAutoSerialSubscriber extends EventSubscriber {
|
||||
@@ -22,13 +22,13 @@ export default class PaymentReceiveAutoSerialSubscriber extends EventSubscriber
|
||||
|
||||
/**
|
||||
* Handles increment next number of payment receive once be created.
|
||||
* @param {IPaymentReceiveCreatedPayload} payload -
|
||||
* @param {IPaymentReceivedCreatedPayload} payload -
|
||||
*/
|
||||
private handlePaymentNextNumberIncrement = async ({
|
||||
tenantId,
|
||||
paymentReceiveId,
|
||||
trx,
|
||||
}: IPaymentReceiveCreatedPayload) => {
|
||||
}: IPaymentReceivedCreatedPayload) => {
|
||||
await this.paymentIncrement.incrementNextPaymentReceiveNumber(tenantId);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -2,9 +2,9 @@ import { Inject, Service } from 'typedi';
|
||||
import events from '@/subscribers/events';
|
||||
import { PaymentReceivedInvoiceSync } from '@/services/Sales/PaymentReceived/PaymentReceivedInvoiceSync';
|
||||
import {
|
||||
IPaymentReceiveCreatedPayload,
|
||||
IPaymentReceiveDeletedPayload,
|
||||
IPaymentReceiveEditedPayload,
|
||||
IPaymentReceivedCreatedPayload,
|
||||
IPaymentReceivedDeletedPayload,
|
||||
IPaymentReceivedEditedPayload,
|
||||
} from '@/interfaces';
|
||||
|
||||
@Service()
|
||||
@@ -39,7 +39,7 @@ export default class PaymentReceiveSyncInvoicesSubscriber {
|
||||
tenantId,
|
||||
paymentReceive,
|
||||
trx,
|
||||
}: IPaymentReceiveCreatedPayload) => {
|
||||
}: IPaymentReceivedCreatedPayload) => {
|
||||
await this.paymentSyncInvoice.saveChangeInvoicePaymentAmount(
|
||||
tenantId,
|
||||
paymentReceive.entries,
|
||||
@@ -57,7 +57,7 @@ export default class PaymentReceiveSyncInvoicesSubscriber {
|
||||
paymentReceive,
|
||||
oldPaymentReceive,
|
||||
trx,
|
||||
}: IPaymentReceiveEditedPayload) => {
|
||||
}: IPaymentReceivedEditedPayload) => {
|
||||
await this.paymentSyncInvoice.saveChangeInvoicePaymentAmount(
|
||||
tenantId,
|
||||
paymentReceive.entries,
|
||||
@@ -74,7 +74,7 @@ export default class PaymentReceiveSyncInvoicesSubscriber {
|
||||
paymentReceiveId,
|
||||
oldPaymentReceive,
|
||||
trx,
|
||||
}: IPaymentReceiveDeletedPayload) => {
|
||||
}: IPaymentReceivedDeletedPayload) => {
|
||||
await this.paymentSyncInvoice.saveChangeInvoicePaymentAmount(
|
||||
tenantId,
|
||||
oldPaymentReceive.entries.map((entry) => ({
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Service, Inject } from 'typedi';
|
||||
import events from '@/subscribers/events';
|
||||
import { PaymentReceiveNotifyBySms } from '@/services/Sales/PaymentReceived/PaymentReceivedSmsNotify';
|
||||
import { IPaymentReceiveCreatedPayload } from '@/interfaces';
|
||||
import { IPaymentReceivedCreatedPayload } from '@/interfaces';
|
||||
import { runAfterTransaction } from '@/services/UnitOfWork/TransactionsHooks';
|
||||
|
||||
@Service()
|
||||
@@ -26,7 +26,7 @@ export default class SendSmsNotificationPaymentReceive {
|
||||
tenantId,
|
||||
paymentReceiveId,
|
||||
trx,
|
||||
}: IPaymentReceiveCreatedPayload) => {
|
||||
}: IPaymentReceivedCreatedPayload) => {
|
||||
// Notify via Sms after transactions complete running.
|
||||
runAfterTransaction(trx, async () => {
|
||||
try {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Inject, Service } from 'typedi';
|
||||
import {
|
||||
IPaymentReceiveCreatedPayload,
|
||||
IPaymentReceiveDeletedPayload,
|
||||
IPaymentReceiveEditedPayload,
|
||||
IPaymentReceivedCreatedPayload,
|
||||
IPaymentReceivedDeletedPayload,
|
||||
IPaymentReceivedEditedPayload,
|
||||
} from '@/interfaces';
|
||||
import events from '@/subscribers/events';
|
||||
import { PaymentReceivedGLEntries } from '@/services/Sales/PaymentReceived/PaymentReceivedGLEntries';
|
||||
@@ -37,7 +37,7 @@ export default class PaymentReceivesWriteGLEntriesSubscriber {
|
||||
tenantId,
|
||||
paymentReceiveId,
|
||||
trx,
|
||||
}: IPaymentReceiveCreatedPayload) => {
|
||||
}: IPaymentReceivedCreatedPayload) => {
|
||||
await this.paymentReceiveGLEntries.writePaymentGLEntries(
|
||||
tenantId,
|
||||
paymentReceiveId,
|
||||
@@ -52,7 +52,7 @@ export default class PaymentReceivesWriteGLEntriesSubscriber {
|
||||
tenantId,
|
||||
paymentReceive,
|
||||
trx,
|
||||
}: IPaymentReceiveEditedPayload) => {
|
||||
}: IPaymentReceivedEditedPayload) => {
|
||||
await this.paymentReceiveGLEntries.rewritePaymentGLEntries(
|
||||
tenantId,
|
||||
paymentReceive.id,
|
||||
@@ -67,7 +67,7 @@ export default class PaymentReceivesWriteGLEntriesSubscriber {
|
||||
tenantId,
|
||||
paymentReceiveId,
|
||||
trx,
|
||||
}: IPaymentReceiveDeletedPayload) => {
|
||||
}: IPaymentReceivedDeletedPayload) => {
|
||||
await this.paymentReceiveGLEntries.revertPaymentGLEntries(
|
||||
tenantId,
|
||||
paymentReceiveId,
|
||||
|
||||
Reference in New Issue
Block a user