diff --git a/app/global-translations/locale-en.json b/app/global-translations/locale-en.json index 71c052d81b..dd9a0688b7 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: ", @@ -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 1821ae2cd9..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": "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", @@ -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/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; 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/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
- {{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}}
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}} {{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}} 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}}< {{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}} 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}}< {{guaranteeData.clientNo}} {{guaranteeData.clientName}} {{guaranteeData.withdrawalReason}} - {{guaranteeData.requestedAmount}} + {{guaranteeData.requestedAmount | FormatNumber:2}} {{guaranteeData.status}} {{guaranteeData.caseId}} {{guaranteeData.chequeData.accountName}} 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/loans/disburseloansbycheques.html b/app/views/loans/disburseloansbycheques.html index f3cb087846..ca3981ce0a 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}} {{loanAccount.loanProductName}} {{loanAccount.expectedFirstRepaymentOnDate | DateFormat}} - {{loanAccount.approvedPrincipal}} + {{loanAccount.approvedPrincipal | FormatNumber:2}}