- push logs distribute saldo admin

This commit is contained in:
Fadli 2023-01-07 01:21:35 +07:00
parent 1ea59d2254
commit dfc4e6b688

View File

@ -163,12 +163,13 @@ export class TransactionService {
HttpStatus.NOT_ACCEPTABLE, HttpStatus.NOT_ACCEPTABLE,
); );
} }
console.log('suppliercodedist', supplier.code);
// GET COA // GET COA
const coaBudget = await this.coaService.findByName( const coaBudget = await this.coaService.findByName(
`${coaType[coaType.BUDGET]}-${supplier.code}`, `${coaType[coaType.BUDGET]}-${supplier.code}`,
); );
console.log('coabudgetdist', coaBudget.amount);
console.log('amounttotaldist', distributeTransactionDto.amount);
if (coaBudget.amount < distributeTransactionDto.amount) { if (coaBudget.amount < distributeTransactionDto.amount) {
throw new HttpException( throw new HttpException(
{ {