mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 21:00:31 +00:00
feat(ManualJournals): Auto-increment.
fix(BillPayment): Validate the opened payment bills. fix(redux): presist redux state. fix(useRequestQuery): hook.
This commit is contained in:
@@ -24,12 +24,20 @@ export class ManualJournalSubscriber {
|
||||
// Ingore writing manual journal journal entries in case was not published.
|
||||
if (manualJournal.publishedAt) {
|
||||
await this.manualJournalsService.writeJournalEntries(
|
||||
tenantId,
|
||||
tenantId,
|
||||
manualJournal
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles the manual journal next number increment once the journal be created.
|
||||
*/
|
||||
@On(events.manualJournals.onCreated)
|
||||
public async handleJournalNumberIncrement({ tenantId }) {
|
||||
await this.manualJournalsService.incrementNextJournalNumber(tenantId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle manual journal edited event.
|
||||
*/
|
||||
@@ -107,16 +115,4 @@ export class ManualJournalSubscriber {
|
||||
manualJournalsIds
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle increment next number of manual journal once be created.
|
||||
*/
|
||||
@On(events.manualJournals.onCreated)
|
||||
public async handleJournalNextNumberIncrement({ tenantId }) {
|
||||
const query = {
|
||||
group: 'manual_journals',
|
||||
key: 'next_number',
|
||||
};
|
||||
await this.settingsService.incrementNextNumber(tenantId, query);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user