fix: Date format in sales/purchases APIs.

fix: Algorithm FIFO cost calculate method.
This commit is contained in:
Ahmed Bouhuolia
2020-08-19 00:13:53 +02:00
parent a202a21df5
commit 52d01b4ed8
21 changed files with 291 additions and 133 deletions

View File

@@ -45,8 +45,6 @@ export default class JournalCommands{
.map((groupedTrans: IInventoryTransaction[], transType: string) => [groupedTrans, transType])
.value();
console.log(groupedInvTransactions);
return Promise.all(
groupedInvTransactions.map(async (grouped: [IInventoryTransaction[], string]) => {
const [invTransGroup, referenceType] = grouped;
@@ -58,8 +56,6 @@ export default class JournalCommands{
.whereIn('reference_id', referencesIds)
.withGraphFetched('account.type');
console.log(_transactions, referencesIds);
if (_transactions.length > 0) {
this.journal.loadEntries(_transactions);
this.journal.removeEntries(_transactions.map((t: any) => t.id));