mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
feat(nestjs): migrate to NestJS
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { AutoIncrementOrdersService } from '@/modules/AutoIncrementOrders/AutoIncrementOrders.service';
|
||||
|
||||
@Injectable()
|
||||
export class PaymentReceivedIncrement {
|
||||
/**
|
||||
* @param {AutoIncrementOrdersService} autoIncrementOrdersService - Auto increment orders service.
|
||||
*/
|
||||
constructor(
|
||||
private readonly autoIncrementOrdersService: AutoIncrementOrdersService,
|
||||
) {}
|
||||
|
||||
/**
|
||||
* Retrieve the next unique payment receive number.
|
||||
* @return {Promise<string>}
|
||||
*/
|
||||
public getNextPaymentReceiveNumber(): Promise<string> {
|
||||
return this.autoIncrementOrdersService.getNextTransactionNumber(
|
||||
'payment_receives',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Increment the payment receive next number.
|
||||
*/
|
||||
public incrementNextPaymentReceiveNumber() {
|
||||
return this.autoIncrementOrdersService.incrementSettingsNextNumber(
|
||||
'payment_receives',
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user