mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-15 20:30:33 +00:00
refactor(nestjs): bank transactions matching
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import async from 'async';
|
||||
import * as async from 'async';
|
||||
import { Knex } from 'knex';
|
||||
import {
|
||||
ILedger,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Knex } from 'knex';
|
||||
import async from 'async';
|
||||
import * as async from 'async';
|
||||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { transformLedgerEntryToTransaction } from './utils';
|
||||
import {
|
||||
@@ -33,7 +33,7 @@ export class LedgerEntriesStorageService {
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
public saveEntries = async (ledger: ILedger, trx?: Knex.Transaction) => {
|
||||
const saveEntryQueue = async.queue(this.saveEntryTask, 10);
|
||||
const saveEntryQueue = async.queue(this.saveEntryTask.bind(this), 10);
|
||||
const entries = ledger.filter(filterBlankEntry).getEntries();
|
||||
|
||||
entries.forEach((entry) => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import async from 'async';
|
||||
import * as async from 'async';
|
||||
import { Knex } from 'knex';
|
||||
import { uniq } from 'lodash';
|
||||
import {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import * as moment from 'moment';
|
||||
import { AccountTransaction } from "../Accounts/models/AccountTransaction.model";
|
||||
import { ILedgerEntry } from "./types/Ledger.types";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user