fix(SPG-661) Filter rekonsiliasi exclude status draft
parent
66c481c9b0
commit
1f4bf80908
|
@ -23,7 +23,7 @@ export class BatchCancelReconciliationManager extends BaseBatchUpdateStatusManag
|
|||
},
|
||||
});
|
||||
|
||||
if (transaction.status != STATUS.SETTLED) {
|
||||
if ([STATUS.SETTLED, STATUS.WAITING].includes(transaction.status)) {
|
||||
throw new UnprocessableEntityException({
|
||||
statusCode: HttpStatus.UNPROCESSABLE_ENTITY,
|
||||
message: `Failed! cant cancel transaction not settled`,
|
||||
|
|
|
@ -27,7 +27,7 @@ export class CancelReconciliationManager extends BaseUpdateStatusManager<Transac
|
|||
},
|
||||
});
|
||||
|
||||
if (transaction.status != STATUS.SETTLED) {
|
||||
if ([STATUS.SETTLED, STATUS.WAITING].includes(transaction.status)) {
|
||||
throw new UnprocessableEntityException({
|
||||
statusCode: HttpStatus.UNPROCESSABLE_ENTITY,
|
||||
message: `Failed! cant cancel transaction not settled`,
|
||||
|
|
|
@ -7,6 +7,7 @@ import {
|
|||
} from 'src/core/modules/domain/entities/base-filter.entity';
|
||||
import { TransactionEntity } from 'src/modules/transaction/transaction/domain/entities/transaction.entity';
|
||||
import { BetweenQueryHelper } from 'src/core/helpers/query/between-query.helper';
|
||||
import { STATUS } from 'src/core/strings/constants/base.constants';
|
||||
|
||||
@Injectable()
|
||||
export class IndexReconciliationManager extends BaseIndexManager<TransactionEntity> {
|
||||
|
@ -145,7 +146,10 @@ export class IndexReconciliationManager extends BaseIndexManager<TransactionEnti
|
|||
}
|
||||
|
||||
queryBuilder.andWhere(
|
||||
`${this.tableName}.reconciliation_status Is Not Null`,
|
||||
`${this.tableName}.reconciliation_status Not In (:...statuses)`,
|
||||
{
|
||||
statuses: [STATUS.DRAFT],
|
||||
},
|
||||
);
|
||||
return queryBuilder;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue