mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 04:40:32 +00:00
32 lines
843 B
TypeScript
32 lines
843 B
TypeScript
import { Service, Inject } from 'typedi';
|
|
import AutoIncrementOrdersService from '@/services/Sales/AutoIncrementOrdersService';
|
|
|
|
@Service()
|
|
export class CashflowTransactionAutoIncrement {
|
|
@Inject()
|
|
private autoIncrementOrdersService: AutoIncrementOrdersService;
|
|
|
|
/**
|
|
* Retrieve the next unique invoice number.
|
|
* @param {number} tenantId - Tenant id.
|
|
* @return {string}
|
|
*/
|
|
public getNextTransactionNumber = (tenantId: number): string => {
|
|
return this.autoIncrementOrdersService.getNextTransactionNumber(
|
|
tenantId,
|
|
'cashflow'
|
|
);
|
|
};
|
|
|
|
/**
|
|
* Increment the invoice next number.
|
|
* @param {number} tenantId -
|
|
*/
|
|
public incrementNextTransactionNumber = (tenantId: number) => {
|
|
return this.autoIncrementOrdersService.incrementSettingsNextNumber(
|
|
tenantId,
|
|
'cashflow'
|
|
);
|
|
};
|
|
}
|