mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 13:50:31 +00:00
add server to monorepo.
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
import { Inject, Service } from 'typedi';
|
||||
import AutoIncrementOrdersService from '@/services/Sales/AutoIncrementOrdersService';
|
||||
|
||||
@Service()
|
||||
export class AutoIncrementManualJournal {
|
||||
@Inject()
|
||||
private autoIncrementOrdersService: AutoIncrementOrdersService;
|
||||
|
||||
public autoIncrementEnabled = (tenantId: number) => {
|
||||
return this.autoIncrementOrdersService.autoIncrementEnabled(
|
||||
tenantId,
|
||||
'manual_journals'
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* Retrieve the next journal number.
|
||||
*/
|
||||
public getNextJournalNumber = (tenantId: number): string => {
|
||||
return this.autoIncrementOrdersService.getNextTransactionNumber(
|
||||
tenantId,
|
||||
'manual_journals'
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* Increment the manual journal number.
|
||||
* @param {number} tenantId
|
||||
*/
|
||||
public incrementNextJournalNumber = (tenantId: number) => {
|
||||
return this.autoIncrementOrdersService.incrementSettingsNextNumber(
|
||||
tenantId,
|
||||
'manual_journals'
|
||||
);
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user