From d5c03a2ece7405cab858511ca62ded7c0ea5a9db Mon Sep 17 00:00:00 2001 From: fiter-julius-oketayot <140818859+fiter-julius-oketayot@users.noreply.github.com> Date: Mon, 5 Feb 2024 14:44:38 +0300 Subject: [PATCH 1/6] FBR-575: Mostrar un filtro para seleccionar la cartera (#304) --- .../PortfoliosPlanningController.js | 13 ++++++++++++ .../organization/planningportfolios.html | 21 +++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/app/scripts/controllers/organization/PortfoliosPlanningController.js b/app/scripts/controllers/organization/PortfoliosPlanningController.js index 70ce2c1dbc..72931b069b 100644 --- a/app/scripts/controllers/organization/PortfoliosPlanningController.js +++ b/app/scripts/controllers/organization/PortfoliosPlanningController.js @@ -35,6 +35,19 @@ data.sort(sortByParentId); }); + + scope.searchByName = function () { + const params = { + name: this.searchText, + }; + resourceFactory.portfolioResource.getAllPortfoliosForCurrentUser(params, function (data) { + scope.portfolios = scope.deepCopy(data); + function sortByParentId(a, b) { + return a.parentId - b.parentId; + } + data.sort(sortByParentId); + }); + } } }); mifosX.ng.application.controller('PortfoliosPlanningController', ['$scope', 'ResourceFactory', '$location', mifosX.controllers.PortfoliosPlanningController]).run(function ($log) { diff --git a/app/views/organization/planningportfolios.html b/app/views/organization/planningportfolios.html index 8e0caad042..f3a0cb4ef1 100644 --- a/app/views/organization/planningportfolios.html +++ b/app/views/organization/planningportfolios.html @@ -7,6 +7,27 @@

+
+
+
+
+
+
+
+ + + + +
+
+
+
+
+
From d04762f1e4c66077e58c273f16c2ac550020f2fd Mon Sep 17 00:00:00 2001 From: fiter-julius-oketayot <140818859+fiter-julius-oketayot@users.noreply.github.com> Date: Mon, 5 Feb 2024 18:20:06 +0300 Subject: [PATCH 2/6] Enhancements/FBR-579: Standardize the format in the amounts (#305) --- app/scripts/directives/NumberFormatDirective.js | 12 ++++-------- app/scripts/filters/FormatNumber.js | 13 +++++++------ app/views/accounting/search_transaction.html | 4 ++-- .../banks/bankcheques/approvechequesissuance.html | 4 ++-- .../banks/bankcheques/authorizechequesissuance.html | 2 +- .../banks/bankcheques/payguaranteeswithcheques.html | 2 +- app/views/loans/disburseloansbycheques.html | 6 +++--- app/views/savings/view_saving_account_details.html | 6 +++--- 8 files changed, 23 insertions(+), 26 deletions(-) diff --git a/app/scripts/directives/NumberFormatDirective.js b/app/scripts/directives/NumberFormatDirective.js index 9e2bdbf1e3..5ec1dddfee 100644 --- a/app/scripts/directives/NumberFormatDirective.js +++ b/app/scripts/directives/NumberFormatDirective.js @@ -21,15 +21,11 @@ num = num.replace(decimalSep, DECIMAL_SEP); } var fractionLength = (num.split(DECIMAL_SEP)[1] || []).length; - - var initialnumber = ""; - if ($locale.id == 'es') { - if (value != undefined) { - initialnumber = value.toLocaleString('en'); - } - } else { - initialnumber = $filter('number')(num, fractionLength); + if(!fractionLength || fractionLength === 0){ + fractionLength = 2; } + var initialnumber = $filter('number')(num, fractionLength); + if (stringValue != undefined && stringValue.indexOf(DECIMAL_SEP) > 0 && decimalSep!= DECIMAL_SEP) { if ($locale.id == 'es') { num = value.toLocaleString('en'); diff --git a/app/scripts/filters/FormatNumber.js b/app/scripts/filters/FormatNumber.js index fceb0f10cb..12b4b4e300 100644 --- a/app/scripts/filters/FormatNumber.js +++ b/app/scripts/filters/FormatNumber.js @@ -2,14 +2,15 @@ mifosX.filters = _.extend(module, { FormatNumber: function ($filter) { return function (input, fractionSize) { + let formattedText = input; if (isNaN(input)) { - return input; + formattedText = input; } else { - //TODO- Add number formatting also - if (input != "" && input != undefined) { - return $filter('number')(input, fractionSize); - }; - }; + if (input !== "" && input !== undefined) { + formattedText = $filter('number')(input, fractionSize); + } + } + return formattedText; } } }); diff --git a/app/views/accounting/search_transaction.html b/app/views/accounting/search_transaction.html index af0f1a90a9..5eb8951a42 100644 --- a/app/views/accounting/search_transaction.html +++ b/app/views/accounting/search_transaction.html @@ -94,12 +94,12 @@

{{'label.heading.transactionid' | translate

diff --git a/app/views/banks/bankcheques/approvechequesissuance.html b/app/views/banks/bankcheques/approvechequesissuance.html index f685ffd8a8..9306bad929 100644 --- a/app/views/banks/bankcheques/approvechequesissuance.html +++ b/app/views/banks/bankcheques/approvechequesissuance.html @@ -143,9 +143,9 @@

{{'label.anchor.approve.cheques.issuance' | translate}}{{cheque.bankAccNo}}

- + - + diff --git a/app/views/banks/bankcheques/authorizechequesissuance.html b/app/views/banks/bankcheques/authorizechequesissuance.html index a7cb37edde..e73379c6be 100644 --- a/app/views/banks/bankcheques/authorizechequesissuance.html +++ b/app/views/banks/bankcheques/authorizechequesissuance.html @@ -153,7 +153,7 @@

{{'label.anchor.authorize.cheques.issuance' | translate}}<

- + diff --git a/app/views/banks/bankcheques/payguaranteeswithcheques.html b/app/views/banks/bankcheques/payguaranteeswithcheques.html index 7043e42920..f944bc6601 100644 --- a/app/views/banks/bankcheques/payguaranteeswithcheques.html +++ b/app/views/banks/bankcheques/payguaranteeswithcheques.html @@ -97,7 +97,7 @@

{{'label.heading.pay.guarantees.by.cheques' | translate}}<

- + diff --git a/app/views/loans/disburseloansbycheques.html b/app/views/loans/disburseloansbycheques.html index f36435120d..ba3d15d258 100644 --- a/app/views/loans/disburseloansbycheques.html +++ b/app/views/loans/disburseloansbycheques.html @@ -217,7 +217,7 @@

{{'label.anchor.disburse.loans.by.cheques' | translate}}{{loanAccount.clientName}}

- + diff --git a/app/views/savings/view_saving_account_details.html b/app/views/savings/view_saving_account_details.html index 28474b283e..f0464aea2d 100755 --- a/app/views/savings/view_saving_account_details.html +++ b/app/views/savings/view_saving_account_details.html @@ -512,19 +512,19 @@

{{'label.heading.availableBalance' | translate}}: {{savingaccountdetails.cur data-ng-click="routeTo(transaction.accountId,transaction.id,transaction.transfer,transaction.transfer.id)">
- {{transaction.amount| FormatByLocale}} + {{transaction.amount| FormatNumber:2}}

- + From 2ad1c0586d26e086a61e387791f2f3acfe20c6f1 Mon Sep 17 00:00:00 2001 From: fiter-julius-oketayot <140818859+fiter-julius-oketayot@users.noreply.github.com> Date: Tue, 6 Feb 2024 15:13:51 +0300 Subject: [PATCH 4/6] Enhancements/FBR-581: Add Spanish Translations (#307) --- app/global-translations/locale-en.json | 3 ++- app/global-translations/locale-es.json | 10 ++++++++-- app/views/groups/viewgroup.html | 2 +- .../prequalificationsGroups.html | 18 ++++++++---------- 4 files changed, 19 insertions(+), 14 deletions(-) diff --git a/app/global-translations/locale-en.json b/app/global-translations/locale-en.json index 2dad117f2c..dd9a0688b7 100644 --- a/app/global-translations/locale-en.json +++ b/app/global-translations/locale-en.json @@ -5305,7 +5305,7 @@ "label.description.additional.aniosComunidad": "Years community", "label.description.additional.servicios": "Services", "validation.msg.group.legacyNumber.not.greater.than.zero": "Old Group No. must be greater than zero", - "error.msg.prequalification.is.not.linked.to.a.group": "Asegúrese de que esta precalificación esté vinculada a un grupo.", + "error.msg.prequalification.is.not.linked.to.a.group": "Please ensure that this prequalification `{{params[0].value}}` is linked to a group", "bank.cheque.status.invalid": "Invalidd", "bank.cheque.status.available":"Available", "bank.cheque.status.issued": "Issued", @@ -5342,5 +5342,6 @@ "error.msg.meeting.date.meeting.end.time.earlier.than.start.time": "Meeting Start Time should be before meeting end time", "label.anchor.createportfolio": "Create portfolio", "label.button.createportfolio": "Create portfolio", + "label.heading.editbankaccount": "Edit bank account", "----End---": "--End of file--- " } diff --git a/app/global-translations/locale-es.json b/app/global-translations/locale-es.json index c874754b28..01ff76c60b 100644 --- a/app/global-translations/locale-es.json +++ b/app/global-translations/locale-es.json @@ -4928,8 +4928,8 @@ "label.input.document.type": "Tipo de Documento", "label.heading.prequalification.name": "Nombre de precalificación", "validation.msg.group.legacyNumber.not.greater.than.zero": "El número de grupo antiguo debe ser mayor que cero.", - "error.msg.prequalification.is.not.linked.to.a.group": "Please ensure that this prequalification is linked to a group", - "label.addBankAccount": "Crear cuenta bancaria", + "error.msg.prequalification.is.not.linked.to.a.group": "Asegúrese de que esta precalificación `{{params[0].value}}` esté vinculada a un grupo", + "label.addBankAccount": "Nueva Cuenta Bancaria", "validation.msg.blacklist.description.cannot.be.blank": "La descripción de la lista negra no puede estar vacía", "validation.msg.loan.charges.not.greater.than.zero": "Los cargos del préstamo no pueden ser mayores que cero", "bank.cheque.status.invalid": "Inválida", @@ -4958,5 +4958,11 @@ "buro.check.classification.red": "Rojo", "buro.check.classification.orange": "Naranja", "error.msg.meeting.date.meeting.end.time.earlier.than.start.time": "La hora de inicio de la reunión debe ser anterior a la hora de finalización de la reunión.", + "label.anchor.createbankaccount": "Nueva cuenta bancaria", + "label.heading.createbankaccount": "Nueva Cuenta Bancaria", + "label.heading.editbankaccount": "Editar cuenta bancaria", + "label.input.glaccount.name": "Seleccione cuenta del libro mayor", + "label.input.bank": "Banco", + "label.heading.member.hardpolicy": "Resultados de Política Dura", "----End---": "---Fin del archivo---" } diff --git a/app/views/groups/viewgroup.html b/app/views/groups/viewgroup.html index dd4abe1748..a39c1da2d1 100644 --- a/app/views/groups/viewgroup.html +++ b/app/views/groups/viewgroup.html @@ -207,7 +207,7 @@

{{ 'label.heading.clients' | translate }}

diff --git a/app/views/prequalifications/prequalificationsGroups.html b/app/views/prequalifications/prequalificationsGroups.html index 8221d94421..9bc1343baf 100644 --- a/app/views/prequalifications/prequalificationsGroups.html +++ b/app/views/prequalifications/prequalificationsGroups.html @@ -28,20 +28,18 @@

{{'label.anchor.prequalification.groups'| translate}}

-
+
-
- - +
+
-
From de0d012fd9fe4dea242681dc0869ecbd792cea91 Mon Sep 17 00:00:00 2001 From: Leonardo Hildt <108893281+leonardohildt@users.noreply.github.com> Date: Tue, 6 Feb 2024 11:42:07 -0300 Subject: [PATCH 5/6] Update capital letter for label header (#308) * Update capital letter for label header * Update locale-es.json --- app/global-translations/locale-es.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/global-translations/locale-es.json b/app/global-translations/locale-es.json index 01ff76c60b..a7516a27e0 100644 --- a/app/global-translations/locale-es.json +++ b/app/global-translations/locale-es.json @@ -4395,7 +4395,7 @@ "label.heading.portfolioHeader": "Cartera: ", "label.heading.loanProductShortName":"Tipo", "label.heading.loanTotalRepayment": "A Cobrar", - "label.heading.loanTotalOverdue": "en mora", + "label.heading.loanTotalOverdue": "En Mora", "label.heading.groupNumberOfClients": "Clientes", "label.heading.prequalification.validation.result": "Resultado de validación de Politicas Duras Grupal", "label.heading.hard.policy.status": "Politica Dura", From 2e01fb3d35eb37ff4900d77b7241167a1744b35d Mon Sep 17 00:00:00 2001 From: Muhimbura Brian Mart Date: Tue, 6 Feb 2024 21:29:23 +0300 Subject: [PATCH 6/6] fix fbr 578 --- .../loanAccount/NewLoanAccAppController.js | 20 ++++--------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/app/scripts/controllers/loanAccount/NewLoanAccAppController.js b/app/scripts/controllers/loanAccount/NewLoanAccAppController.js index 09c36a0c48..7746f9ec54 100755 --- a/app/scripts/controllers/loanAccount/NewLoanAccAppController.js +++ b/app/scripts/controllers/loanAccount/NewLoanAccAppController.js @@ -179,21 +179,6 @@ } } ; - scope.resolveFrequencyRange = function (centerName){ - if(centerName.includes('-R1-')){ - scope.disableFrequencySelect = true; - return 1; - }if(centerName.includes('-R2-')){ - scope.disableFrequencySelect = true; - return 2; - }if(centerName.includes('-R3-')){ - scope.disableFrequencySelect = true; - return 3; - }if(centerName.includes('-R4-')){ - scope.disableFrequencySelect = true; - return 4; - } - } scope.loanProductChange = function (loanProductId) { // _.isUndefined(scope.datatables) ? scope.tempDataTables = [] : scope.tempDataTables = scope.datatables; // WizardHandler.wizard().removeSteps(1, scope.tempDataTables.length); @@ -216,7 +201,10 @@ if (data.product.ownerTypeOption.value ==='Group'){ if (data.group){ scope.formData.repaymentFrequencyDayOfWeekType = scope.resolveFrequencyDayOfWeek(data.group.meetingDayName) - scope.formData.repaymentFrequencyNthDayType = scope.resolveFrequencyRange(data.group.centerName) + if (data.group.meetingFrequencyRange){ + scope.disableFrequencySelect = true; + scope.formData.repaymentFrequencyNthDayType = data.group.meetingFrequencyRange + } } } scope.loandetails.interestValue = scope.loanaccountinfo.interestType.value;
- {{transaction.currency.displaySymbol}} {{transaction.amount | number}} + {{transaction.currency.displaySymbol}} {{transaction.amount | FormatNumber:2}}
- {{transaction.currency.displaySymbol}} {{transaction.amount | number}} + {{transaction.currency.displaySymbol}} {{transaction.amount | FormatNumber:2}}
{{cheque.loanAmount && cheque.loanAmount>0? 'label.heading.disbursement':'label.heading.guarantees'|translate }} {{cheque.clientName}}{{cheque.chequeAmount}}{{cheque.chequeAmount | FormatNumber:2 }} {{cheque.depositNumber}}{{cheque.guaranteeAmount}}{{cheque.guaranteeAmount | FormatNumber:2}} {{cheque.description}} {{cheque.createdByUsername}}
{{cheque.batchNo}} {{cheque.bankAccNo}} {{cheque.loanAmount && cheque.loanAmount>0? 'label.heading.disbursement':'label.heading.guarantees'|translate }}{{cheque.chequeAmount}}{{cheque.chequeAmount | FormatNumber:2}} {{cheque.status.code | translate}} {{cheque.description}} {{cheque.createdDate | DateFormat}}{{guaranteeData.clientNo}} {{guaranteeData.clientName}} {{guaranteeData.withdrawalReason}}{{guaranteeData.requestedAmount}}{{guaranteeData.requestedAmount | FormatNumber:2}} {{guaranteeData.status}} {{guaranteeData.caseId}} {{guaranteeData.chequeData.accountName}}{{loanAccount.loanProductName}} {{loanAccount.expectedFirstRepaymentOnDate | DateFormat}}{{loanAccount.approvedPrincipal}}{{loanAccount.approvedPrincipal | FormatNumber:2}}
- +
- {{transaction.amount| FormatByLocale}} + {{transaction.amount | FormatNumber:2}}
- {{transaction.runningBalance| FormatByLocale}} + {{transaction.runningBalance | FormatNumber:2}} From 3eb5ba3776d74261fea1514e65aa3f5990de8e50 Mon Sep 17 00:00:00 2001 From: Muhimbura Brian Mart Date: Tue, 6 Feb 2024 10:15:36 +0300 Subject: [PATCH 3/6] fix fbr 427 --- app/global-translations/locale-en.json | 2 +- app/global-translations/locale-es.json | 2 +- app/views/organization/viewportfolioplanning.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/global-translations/locale-en.json b/app/global-translations/locale-en.json index 71c052d81b..2dad117f2c 100644 --- a/app/global-translations/locale-en.json +++ b/app/global-translations/locale-en.json @@ -4754,7 +4754,7 @@ "label.input.select.supervision" : "Select Supervision", "label.input.supervisionResponsibleUser": "Responsible", "label.heading.loanProductShortName":"Type", - "label.heading.loanTotalRepayment": "Paid", + "label.heading.loanTotalRepayment": "Payments", "label.heading.loanTotalOverdue": "Overdue", "label.heading.groupNumberOfClients": "Customers", "label.heading.portfolioHeader": "Portfolio: ", diff --git a/app/global-translations/locale-es.json b/app/global-translations/locale-es.json index 1821ae2cd9..c874754b28 100644 --- a/app/global-translations/locale-es.json +++ b/app/global-translations/locale-es.json @@ -4395,7 +4395,7 @@ "label.heading.portfolioHeader": "Cartera: ", "label.heading.loanProductShortName":"Tipo", "label.heading.loanTotalRepayment": "A Cobrar", - "label.heading.loanTotalOverdue": "Mora", + "label.heading.loanTotalOverdue": "en mora", "label.heading.groupNumberOfClients": "Clientes", "label.heading.prequalification.validation.result": "Resultado de validación de Politicas Duras Grupal", "label.heading.hard.policy.status": "Politica Dura", diff --git a/app/views/organization/viewportfolioplanning.html b/app/views/organization/viewportfolioplanning.html index ef78f8c9b7..c7c8bb881b 100644 --- a/app/views/organization/viewportfolioplanning.html +++ b/app/views/organization/viewportfolioplanning.html @@ -98,8 +98,8 @@

{{ 'label.heading.portfolioHeader' | translate }}{{portfolio.name}}<

{{planning.centerGroupId}} {{planning.centerGroupName}} {{'label.anchor.cobro' | translate}}{{planning.totalOverdue |number}} {{planning.totalRepayment |number}}{{planning.totalOverdue |number}} {{planning.numberOfClients}}