From 814bb87c16f8e881f5a421ade26f1eebd357674a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Alberto=20Hern=C3=A1ndez?= <44206706+josehernandezfintecheandomx@users.noreply.github.com> Date: Tue, 28 Feb 2023 23:48:58 -0600 Subject: [PATCH] Debit and Credit values are not aligned properly on view journal entry view (#1694) Co-authored-by: Jose Alberto Hernandez --- .../view-transaction/view-transaction.component.ts | 2 +- .../create-data-table/create-data-table.component.ts | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/app/loans/loans-view/transactions/view-transaction/view-transaction.component.ts b/src/app/loans/loans-view/transactions/view-transaction/view-transaction.component.ts index d8e772301..133e43075 100644 --- a/src/app/loans/loans-view/transactions/view-transaction/view-transaction.component.ts +++ b/src/app/loans/loans-view/transactions/view-transaction/view-transaction.component.ts @@ -68,7 +68,7 @@ export class ViewTransactionComponent implements OnInit { this.transactionData = data.loansAccountTransaction; this.allowEdition = !this.transactionData.manuallyReversed && !this.allowTransactionEdition(this.transactionData.type.id); this.allowUndo = !this.transactionData.manuallyReversed; - this.allowChargeback = this.transactionData.type.repayment; + this.allowChargeback = this.transactionData.type.repayment && !this.transactionData.manuallyReversed; let transactionsChargebackRelated = false; if (this.transactionData.type.repayment) { if (this.transactionData.transactionRelations) { diff --git a/src/app/system/manage-data-tables/create-data-table/create-data-table.component.ts b/src/app/system/manage-data-tables/create-data-table/create-data-table.component.ts index c9528f16d..fd1ab8685 100644 --- a/src/app/system/manage-data-tables/create-data-table/create-data-table.component.ts +++ b/src/app/system/manage-data-tables/create-data-table/create-data-table.component.ts @@ -227,7 +227,11 @@ export class CreateDataTableComponent implements OnInit, AfterViewInit { }); }); this.dataTableForm.value.columns = columns; - this.systemService.createDataTable(this.dataTableForm.value).subscribe((response: any) => { + const payload = this.dataTableForm.value; + if (this.dataTableForm.value.entitySubType == null || this.dataTableForm.value.entitySubType === '') { + delete payload.entitySubType; + } + this.systemService.createDataTable(payload).subscribe((response: any) => { if (this.configurationWizardService.showDatatablesForm === true) { this.configurationWizardService.showDatatablesForm = false; this.openDialog();