fix: reject payback
This commit is contained in:
parent
36d53b2f5f
commit
b7b96d0f5c
|
@ -528,7 +528,7 @@ export class TransactionService {
|
||||||
await this.productHistoryPriceService.updateEndDate(product.id);
|
await this.productHistoryPriceService.updateEndDate(product.id);
|
||||||
|
|
||||||
listActivePrice.map(async (x) => {
|
listActivePrice.map(async (x) => {
|
||||||
let newProductPrice = new ProductHistoryPrice();
|
const newProductPrice = new ProductHistoryPrice();
|
||||||
|
|
||||||
newProductPrice.id = uuid.v4();
|
newProductPrice.id = uuid.v4();
|
||||||
newProductPrice.type = x.type;
|
newProductPrice.type = x.type;
|
||||||
|
@ -613,6 +613,7 @@ export class TransactionService {
|
||||||
|
|
||||||
await manager.save(transactionData);
|
await manager.save(transactionData);
|
||||||
|
|
||||||
|
if (statusApproval != 'accept') {
|
||||||
await this.accountingTransaction({
|
await this.accountingTransaction({
|
||||||
createTransaction: false,
|
createTransaction: false,
|
||||||
transactionalEntityManager: manager,
|
transactionalEntityManager: manager,
|
||||||
|
@ -637,6 +638,7 @@ export class TransactionService {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return transactionData;
|
return transactionData;
|
||||||
|
@ -1020,6 +1022,7 @@ export class TransactionService {
|
||||||
if (startDate && endDate) {
|
if (startDate && endDate) {
|
||||||
filter['start'] = Between(new Date(startDate), new Date(endDate));
|
filter['start'] = Between(new Date(startDate), new Date(endDate));
|
||||||
}
|
}
|
||||||
|
|
||||||
const baseQuery = this.transactionRepository.findAndCount({
|
const baseQuery = this.transactionRepository.findAndCount({
|
||||||
skip: page * (pageSize || 10),
|
skip: page * (pageSize || 10),
|
||||||
take: pageSize || 10,
|
take: pageSize || 10,
|
||||||
|
@ -1028,6 +1031,7 @@ export class TransactionService {
|
||||||
createdAt: 'DESC',
|
createdAt: 'DESC',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
return baseQuery;
|
return baseQuery;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user