mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 05:40:31 +00:00
feat: journal entries with expenses operations.
This commit is contained in:
@@ -225,12 +225,15 @@ export default class JournalCommands {
|
||||
* Writes journal entries of expense model object.
|
||||
* @param {IExpense} expense
|
||||
*/
|
||||
expense(expense: IExpense) {
|
||||
expense(
|
||||
expense: IExpense,
|
||||
userId: number,
|
||||
) {
|
||||
const mixinEntry = {
|
||||
referenceType: 'Expense',
|
||||
referenceId: expense.id,
|
||||
date: expense.paymentDate,
|
||||
userId: expense.userId,
|
||||
userId,
|
||||
draft: !expense.publishedAt,
|
||||
};
|
||||
const paymentJournalEntry = new JournalEntry({
|
||||
|
||||
Reference in New Issue
Block a user