diff --git a/.gitignore b/.gitignore index b94aca9e56..20ecb8cfee 100644 --- a/.gitignore +++ b/.gitignore @@ -35,6 +35,7 @@ app/custom_files Gruntfile-custom.js .sass-cache gems.locked +package-lock.json .grunt/ bin/ *.cache diff --git a/Dockerfile b/Dockerfile index 4d4740755e..881e6b01f3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +10,7 @@ RUN npm install -g bower RUN npm install -g grunt-cli COPY . /usr/src/app RUN bower --allow-root install -RUN npm install +RUN npm install --force RUN bundle install #RUN grunt test --code-coverage --force RUN grunt prod diff --git a/app/angular/i18n/angular-locale_es.js b/app/angular/i18n/angular-locale_es.js index 91aba876a3..98538ddbc2 100644 --- a/app/angular/i18n/angular-locale_es.js +++ b/app/angular/i18n/angular-locale_es.js @@ -64,8 +64,8 @@ $provide.value("$locale", { }, "NUMBER_FORMATS": { "CURRENCY_SYM": "\u20ac", - "DECIMAL_SEP": ",", - "GROUP_SEP": ".", + "DECIMAL_SEP": ".", + "GROUP_SEP": ",", "PATTERNS": [ { "gSize": 3, diff --git a/app/global-translations/locale-en.json b/app/global-translations/locale-en.json index f794586ea6..7b568a7701 100644 --- a/app/global-translations/locale-en.json +++ b/app/global-translations/locale-en.json @@ -266,8 +266,8 @@ "#Inputs": "..", "label.input.name": "Name", "label.input.unittype": "Unit Type", - "label.input.pcttobase": "Percentage To Base", - "label.input.baseprice": "Base Price", + "label.input.pcttobase": "Percentage To Base", + "label.input.baseprice": "Base Price", "label.input.firstname": "First name", "label.input.lastname": "Last name", "label.input.middlename": "Middle name", @@ -360,6 +360,8 @@ "label.input.status": "Status", "label.input.city": "City", "label.input.email": "Email", + "planning.type.group": "Group", + "planning.type.individual": "Individual", "#Buttons": "..", "label.button.previous": "Previous", "label.button.createcollateral": "Create Collateral", @@ -583,6 +585,7 @@ "error.msg.loan.writeoff.cannot.be.undone.before.client.transfer.date": " The date on which a write off is made cannot be earlier than client's transfer date of ({{params[0].value}}) ", "error.msg.loan.close.cannot.be.undone.before.client.transfer.date": " The date on which the loan is repaid in full cannot be earlier than client's transfer date of ({{params[0].value}}) ", "error.msg.loan.repayment.or.waiver.account.is.not.active": "Loan account is not active", + "error.msg.payment.amount.not.enough.invalid": "Payment of amount `{{params[0].value}}` is not enough to cover the loan balance of `{{params[1].value}}` and release the guaranteed amount of `{{params[2].value}}`", "validation.msg.floatingrate.ratePeriods.cannot.be.empty": "Floating rate periods can not be empty", "validation.msg.floatingrate.fromDate.is.less.than.date": "Floating rate periods from date must be greater than current date", "validation.msg.floatingrate.isBaseLendingRate.baselendingrate.duplicate": "Base lending rate is already defined", @@ -1890,6 +1893,7 @@ "loanTransactionType.refund": "Refund from Overpaid", "loanTransactionType.approveTransfer": "Transfer Approved", "loanTransactionType.chargePayment": "Fee payment", + "loanTransactionType.accrual": "Accrual", "loanStatusType.transfer.on.hold": "Transfer on Hold", "loanStatusType.invalid": "Invalid status", "loanStatusType.submitted.and.pending.approval": "Submitted and pending approval", @@ -2247,6 +2251,8 @@ "label.input.routingcode": "Routing code", "label.input.receiptnumber": "Receipt#", "label.input.banknumber": "Bank#", + "label.input.billnumber": "Bill Number", + "label.heading.billnumber": "Bill Number", "label.input.loanofficer": "Loan officer", "label.input.chargepaymentby": "Charge payment by", "label.input.duedate": "Due date", @@ -3001,6 +3007,10 @@ "label.input.politicalPosition": "Political Position Held", "label.input.politicalOffice": "Political Office", "label.input.rentMortgageFee": "Rent / Mortgage Fee", + "label.input.rentFee": "Rent fee", + "label.heading.feevalue": "Fee Value", + "label.input.loanAmountValue": "Loan Amount", + "label.input.mortgageFee": "House Payment(Mortgage)", "label.input.populatedPlace": "Populated Place", "label.input.referencePoint": "Reference Point", "label.input.relativeNumber": "Relative Phone Number", @@ -3137,6 +3147,10 @@ "label.accountNumberPreferences": "Preferences for generating account numbers for client, loan and savings accounts", "label.menu.selectAccountType": "Select Account Type", "label.menu.selectPrefixField": "Select Prefix Field", + "label.color.orange": "ORANGE", + "label.color.green": "GREEN", + "label.color.yellow": "YELLOW", + "label.color.red": "RED", "#Enumeration & Error Messages": "..", "No.Data.Found": "No data found.", "validation.msg.datatable.name.mandatory": "Data table name is mandatory", @@ -3846,6 +3860,7 @@ "#Inputs": "..", "label.input.adhoc.search.loans": "Loans", "label.input.adhoc.search.loanstatus": "Loan status", + "label.input.adhoc.search.debtstatus": "Debt Status", "label.input.date.filter": "Select date type:", "label.input.adhoc.search.loanoutstanding.percentage": "Loan outstanding percentage", "#------------------": "------------", @@ -4570,31 +4585,31 @@ "#------------------": "------------", - "#TwoFactorAuthentication": "...", + "#TwoFactorAuthentication": "...", - "#Headings": "..", - "label.heading.twofactor": "Two-Factor Authentication", - "label.heading.sms": "SMS", - "label.heading.token": "Token", + "#Headings": "..", + "label.heading.twofactor": "Two-Factor Authentication", + "label.heading.sms": "SMS", + "label.heading.token": "Token", - "#Labels": "..", - "label.otp.token": "Authentication token", - "label.button.otp.request": "Request token", - "label.button.tfa.remember_me": "Remember this computer", - "label.otp.delivery.select.sms": "Send as an SMS to {{target}}", - "label.otp.delivery.select.email": "Send via Email to {{target}}", - "label.otp.delivery.info": "Please select how you would like to receive an authentication token.", - "label.otp.verify.info": "Please enter the authentication token you received.", - "label.anchor.twofactorconfig": "Two-Factor Configuration", - "label.twofactorconfig": "Two-factor authentication configuration settings", - "label.anchor.viewtwofactorconfig":"View Two-Factor Configuration", - "label.anchor.edittwofactorconfig": "Edit Two-Factor Configuration", + "#Labels": "..", + "label.otp.token": "Authentication token", + "label.button.otp.request": "Request token", + "label.button.tfa.remember_me": "Remember this computer", + "label.otp.delivery.select.sms": "Send as an SMS to {{target}}", + "label.otp.delivery.select.email": "Send via Email to {{target}}", + "label.otp.delivery.info": "Please select how you would like to receive an authentication token.", + "label.otp.verify.info": "Please enter the authentication token you received.", + "label.anchor.twofactorconfig": "Two-Factor Configuration", + "label.twofactorconfig": "Two-factor authentication configuration settings", + "label.anchor.viewtwofactorconfig":"View Two-Factor Configuration", + "label.anchor.edittwofactorconfig": "Edit Two-Factor Configuration", - "#Error messages": "..", + "#Error messages": "..", - "error.otp.validate.invalid": "The provided authentication token is invalid", - "error.otp.validate.other": "An error occurred while trying to validate the authentication token", - "error.twofactor.config.disabled": "Two-Factor authentication is disabled or not supported on the server!", + "error.otp.validate.invalid": "The provided authentication token is invalid", + "error.otp.validate.other": "An error occurred while trying to validate the authentication token", + "error.twofactor.config.disabled": "Two-Factor authentication is disabled or not supported on the server!", "label.tooltip.reportrunfrequncy": "Report Run Frequency", "label.heading.reportrunfrequncy": "Report Run Frequency", @@ -4647,7 +4662,7 @@ "label.anchor.editrate": "Edit Rate", "label.error.rate.already.exist" : "Rate already exist.", "label.selectrate" : "Select Rate", - "label.input.street":"Street", + "label.input.street":"Street", "label.input.fixed.pricipal.percentage.per.installment" : "Fixed Principal % per instalment", "label.heading.fixed.pricipal.percentage.per.installment" : "Fixed Principal % per instalment", @@ -4753,7 +4768,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: ", @@ -4785,7 +4800,9 @@ "label.heading.creditRequest": "Credit Request", "label.heading.analysis": "Analysis", "label.input.totalLoanBalances": "Total Loan Balances", + "label.input.totalBalances": "Total de saldos", "label.input.totalCharges": "Total Installments", + "label.input.totalInstallments": "Total Installments", "label.input.houseHoldGoods": "House Hold Goods", "label.input.businessActivity": "Business Activity(s)", "label.input.salesValue": "Sales Value", @@ -4798,6 +4815,8 @@ "label.input.proposedFee": "Proposed Fee", "label.input.agencyAuthorizedAmount": "Agency Authorized Amount", "label.input.authorizedFee": "Authorized Fee", + "label.input.collateralAmount": "Collateral Amount", + "label.input.netAmountReceivable": "Net Amount Receivable", "label.input.businessPurchases": "Business Purchases", "label.input.businessProfit": "Business Profit", "label.input.clientProfit": "Profit According to Client", @@ -4943,7 +4962,7 @@ "label.button.void": "Void", "label.button.view.cheque": "View Cheque", "label.button.void.cheque": "Void Cheque", - "label.button.issue.cheque": "Issue & Print", + "label.button.disburse.and.print.cheque": "Print", "label.button.print.cheque": "Print Cheque", "label.button.reassign.cheque": "Reassign Cheque", "label.button.void.authorize.cheque": "Authorize Voidance", @@ -4951,7 +4970,7 @@ "label.heading.old.chequeNo": "Old Cheque", "label.heading.new.chequeNo": "New Cheque", "label.select.new.cheque": "Select new cheque", - "label.anchor.disburse.loans.by.cheques": "Disburse Loans by Cheques", + "label.anchor.disburse.loans.by.cheques": "Assign checks to loans", "label.view.disburse.loans.by.cheques": "Disburse multiple loans by cheques", "label.menu.disbursementmethod": "Disbursement Method", "label.heading.isindividualbusinessloan": "Is Individual Business Loan?", @@ -4989,19 +5008,20 @@ "validation.msg.charge.adminFeeRate.cannot.be.blank": "Fee ranges cannot be blank", "validation.msg.bank.code.exceeds.max.length": "Bank Code exceeds the maximum length expected.", "label.input.chequeNo": "Cheque No.", - "label.button.approve.issuance.cheque": "Approve Issuance", - "label.anchor.approve.cheques.issuance": "Approve Cheques Issuance", - "label.view.approve.cheques.issuance": "Approve Multiple Cheques Issuance", + "label.button.approve.issuance.cheque": "Authorize Issuance", + "label.anchor.approve.cheques.issuance": "Authorize Cheques Issuance", + "label.view.approve.cheques.issuance": "Authorize Multiple Cheques Issuance", "label.heading.exceptions.queue": "Exceptions Queue", - "label.button.authorize.issuance.cheque": "Authorize Issuance", - "label.anchor.authorize.cheques.issuance": "Authorize Cheques Issuance", - "label.view.authorize.cheques.issuance": "Authorize Multiple Cheques Issuance", + "label.button.authorize.issuance.cheque": "Authorize print", + "label.anchor.authorize.cheques.issuance": "Authorize Cheques Printing", + "label.view.authorize.cheques.issuance": "Authorize Multiple Cheques Printing", "label.button.print.cheques": "Print Cheques", "label.anchor.print.cheques": "Print Cheques", - "label.view.print.cheques": "Print Multiple Bank Cheques", + "label.view.print.cheques": "Print cheques (with disbursement)", "label.anchor.pay.guarantees.by.cheques": "Pay Guarantees By cheques", "label.view.pay.guarantees.by.cheques": "Pay Multiple Guarantees By cheques", "label.heading.pay.guarantees.by.cheques": "Pay Guarantees By cheques", + "label.heading.guarantees": "Guarantees", "label.input.searchbycaseid": "Search By Case ID", "label.heading.withdrawalreason": "Withdrawal reason", "label.heading.caseid": "Case ID", @@ -5264,6 +5284,7 @@ "label.description.additional.telefono_fijo": "Landline", "label.description.additional.telefono_negocio": "Business phone", "label.description.additional.tiene_correo": "Has email", + "label.anchor.cobro": "Payments", "label.description.additional.tipo_credito": "Credit type", "label.description.additional.tipo_direccion_negocio": "Business address type", "label.description.additional.total_costo_ventas": "Total cost of sales", @@ -5302,6 +5323,134 @@ "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": "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", + "bank.cheque.status.canceled": "Voided", + "bank.cheque.status.pending.cancellation": "Pending voidance", + "bank.cheque.status.pending.issuance": "Pending Issuance", + "bank.cheque.status.pending.authorization.by.accounting": "Pending Authorization by Accounting", + "bank.cheque.status.ready.to.be.printed": "Ready to be printed", + "error.msg.cheque.guarantee.savings.account.not.found": "Guarantee savings account not found", + "error.msg.cheque.guarantee.amount.greater.than.available.savings.account.balance": "Guarantee amount is greater than savings account available balance", + "label.heading.centerRange": "Range and Day", + "label.heading.member.buro.result": "Bureau result", + "label.heading.buro.name": "Bureau Name", + "label.heading.buro.identification.type": "Identification Type", + "label.heading.buro.identification.number": "Identification Number", + "label.heading.buro.identification.status": "Identification Status", + "label.heading.buro.date": "Bureau Date", + "label.heading.buro.Cuentas": "Bureau Accounts", + "label.heading.buro.Clasificacion": "Classification Bureau", + "label.heading.buro.Resumen": "Summary Bureau", + "buro.check.classification.grey": "Grey", + "buro.check.classification.green": "Green", + "buro.check.classification.yellow": "Yellow", + "buro.check.classification.red": "Red", + "buro.check.classification.orange": "Orange", + "label.input.company.fieldset.custom": "Additional", + "label.input.portfolioCenter": "Centre", + "label.input.legacyGroupNumber": "Old Group No.", + "label.input.groupLatitude": "Latitude", + "label.input.groupformationdate": "Training date", + "label.input.groupSize": "Group size", + "label.input.groupResponsibleUser": "Group Formed By", + "label.input.groupLongitude": "Longitude", + "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", + "label.heading.list.of.clients": "List of Clients", + "label.heading.list.of.groups": "List of Groups", + "label.heading.list.of.centers": "List of Centers", + "label.view.principalpaymentdetail": "Principal Payment", + "label.view.interestspayment": "Interest Payment", + "loanTermFrequency.periodFrequencyType.days": "Days", + "loanTermFrequency.periodFrequencyType.weeks": "Weeks", + "loanTermFrequency.periodFrequencyType.months": "Months", + "loanTermFrequency.periodFrequencyType.years": "Years", + "label.heading.on": "on", + "repaymentFrequency.nthDayType.one": "First", + "repaymentFrequency.nthDayType.two": "Second", + "repaymentFrequency.nthDayType.three": "Third", + "repaymentFrequency.nthDayType.four": "Fourth", + "repaymentFrequency.nthDayType.last": "Last", + "repaymentFrequency.weekDayType.sunday": "SUNDAY", + "repaymentFrequency.weekDayType.monday": "MONDAY", + "repaymentFrequency.weekDayType.tuesday": "TUESDAY", + "repaymentFrequency.weekDayType.wednesday": "WEDNESDAY", + "repaymentFrequency.weekDayType.thursday": "THURSDAY", + "repaymentFrequency.weekDayType.friday": "FRIDAY", + "repaymentFrequency.weekDayType.saturday": "SATURDAY", + "interestRateFrequency.periodFrequencyType.days": "Per Day", + "interestRateFrequency.periodFrequencyType.weeks": "Per Week", + "interestRateFrequency.periodFrequencyType.months": "Per month", + "interestRateFrequency.periodFrequencyType.years": "Per year", + "interestRateFrequency.periodFrequencyType.whole_term": "Whole term", + "interestRateFrequency.periodFrequencyType.invalid": "Invalid", + "interestType.flat": "Flat", + "interestType.declining.balance": "Declining Balance", + "amortizationType.equal.installments": "Equal installments", + "amortizationType.equal.principal": "Equal principal payments", + "interestCalculationPeriodType.daily": "Daily", + "interestCalculationPeriodType.same.as.repayment.period": "Same as repayment period", + "mifos-standard-strategy": "Penalties, Fees, Interest, Principal order", + "rbi-india-strategy": "Overdue/Due Fee/Int,Principal", + "principal-interest-penalties-fees-order-strategy": "Principal, Interest, Penalties, Fees Order", + "interest-principal-penalties-fees-order-strategy": "Interest, Principal, Penalties, Fees Order", + "early-repayment-strategy": "Early Repayment Strategy", + "heavensfamily-strategy": "HeavensFamily Unique", + "creocore-strategy": "Creocore Unique", + "validation.msg.loan.description.cannot.be.blank": "Description cannot be blank", + "DaysInYearType.actual": "Actual", + "DaysInYearType.days360": "360 Days", + "DaysInYearType.days364": "364 Days", + "DaysInYearType.days365": "365 Days", + "DaysInYearType.invalid": "Invalid", + "DaysInMonthType.actual": "Actual", + "DaysInMonthType.days360": "30 Days", + "update.loan.arrears.ageing": "4. Update Loan Arrears Ageing", + "apply.annual.fee.for.savings": "Apply Annual Fee For Savings", + "apply.holidays.to.loans": "1. Apply Holidays To Loans", + "post.interest.for.savings": "Post Interest For Savings", + "transfer.fee.for.loans.from.savings": "Transfer Fee For Loans From Savings", + "pay.due.savings.charges": "Pay Due Savings Charges", + "update.accounting.running.balances": "10. Update Accounting Running Balances", + "execute.standing.instruction": "Execute Standing Instruction", + "add.accrual.transactions": "6. Add Accrual Transactions", + "apply.penalty.to.overdue.loans": "2. Apply penalty to overdue loans", + "update.non.performing.assets": "3. Update Non Performing Assets", + "transfer.interest.to.savings": "Transfer Interest To Savings", + "update.deposit.accounts.maturity.details": "Update Deposit Accounts Maturity details", + "add.periodic.accrual.transactions": "8. Add Periodic Accrual Transactions", + "recalculate.interest.for.loans": "5. Recalculate Interest For Loans", + "generate.mandatory.savings.schedule": "Generate Mandatory Savings Schedule", + "generate.loan.loss.provisioning": "9. Generate Loan Loss Provisioning", + "post.dividends.for.shares": "Post Dividends For Shares", + "update.savings.dormant.accounts": "Update Savings Dormant Accounts", + "add.accrual.transactions.for.loans.with.income.posted.as.transactions": "7. Add Accrual Transactions For Loans With Income Posted As Transactions", + "execute.report.mailing.jobs": "Execute Report Mailing Jobs", + "update.sms.outbound.with.campaign.message": "Update SMS Outbound with Campaign Message", + "send.messages.to.sms.gateway": "Send Messages to SMS Gateway", + "get.delivery.reports.from.sms.gateway": "Get Delivery Reports from SMS Gateway", + "execute.email": "Execute Email", + "update.email.outbound.with.campaign.message": "Update Email Outbound with campaign message", + "generate.adhocclient.schedule": "Generate AdhocClient Schedule", + "update.trial.balance.details": "11. Update Trial Balance Details", + "execute.all.dirty.jobs": "Execute All Dirty Jobs", + "increase.business.date.by.1.day": "Increase Business Date by 1 day", + "increase.cob.date.by.1.day": "Increase COB Date by 1 day", + "disable.expired.prequalifications": "12. Disable Expired Prequalifications", + "import.batches.of.loan.repayments": "13. Import Batches of Loan Repayments", + "scheduler.status.active": "Active", + "scheduler.status.standby": "Standy", + "scheduler.job.last.run.history.success": "Success", + "scheduler.job.last.run.history.failed": "Failed", + "scheduler.job.last.run.history.pending": "Failed", + "scheduler.job.last.run.history.error": "Error", + "scheduler.job.last.run.history.invalid": "invalid", + "label.heading.execution.order": "Execution Order", + "label.heading.usersList": "List of Users", "----End---": "--End of file--- " } diff --git a/app/global-translations/locale-es.json b/app/global-translations/locale-es.json index 8400c2c40f..d5288dbbcd 100644 --- a/app/global-translations/locale-es.json +++ b/app/global-translations/locale-es.json @@ -74,7 +74,7 @@ "label.heading.loanaccount": "Cuenta de préstamo", "label.heading.type": "Tipo", "label.heading.category": "Categoría", - "label.heading.balance": "Balance", + "label.heading.balance": "Saldo", "label.heading.viewreceipts": "Ver recibo", "label.heading.savingaccount": "Cuenta de Ahorros", "label.heading.description": "Descripción", @@ -400,7 +400,7 @@ "label.button.proceed": "Continuar", "label.button.addAddress": "Agregar dirección", "label.button.hardpolicychecklist": "Check list de políticas duras", - "label.button.prequalification.buralValidation": "Validar Buros", + "label.button.prequalification.buralValidation": "Validar Burós", "label.heading.hardpolicychecklist": "Check list de políticas duras", "label.uniquelyidentifiedwithid": "Exclusivamente identificado con Id", "label.belongsto": "Pertenece a", @@ -528,6 +528,7 @@ "error.msg.loan.close.cannot.be.undone.before.client.transfer.date": "La fecha en que el préstamo es pagado en su totalidad no puede ser anterior a la fecha de transferencia del cliente de ({{params[0].value}})", "error.msg.loan.repayment.or.waiver.account.is.not.active": "Cuenta de préstamo no está activa", "error.msg.center.group.meeting.times.collision": "Grupo central `{{params[0].value}}` con id `{{params[1].value}}` En el centro de destino tiene una reunión colisionante en un tiempo determinado: `{{params[2].value}}` - {{params[3].value}}", + "error.msg.payment.amount.not.enough.invalid": "El pago del monto `{{params[0].value}}` no es suficiente para cubrir el saldo del préstamo de `{{params[1].value}}` y liberar el monto garantizado de `{{params[2]. valor}}`", "validation.msg.floatingrate.ratePeriods.cannot.be.empty": "Flotante de periodos de tasa no puede estar vacío", "validation.msg.floatingrate.fromDate.is.less.than.date": "Flotante de tarifas por períodos de fecha debe ser mayor que fecha actual", "validation.msg.floatingrate.isBaseLendingRate.baselendingrate.duplicate": "Tasa de interés ya está definida", @@ -667,13 +668,14 @@ "label.input.age.limit.block.message": "El cliente es mayor que el límite de edad para este producto de préstamo: ", "label.input.years": "Años", "label.input.totalLoanAmount": "Monto del préstamo", + "label.input.loanAmountValue": "Valor recibido", "label.input.totalLoanBalance": "Balance de prestamo", "label.input.totalGuaranteedLoanBalance": "Saldo del préstamo garantizado", "label.input.noOfCycles": "Ciclos", "label.input.additionalCreditsCount": "Recuento de créditos adicionales", "label.input.additionalCreditsSum": "Suma de créditos adicionales", "label.input.loanCycle":"Ciclo de prestamo", - "label.input.bureau.status": "Buros", + "label.input.bureau.status": "Burós", "label.addtoblacklist": "Agregar Persona", "label.search.scope.all": "Todo", "label.search.scope.clients.and.clientIdentifiers": "Clientes", @@ -752,7 +754,7 @@ "label.input.selectexcelfile": "Seleccionar un archivo de Excel", "label.input.documenttype": "Tipo de documento", "label.input.uniqueidentification": "N.º identificador único", - "label.input.mobilenumber": "Número de teléfono móvil", + "label.input.mobilenumber": "No. de Celular Clienta", "label.input.client.activationdate": "Fecha de activación", "label.input.client.creationdate": "Fecha de creación", "label.input.rejectiondate": "Fecha de rechazo", @@ -924,10 +926,10 @@ "label.input.revisedmeetingdates": "Fechas de reuniones revisadas", "label.input.error": "Error", "label.input.invaliddaterange": "Selecciona un intervalo de fechas válido", - "label.input.agencyid": "identificador de agencia", + "label.input.agencyid": "Identificador de agencia", "label.input.agency": "Seleccionar de agencia", "label.input.work.with.puente": "Ya trabajo con Puente?", - "label.input.amount.requested": "Monto solicitada", + "label.input.amount.requested": "Monto solicitado", "label.input.amount.approved": "Monto aprobado", "label.button.creategroup": "Crear grupo", "label.button.groupsavingapplication": "Grupo de solicitud de ahorro", @@ -1275,7 +1277,7 @@ "label.heading.blacklist.clients": "Clientes en lista negra", "label.input.portfolio": "Seleccionar de Cartera", "label.input.typification": "Tipificación", - "label.input.year": "año", + "label.input.year": "Año", "label.input.select.center": "Seleccionar Centro", "label.heading.balancesheet": "Balance general", "label.heading.incomes": "Ingresos", @@ -1410,7 +1412,7 @@ "label.heading.paiddate": "Fecha de pago", "label.heading.totaldue": "Total debido", "label.heading.balanceofloan": "Saldo del préstamo", - "label.heading.breakdown": "Romper", + "label.heading.breakdown": "Desglose", "label.heading.loancollaterals": "Garantía del préstamo", "label.heading.enterpaymentdate": "Introduzca la fecha de pago", "label.heading.loandocuments": "Documentos del préstamo", @@ -1444,7 +1446,7 @@ "label.heading.rejectloanreschedule": "Rechazar Préstamo Reprogramar", "label.heading.newrepaymentreschedule": "Nuevo Programa De Pago", "label.heading.reschulerequest": "Reschedule Petición#", - "label.heading.isTopup": "Es Préstamo nivelado?", + "label.heading.isTopup": "Es ampliación?", "label.heading.loanIdToClose": "Préstamo cerrado con complemento", "label.heading.topupAmount": "Cantidad de cierre del complemento", "label.heading.indidualcredit.prequalification": "Precalificación Crédito Individual", @@ -1505,6 +1507,8 @@ "label.anchor.unassignloanofficer": "Desasignar agente de préstamo", "label.anchor.showpaymentdetails": "Mostrar detalles de pago", "label.anchor.viewcharge": "Ver cobro", + "label.anchor.cobro": "Cobro", + "label.heading.guarantees": "Garantías", "label.anchor.viewcollateral": "Ver garantía", "label.anchor.viewschedule": "Horario", "label.anchor.loanapplication": "Nueva solicitud de préstamo", @@ -1584,7 +1588,7 @@ "label.input.applicationdate": "Fecha de Inscripción", "label.input.isTopup": "Es préstamo nivelado", "label.input.loanIdToClose": "Escoge préstamo para cerrar", - "label.input.groupPosition": "Posición en el grupo", + "label.input.groupPosition": "Cargo en el Grupo", "label.button.addloancharge": "Añadir cobro de préstamo", "label.button.addcollateral": "Añadir garantía", "label.button.guarantor": "Garante", @@ -1620,6 +1624,8 @@ "label.selectprovisioningcategory": "Seleccione Categoría", "label.selectfromdate": "Seleccionar a partir de la fecha", "label.selecttodate": "Seleccionar fecha", + "planning.type.group": "Grupo", + "planning.type.individual": "Individual", "label.tooltip.fundsource": "una cuenta de activo (normalmente bancaria o en efectivo) que se cargará durante reembolsos/pagos y se acredita mediante desembolsos.", "label.tooltip.loanportfolio": "una cuenta de activo que se cargará durante el desembolso y se acreditará en el reembolso del reembolso/cancelación principal.", "label.tooltip.receivableinterest": "una cuenta de activo que se utiliza para acumular intereses", @@ -1728,6 +1734,7 @@ "loanTransactionType.refund": "Devolución de pago en exceso", "loanTransactionType.approveTransfer": "Transferencia aprobada", "loanTransactionType.chargePayment": "Pago de cuota", + "loanTransactionType.accrual": "Devengo", "loanStatusType.transfer.on.hold": "Transferencia en espera", "loanStatusType.invalid": "Estado no válido", "loanStatusType.submitted.and.pending.approval": "Presentado y pendiente de aprobación", @@ -1912,6 +1919,7 @@ "label.heading.withdrawalfeefortransfers": "Aplica cuota de retiro para las transferencias", "label.heading.decimalplaces": "Lugares decimales", "label.heading.charges": "Cargos", + "label.heading.feevalue": "Valor de la cuota", "label.heading.inactivatecharge": "Inactivar cargo", "label.heading.collectedon": "Recaudado el", "label.heading.transactionid": "Identificador de la transacción", @@ -2005,7 +2013,7 @@ "label.input.equityaccount": "La Equidad De La Cuenta", "label.input.allowdividendsforinactiveclients": "Permitir a los dividendos para los clientes inactivos", "label.input.marketpriceperiods": "Periodos de precio del mercado", - "label.input.requreddate": "Fecha Solicitada", + "label.input.requreddate": "Fecha Solicitud", "label.input.currencyinmultiplesof": "Moneda en múltiplos de", "label.input.interestcompoundingperiod": "Período de capitalización de intereses", "label.input.interestpostingperiod": "Periodo de contabilización de intereses", @@ -2256,6 +2264,7 @@ "savingsAccountTransactionType.approveTransfer": "Aprobar transferencia", "savingsAccountTransactionType.withdrawTransfer": "Retirar transferencia", "savingsAccountTransactionType.rejectTransfer": "Rechazar transferencia", + "savingsAccountTransactionType.onHold": "En reserva", "savingsAccountStatusType.invalid": "Estado no válido", "savingsAccountStatusType.submitted.and.pending.approval": "Presentado y pendiente de aprobación", "savingsAccountStatusType.approved": "Aprobado", @@ -3089,7 +3098,7 @@ "label.input.principal": "Principal", "label.input.principalamount": "Monto principal", "label.input.totalinstallmentamount": "Monto de importe", - "label.input.disbursementAmount": "monto del desembolso", + "label.input.disbursementAmount": "Monto del desembolso", "label.input.balance": "Saldo Saneado", "label.input.minimum": "Mínimo", "label.input.maximum": "Máximo", @@ -3122,7 +3131,7 @@ "label.input.upfrontaccrual": "Devengo (por adelantado)", "label.input.periodicaccrual": "Devengo (periódico)", "label.input.": "Efectivo", - "label.input.fundsource": "Fuente de fondos", + "label.input.fundsource": "Origen de los Fondos", "label.input.loanportfolio": "Cartera de préstamos", "label.input.receivableinterest": "Intereses por cobrar", "label.input.receivablefees": "Comisiones por cobrar", @@ -3248,6 +3257,15 @@ "chargeCalculationType.percent.of.disbursement.amount": "% Disbursement Cantidad", "chargepaymentmode.regular": "Modo regular", "chargepaymentmode.accounttransfer": "Modo de transferencia de cuenta", + "chargeTimeType.activation": "Activación", + "chargeTimeType.sharespurchase": "Compra de participaciones", + "chargeTimeType.sharesredeem": "Redención de participaciones", + "chargeTimeType.instalmentFee": "Cargp de cuota", + "chargeTimeType.overdueInstallment": "Cuota vencida", + "chargeTimeType.weeklyFee": "Cuota semanal", + "chargeTimeType.overdraftFee": "Cargo por sobregiro", + "chargeTimeType.savingsNoActivityFee": "Cargo por inactividad de ahorros", + "chargeTimeType.tranchedisbursement": "Tranche Disbursement", "validation.msg.charge.name.cannot.be.blank": "El nombre no puede estar en blanco.", "validation.msg.charge.name.exceeds.max.length": "El nombre no puede ser más de {{params[0].value}} caracteres de largo.", "validation.msg.charge.amount.cannot.be.blank": "La cantidad no puede estar en blanco.", @@ -3511,6 +3529,7 @@ "label.heading.adhoc.search.query.for.loans": "Consulta de búsqueda AdHoc de préstamos", "label.input.adhoc.search.loans": "Préstamos", "label.input.adhoc.search.loanstatus": "Estado del préstamo", + "label.input.adhoc.search.debtstatus": "Estado de deuda", "label.input.date.filter": "Seleccione el tipo de fecha:", "label.input.adhoc.search.loanoutstanding.percentage": "Porcentaje pendiente del préstamo", "expertsearch": "Búsqueda experta", @@ -3825,7 +3844,13 @@ "label.input.clienttype": "Tipo de cliente", "label.menu.clienttype": "Seleccionar tipo de cliente", "label.input.clientclassification": "Clasificación del cliente", + "label.input.collateralAmount": "Monto de Garantía", + "label.input.netAmountReceivable": "Monto neto a cobrar", "label.menu.clientclassification": "Seleccionar clasificación del cliente", + "label.color.orange": "NARANJA", + "label.color.green": "VERDE", + "label.color.yellow": "AMARILLO", + "label.color.red": "ROJO", "label.incentive.row": "Incentivos", "label.heading.incentives": "Incentivos", "label.heading.customerattributes": "Atributos del cliente", @@ -4392,7 +4417,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", @@ -4420,9 +4445,9 @@ "label.input.lightDeviceNumber": "No. Contador Luz", "label.heading.basic": "Básico", "label.input.schoolingYears": "Años de escolarización", - "label.input.noOfChildren": "Número de niños", + "label.input.noOfChildren": "Número Hijos", "label.input.earlyCancellationReason": "Motivo de la cancelación anticipada", - "label.input.sourceOfFunds": "Fuente de fondos", + "label.input.sourceOfFunds": "Origen de los Fondos", "label.input.clientLoanRequestNumber": "Número de solicitud de préstamo del cliente", "label.input.jobtype": "Tipo de trabajo", "label.input.occupancyClassification": "Clasificación de ocupación", @@ -4432,49 +4457,54 @@ "label.input.politicalPosition": "Posición política ocupada", "label.input.politicalOffice": "Oficina Política", "label.input.rentMortgageFee": "Cuota de alquiler/hipoteca", + "label.input.rentFee": "Valor alquiler", + "label.input.mortgageFee": "Cuota casa (Hipoteca)", "label.input.populatedPlace": "Lugar poblado", "label.input.referencePoint": "Punto de referencia", - "label.input.relativeNumber": "Número de teléfono relativo", + "label.input.relativeNumber": "No. celular esposo / familiar", "label.button.show.loan.additionals": "Mostrar campos adicionales", "label.heading.contact.information": "Datos de Contacto", - "label.input.monthlyIncome": "Ingreso mensual", + "label.input.monthlyIncome": "Ingresos Mensuales", "label.input.otherIncome": "Otros ingresos", - "label.input.familyExpenses": "Gastos familiares", + "label.input.familyExpenses": "Gastos Familiares (diferentes al alquiler vivienda)", "label.input.currentLoans": "Préstamos vigentes", "label.input.institutionName": "Nombre de la institución", "label.input.institutionType": "Tipo de institución", "label.heading.currentLoanDetails": "Detalles del préstamo actual", "label.input.totalLoanBalances": "Saldos totales de préstamos", + "label.input.totalBalances": "Total de saldos", "label.input.totalCharges": "Cuotas totales", - "label.input.houseHoldGoods": "Artículos para el hogar", + "label.input.totalInstallments": "Total de cuotas", + "label.input.houseHoldGoods": "Bienes del Hogar (Quetzales)", "label.input.businessActivity": "Actividad(es) de Negocio", "label.input.salesValue": "Valor de ventas", "label.input.businessLocation": "Ubicación del negocio", "label.input.loanPurpose": "Propósito del préstamo", "label.input.currentCreditValue": "Valor de crédito actual", "label.input.requestedValue": "Valor solicitado por el cliente", - "label.input.groupAuthorizedValue": "Valor autorizado del grupo", + "label.input.groupAuthorizedValue": "Valor Autorizado por el Grupo", "label.input.facilitatorProposedValue": "Valor propuesto por el facilitador", - "label.input.proposedFee": "Tarifa propuesta", - "label.input.agencyAuthorizedAmount": "Cantidad autorizada por la agencia", - "label.input.authorizedFee": "Tarifa autorizada", - "label.input.businessPurchases": "Compras comerciales", - "label.input.businessProfit": "Beneficio empresarial", - "label.input.clientProfit": "Beneficio según cliente", + "label.input.proposedFee": "Cuota propuesta", + "label.input.agencyAuthorizedAmount": "Monto autorizado Jefe de Agencia", + "label.input.authorizedFee": "Cuota autorizada", + "label.input.businessPurchases": "Compras del negocio", + "label.input.businessProfit": "Ganancia del negocio", + "label.input.clientProfit": "Ganancia Según cliente", "label.input.inventories": "Inventarios(Valor en efectivo)", "label.input.visitBusiness": "¿Visitas el negocio?", - "label.input.familySupport": "¿Apoyo familiar?", + "label.input.familySupport": "¿Apoyo esposo o familia?", "label.input.businessEvolution": "Evolución del negocio", - "label.input.numberOfApprovals": "Nº de aprobaciones", - "label.input.recommenderName": "Nombre del solicitante que aprueba", - "label.input.monthlyPaymentCapacity": "Capacidad de pago mensual", + "label.input.numberOfApprovals": "No. Aprobaciones BC", + "label.input.recommenderName": "Nombre Solicitante que la recomienda", + "label.input.monthlyPaymentCapacity": "¿Cuánto puede pagar de cuota al Mes?", "label.input.paidCapacity": "Capacidad de Pago", - "label.input.facValue": "FAC", - "label.input.debtLevel": "Nivel de deuda", - "label.input.businessExperience": "Experiencia de tiempo en los negocios", - "label.input.totalIncome": "Ingresos totales", - "label.input.totalExpenditures": "Gastos Totales", - "label.input.availableMonthly": "Disponible mensualmente", + "label.input.facValue": "Préstamo Fac ÷ Inventario", + "label.input.debtLevel": "Nivel de Endeudamiento", + "label.input.businessExperience": "Tiempo experiencia en el negocio", + "label.input.totalIncome": "Total ingresos", + "label.input.totalExpenditures": "Total Egresos", + "label.input.availableMonthly": "Disponible mensual", + "label.input.paymentCapacity": "Capacidad de pago", "label.heading.financialData": "Datos Financieros", "label.heading.creditRequest": "Solicitud de crédito", "label.heading.analysis": "Análisis", @@ -4502,7 +4532,7 @@ "label.button.prequalification.submitToReview": "Enviar a Revisión", "label.button.prequalification.sendToAnalysis": "Enviar a Unidad de Analisis", "label.button.prequalification.sendtoexception": "Enviar a Aprobación por Excepción", - "label.button.hardpolicyvalidations": "Ver validaciones de políticas estrictas", + "label.button.hardpolicyvalidations": "Ver validaciones de políticas duras", "label.category.newclient": "Categorización de clienta nueva", "label.category.recurringcustomer": "Categorización de clienta recurrente", "label.category.increasepercentage": "Porcentaje de incremento", @@ -4533,9 +4563,9 @@ "label.category.newclientsacceptance": "Aceptación de clientas nuevas", "label.heading.groupcredit.prequalification": "Precalificación de crédito grupal", "label.heading.editgroup.prequalification": "Editar precalificación", - "label.heading.view.prequalification": "View Prequalification", - "label.heading.group.hard.policies": "Políticas estrictas del grupo", - "label.heading.members.hard.policies": "Políticas estrictas para los miembros", + "label.heading.view.prequalification": "Ver Precalificación", + "label.heading.group.hard.policies": "Políticas duras del grupo", + "label.heading.members.hard.policies": "Políticas duras para los miembros", "label.anchor.bankcheques": "Cheques bancarios", "label.view.bankcheques": "Gestionar cheques bancarios", "label.heading.chequebatch": "lote de cheques bancarios", @@ -4546,7 +4576,7 @@ "label.heading.bank.name": "Nombre del banco", "label.heading.bank.account.name": "Nombre de la cuenta", "label.heading.bank.agency.name": "Nombre de agencia", - "label.heading.cheque.from": "Hesde Cheque", + "label.heading.cheque.from": "Desde Cheque", "label.heading.cheque.to": "Hasta Cheque", "label.button.add.batch": "Agregar lote", "label.button.edit.batch": "Editar lote", @@ -4573,8 +4603,8 @@ "label.heading.old.chequeNo": "cheque antiguon", "label.heading.new.chequeNo": "Nuevo cheque", "label.select.new.cheque": "Seleccionar nuevo cheque", - "label.anchor.disburse.loans.by.cheques": "“Desembolsar Prestamos con cheques", - "label.view.disburse.loans.by.cheques": "Desembolsar múltiples préstamos mediante cheques", + "label.anchor.disburse.loans.by.cheques": "Asignar cheques a préstamos", + "label.view.disburse.loans.by.cheques": "Asignar cheques a préstamos", "label.menu.disbursementmethod": "Método de desembolso", "label.heading.isindividualbusinessloan": "¿Es un préstamo comercial individual?", "label.input.isindividualbusinessloan": "¿Es un préstamo comercial individual?", @@ -4608,21 +4638,22 @@ "validation.msg.charge.adminFeeRate.cannot.be.blank": "Debe ingresar los rangos para cuota administrativa", "validation.msg.bank.code.exceeds.max.length": "El código de banco excede el máximo de caracteres permitidos.", "label.heading.bankAccNo": "Número de cuenta bancaria", - "label.button.approve.issuance.cheque": "Aprobar emisión", - "label.anchor.approve.cheques.issuance": "Aprobar emisión de cheques", - "label.view.approve.cheques.issuance": "Aprobar la emisión de múltiples cheques", + "label.button.approve.issuance.cheque": "Autorizar emisión", + "label.anchor.approve.cheques.issuance": "Autorizar emisión de cheques", + "label.view.approve.cheques.issuance": "Autorizar la emisión de múltiples cheques", "label.heading.exceptions.queue": "Cola de excepciones", - "label.button.authorize.issuance.cheque": "Autorizar emisión", - "label.anchor.authorize.cheques.issuance": "Autorizar emisión de cheques", - "label.view.authorize.cheques.issuance": "Autorizar la emisión de múltiples cheques", - "label.button.print.cheques": "Imprimir cheques", - "label.anchor.print.cheques": "Imprimir cheques", + "label.button.authorize.issuance.cheque": "Autorizar impresión", + "label.anchor.authorize.cheques.issuance": "Autorizar impresión de cheques", + "label.view.authorize.cheques.issuance": "Autorizar impresión de cheques múltiples", + "label.button.print.cheques": "Imprimir cheques (con desembolso)", + "label.anchor.print.cheques": "Imprimir cheques (con desembolso)", "label.view.print.cheques": "Imprimir múltiples cheques bancarios", - "label.anchor.pay.guarantees.by.cheques": "Garantías de pago mediante cheques", - "label.view.pay.guarantees.by.cheques": "Pague múltiples garantías mediante chequess", - "label.heading.pay.guarantees.by.cheques": "Garantías de pago mediante cheques", + "label.anchor.pay.guarantees.by.cheques": "Pago de Garantías mediante cheques", + "label.view.pay.guarantees.by.cheques": "Pagar múltiples garantías mediante cheques", + "label.heading.pay.guarantees.by.cheques": "Pago de Garantías mediante cheques", "label.input.searchbycaseid": "Buscar por ID de caso", - "label.heading.withdrawalreason": "motivo de retiro", + "label.heading.withdrawalreason": "Motivo de retiro", + "label.heading.requestedAmount": "Monto requerido", "label.heading.caseid": "Case ID", "label.input.cheque.agency": "Seleccionar agencia de cheques", "label.input.loan.agency": "Seleccionar agencia de préstamos", @@ -4650,7 +4681,7 @@ "error.msg.committee.user.already.assigned": "El usuario `{{params[0].value}}` ya está asignado a un comité", "confirmation.message.first.part.one": "¿Está seguro de que desea ", "confirmation.message.first.part.two": " esta precalificación?", - "label.button.issue.cheque": "Emitir e imprimir", + "label.button.disburse.and.print.cheque": "Imprimir", "label.button.validate.blacklist": "validar lista negra", "label.input.blacklist.status": "Lista negra", "label.validate.hard.policy": "Validar Política Dura", @@ -4665,10 +4696,8 @@ "label.input.select.prequalification": "Seleccionar Precalificación", "error.msg.prequalification.member.not.selected.exception": "Seleccione al menos una miembro para aprobar el préstamo", "error.msg.prequalification.submitted.loan.not.found.exception": "No se encontró ningún préstamo en estado enviado y pendiente de aprobación", - "label.heading.additionals": "Adicionales", "label.heading.additional.property.name": "Nombre del campo", "label.heading.additional.property.value": "Valor de campo", - "label.description.additional.ciclosCancelados": "Ciclos cancelados", "label.description.additional.id": "Identificación", "label.description.additional.caseId": "Identificación del caso", @@ -4723,7 +4752,7 @@ "label.description.additional.familiares":"Nucleo familiar", "label.description.additional.fechaPrimeraReunion":"Fecha primera reunión", "label.description.additional.flujoDisponible":"Flujo disponible", - "label.description.additional.garantiaPrestamo":"Garantia del prestamo", + "label.description.additional.garantiaPrestamo":"Garantía del préstamo", "label.description.additional.gastosFamiliares":"Gastos familiares", "label.description.additional.gastosNegocio":"Gastos del negocio", "label.description.additional.herramientas":"Valor en herramientas", @@ -4759,7 +4788,7 @@ "label.description.additional.salarioCliente":"Salario del cliente", "label.description.additional.salarios":"Salarios", "label.description.additional.salud":"Estado de salud", - "label.description.additional.salud":"Servicios basicos", + "label.description.additional.salud":"Servicios básicos", "label.description.additional.serviciosGasto":"Gasto por servicios", "label.description.additional.serviciosMedicos":"Servicios medicos", "label.description.additional.tarjetas":"tarjetas de crédito", @@ -4926,6 +4955,165 @@ "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": "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", + "bank.cheque.status.available":"Disponible", + "bank.cheque.status.issued": "Emitido", + "bank.cheque.status.canceled": "Anulado", + "bank.cheque.status.pending.cancellation": "Pendiente de anulación", + "bank.cheque.status.pending.issuance": "Pendiente de emisión", + "bank.cheque.status.pending.authorization.by.accounting": "Pendiente de Autorización por Contabilidad", + "bank.cheque.status.ready.to.be.printed": "Listo para impresión", + "error.msg.cheque.guarantee.savings.account.not.found": "Cuenta de ahorro de garantía no encontrada", + "error.msg.cheque.guarantee.amount.greater.than.available.savings.account.balance": "El monto de la garantía es mayor que el saldo disponible de la cuenta de ahorros", + "label.heading.centerRange": "Rango y Dia", + "label.heading.member.buro.result": "Resultado de Buro", + "label.heading.buro.name": "Nombre Buró", + "label.heading.buro.identification.type": "Tipo de identificación", + "label.heading.buro.identification.number": "Identificación Número", + "label.heading.buro.identification.status": "Identificación Estado", + "label.heading.buro.date": "Buró Fecha", + "label.heading.buro.Cuentas": "Buró Cuentas", + "label.heading.buro.Clasificacion": "Buró Clasificación", + "label.heading.buro.Resumen": "Buró Resumen", + "buro.check.classification.grey": "Gris", + "buro.check.classification.green": "Verde", + "buro.check.classification.yellow": "Amarillo", + "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", + "label.heading.list.of.clients": "Lista de Clientes", + "label.heading.list.of.groups": "Lista de Grupos", + "label.heading.list.of.centers": "Lista de Centros", + "label.input.billnumber": "Número de factura", + "label.heading.billnumber": "Número de factura", + "label.view.principalpaymentdetail": "Pago principal", + "label.view.interestspayment": "Pago de intereses", + "loanTermFrequency.periodFrequencyType.days": "Días", + "loanTermFrequency.periodFrequencyType.weeks": "Semanas", + "loanTermFrequency.periodFrequencyType.months": "Meses", + "loanTermFrequency.periodFrequencyType.years": "Años", + "label.heading.on": "en", + "repaymentFrequency.nthDayType.one": "Primero", + "repaymentFrequency.nthDayType.two": "Segundo", + "repaymentFrequency.nthDayType.three": "Tercero", + "repaymentFrequency.nthDayType.four": "Cuarto", + "repaymentFrequency.nthDayType.last": "Último", + "repaymentFrequency.weekDayType.sunday": "DOMINGO", + "repaymentFrequency.weekDayType.monday": "LUNES", + "repaymentFrequency.weekDayType.tuesday": "MARTES", + "repaymentFrequency.weekDayType.wednesday": "MIÉRCOLES", + "repaymentFrequency.weekDayType.thursday": "JUEVES", + "repaymentFrequency.weekDayType.friday": "VIERNES", + "repaymentFrequency.weekDayType.saturday": "SÁBADO", + "interestRateFrequency.periodFrequencyType.days": "Por día", + "interestRateFrequency.periodFrequencyType.weeks": "Por semana", + "interestRateFrequency.periodFrequencyType.months": "Por mes", + "interestRateFrequency.periodFrequencyType.years": "Por año", + "interestRateFrequency.periodFrequencyType.whole_term": "Término completo", + "interestRateFrequency.periodFrequencyType.invalid": "Inválido", + "label.input.isequalamortization": "¿Es igual la amortización?", + "interestType.flat": "Plano", + "interestType.declining.balance": "Saldo decreciente", + "amortizationType.equal.installments": "Cuotas iguales", + "amortizationType.equal.principal": "Pagos iguales de principal", + "interestCalculationPeriodType.daily": "A diario", + "interestCalculationPeriodType.same.as.repayment.period": "Lo mismo que el período de amortización", + "mifos-standard-strategy": "Sanciones, Tarifas, Intereses, Orden principal", + "rbi-india-strategy": "Vencido/tarifa vencida/int,principal", + "principal-interest-penalties-fees-order-strategy": "Orden de capital, intereses, sanciones y comisiones", + "interest-principal-penalties-fees-order-strategy": "Intereses, Principal, Sanciones, Orden de Honorarios", + "early-repayment-strategy": "Estrategia de amortización anticipada", + "heavensfamily-strategy": "Cielos familia único", + "creocore-strategy": "Creocore único", + "validation.msg.loan.description.cannot.be.blank": "La descripción no puede estar en blanco", + "DaysInYearType.actual": "Actual", + "DaysInYearType.days360": "360 días", + "DaysInYearType.days364": "364 días", + "DaysInYearType.days365": "365 dias", + "DaysInYearType.invalid": "Invalid", + "update.loan.arrears.ageing": "4. Actualizar la antigüedad de los atrasos en los préstamos", + "apply.annual.fee.for.savings": "Aplicar tarifa anual para ahorros", + "apply.holidays.to.loans": "1. Aplicar días festivos a préstamos", + "post.interest.for.savings": "Publicar intereses para ahorros", + "transfer.fee.for.loans.from.savings": "Tarifa de transferencia para préstamos de ahorros", + "pay.due.savings.charges": "Pagar los cargos de ahorro adeudados", + "update.accounting.running.balances": "10. Actualizar saldos corrientes contables", + "execute.standing.instruction": "Ejecutar instrucción permanente", + "add.accrual.transactions": "6. Agregar transacciones de acumulación", + "apply.penalty.to.overdue.loans": "2. Aplicar penalización a préstamos vencidos", + "update.non.performing.assets": "3. Actualizar activos improductivos", + "transfer.interest.to.savings": "Transferir intereses a ahorros", + "update.deposit.accounts.maturity.details": "Actualizar detalles de vencimiento de cuentas de depósito", + "add.periodic.accrual.transactions": "8. Agregar transacciones de acumulación periódica", + "recalculate.interest.for.loans": "5. Recalcular el interés de los préstamos", + "generate.mandatory.savings.schedule": "Generar Cronograma de Ahorro Obligatorio", + "generate.loan.loss.provisioning": "9. Generar provisiones para pérdidas crediticias", + "post.dividends.for.shares": "Publicar dividendos para acciones", + "update.savings.dormant.accounts": "Actualizar cuentas de ahorro inactivas", + "add.accrual.transactions.for.loans.with.income.posted.as.transactions": "7. Agregar transacciones de acumulación para préstamos con ingresos contabilizados como transacciones", + "execute.report.mailing.jobs": "Ejecutar trabajos de envío de informes", + "update.sms.outbound.with.campaign.message": "Actualizar SMS salientes con mensaje de campaña", + "send.messages.to.sms.gateway": "Enviar mensajes a la puerta de enlace SMS", + "get.delivery.reports.from.sms.gateway": "Obtenga informes de entrega desde SMS Gateway", + "execute.email": "Ejecutar correo electrónico", + "update.email.outbound.with.campaign.message": "Actualizar correo electrónico saliente con mensaje de campaña", + "generate.adhocclient.schedule": "Generar programación AdhocClient", + "update.trial.balance.details": "11. Actualizar detalles del balance general", + "execute.all.dirty.jobs": "Ejecutar todos los trabajos sucios", + "increase.business.date.by.1.day": "Aumentar la fecha comercial en 1 día", + "increase.cob.date.by.1.day": "Aumentar la fecha COB en 1 día", + "disable.expired.prequalifications": "12. Deshabilitar precalificaciones vencidas", + "import.batches.of.loan.repayments": "13. Importar lotes de reembolsos de préstamos", + "scheduler.status.active": "Activo", + "scheduler.status.standby": "Apoyar", + "scheduler.job.last.run.history.success": "Éxito", + "scheduler.job.last.run.history.failed": "Fallido", + "scheduler.job.last.run.history.pending": "Pendiente", + "scheduler.job.last.run.history.error": "Error", + "scheduler.job.last.run.history.invalid": "Inválido", + "label.heading.execution.order": "Orden de ejecución", + "savingsAccountTransactionType.deposit": "Depósito", + "savingsAccountTransactionType.withdrawal": "Retiro", + "savingsAccountTransactionType.interestPosting": "Contabilización de intereses", + "savingsAccountTransactionType.withdrawalFee": "Cargo por retiro", + "savingsAccountTransactionType.annualFee": "Cuota anual", + "savingsAccountTransactionType.initiateTransfer": "Iniciar transferencia", + "savingsAccountTransactionType.approveTransfer": "Aprobar transferencia", + "savingsAccountTransactionType.withdrawTransfer": "Retirar transferencia", + "savingsAccountTransactionType.rejectTransfer": "Rechazar transferencia", + "savingsAccountTransactionType.accrualInterestPosting": "Intereses devengados", + "savingsAccountTransactionType.release": "Liberación de monto", + "savingsAccountStatusType.invalid": "Estado no válido", + "savingsAccountStatusType.submitted.and.pending.approval": "Presentado y pendiente de aprobación", + "savingsAccountStatusType.approved": "Aprobado", + "savingsAccountStatusType.active": "Activo", + "savingsAccountStatusType.withdrawn.by.applicant": "Retirado por solicitante", + "savingsAccountStatusType.rejected": "Rechazado", + "savingsAccountStatusType.closed": "Cerrado", + "savingsAccountStatusType.transfer.in.progress": "Transferencia en proceso", + "savingsAccountStatusType.transfer.on.hold": "Transferencia en espera", + "label.heading.balancehold": "Balance en Reserva", + "label.button.hold": "Reserva", + "label.heading.lienTransaction": "Transacción de Gravamen", + "label.heading.numberOfRepayments": "# de Pagos", + "label.heading.numberOfMissedPayments": "# de Pagos Perdidos", + "penalty": "Penalidad", + "fee": "Cargo", + "label.heading.usersList": "Usuarios", + "label.heading.system": "Sistema", + "label.heading.organization": "Organización", + "label.heading.products": "Productos", + "label.heading.templateList": "Plantillas", + "error.msg.mobile.service.provider.not.available": "Proveedor de servicios externos (Buro) no disponible", "----End---": "---Fin del archivo---" } diff --git a/app/scripts/controllers/bank/bankcheques/ApproveChequesIssuanceController.js b/app/scripts/controllers/bank/bankcheques/ApproveChequesIssuanceController.js index 70c8fcc910..209adbb5b5 100644 --- a/app/scripts/controllers/bank/bankcheques/ApproveChequesIssuanceController.js +++ b/app/scripts/controllers/bank/bankcheques/ApproveChequesIssuanceController.js @@ -2,13 +2,44 @@ mifosX.controllers = _.extend(module, { ApproveChequesIssuanceController: function (scope, routeParams, route, location, resourceFactory, http, $uibModal, API_VERSION, $timeout, $rootScope, Upload) { - resourceFactory.chequeBatchTemplateResource.get({}, function (data) { - scope.statusOptions = data.statusOptions; - scope.agencyOptions = data.agencyOptions; - }); + scope.bankAccountOptions = []; + resourceFactory.chequeBatchTemplateResource.get({}, function (data) { + scope.statusOptions = data.statusOptions; + scope.agencyOptions = data.agencyOptions; + scope.facilitatorOptions = data.facilitatorOptions; + scope.centerOptions = data.centerOptions; + scope.allGroupOptions = data.groupOptions; + scope.groupOptions = data.groupOptions; + scope.allCenterGroupOptions = data.groupOptions; + }); - scope.routeTo = function (chequeId, batchId){ - location.path('/viewdetails/' + chequeId + '/cheque/' + batchId); + scope.filterGroups = function () { + if (this.formData.centerId){ + scope.groupOptions = []; + for (var i in scope.allGroupOptions) { + if (scope.allGroupOptions[i].centerId == scope.formData.centerId) { + scope.groupOptions.push(scope.allGroupOptions[i]); + } + } + }else { + scope.groupOptions = scope.allGroupOptions; + } + + } + + resourceFactory.bankAccountResource.getAllBankAccounts({}, function (data) { + scope.totalBankAccounts = data.totalFilteredRecords; + scope.bankAccountOptions = data.pageItems; + for (var i = 0; i < scope.bankAccountOptions.length; i++) { + var accountName = scope.bankAccountOptions[i].accountNumber + ' - ' + scope.bankAccountOptions[i].agency.name; + scope.bankAccountOptions[i].accountName = accountName; + } + + }); + + + scope.routeTo = function (chequeId, batchId) { + location.path('/viewdetails/' + chequeId + '/cheque/' + batchId); }; scope.cheques = []; @@ -18,12 +49,18 @@ scope.isAllChequesSelected = false; scope.disableApproveButton = true; scope.getResultsPage = function (pageNumber) { - resourceFactory.searchChequeResource.get({ + resourceFactory.searchChequeResource.get({ offset: ((pageNumber - 1) * scope.chequesPerPage), limit: scope.chequesPerPage, orderBy: 'chequeNo', sortOrder: 'ASC', + to: scope.formData.to, + from: scope.formData.from, + centerId: scope.formData.centerId, + groupId: scope.formData.groupId, + facilitatorId: scope.formData.facilitatorId, bankAccNo: scope.formData.bankAccNo, + bankAccId: scope.formData.bankAccId, chequeNo: scope.formData.chequeNo, agencyId: scope.formData.agencyId, status: scope.formData.status @@ -31,43 +68,67 @@ scope.totalCheques = data.totalFilteredRecords; scope.cheques = data.pageItems; scope.isAllChequesSelected = false; - }); + }); } + scope.$watch('formData.bankAccId',function(){ + delete scope.formData.agencyName; + delete scope.formData.bankName; + for (var i = 0; i < scope.bankAccountOptions.length; i++ ){ + if(scope.bankAccountOptions[i].id === scope.formData.bankAccId){ + scope.formData.agencyName = scope.bankAccountOptions[i].agency.name; + scope.formData.bankName = scope.bankAccountOptions[i].bank.name; + } + } + }); + + scope.$watch('formData.centerId',function(){ + var selectedCenterGroupOptions = []; + if(scope.formData.centerId){ + var centerGroupOptions = []; + for (var i = 0; i < scope.groupOptions.length; i++ ){ + selectedCenterGroupOptions.push(scope.groupOptions[i]); + } + scope.groupOptions = selectedCenterGroupOptions; + } else { + scope.groupOptions = scope.allCenterGroupOptions; + } + }); + scope.search = function () { - scope.getResultsPage(1); + scope.getResultsPage(1); } - scope.selectAllCheques = function(){ - for (var i = 0; i < scope.cheques.length; i++ ){ - scope.cheques[i].isSelected = scope.isAllChequesSelected; + scope.selectAllCheques = function () { + for (var i = 0; i < scope.cheques.length; i++) { + scope.cheques[i].isSelected = scope.isAllChequesSelected; } } - scope.isApproveBtnDisabled = function(){ - var ret = true; - for (var i = 0; i < scope.cheques.length; i++ ){ - if(scope.cheques[i].isSelected){ - ret = false; - break; - } - } - return ret; + scope.isApproveBtnDisabled = function () { + var ret = true; + for (var i = 0; i < scope.cheques.length; i++) { + if (scope.cheques[i].isSelected) { + ret = false; + break; + } + } + return ret; } - scope.submit = function (){ - var selectedCheques = []; - for(var i = 0; i < scope.cheques.length; i++){ - if(scope.cheques[i].isSelected){ - var selectedCheque = { - chequeId: scope.cheques[i].id - } - selectedCheques.push(selectedCheque); + scope.submit = function () { + var selectedCheques = []; + for (var i = 0; i < scope.cheques.length; i++) { + if (scope.cheques[i].isSelected) { + var selectedCheque = { + chequeId: scope.cheques[i].id } - } - resourceFactory.chequeBatchResource.approveIssuance({ commandParam: 'approveissuance'}, selectedCheques, function (data) { - route.reload(); - }); + selectedCheques.push(selectedCheque); + } + } + resourceFactory.chequeBatchResource.approveIssuance({commandParam: 'approveissuance'}, selectedCheques, function (data) { + route.reload(); + }); } } diff --git a/app/scripts/controllers/bank/bankcheques/AuthorizeChequesIssuanceController.js b/app/scripts/controllers/bank/bankcheques/AuthorizeChequesIssuanceController.js index 118af4ac64..7f97d871ad 100644 --- a/app/scripts/controllers/bank/bankcheques/AuthorizeChequesIssuanceController.js +++ b/app/scripts/controllers/bank/bankcheques/AuthorizeChequesIssuanceController.js @@ -8,6 +8,7 @@ scope.agencyOptions = data.agencyOptions; scope.facilitatorOptions = data.facilitatorOptions; scope.centerOptions = data.centerOptions; + scope.allGroupOptions = data.groupOptions; scope.groupOptions = data.groupOptions; scope.allCenterGroupOptions = data.groupOptions; }); @@ -22,6 +23,19 @@ }); + scope.filterGroups = function () { + if (this.formData.centerId){ + scope.groupOptions = []; + for (var i in scope.allGroupOptions) { + if (scope.allGroupOptions[i].centerId == scope.formData.centerId) { + scope.groupOptions.push(scope.allGroupOptions[i]); + } + } + }else { + scope.groupOptions = scope.allGroupOptions; + } + + } scope.cheques = []; scope.formData = {}; scope.chequesPerPage = 100; diff --git a/app/scripts/controllers/bank/bankcheques/PayGuaranteesWithChequesController.js b/app/scripts/controllers/bank/bankcheques/PayGuaranteesWithChequesController.js index 9cdfc9684e..7be734197d 100644 --- a/app/scripts/controllers/bank/bankcheques/PayGuaranteesWithChequesController.js +++ b/app/scripts/controllers/bank/bankcheques/PayGuaranteesWithChequesController.js @@ -8,6 +8,7 @@ scope.availableCheques= []; scope.formData = {}; scope.uiValidationErrors = []; + scope.bankAccountOptions = []; scope.searchByCaseId = function () { var params = { @@ -32,13 +33,50 @@ sortOrder: 'ASC', agencyId: scope.formData.agencyId, status: 1 - }, function (data) { + }, data => { scope.totalAvailableCheques = data.totalFilteredRecords; scope.availableCheques = data.pageItems; + var bankAccMap = groupBy(scope.availableCheques, 'bankAccId'); + for (var [key, value] of bankAccMap.entries()) { + var chequeData = value[0]; + var accountName = chequeData.bankAccNo + ' (' + chequeData.bankName + ')' + ' - ' + chequeData.agencyName + ' (' + value.length + ' Cheques)'; + scope.bankAccountOptions.push({bankAccId: chequeData.bankAccId, accountName: accountName }); + } }); } + const groupBy = (items, key) => { + const map = new Map(); + items.forEach((item) => { + const keyValue = item[key]; + const currArr = map.has(keyValue) ? map.get(keyValue) : []; + currArr.push(item); + map.set(keyValue, currArr); + }); + return map; + }; + + scope.assignGuaranteeCheques = function () { + $uibModal.open({ + templateUrl: 'assignGuaranteeCheques.html', + controller: AssignGuaranteeChequesController + }); + }; - scope.assignCheques = function(){ + var AssignGuaranteeChequesController = function ($scope, $uibModalInstance) { + $scope.bankAccountOptions = scope.bankAccountOptions; + if (Array.isArray($scope.bankAccountOptions) && $scope.bankAccountOptions.length) { + $scope.bankAccId = $scope.bankAccountOptions[0].bankAccId; + } + $scope.assign = function () { + scope.assignChequesFromBankAccount( $scope.bankAccId); + $uibModalInstance.close('delete'); + }; + $scope.cancel = function () { + $uibModalInstance.close('cancel'); + }; + }; + + scope.assignChequesFromBankAccount = function(bankAccId){ var selectedGuaranteeDataList = []; for(var i = 0; i < scope.guaranteeDataList.length; i++){ delete scope.guaranteeDataList[i].chequeData; @@ -46,23 +84,31 @@ selectedGuaranteeDataList.push(scope.guaranteeDataList[i]); } } + var availableBankCheques = []; + for(var i = 0; i < scope.availableCheques.length; i++){ + if(scope.availableCheques[i].bankAccId === bankAccId){ + availableBankCheques.push(scope.availableCheques[i]); + } + } scope.uiValidationErrors = []; if(selectedGuaranteeDataList.length < 1){ scope.uiValidationErrors.push({ message: 'error.message.select.at.least.one.guarantee' }); - } else if (selectedGuaranteeDataList.length > this.availableCheques.length){ + } else if (selectedGuaranteeDataList.length > availableBankCheques.length){ scope.uiValidationErrors.push({ message: 'error.message.insufficient.amount.of.cheques' }); } else { + let mappedChequeIndex = 0; for (var i = 0; i < scope.guaranteeDataList.length; i++ ){ if(scope.guaranteeDataList[i].isSelected){ - scope.guaranteeDataList[i].chequeData = scope.availableCheques[i]; + scope.guaranteeDataList[i].chequeData = availableBankCheques[mappedChequeIndex]; var chequeName = scope.guaranteeDataList[i].chequeData.chequeNo + ' |' + scope.guaranteeDataList[i].chequeData .batchNo + '| ' + scope.guaranteeDataList[i].chequeData .bankAccNo + '| ' + scope.guaranteeDataList[i].chequeData.bankName; var accountName = scope.guaranteeDataList[i].chequeData.bankAccNo + ' - ' + scope.guaranteeDataList[i].chequeData.agencyName; scope.guaranteeDataList[i].chequeData.chequeName = chequeName; scope.guaranteeDataList[i].chequeData.accountName = accountName; + mappedChequeIndex++; } } scope.uiValidationErrors = []; @@ -93,6 +139,7 @@ if(scope.guaranteeDataList[i].isSelected){ var selectedGuarantee = { guaranteeId: scope.guaranteeDataList[i].id, + clientNo: scope.guaranteeDataList[i].clientNo, caseId: scope.guaranteeDataList[i].caseId, chequeId: scope.guaranteeDataList[i].chequeData.id, guaranteeAmount: scope.guaranteeDataList[i].requestedAmount, diff --git a/app/scripts/controllers/bank/bankcheques/PrintChequesController.js b/app/scripts/controllers/bank/bankcheques/PrintChequesController.js index 472652d789..4365632cb3 100644 --- a/app/scripts/controllers/bank/bankcheques/PrintChequesController.js +++ b/app/scripts/controllers/bank/bankcheques/PrintChequesController.js @@ -2,25 +2,39 @@ mifosX.controllers = _.extend(module, { PrintChequesController: function (scope, routeParams, route, location, resourceFactory, http, $uibModal, dateFilter, API_VERSION, $sce, $rootScope) { - scope.bankAccountOptions = []; - resourceFactory.chequeBatchTemplateResource.get({}, function (data) { - scope.statusOptions = data.statusOptions; - scope.agencyOptions = data.agencyOptions; - scope.facilitatorOptions = data.facilitatorOptions; - scope.centerOptions = data.centerOptions; - scope.groupOptions = data.groupOptions; - scope.allCenterGroupOptions = data.groupOptions; - }); - - resourceFactory.bankAccountResource.getAllBankAccounts({}, function (data) { - scope.totalBankAccounts = data.totalFilteredRecords; - scope.bankAccountOptions = data.pageItems; - for (var i = 0; i < scope.bankAccountOptions.length; i++ ){ - var accountName = scope.bankAccountOptions[i].accountNumber + ' - ' + scope.bankAccountOptions[i].agency.name; - scope.bankAccountOptions[i].accountName = accountName; - } - - }); + scope.bankAccountOptions = []; + resourceFactory.chequeBatchTemplateResource.get({}, function (data) { + scope.statusOptions = data.statusOptions; + scope.agencyOptions = data.agencyOptions; + scope.facilitatorOptions = data.facilitatorOptions; + scope.centerOptions = data.centerOptions; + scope.allGroupOptions = data.groupOptions; + scope.groupOptions = data.groupOptions; + scope.allCenterGroupOptions = data.groupOptions; + }); + + scope.filterGroups = function () { + if (this.formData.centerId){ + scope.groupOptions = []; + for (var i in scope.allGroupOptions) { + if (scope.allGroupOptions[i].centerId == scope.formData.centerId) { + scope.groupOptions.push(scope.allGroupOptions[i]); + } + } + }else { + scope.groupOptions = scope.allGroupOptions; + } + + } + resourceFactory.bankAccountResource.getAllBankAccounts({}, function (data) { + scope.totalBankAccounts = data.totalFilteredRecords; + scope.bankAccountOptions = data.pageItems; + for (var i = 0; i < scope.bankAccountOptions.length; i++ ){ + var accountName = scope.bankAccountOptions[i].accountNumber + ' - ' + scope.bankAccountOptions[i].agency.name; + scope.bankAccountOptions[i].accountName = accountName; + } + + }); scope.cheques = []; scope.formData = {}; @@ -29,7 +43,7 @@ scope.isAllChequesSelected = false; scope.isCollapsed = false; scope.getResultsPage = function (pageNumber) { - resourceFactory.searchChequeResource.get({ + resourceFactory.searchChequeResource.get({ offset: ((pageNumber - 1) * scope.chequesPerPage), limit: scope.chequesPerPage, orderBy: 'chequeNo', @@ -47,127 +61,127 @@ scope.totalCheques = data.totalFilteredRecords; scope.cheques = data.pageItems; scope.isAllChequesSelected = false; - }); + }); } scope.search = function () { - scope.getResultsPage(1); - scope.isCollapsed = true; + scope.getResultsPage(1); + scope.isCollapsed = true; } scope.selectAllCheques = function(){ for (var i = 0; i < scope.cheques.length; i++ ){ - scope.cheques[i].isSelected = scope.isAllChequesSelected; + scope.cheques[i].isSelected = scope.isAllChequesSelected; } } scope.isExportBtnDisabled = function(){ - var ret = true; - for (var i = 0; i < scope.cheques.length; i++ ){ - if(scope.cheques[i].isSelected){ - ret = false; - break; - } - } - return ret; + var ret = true; + for (var i = 0; i < scope.cheques.length; i++ ){ + if(scope.cheques[i].isSelected){ + ret = false; + break; + } + } + return ret; } scope.processCsvData = function () { - var selectedCheques = []; + var selectedCheques = []; for(var i = 0; i < scope.cheques.length; i++){ - if(scope.cheques[i].isSelected){ - let cheque = { - chequeNo: scope.cheques[i].chequeNo, - clientName: scope.cheques[i].clientName, - chequeAmount: scope.cheques[i].chequeAmount - } - selectedCheques.push(cheque); - } - } - var csvData = []; - for (let i = 0; i < selectedCheques.length; i++) { - var row = [selectedCheques[i].chequeNo, selectedCheques[i].clientName, selectedCheques[i].chequeAmount]; - csvData.push(row); - } - var date = new Date(); - var year = date.getFullYear(); - var month = date.getMonth() + 1; - var day = date.getDate(); - var hours = date.getHours(); - var minutes = date.getMinutes(); - var seconds = date.getSeconds(); - var fileName = 'cheques_' + [year, month.toString().padStart(2, '0'), day.toString().padStart(2, '0'), hours.toString().padStart(2, '0'), minutes.toString().padStart(2, '0'), seconds.toString().padStart(2, '0')].join('-'); - scope.fileName = fileName; - return csvData; + if(scope.cheques[i].isSelected){ + let cheque = { + chequeNo: scope.cheques[i].chequeNo, + clientName: scope.cheques[i].clientName, + chequeAmount: scope.cheques[i].chequeAmount + } + selectedCheques.push(cheque); + } + } + var csvData = []; + for (let i = 0; i < selectedCheques.length; i++) { + var row = [selectedCheques[i].chequeNo, selectedCheques[i].clientName, selectedCheques[i].chequeAmount]; + csvData.push(row); + } + var date = new Date(); + var year = date.getFullYear(); + var month = date.getMonth() + 1; + var day = date.getDate(); + var hours = date.getHours(); + var minutes = date.getMinutes(); + var seconds = date.getSeconds(); + var fileName = 'cheques_' + [year, month.toString().padStart(2, '0'), day.toString().padStart(2, '0'), hours.toString().padStart(2, '0'), minutes.toString().padStart(2, '0'), seconds.toString().padStart(2, '0')].join('-'); + scope.fileName = fileName; + return csvData; }; - scope.issueCheques = function () { - var selectedCheques = []; - for(var i = 0; i < scope.cheques.length; i++){ - if(scope.cheques[i].isSelected){ - var selectedCheque = { - chequeId: scope.cheques[i].id - } - selectedCheques.push(selectedCheque); - } - } - var request = { - locale: scope.optlang.code, - selectedCheques: selectedCheques, - actualDisbursementDate: dateFilter(new Date(Date.now()), scope.df), - dateFormat: scope.df + scope.issueCheques = function () { + var selectedCheques = []; + for(var i = 0; i < scope.cheques.length; i++){ + if(scope.cheques[i].isSelected){ + var selectedCheque = { + chequeId: scope.cheques[i].id + } + selectedCheques.push(selectedCheque); + } + } + var request = { + locale: scope.optlang.code, + selectedCheques: selectedCheques, + actualDisbursementDate: dateFilter(new Date(Date.now()), scope.df), + dateFormat: scope.df } resourceFactory.chequeBatchResource.printCheques({ commandParam: 'printCheques'}, request, function (data) { scope.printPentahoBankCheques(selectedCheques); }); - }; + }; - scope.reloadPage = function(){ + scope.reloadPage = function(){ route.reload(); - } - - scope.$watch('formData.bankAccId',function(){ - delete scope.formData.agencyName; - delete scope.formData.bankName; - for (var i = 0; i < scope.bankAccountOptions.length; i++ ){ - if(scope.bankAccountOptions[i].id === scope.formData.bankAccId){ - scope.formData.agencyName = scope.bankAccountOptions[i].agency.name; - scope.formData.bankName = scope.bankAccountOptions[i].bank.name; + } + + scope.$watch('formData.bankAccId',function(){ + delete scope.formData.agencyName; + delete scope.formData.bankName; + for (var i = 0; i < scope.bankAccountOptions.length; i++ ){ + if(scope.bankAccountOptions[i].id === scope.formData.bankAccId){ + scope.formData.agencyName = scope.bankAccountOptions[i].agency.name; + scope.formData.bankName = scope.bankAccountOptions[i].bank.name; + } } - } - }); - - scope.$watch('formData.centerId',function(){ - var selectedCenterGroupOptions = []; - if(scope.formData.centerId){ - var centerGroupOptions = []; - for (var i = 0; i < scope.groupOptions.length; i++ ){ + }); + + scope.$watch('formData.centerId',function(){ + var selectedCenterGroupOptions = []; + if(scope.formData.centerId){ + var centerGroupOptions = []; + for (var i = 0; i < scope.groupOptions.length; i++ ){ selectedCenterGroupOptions.push(scope.groupOptions[i]); } - scope.groupOptions = selectedCenterGroupOptions; - } else { - scope.groupOptions = scope.allCenterGroupOptions; - } + scope.groupOptions = selectedCenterGroupOptions; + } else { + scope.groupOptions = scope.allCenterGroupOptions; + } }); scope.printPentahoBankCheques = function (selectedCheques) { - var paramValue = ','; - for (var i = 0; i < selectedCheques.length; i++ ){ - paramValue = paramValue + selectedCheques[i].chequeId + ','; - } - scope.report = true; - scope.formData.outputType = 'PDF'; - var reportURL = $rootScope.hostUrl + API_VERSION + "/runreports/" + encodeURIComponent("Print Bank Cheque"); - reportURL += "?output-type=" + encodeURIComponent(scope.formData.outputType) + "&tenantIdentifier=" + $rootScope.tenantIdentifier+"&locale="+scope.optlang.code; - var reportParams = ""; - var paramName = "R_selectedCheques"; - reportParams += encodeURIComponent(paramName) + "=" + encodeURIComponent(paramValue); - if (reportParams > "") { - reportURL += "&" + reportParams; - } - reportURL = $sce.trustAsResourceUrl(reportURL); - reportURL = $sce.valueOf(reportURL); - http.get(reportURL, {responseType: 'arraybuffer'}) + var paramValue = ','; + for (var i = 0; i < selectedCheques.length; i++ ){ + paramValue = paramValue + selectedCheques[i].chequeId + ','; + } + scope.report = true; + scope.formData.outputType = 'PDF'; + var reportURL = $rootScope.hostUrl + API_VERSION + "/runreports/" + encodeURIComponent("Print Bank Cheque"); + reportURL += "?output-type=" + encodeURIComponent(scope.formData.outputType) + "&tenantIdentifier=" + $rootScope.tenantIdentifier+"&locale="+scope.optlang.code; + var reportParams = ""; + var paramName = "R_selectedCheques"; + reportParams += encodeURIComponent(paramName) + "=" + encodeURIComponent(paramValue); + if (reportParams > "") { + reportURL += "&" + reportParams; + } + reportURL = $sce.trustAsResourceUrl(reportURL); + reportURL = $sce.valueOf(reportURL); + http.get(reportURL, {responseType: 'arraybuffer'}) .then(function(response) { let data = response.data; let status = response.status; @@ -178,11 +192,11 @@ var fileContent = URL.createObjectURL(file); scope.reportURL = $sce.trustAsResourceUrl(fileContent); }).catch(function(error){ - console.log(JSON.stringify(error)) - $log.error(`Error loading ${scope.reportType} report`); - $log.error(error); - }); - }; + console.log(JSON.stringify(error)) + $log.error(`Error loading ${scope.reportType} report`); + $log.error(error); + }); + }; } }); diff --git a/app/scripts/controllers/client/CreateClientController.js b/app/scripts/controllers/client/CreateClientController.js index 9e226d48a6..212f0ee54c 100755 --- a/app/scripts/controllers/client/CreateClientController.js +++ b/app/scripts/controllers/client/CreateClientController.js @@ -30,6 +30,7 @@ scope.formData.familyMembers=[]; scope.formData.residenceYears = 0; scope.formData.communityYears = 0; + scope.formData.loanCycle = 0; scope.familyArray=[]; scope.datatables = []; scope.noOfTabs = 1; @@ -62,6 +63,9 @@ scope.housingTypeOptions = data.housingTypeOptions; scope.departamentoOptions = data.departamentoOptions; scope.municipioOptions = data.municipioOptions; + scope.maritalStatusOptions = data.maritalStatusOptions; + scope.jobTypeOptions = data.jobTypeOptions; + scope.educationLevelOptions = data.educationLevelOptions; scope.economicSectorOptions = data.economicSectorData; scope.economicActivities = data.economicActivityData; scope.formData.publicServices = []; @@ -122,7 +126,7 @@ scope.addressTypes = data.address[0].addressTypeIdOptions; scope.countryOptions = data.address[0].countryIdOptions; scope.stateOptions = data.address[0].stateProvinceIdOptions; - + resourceFactory.addressFieldConfiguration.get({entity:entityname},function(data){ for(var i=0;i0?data.legacyNumber:null, latitude: data.latitude, longitude: data.longitude, size: data.size, @@ -193,6 +194,7 @@ this.formData.activationDate = dateFilter(scope.first.date, scope.df); this.formData.locale = scope.optlang.code; this.formData.dateFormat = scope.df; + this.formData.timeFormat = scope.tf; this.formData.formationDate = dateFilter(scope.formData.formationDate, scope.df); @@ -217,6 +219,7 @@ resourceFactory.prequalificationResource.getAllGroups({ type: 'checked', + portfolioCenterId:scope.formData.portfolioCenterId, searchText:value }, function (data) { console.log("prequal data: "+ JSON.stringify(data)); diff --git a/app/scripts/controllers/groups/ViewGroupController.js b/app/scripts/controllers/groups/ViewGroupController.js index 2ef9ebb45c..cde49639d7 100644 --- a/app/scripts/controllers/groups/ViewGroupController.js +++ b/app/scripts/controllers/groups/ViewGroupController.js @@ -2,11 +2,13 @@ mifosX.controllers = _.extend(module, { ViewGroupController: function (scope, routeParams, route, location, resourceFactory, dateFilter, $uibModal) { scope.group = []; + scope.clientMembers = []; scope.template = []; scope.groupGLIMAccounts=[]; scope.groupGSIMAccounts=[]; scope.groupId=routeParams.id; scope.formData = {}; + scope.showClosed = false; scope.choice = 0; scope.staffData = {}; scope.openLoan = true; @@ -31,6 +33,21 @@ }; resourceFactory.groupResource.get({groupId: routeParams.id, associations: 'all'}, function (data) { scope.group = data; + let clientMembersList = data.clientMembers; + if (clientMembersList && clientMembersList.length>0){ + scope.clientMembers = clientMembersList.filter(function (client) { + return client.status.value !== 'Closed'; + }); + } + + if(scope.group.prequalificationGroups && scope.group.prequalificationGroups.length > 0){ + for(var i = 0; i < scope.group.prequalificationGroups.length; i++){ + const [ year, month, day, hour, minute, second ] = scope.group.prequalificationGroups[i].createdAt; + const createdDate = new Date(`${year}-${month}-${day} ${hour}:${minute}:${second}`); + scope.group.prequalificationGroups[i].createdAt = dateFilter(createdDate, scope.df); + } + } + scope.showNonPrequalificationActionBtn = false; if(scope.group.clientMembers){ scope.isGroupMembersAvailable = (scope.group.clientMembers.length>0); @@ -70,6 +87,22 @@ }); }); }; + scope.showClosedClients = function () { + console.log("going to filter closed "+ scope.showClosed) + scope.clientMembers = []; + scope.showClosed = !scope.showClosed; + if (scope.showClosed){ + scope.clientMembers = scope.group.clientMembers; + }else{ + let clientMembersList = scope.group.clientMembers; + if (clientMembersList && clientMembersList.length>0){ + scope.clientMembers = clientMembersList.filter(function (client) { + return client.status.value !== 'Closed'; + }); + } + } + }; + scope.deleteGroup = function () { $uibModal.open({ templateUrl: 'deletegroup.html', diff --git a/app/scripts/controllers/hardpolicychecklist/ViewHardpolicyValidationController.js b/app/scripts/controllers/hardpolicychecklist/ViewHardpolicyValidationController.js index 4dcd493c66..1316cdf4de 100644 --- a/app/scripts/controllers/hardpolicychecklist/ViewHardpolicyValidationController.js +++ b/app/scripts/controllers/hardpolicychecklist/ViewHardpolicyValidationController.js @@ -13,25 +13,36 @@ if(colorName){ if('RED' === colorName.toUpperCase()){ return 'text-danger'; - } - - if('YELLOW' === colorName.toUpperCase()){ + }else if('YELLOW' === colorName.toUpperCase()){ return 'text-warning'; - } - - if('GREEN' === colorName.toUpperCase()){ + }else if('GREEN' === colorName.toUpperCase()){ return 'text-success'; - } - - if('GREEN' === colorName.toUpperCase()){ + }else if('GREEN' === colorName.toUpperCase()){ return 'text-success'; + }else if('ORANGE' === colorName.toUpperCase()){ + return 'text-warning'; + }else{ + return colorName } + } + return colorName; + } - if('ORANGE' === colorName.toUpperCase()){ - return 'text-warning'; + scope.colorLabel = function (colorName) { + if(colorName){ + if('RED' === colorName.toUpperCase()){ + return 'label.color.red'; + }else if('YELLOW' === colorName.toUpperCase()){ + return 'label.color.yellow'; + }else if('GREEN' === colorName.toUpperCase()){ + return 'label.color.green'; + }else if('ORANGE' === colorName.toUpperCase()){ + return 'label.color.orange'; + }else{ + return null; } } - return ''; + return null; } } }); diff --git a/app/scripts/controllers/loanAccount/DisburseLoanByChequeController.js b/app/scripts/controllers/loanAccount/DisburseLoanByChequeController.js index 0d47a3c3e8..c25f84a3b8 100644 --- a/app/scripts/controllers/loanAccount/DisburseLoanByChequeController.js +++ b/app/scripts/controllers/loanAccount/DisburseLoanByChequeController.js @@ -14,48 +14,63 @@ resourceFactory.loanTemplateResource.get({templateType: 'cheque'}, function (data) { scope.agencyOptions = data.agencyOptions; scope.centerOptions = data.centerOptions; + scope.allGroupOptions = data.groupOptions; scope.groupOptions = data.groupOptions; scope.facilitatorOptions = data.facilitatorOptions; scope.disbursementMethodOptions = data.disbursementMethodOptions; }); - scope.searchApprovedLoanAccounts = function () { - this.formData.limit = 2147483647; - this.formData.sqlSearch = 'l.loan_status_id IN (200)'; - this.formData.locale = scope.optlang.code; - this.formData.dateFormat = scope.df; - if(this.formData.approvalEndDate){ - this.formData.approvalEndDate = dateFilter(this.formData.approvalEndDate, scope.df); - } - if(this.formData.approvalStartDate){ - this.formData.approvalStartDate = dateFilter(this.formData.approvalStartDate, scope.df); - } - if(this.formData.disbursementStartDate){ - this.formData.disbursementStartDate = dateFilter(this.formData.disbursementStartDate, scope.df); - } - if(this.formData.disbursementEndDate){ - this.formData.disbursementEndDate = dateFilter(this.formData.disbursementEndDate, scope.df); + scope.filterGroups = function () { + if (this.formData.centerId){ + scope.groupOptions = []; + for (var i in scope.allGroupOptions) { + if (scope.allGroupOptions[i].centerId == scope.formData.centerId) { + scope.groupOptions.push(scope.allGroupOptions[i]); + } + } + }else { + scope.groupOptions = scope.allGroupOptions; } - resourceFactory.loanResource.getAllLoans(this.formData, function (data) { - scope.approvedLoanAccounts = data.pageItems; - }); + + } + + scope.searchApprovedLoanAccounts = function () { + this.formData.limit = 2147483647; + this.formData.sqlSearch = 'l.loan_status_id IN (200)'; + this.formData.locale = scope.optlang.code; + this.formData.dateFormat = scope.df; + if(this.formData.approvalEndDate){ + this.formData.approvalEndDate = dateFilter(this.formData.approvalEndDate, scope.df); + } + if(this.formData.approvalStartDate){ + this.formData.approvalStartDate = dateFilter(this.formData.approvalStartDate, scope.df); + } + if(this.formData.disbursementStartDate){ + this.formData.disbursementStartDate = dateFilter(this.formData.disbursementStartDate, scope.df); + } + if(this.formData.disbursementEndDate){ + this.formData.disbursementEndDate = dateFilter(this.formData.disbursementEndDate, scope.df); + } + resourceFactory.loanResource.getAllLoans(this.formData, function (data) { + scope.approvedLoanAccounts = data.pageItems; + }); } scope.search = function () { - scope.searchApprovedLoanAccounts(); - scope.fetchAvailableCheques(); - scope.isCollapsed = true; - scope.allLoansSelected = false; - scope.uiValidationErrors = []; + scope.searchApprovedLoanAccounts(); + scope.fetchAvailableCheques(); + scope.isCollapsed = true; + scope.allLoansSelected = false; + scope.uiValidationErrors = []; } - scope.calculateDiffWithZeroDefault = function(value1, value2){ - if(value1 && value2){ + scope.calculateDiffWithZeroDefault = function(value1, value2){ + if(value1 && value2){ return (value1 - value2) < 0 ? 0 : (value1 - value2); - }else { - return 0; - } - } + }else { + return 0; + } + } scope.calculateDepositAmount = function(requiredGuarantee, actualGuarantee){ if(requiredGuarantee !== undefined && actualGuarantee !== undefined){ @@ -69,23 +84,6 @@ // Required Guanratee is Greater than available account balance return Math.abs(requiredGuarantee - actualGuarantee); } - }else { - return 0; - } - } - - scope.calculateDepositAmount = function(requiredGuarantee, actualGuarantee){ - if(requiredGuarantee !== undefined && actualGuarantee !== undefined){ - if(requiredGuarantee === 0){ - // No Guarantee Required - return 0; - }else if(requiredGuarantee < actualGuarantee){ - // Actual Client Account Balance is greater than Required Guarantee so no need to deposit - return 0; - }else { - // Required Guanratee is Greater than available account balance - return Math.abs(requiredGuarantee - actualGuarantee); - } }else { return 0; } @@ -98,91 +96,93 @@ agencyId: scope.formData.checkAgencyId, status: 1 }, function (data) { - scope.totalAvailableCheques = data.totalFilteredRecords; - scope.availableCheques = data.pageItems; - var bankAccMap = groupBy(scope.availableCheques, 'bankAccId'); - for (var [key, value] of bankAccMap.entries()) { - var chequeData = value[0]; - var accountName = chequeData.bankAccNo + ' (' + chequeData.bankName + ')' + ' - ' + chequeData.agencyName + ' (' + value.length + ' Cheques)'; - scope.bankAccountOptions.push({bankAccId: chequeData.bankAccId, accountName: accountName }); - } - }); + scope.totalAvailableCheques = data.totalFilteredRecords; + scope.availableCheques = data.pageItems; + var bankAccMap = groupBy(scope.availableCheques, 'bankAccId'); + for (var [key, value] of bankAccMap.entries()) { + var chequeData = value[0]; + var accountName = chequeData.bankAccNo + ' (' + chequeData.bankName + ')' + ' - ' + chequeData.agencyName + ' (' + value.length + ' Cheques)'; + scope.bankAccountOptions.push({bankAccId: chequeData.bankAccId, accountName: accountName }); + } + }); } scope.assignChequesFromBankAccount = function(bankAccId){ var selectedLoanAccounts = []; for(var i = 0; i < scope.approvedLoanAccounts.length; i++){ - delete scope.approvedLoanAccounts[i].chequeData; - if(scope.approvedLoanAccounts[i].isSelected){ + delete scope.approvedLoanAccounts[i].chequeData; + if(scope.approvedLoanAccounts[i].isSelected){ selectedLoanAccounts.push(scope.approvedLoanAccounts[i]); - } + } } var availableBankCheques = []; for(var i = 0; i < scope.availableCheques.length; i++){ - if(scope.availableCheques[i].bankAccId === bankAccId){ + if(scope.availableCheques[i].bankAccId === bankAccId){ availableBankCheques.push(scope.availableCheques[i]); - } + } } scope.uiValidationErrors = []; if(selectedLoanAccounts.length < 1){ - scope.uiValidationErrors.push({ + scope.uiValidationErrors.push({ message: 'error.message.select.at.least.one.cheque' - }); + }); } else if (selectedLoanAccounts.length > availableBankCheques.length){ - scope.uiValidationErrors.push({ - message: 'error.message.insufficient.amount.of.cheques' - }); + scope.uiValidationErrors.push({ + message: 'error.message.insufficient.amount.of.cheques' + }); } else { + let mappedChequeIndex = 0; for (var i = 0; i < scope.approvedLoanAccounts.length; i++ ){ - if(scope.approvedLoanAccounts[i].isSelected){ - scope.availableCheques[i].isAssigned = true; - scope.approvedLoanAccounts[i].chequeData = availableBankCheques[i]; - var chequeData = scope.approvedLoanAccounts[i].chequeData; - var chequeName = chequeData.chequeNo + ' |' + chequeData .batchNo + '| ' + chequeData .bankAccNo + '| ' + chequeData.bankName + '| ' + chequeData.agencyName; - scope.approvedLoanAccounts[i].chequeData.chequeName = chequeName; - } + if(scope.approvedLoanAccounts[i].isSelected){ + scope.availableCheques[i].isAssigned = true; + scope.approvedLoanAccounts[i].chequeData = availableBankCheques[mappedChequeIndex]; + var chequeData = scope.approvedLoanAccounts[i].chequeData; + var chequeName = chequeData.chequeNo + ' |' + chequeData .batchNo + '| ' + chequeData .bankAccNo + '| ' + chequeData.bankName + '| ' + chequeData.agencyName; + scope.approvedLoanAccounts[i].chequeData.chequeName = chequeName; + mappedChequeIndex++; + } } scope.uiValidationErrors = []; scope.isChequeAssigned = true; - } + } } - scope.isAssignBtnDisabled = function (){ + scope.isAssignBtnDisabled = function (){ var selectedLoanAccounts = []; for(var i = 0; i < scope.approvedLoanAccounts.length; i++){ - if(scope.approvedLoanAccounts[i].isSelected){ + if(scope.approvedLoanAccounts[i].isSelected){ selectedLoanAccounts.push(scope.approvedLoanAccounts[i]); - } + } } return selectedLoanAccounts.length < 1; - } + } - scope.selectAllLoans = function(){ + scope.selectAllLoans = function(){ for (var i = 0; i < scope.approvedLoanAccounts.length; i++ ){ - scope.approvedLoanAccounts[i].isSelected = scope.allLoansSelected; + scope.approvedLoanAccounts[i].isSelected = scope.allLoansSelected; } } function groupBy(items, key) { - const map = new Map(); - items.forEach((item) => { + const map = new Map(); + items.forEach((item) => { const keyValue = item[key]; const currArr = map.has(keyValue) ? map.get(keyValue) : []; currArr.push(item); map.set(keyValue, currArr); - }); - return map; + }); + return map; } var AssignLoanChequesController = function ($scope, $uibModalInstance) { $scope.bankAccountOptions = scope.bankAccountOptions; if (Array.isArray($scope.bankAccountOptions) && $scope.bankAccountOptions.length) { - $scope.bankAccId = $scope.bankAccountOptions[0].bankAccId; + $scope.bankAccId = $scope.bankAccountOptions[0].bankAccId; } $scope.assign = function () { - scope.assignChequesFromBankAccount( $scope.bankAccId); + scope.assignChequesFromBankAccount( $scope.bankAccId); $uibModalInstance.close('delete'); }; $scope.cancel = function () { @@ -191,7 +191,7 @@ }; scope.assignLoanCheques = function () { - $uibModal.open({ + $uibModal.open({ templateUrl: 'assignLoanCheques.html', controller: AssignLoanChequesController }); @@ -200,10 +200,10 @@ scope.disburseByCheques = function(){ var selectedLoanAccounts = []; for(var i = 0; i < scope.approvedLoanAccounts.length; i++){ - if(scope.approvedLoanAccounts[i].isSelected){ + if(scope.approvedLoanAccounts[i].isSelected){ var requiredGuaranteeAmount = scope.approvedLoanAccounts[i].requiredGuaranteeAmount; var actualGuaranteeAmount = scope.approvedLoanAccounts[i].actualGuaranteeAmount; - var selectedLoanAccount = { + var selectedLoanAccount = { loanId: scope.approvedLoanAccounts[i].id, chequeId: scope.approvedLoanAccounts[i].chequeData.id, description: scope.approvedLoanAccounts[i].description, @@ -212,12 +212,12 @@ depositGuaranteeAmount: scope.calculateDepositAmount(scope.approvedLoanAccounts[i].requiredGuaranteeAmount, scope.approvedLoanAccounts[i].actualGuaranteeAmount), depositGuaranteeNo: scope.approvedLoanAccounts[i].depositGuaranteeNo, locale: scope.optlang.code - } + } selectedLoanAccounts.push(selectedLoanAccount); - } + } } - resourceFactory.loanResource.save({command: 'disbursebycheques'}, selectedLoanAccounts, function (data) { - route.reload(); + resourceFactory.loanResource.save({command: 'disbursebycheques'}, selectedLoanAccounts, function (data) { + route.reload(); }); } } diff --git a/app/scripts/controllers/loanAccount/EditLoanAccAppController.js b/app/scripts/controllers/loanAccount/EditLoanAccAppController.js index 8aa0c82c5c..9c0fcd8414 100755 --- a/app/scripts/controllers/loanAccount/EditLoanAccAppController.js +++ b/app/scripts/controllers/loanAccount/EditLoanAccAppController.js @@ -22,12 +22,12 @@ }, function (data) { scope.loanaccountinfo = data; if (data.groupLoanAdditionalData) { - scope.formData.dateRequested=new Date(data.groupLoanAdditionalData.dateRequested) || new Date(); - scope.formData.dateOfBirth=new Date(data.groupLoanAdditionalData.dateOfBirth) || new Date(); + scope.formData.dateRequested=new Date(data.timeline.submittedOnDate) || new Date(); + scope.formData.dateOfBirth=data.groupLoanAdditionalData.dateOfBirth? new Date(data.groupLoanAdditionalData.dateOfBirth) : new Date(); scope.formData.loanCycleCompleted=data.groupLoanAdditionalData.loanCycleCompleted; scope.formData.earlyCancellationReason=data.groupLoanAdditionalData.earlyCancellationReason; scope.formData.sourceOfFunds=data.groupLoanAdditionalData.sourceOfFunds; - scope.formData.clientLoanRequestNumber=data.groupLoanAdditionalData.clientLoanRequestNumber; + scope.formData.clientLoanRequestNumber=data.contractNo; scope.formData.position=data.groupLoanAdditionalData.position; scope.formData.facilitator=data.groupLoanAdditionalData.facilitatorId; scope.formData.fullName=data.groupLoanAdditionalData.fullName; @@ -50,7 +50,8 @@ scope.formData.politicallyExposed=politicalPosition.length>0?'YES':'NO'; scope.formData.politicalOffice=data.groupLoanAdditionalData.politicalOffice; scope.formData.housingType=data.groupLoanAdditionalData.housingType; - scope.formData.rentMortgageFee=data.groupLoanAdditionalData.rentMortgageFee; + scope.formData.rentFee=data.groupLoanAdditionalData.rentFee; + scope.formData.mortgageFee=data.groupLoanAdditionalData.mortgageFee; scope.formData.address=data.groupLoanAdditionalData.address; scope.formData.populatedPlace=data.groupLoanAdditionalData.populatedPlace; scope.formData.referencePoint=data.groupLoanAdditionalData.referencePoint; @@ -65,7 +66,7 @@ scope.formData.totalInstallments=data.groupLoanAdditionalData.totalInstallments; scope.formData.clientType=data.groupLoanAdditionalData.clientType; scope.formData.houseHoldGoods=data.groupLoanAdditionalData.houseHoldGoods; - scope.formData.businessActivity=data.groupLoanAdditionalData.businessActivity; + scope.formData.businessActivities=data.groupLoanAdditionalData.businessActivities; scope.formData.businessLocation=data.groupLoanAdditionalData.businessLocation; scope.formData.businessExperience=data.groupLoanAdditionalData.businessExperience; scope.formData.salesValue=data.groupLoanAdditionalData.salesValue; @@ -127,6 +128,7 @@ scope.formData.clientId = scope.clientId; resourceFactory.clientResource.get({clientId: scope.clientId}, function (clientData) { scope.clientData = clientData; + scope.formData.dpi = clientData.dpiNumber; scope.prequalificationOptions = clientData.clientPrequalifications; if (scope.loanaccountinfo.prequalificationData && scope.loanaccountinfo.prequalificationData.id) { scope.formData.prequalificationId = scope.loanaccountinfo.prequalificationData.id; @@ -308,6 +310,7 @@ scope.cancellationReasonOptions = data.cancellationReasonOptions || []; scope.facilitatorOptions = data.facilitatorOptions || []; scope.documentTypeOptions = data.documentTypeOptions || []; + scope.economicSectorOptions = data.economicSectorOptions || []; }); scope.previewClientLoanAccInfo = function () { @@ -718,8 +721,8 @@ scope.formData.totalExternalLoanAmount = 0; scope.formData.totalInstallments = 0; angular.forEach(scope.currentLoans, function (currentLoan, index) { - scope.formData.totalExternalLoanAmount += currentLoan.totalLoanBalance; - scope.formData.totalInstallments += currentLoan.charges; + scope.formData.totalExternalLoanAmount += Number(currentLoan.totalLoanBalance?currentLoan.totalLoanBalance:0); + scope.formData.totalInstallments += Number(currentLoan.charges?currentLoan.charges:0); }); } diff --git a/app/scripts/controllers/loanAccount/LoanAccountActionsController.js b/app/scripts/controllers/loanAccount/LoanAccountActionsController.js index fe43142337..81cc5fc5b5 100755 --- a/app/scripts/controllers/loanAccount/LoanAccountActionsController.js +++ b/app/scripts/controllers/loanAccount/LoanAccountActionsController.js @@ -12,6 +12,7 @@ scope.restrictDate = new Date(); // Transaction UI Related scope.isTransaction = false; + scope.isRepaymentTransaction = false; scope.showPaymentDetails = false; scope.paymentTypes = []; scope.form = {}; @@ -207,7 +208,15 @@ if (data.paymentTypeOptions.length > 0) { scope.formData.paymentTypeId = data.paymentTypeOptions[0].id; } + if(data.bankAccounts && data.bankAccounts.length > 0){ + scope.bankAccounts = data.bankAccounts; + } scope.formData.transactionAmount = data.amount; + scope.formData.collateralAmount = data.collateralAmount; + if (data.collateralAmount && Number(data.collateralAmount)>0){ + scope.formData.netAmountReceivable = Number(data.amount) - Number(data.collateralAmount); + } + scope.formData.collateralAmount = data.collateralAmount; scope.formData[scope.modelName] = new Date(data.date) || new Date(); if(data.penaltyChargesPortion>0){ scope.showPenaltyPortionDisplay = true; @@ -219,6 +228,7 @@ scope.title = 'label.heading.loanrepayments'; scope.labelName = 'label.input.transactiondate'; scope.isTransaction = true; + scope.isRepaymentTransaction = true; scope.showAmountField = true; scope.taskPermissionName = 'REPAYMENT_LOAN'; break; @@ -496,6 +506,10 @@ scope.disbursementDetails.splice(index, 1); }; + scope.calculateReceivableAmount = function () { + scope.formData.netAmountReceivable = Number(scope.formData.transactionAmount) - Number(scope.formData.collateralAmount); + }; + scope.addTranches = function () { scope.disbursementDetails.push({ }); diff --git a/app/scripts/controllers/loanAccount/NewLoanAccAppController.js b/app/scripts/controllers/loanAccount/NewLoanAccAppController.js index 4f4a47a871..3d23d7985c 100755 --- a/app/scripts/controllers/loanAccount/NewLoanAccAppController.js +++ b/app/scripts/controllers/loanAccount/NewLoanAccAppController.js @@ -32,6 +32,7 @@ scope.currentLoanDocs = {} scope.loanDocuments = []; scope.product; + scope.clientHousingType; scope.formData.totalExternalLoanAmount =0; scope.formData.totalInstallments =0 scope.institutionTypeOptions = [ @@ -42,6 +43,7 @@ ]; scope.date.first = new Date(); + scope.date.fifth = new Date(); if (scope.clientId) { scope.inparams.clientId = routeParams.clientId; @@ -131,14 +133,25 @@ } if(scope.clientId){ - resourceFactory.clientResource.get({clientId: scope.clientId}, function (data) { - scope.prequalificationOptions = data.clientPrequalifications; - scope.clientData = data; - scope.formData.fullName = data.displayName; - scope.formData.phoneNumber = data.mobileNo; - scope.formData.dpi = data.dpiNumber; - scope.formData.yearsInCommunity = data.clientContactInformation.communityYears; - }); + resourceFactory.clientResource.get({clientId: scope.clientId}, function (data) { + scope.prequalificationOptions = data.clientPrequalifications; + scope.clientData = data; + + scope.formData.fullName = data.displayName; + scope.formData.maidenName = data.detailData.maidenName; + scope.formData.nationality = data.detailData.nationality; + scope.formData.language = data.detailData.languages; + scope.formData.occupancyClassification = Number(data.detailData.economicSector); + scope.clientHousingType = data.clientContactInformation.housingType; + scope.date.sixth = new Date(data.dateOfBirth); + scope.formData.phoneNumber = data.mobileNo; + scope.formData.dpi = data.dpiNumber; + scope.formData.nit = data.nit; + scope.formData.jobType = data.jobType; + scope.formData.educationLevel = data.educationLevel; + scope.formData.maritalStatus = data.maritalStatus; + scope.formData.yearsInCommunity = data.clientContactInformation.communityYears; + }); } scope.prequalificationChange = function (prequalificationId){ @@ -153,47 +166,32 @@ if(groupMembers.length > 0){ for(var i = 0; i < groupMembers.length; i++){ if(groupMembers[i].dpi === scope.clientData.dpiNumber){ - scope.totalApprovedAmount = groupMembers[i].requestedAmount; + scope.totalApprovedAmount = groupMembers[i].requestedAmount; } } } } else { - scope.totalApprovedAmount = data.totalApprovedAmount ? data.totalApprovedAmount : data.totalApprovedAmount; + scope.totalApprovedAmount = data.totalApprovedAmount ? data.totalApprovedAmount : data.totalApprovedAmount; } scope.loanProductChange(loanProductId); }); } - scope.resolveFrequencyDayOfWeek = function (meetingDay){ - if(meetingDay == 'Lunes'){ + scope.resolveFrequencyDayOfWeek = function (meetingDay){ + if(meetingDay == 'Lunes'){ scope.disableDaySelect = true; return 1; }if(meetingDay == 'Martes'){ - scope.disableDaySelect = true; - return 2; + scope.disableDaySelect = true; + return 2; }if(meetingDay == 'Miércoles'){ - scope.disableDaySelect = true; - return 3; + scope.disableDaySelect = true; + return 3; }if(meetingDay == 'Jueves'){ - scope.disableDaySelect = true; - return 4; + scope.disableDaySelect = true; + return 4; } } ; - 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,13 +214,16 @@ 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; - scope.loandetails.amortizationValue = scope.loanaccountinfo.amortizationType.value; - scope.loandetails.interestCalculationPeriodValue = scope.loanaccountinfo.interestCalculationPeriodType.value; - scope.loandetails.transactionProcessingStrategyValue = scope.formValue(scope.loanaccountinfo.transactionProcessingStrategyOptions, scope.formData.transactionProcessingStrategyId, 'id', 'name'); + scope.loandetails.interestValue = scope.loanaccountinfo.interestType.code; + scope.loandetails.amortizationValue = scope.loanaccountinfo.amortizationType.code; + scope.loandetails.interestCalculationPeriodValue = scope.loanaccountinfo.interestCalculationPeriodType.code; + scope.loandetails.transactionProcessingStrategyValue = scope.formValue(scope.loanaccountinfo.transactionProcessingStrategyOptions, scope.formData.transactionProcessingStrategyId, 'id', 'code'); scope.datatables = data.datatables; scope.handleDatatables(scope.datatables); scope.disabled = false; @@ -258,7 +259,17 @@ scope.loanStatusOptions = data.loanStatusOptions || []; scope.institutionTypeOptions = data.institutionTypeOptions || []; scope.housingTypeOptions = data.housingTypeOptions || []; + if (data.housingTypeOptions && scope.clientHousingType){ + console.log("going to set housing type: "+ scope.clientHousingType) + scope.housingTypeOptions.filter((housingType) => { + if (housingType.description === scope.clientHousingType){ + scope.formData.housingType = housingType.id; + } + }); + + } scope.classificationOptions = data.classificationOptions || []; + scope.economicSectorOptions = data.economicSectorOptions || []; scope.jobTypeOptions = data.jobTypeOptions || []; scope.educationLevelOptions = data.educationLevelOptions || []; scope.maritalStatusOptions = data.maritalStatusOptions || []; @@ -301,8 +312,8 @@ scope.formData.totalExternalLoanAmount = 0; scope.formData.totalInstallments = 0; angular.forEach(scope.currentLoans, function (currentLoan, index) { - scope.formData.totalExternalLoanAmount += currentLoan.totalLoanBalance; - scope.formData.totalInstallments += currentLoan.charges; + scope.formData.totalExternalLoanAmount += Number(currentLoan.totalLoanBalance?currentLoan.totalLoanBalance:0); + scope.formData.totalInstallments += Number(currentLoan.charges?currentLoan.charges:0); }); } @@ -376,16 +387,16 @@ scope.formData.isEqualAmortization = scope.loanaccountinfo.isEqualAmortization; scope.loandetails.amortizationValue = scope.loanaccountinfo.amortizationType.value; scope.formData.interestType = scope.loanaccountinfo.interestType.id; - scope.loandetails.interestValue = scope.loanaccountinfo.interestType.value; + scope.loandetails.interestValue = scope.loanaccountinfo.interestType.code; scope.formData.interestCalculationPeriodType = scope.loanaccountinfo.interestCalculationPeriodType.id; - scope.loandetails.interestCalculationPeriodValue = scope.loanaccountinfo.interestCalculationPeriodType.value; + scope.loandetails.interestCalculationPeriodValue = scope.loanaccountinfo.interestCalculationPeriodType.code; scope.formData.allowPartialPeriodInterestCalcualtion = scope.loanaccountinfo.allowPartialPeriodInterestCalcualtion; scope.formData.inArrearsTolerance = scope.loanaccountinfo.inArrearsTolerance; scope.formData.graceOnPrincipalPayment = scope.loanaccountinfo.graceOnPrincipalPayment; scope.formData.graceOnInterestPayment = scope.loanaccountinfo.graceOnInterestPayment; scope.formData.graceOnArrearsAgeing = scope.loanaccountinfo.graceOnArrearsAgeing; scope.formData.transactionProcessingStrategyId = scope.loanaccountinfo.transactionProcessingStrategyId; - scope.loandetails.transactionProcessingStrategyValue = scope.formValue(scope.loanaccountinfo.transactionProcessingStrategyOptions, scope.formData.transactionProcessingStrategyId, 'id', 'name'); + scope.loandetails.transactionProcessingStrategyValue = scope.formValue(scope.loanaccountinfo.transactionProcessingStrategyOptions, scope.formData.transactionProcessingStrategyId, 'id', 'code'); scope.formData.graceOnInterestCharged = scope.loanaccountinfo.graceOnInterestCharged; scope.formData.fixedEmiAmount = scope.loanaccountinfo.fixedEmiAmount; scope.formData.maxOutstandingLoanBalance = scope.loanaccountinfo.maxOutstandingLoanBalance; @@ -749,9 +760,9 @@ location.path('/viewloanaccount/' + loanId); } - scope.searchByCaseId = function () { - var caseId = this.searchText; - if(scope.clientId && caseId){ + scope.searchByCaseId = function () { + var caseId = this.searchText; + if(scope.clientId && caseId){ delete scope.formData.loanAdditionalData; resourceFactory.individualPrequalificationResource.loanAdditionalData({productId: scope.formData.productId, clientId: scope.clientId, caseId: caseId}, function(data){ scope.formData.loanAdditionalData = data; @@ -768,12 +779,12 @@ } }); } - } + } - scope.isAdditionalDateProperty = function(propertyName){ - var dateFields = ["fechaInicio", "cFechaNacimiento", "fechaPrimeraReunion", "dateOpened", "fechaSolicitud", "fecha_solicitud", "fechaFin", "fecha_estacionalidad", "fecha_inico_operaciones", "fecha_integraciones", "fecha_inventario", "fecha_nacimiento_solicitante", "fecha_nacimiento_solicitante", "fecha_visita"]; + scope.isAdditionalDateProperty = function(propertyName){ + var dateFields = ["fechaInicio", "cFechaNacimiento", "fechaPrimeraReunion", "dateOpened", "fechaSolicitud", "fecha_solicitud", "fechaFin", "fecha_estacionalidad", "fecha_inico_operaciones", "fecha_integraciones", "fecha_inventario", "fecha_nacimiento_solicitante", "fecha_nacimiento_solicitante", "fecha_visita"]; return dateFields.includes(propertyName); - } + } scope.cancel = function () { if (scope.groupId) { @@ -822,7 +833,10 @@ return scope.formData.totalIncome; } - scope.$watch('formData.rentMortgageFee', function(){ + scope.$watch('formData.rentFee', function(){ + scope.calculateTotalExpenditure(); + }); + scope.$watch('formData.mortgageFee', function(){ scope.calculateTotalExpenditure(); }); @@ -836,10 +850,11 @@ scope.calculateTotalExpenditure = function () { scope.formData.totalExpenditures=0; - let rentMortgageFee = Number(scope.formData.rentMortgageFee?scope.formData.rentMortgageFee:0); + let rentFee = Number(scope.formData.rentFee?scope.formData.rentFee:0); + let mortgageFee = Number(scope.formData.mortgageFee?scope.formData.mortgageFee:0); let familyExpenses = Number(scope.formData.familyExpenses?scope.formData.familyExpenses:0); let totalInstallments = Number(scope.formData.totalInstallments?scope.formData.totalInstallments:0); - scope.formData.totalExpenditures=(rentMortgageFee + familyExpenses + totalInstallments); + scope.formData.totalExpenditures=(rentFee + mortgageFee + familyExpenses + totalInstallments); return scope.formData.totalExpenditures; } diff --git a/app/scripts/controllers/loanAccount/ViewLoanDetailsController.js b/app/scripts/controllers/loanAccount/ViewLoanDetailsController.js index 65676b1e9b..cd3450e941 100755 --- a/app/scripts/controllers/loanAccount/ViewLoanDetailsController.js +++ b/app/scripts/controllers/loanAccount/ViewLoanDetailsController.js @@ -292,17 +292,17 @@ name: "button.disbursetosavings", icon: "fa fa-flag", taskPermissionName: 'DISBURSETOSAVINGS_LOAN' - }, - { - name: "button.undoapproval", - icon: "fa fa-undo", - taskPermissionName: 'APPROVALUNDO_LOAN' }); } scope.buttons = { singlebuttons: singlebuttonsApproved, options: [ + { + name: "button.undoapproval", + icon: "fa fa-undo", + taskPermissionName: 'APPROVALUNDO_LOAN' + }, { name: "button.addloancharge", taskPermissionName: 'CREATE_LOANCHARGE' diff --git a/app/scripts/controllers/notification/NotificationsController.js b/app/scripts/controllers/notification/NotificationsController.js index 97486aa0e9..8ccdacbf57 100644 --- a/app/scripts/controllers/notification/NotificationsController.js +++ b/app/scripts/controllers/notification/NotificationsController.js @@ -88,7 +88,7 @@ }; scope.countFromLastResponse = function() { scope.counter++; - if (scope.counter == 60) { + if (scope.counter === 3600) { scope.counter = 0; scope.fetchUnreadNotifications(); } diff --git a/app/scripts/controllers/organization/PortfoliosController.js b/app/scripts/controllers/organization/PortfoliosController.js index 98efc86b61..a5632d028d 100644 --- a/app/scripts/controllers/organization/PortfoliosController.js +++ b/app/scripts/controllers/organization/PortfoliosController.js @@ -36,6 +36,20 @@ 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('PortfoliosController', ['$scope', 'ResourceFactory', '$location', mifosX.controllers.PortfoliosController]).run(function ($log) { 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/controllers/organization/ViewPortfolioPlanningController.js b/app/scripts/controllers/organization/ViewPortfolioPlanningController.js index c6d599ec6b..e771361af3 100644 --- a/app/scripts/controllers/organization/ViewPortfolioPlanningController.js +++ b/app/scripts/controllers/organization/ViewPortfolioPlanningController.js @@ -46,15 +46,17 @@ scope.convertTimeArrayToObject('meetingEndTime'); scope.csvData = []; - scope.row = ['Fecha', 'Día', 'Hora', 'Centro', 'Nro. Grupo', 'Grupo', 'Tipo', 'A Cobrar', 'Mora', 'Clientes']; + scope.row = ['Fecha', 'Día', 'Hora', 'Centro', 'Nro. Grupo', 'Grupo', 'Categoría', 'Tipo', + 'A Cobrar', 'Mora', 'Clientes']; scope.csvData.push(scope.row); for (var i in scope.detailedPlanningData) { // push each row of planning into the array for csv data + var planningType = scope.detailedPlanningData[i].planningType === 'planning.type.individual' ? 'Individual' : 'Grupo'; scope.row = [dateFilter(scope.detailedPlanningData[i].meetingDate, 'dd MMM yyyy'), scope.detailedPlanningData[i].meetingDayName, dateFilter(scope.detailedPlanningData[i].meetingStartTime, 'HH:mm'), scope.detailedPlanningData[i].portfolioCenterName, scope.detailedPlanningData[i].centerGroupId, - scope.detailedPlanningData[i].centerGroupName, scope.detailedPlanningData[i].loanShortProductName, + scope.detailedPlanningData[i].centerGroupName, planningType, 'Cobro', scope.detailedPlanningData[i].totalRepayment, scope.detailedPlanningData[i].totalOverdue, scope.detailedPlanningData[i].numberOfClients]; scope.csvData.push(scope.row); diff --git a/app/scripts/controllers/prequalification/EditGroupPrequalificatoinController.js b/app/scripts/controllers/prequalification/EditGroupPrequalificatoinController.js index 7a99b48e81..39ee3f172d 100644 --- a/app/scripts/controllers/prequalification/EditGroupPrequalificatoinController.js +++ b/app/scripts/controllers/prequalification/EditGroupPrequalificatoinController.js @@ -23,7 +23,7 @@ scope.presidentSelected =false; if (routeParams.groupingType === 'group'){ - scope.previousPageUrl = "#/prequalificationGroups/group/new"; + scope.previousPageUrl = "#/prequalificationGroups/group/list"; } if (routeParams.groupingType === 'individual'){ @@ -105,7 +105,7 @@ scope.formData.members.splice(index,1); }; - scope.updatePresident = function (index) { + scope.updatePresident = function (index) { let members = scope.formData.members; scope.presidentSelected = false; for (var i = 0; i < members.length; i++ ){ diff --git a/app/scripts/controllers/prequalification/ExistingGroupPrequalificatoinController.js b/app/scripts/controllers/prequalification/ExistingGroupPrequalificatoinController.js index 1801289460..e2c33b560f 100644 --- a/app/scripts/controllers/prequalification/ExistingGroupPrequalificatoinController.js +++ b/app/scripts/controllers/prequalification/ExistingGroupPrequalificatoinController.js @@ -8,6 +8,7 @@ scope.groupsList = []; scope.productsList = []; scope.facilitators = []; + scope.isEditMember = false; scope.yesNo = [{value: "YES", name: "Yes"}, {value: "NO", name: "No"}]; scope.restrictDate = new Date(); scope.formData = {}; @@ -20,7 +21,7 @@ scope.membersList = []; scope.tf = "HH:mm"; - resourceFactory.prequalificationTemplateResource.get({groupId: routeParams.prequalificationId},function (data) { + resourceFactory.prequalificationTemplateResource.get({groupId: routeParams.prequalificationId, groupingType: 'group'}, function (data) { if (data.agencies){ scope.agenciesList = data.agencies } @@ -34,10 +35,9 @@ }); resourceFactory.prequalificationResource.get({groupId: routeParams.prequalificationId}, function (data) { - var prevDate = dateFilter(data.createdAt, scope.df); - - scope.previousPrequalificationDate = dateFilter(new Date(prevDate), scope.df) ; - + const [ year, month, day, hour, minute, second ] = data.createdAt; + const createdDate = new Date(`${year}-${month}-${day} ${hour}:${minute}:${second}`); + scope.previousPrequalificationDate = dateFilter(createdDate, scope.df); if (data.openingDate) { var editDate = dateFilter(data.openingDate, scope.df); scope.first.date = new Date(editDate); @@ -54,6 +54,10 @@ memberDets.puente = member.workWithPuente; memberDets.amount = member.approvedAmount; memberDets.name = member.name; + memberDets.groupPresident = member.groupPresident; + if (member.groupPresident){ + scope.presidentSelected = true; + } memberDets.dpi = member.dpi; memberDets.locale = scope.optlang.code; memberDets.dateFormat = scope.df; @@ -68,7 +72,7 @@ productId: data.productId, centerId: data.centerId, facilitator: data.facilitatorId, - groupName: data.groupName+"-NUEVO", + groupName: data.groupName, prequalilficationTimespan: data.prequalilficationTimespan, members: membersList } @@ -148,7 +152,9 @@ memberData.clientId = scope.membersList[i].id ; memberData.name = scope.membersList[i].displayName ; memberData.dpi = scope.membersList[i].dpiNumber ; + memberData.groupPresident = scope.membersList[i].groupPresident ; if(scope.membersList[i].dateOfBirth){ + console.log(scope.membersList[i].dateOfBirth); memberData.dob = dateFilter(new Date(scope.membersList[i].dateOfBirth),scope.df); } @@ -161,7 +167,7 @@ resourceFactory.prequalificationResource.prequalifyExistingGroup({groupId: scope.formData.groupId,anotherResource:'prequalifyGroup'},this.formData, function (data) { - location.path('#/prequalificationGroups/group/new'); + location.path('#/prequalificationGroups/group/list'); }); } @@ -176,7 +182,7 @@ // member.dateFormat = scope.df; // }) resourceFactory.prequalificationResource.save(this.formData, function (data) { - location.path('#/prequalificationGroups/group/new'); + location.path('#/prequalificationGroups/group/list'); }); } @@ -193,6 +199,20 @@ return hour.toString().padStart(2,"0")+':'+minute.toString().padStart(2,"0")+':'+seconds.toString().padStart(2,"0"); } + scope.updatePresident = function (index) { + let members = scope.formData.members; + scope.presidentSelected = false; + for (var i = 0; i < members.length; i++ ){ + const isGroupPresident = scope.formData.members[i].groupPresident; + if (i === Number(index) && isGroupPresident){ + scope.formData.members[i].groupPresident = true; + scope.presidentSelected = true; + }else{ + scope.formData.members[i].groupPresident = false; + } + } + }; + } }); diff --git a/app/scripts/controllers/prequalification/NewGroupPrequalificatoinController.js b/app/scripts/controllers/prequalification/NewGroupPrequalificatoinController.js index e8e054165a..773681a437 100644 --- a/app/scripts/controllers/prequalification/NewGroupPrequalificatoinController.js +++ b/app/scripts/controllers/prequalification/NewGroupPrequalificatoinController.js @@ -26,7 +26,7 @@ scope.isCenterSelected = false; if (routeParams.groupingType === 'group'){ - scope.previousPageUrl = "#/prequalificationGroups/group/new"; + scope.previousPageUrl = "#/prequalificationGroups/group/list"; } if (routeParams.groupingType === 'individual'){ @@ -35,6 +35,12 @@ resourceFactory.prequalificationTemplateResource.get({groupingType:routeParams.groupingType},function (data) { scope.agenciesList = data.agencies; + if (data.agencies.length === 1) { + scope.formData.agencyId = data.agencies[0].id; + let facilitators = data.facilitators.filter((facilitator) => facilitator.username === scope.currentSession.user.name); + scope.formData.facilitator = facilitators[0].id; + } + scope.centersList = data.centerData; scope.facilitators = data.facilitators; scope.productsList = data.loanProducts; diff --git a/app/scripts/controllers/prequalification/PrequalificationDetailsAnalysisController.js b/app/scripts/controllers/prequalification/PrequalificationDetailsAnalysisController.js index 9baf9f9dbb..ddc18c5fc7 100644 --- a/app/scripts/controllers/prequalification/PrequalificationDetailsAnalysisController.js +++ b/app/scripts/controllers/prequalification/PrequalificationDetailsAnalysisController.js @@ -10,6 +10,7 @@ scope.showValidatePolicies = routeParams.showValidatePolicies == 'true' ? true : false; scope.prequalificationType = routeParams.prequalificationType; scope.previousPageUrl = "#/prequalificationAnalysis/"+routeParams.prequalificationType; + resourceFactory.prequalificationResource.get({groupId: routeParams.groupId}, function (data) { scope.groupData = data; scope.groupMembers = data.groupMembers; @@ -62,11 +63,7 @@ scope.resolveMemberStatus = function (statusId) { if (statusId === 'ACTIVE') { return 'text-danger'; - } - if (statusId === 'INACTIVE') { - return 'text-warning'; - } - if (statusId === 'NONE') { + }else{ return 'text-success'; } } @@ -78,11 +75,26 @@ return 'NA'; } } - scope.policyCheckColor = function (redValidationCount) { - if (redValidationCount > 0) { + scope.policyCheckColor = function (member) { + if (member.redValidationCount > 0) { return 'text-danger'; + }else if(member.orangeValidationCount > 0||member.yellowValidationCount > 0){ + return 'text-warning'; + }else{ + return 'text-success' + } + } + scope.policyCountColor = function (member) { + let redValidationCount = member.redValidationCount||0; + let orangeValidationCount = member.orangeValidationCount || 0; + let yellowValidationCount = member.yellowValidationCount || 0; + if (redValidationCount > 0) { + return Number(redValidationCount)+Number(orangeValidationCount)+Number(yellowValidationCount); + }else if(Number(orangeValidationCount) > 0 || yellowValidationCount > 0){ + return Number(orangeValidationCount)+Number(yellowValidationCount); + }else{ + return '0' } - return 'text-success' } scope.validateHardPolicy = function () { resourceFactory.prequalificationChecklistResource.validate({prequalificationId: routeParams.groupId}, {}, function (data) { @@ -152,6 +164,23 @@ return ''; } + $scope.colorLabel = function (colorName) { + if(colorName){ + if('RED' === colorName.toUpperCase()){ + return 'label.color.red'; + }else if('YELLOW' === colorName.toUpperCase()){ + return 'label.color.yellow'; + }else if('GREEN' === colorName.toUpperCase()){ + return 'label.color.green'; + }else if('ORANGE' === colorName.toUpperCase()){ + return 'label.color.orange'; + }else{ + return null; + } + } + return null; + } + $scope.cancel = function () { $uibModalInstance.dismiss('cancel'); }; @@ -256,7 +285,43 @@ }); } - scope.selectAllMembers = function(){ + scope.routeToClientView = function (clientId) { + location.path('/viewclient/' + clientId); + }; + + scope.viewBuroResult = function (memberId) { + scope.buroCheckResult = {}; + console.log("======GP ID===========\n\n") + console.log(memberId) + console.log("======GP MEMBERS===========\n\n") + console.log(JSON.stringify(scope.groupMembers)) + if(scope.groupMembers && scope.groupMembers.length > 0){ + for (let i = 0; i < scope.groupMembers.length; i++){ + if(scope.groupMembers[i].id === memberId){ + scope.buroCheckResult = scope.groupMembers[i].buroData; + } + } + } + + $uibModal.open({ + templateUrl: 'viewBuroResultAnalysis.html', + controller: viewBuroResultAnalysisCtrl + }); + }; + + var viewBuroResultAnalysisCtrl = function ($scope, $uibModalInstance) { + var result = Object.assign({}, scope.buroCheckResult); + $scope.buroCheckResult = result; + if(result.fecha){ + $scope.buroCheckResult.fecha = new Date(... result.fecha); + } + $scope.cancel = function () { + $uibModalInstance.close(); + }; + }; + + + scope.selectAllMembers = function(){ for (var i = 0; i < scope.groupMembers.length; i++ ){ scope.groupMembers[i].isSelected = scope.formData.isAllMembersSelected; } diff --git a/app/scripts/controllers/prequalification/PrequalificationDetailsController.js b/app/scripts/controllers/prequalification/PrequalificationDetailsController.js index 8a0fd6dabc..1e46744390 100644 --- a/app/scripts/controllers/prequalification/PrequalificationDetailsController.js +++ b/app/scripts/controllers/prequalification/PrequalificationDetailsController.js @@ -13,11 +13,11 @@ scope.groupingType = routeParams.groupingType; scope.previousPageUrl = "#/prequalificationsmenu"; if (routeParams.groupingType === 'group'){ - scope.previousPageUrl = "#/prequalificationGroups/group/new"; + scope.previousPageUrl = "#/prequalificationGroups/group/list"; } if (routeParams.groupingType === 'individual'){ - scope.previousPageUrl = "#/prequalificationGroups/individual/new"; + scope.previousPageUrl = "#/prequalificationGroups/individual/list"; } scope.hasRedValidations = false; @@ -89,11 +89,11 @@ } if (routeParams.groupingType === 'group'){ - location.path('/prequalificationGroups/group/new'); + location.path('/prequalificationGroups/group/list'); } if (routeParams.groupingType === 'individual'){ - location.path('/prequalificationGroups/individual/new'); + location.path('/prequalificationGroups/individual/list'); } }); }; @@ -101,11 +101,7 @@ scope.resolveMemberStatus = function (statusId) { if (statusId === 'ACTIVE') { return 'text-danger'; - } - if (statusId === 'INACTIVE') { - return 'text-warning'; - } - if (statusId === 'NONE') { + }else { return 'text-success'; } } @@ -118,11 +114,27 @@ } } - scope.policyCheckColor = function (redValidationCount) { - if (redValidationCount > 0) { + scope.policyCheckColor = function (member) { + if (member.redValidationCount > 0) { return 'text-danger'; + }else if(member.orangeValidationCount > 0||member.yellowValidationCount > 0){ + return 'text-warning'; + }else{ + return 'text-success' + } + } + + scope.policyCountColor = function (member) { + let redValidationCount = member.redValidationCount||0; + let orangeValidationCount = member.orangeValidationCount || 0; + let yellowValidationCount = member.yellowValidationCount || 0; + if (redValidationCount > 0) { + return Number(redValidationCount)+Number(orangeValidationCount)+Number(yellowValidationCount); + }else if(Number(orangeValidationCount) > 0 || yellowValidationCount > 0){ + return Number(orangeValidationCount)+Number(yellowValidationCount); + }else{ + return '0' } - return 'text-success' } scope.requestForUpdates = function () { @@ -170,6 +182,21 @@ }); }; + scope.viewBuroResult = function (memberId) { + scope.buroCheckResult = {}; + if(scope.groupMembers && scope.groupMembers.length > 0){ + for (let i = 0; i < scope.groupMembers.length; i++){ + if(scope.groupMembers[i].id === memberId){ + scope.buroCheckResult = scope.groupMembers[i].buroData; + } + } + } + $uibModal.open({ + templateUrl: 'viewBuroResult.html', + controller: ViewBuroResultCtrl + }); + }; + scope.processAnalysisRequest = function (status, inMessage) { scope.analysisStatus = status; scope.confirmationMessage = inMessage @@ -194,6 +221,17 @@ }; }; + var ViewBuroResultCtrl = function ($scope, $uibModalInstance) { + var result = Object.assign({}, scope.buroCheckResult); + $scope.buroCheckResult = result; + if(result.fecha){ + $scope.buroCheckResult.fecha = new Date(... result.fecha); + } + $scope.cancel = function () { + $uibModalInstance.close(); + }; + }; + var ViewMemberHardPolicyCtrl = function ($scope, $uibModalInstance) { $scope.memberResults = scope.memberHardPolicyResults; @@ -222,6 +260,24 @@ return ''; } + $scope.colorLabel = function (colorName) { + console.log("going to validate color: "+colorName) + if(colorName){ + if('RED' === colorName.toUpperCase()){ + return 'label.color.red'; + }else if('YELLOW' === colorName.toUpperCase()){ + return 'label.color.yellow'; + }else if('GREEN' === colorName.toUpperCase()){ + return 'label.color.green'; + }else if('ORANGE' === colorName.toUpperCase()){ + return 'label.color.orange'; + }else{ + return null; + } + } + return null; + } + $scope.cancel = function () { $uibModalInstance.dismiss('cancel'); }; @@ -246,6 +302,12 @@ scope.routeTo = function (path) { location.path(path); } + + + + scope.routeToClientView = function (clientId) { + location.path('/viewclient/' + clientId); + }; } }); diff --git a/app/scripts/controllers/prequalification/PrequalificationsController.js b/app/scripts/controllers/prequalification/PrequalificationsController.js index da85552a0e..22323df9d1 100644 --- a/app/scripts/controllers/prequalification/PrequalificationsController.js +++ b/app/scripts/controllers/prequalification/PrequalificationsController.js @@ -10,13 +10,15 @@ scope.isIndividual=routeParams.individual; scope.getResultsPage = function (pageNumber) { - var items = resourceFactory.prequalificationResource.getAllGroups({ + resourceFactory.prequalificationResource.getAllGroups({ offset: ((pageNumber - 1) * scope.groupsPerPage), limit: scope.groupsPerPage, type: routeParams.type, status: scope.formData.status, searchText:scope.searchText, - groupingType: routeParams.groupingType + groupingType: routeParams.groupingType, + orderBy: 'g.id', + sortOrder: 'desc' }, function (data) { scope.totalGroups = data.totalFilteredRecords; scope.groupsList = data.pageItems; diff --git a/app/scripts/controllers/reports/RunReportsController.js b/app/scripts/controllers/reports/RunReportsController.js index ab1680b0ac..a084e329af 100644 --- a/app/scripts/controllers/reports/RunReportsController.js +++ b/app/scripts/controllers/reports/RunReportsController.js @@ -33,7 +33,7 @@ i.className = 'selected-row'; } }; - if (scope.reportType == 'Pentaho') { + if (scope.reportType === 'Pentaho' || scope.reportType === 'Table') { scope.formData.outputType = 'HTML'; }; @@ -95,12 +95,20 @@ } function intializeParams(paramData, params) { + for (var i in scope.reportDateParams) { + if (scope.formData[scope.reportDateParams[i].inputName]) { + scope.formData[scope.reportDateParams[i].inputName] = dateFilter(scope.formData[scope.reportDateParams[i].inputName], 'yyyy-MM-dd'); + } + } + const requestJson = {...scope.formData}; + requestJson.parameterType = true; + requestJson.reportSource = paramData.name; scope.errorStatus = undefined; scope.errorDetails = []; params.reportSource = paramData.name; params.parameterType = true; var successFunction = getSuccuessFunction(paramData); - resourceFactory.runReportsResource.getReport(params, successFunction); + resourceFactory.runReportsResource.getReport(requestJson, successFunction); } scope.getDependencies = function (paramData) { @@ -151,6 +159,18 @@ }); } + scope.$watchGroup(['formData.R_disbursementDate', 'formData.R_officeIdSelectAll', 'formData.R_loanProductSelectAll'], function(){ + if(scope.reportDateParams && scope.reportDateParams.length > 0){ + for (var i = 0; i < scope.reportDateParams.length; i++) { + if(scope.reportDateParams[i].name === 'disbursementDate'){ + if(scope.formData.R_disbursementDate && scope.formData.R_officeIdSelectAll && scope.formData.R_loanProductSelectAll){ + scope.getDependencies(scope.reportDateParams[i]); + } + break; + } + } + } + }); function parameterValidationErrors() { var tmpStartDate = ""; var tmpEndDate = ""; @@ -301,7 +321,7 @@ //Custom validation for report parameters parameterValidationErrors(); - if (scope.errorDetails.length == 0) { + if (scope.errorDetails.length === 0) { scope.isCollapsed = true; switch (scope.reportType) { case "Table": @@ -310,21 +330,33 @@ scope.hidePentahoReport = true; scope.hideChart = true; scope.formData.reportSource = scope.reportName; - resourceFactory.runReportsResource.getReport(scope.formData, function (data) { - //clear the csvData array for each request - scope.csvData = []; - scope.reportData.columnHeaders = data.columnHeaders; - scope.reportData.data = data.data; - for (var i in data.columnHeaders) { - scope.row.push(data.columnHeaders[i].columnName); - } - scope.csvData.push(scope.row); - for (var k in data.data) { - scope.csvData.push(data.data[k].row); - } - }); + if(scope.formData.outputType === 'CSV' || scope.formData.outputType === 'PDF'){ + scope.hidePentahoReport = false; + scope.hideTable = true; + resourceFactory.runReportsResource.downloadReport(scope.formData, function (responseObj) { + const responseData = responseObj.data; + const headers = responseObj.headers; + const contentType = headers('Content-Type'); + const file = new Blob([responseData], {type: contentType}); + const fileContent = URL.createObjectURL(file); + scope.baseURL = $sce.trustAsResourceUrl(fileContent); + }); + } else { + resourceFactory.runReportsResource.getReport(scope.formData, function (data) { + //clear the csvData array for each request + scope.csvData = []; + scope.reportData.columnHeaders = data.columnHeaders; + scope.reportData.data = data.data; + for (var i in data.columnHeaders) { + scope.row.push(data.columnHeaders[i].columnName); + } + scope.csvData.push(scope.row); + for (var k in data.data) { + scope.csvData.push(data.data[k].row); + } + }); + } break; - case "Pentaho": scope.hideTable = true; scope.hidePentahoReport = false; @@ -343,13 +375,10 @@ http.get(reportURL, {responseType: 'arraybuffer'}) .then(function(response) { let data = response.data; - let status = response.status; let headers = response.headers; - let config = response.config; var contentType = headers('Content-Type'); var file = new Blob([data], {type: contentType}); var fileContent = URL.createObjectURL(file); - // Pass the form data to the iframe as a data url. scope.baseURL = $sce.trustAsResourceUrl(fileContent); }) diff --git a/app/scripts/controllers/system/SchedulerJobsController.js b/app/scripts/controllers/system/SchedulerJobsController.js index 08ad5f3324..bcd1d2a724 100644 --- a/app/scripts/controllers/system/SchedulerJobsController.js +++ b/app/scripts/controllers/system/SchedulerJobsController.js @@ -8,7 +8,7 @@ }); resourceFactory.schedulerResource.get(function (data) { - scope.schedulerstatus = data.active === true ? 'Active' : 'Standby'; + scope.schedulerstatus = data.active === true ? 'scheduler.status.active' : 'scheduler.status.standby'; }); scope.selectAll = function (selectAll) { @@ -20,13 +20,20 @@ } else { for (var i = 0; i < scope.jobs.length; i++) { jobIdArray = _.without(jobIdArray,scope.jobs[i].jobId); - scope.jobs[i].checkbox = false; } + scope.jobs[i].checkbox = false; } jobIdArray = _.uniq(jobIdArray); }; + scope.resolvePreviousRunStatus = function (status){ + if(status){ + return 'scheduler.job.last.run.history.' + status; + } + return ''; + } + scope.errorLog = function (id){ scope.id = id; $uibModal.open({ 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/DateTimeFormat.js b/app/scripts/filters/DateTimeFormat.js new file mode 100644 index 0000000000..bcd9c0f964 --- /dev/null +++ b/app/scripts/filters/DateTimeFormat.js @@ -0,0 +1,24 @@ +(function (module) { + mifosX.filters = _.extend(module, { + DateTimeFormat: function (dateFilter, localStorageService) { + return function (input) { + if (input) { + // SAFARI is Bad We fix it Issue #3196 + // This fix affected transaction + //remove = input.toString().split(","); + //var tDate = new Date(remove[0], remove[1]-1, remove[2]); + //return dateFilter(tDate, localStorageService.getFromLocalStorage('dateformat')); + var dateFormat = localStorageService.getFromLocalStorage('dateformat'); + var dateTimeFormat = dateFormat + ' ' + 'HH:mm:ss'; + const [ year, month, day, hour, minute, second ] = input; + var tDate = new Date(`${year}-${month}-${day} ${hour}:${minute}:${second}`); + return dateFilter(tDate, dateTimeFormat); + } + return ''; + } + } + }); + mifosX.ng.application.filter('DateTimeFormat', ['dateFilter', 'localStorageService', mifosX.filters.DateTimeFormat]).run(function ($log) { + $log.info("DateTimeFormat filter initialized"); + }); +}(mifosX.filters || {})); 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/scripts/filters/YesOrNo.js b/app/scripts/filters/YesOrNo.js index cbd722d170..f992285511 100644 --- a/app/scripts/filters/YesOrNo.js +++ b/app/scripts/filters/YesOrNo.js @@ -1,18 +1,18 @@ (function (module) { mifosX.filters = _.extend(module, { - YesOrNo: function () { + YesOrNo: function ($filter, $locale) { return function (input) { var status = 'No'; - if (input == true) { - status = 'Yes'; - } else if (input == false) { - status = 'No'; + if (input === true) { + status = $locale.id === 'es' ? 'Sí' : 'Yes'; + } else if (input === false) { + status = $locale.id === 'es' ? 'No' : 'No'; } return status; } } }); - mifosX.ng.application.filter('YesOrNo', ['dateFilter', mifosX.filters.YesOrNo]).run(function ($log) { + mifosX.ng.application.filter('YesOrNo', ['$filter', '$locale', mifosX.filters.YesOrNo]).run(function ($log) { $log.info("YesOrNo filter initialized"); }); }(mifosX.filters || {})); diff --git a/app/scripts/mifosXComponents.js b/app/scripts/mifosXComponents.js index 58efc54462..91de3f2487 100755 --- a/app/scripts/mifosXComponents.js +++ b/app/scripts/mifosXComponents.js @@ -432,6 +432,7 @@ define(['Q', 'underscore', 'mifosX'], function (Q) { filters: [ 'StatusLookup', 'DateFormat', + 'DateTimeFormat', 'DayMonthFormat', 'YesOrNo', 'UrlToString', diff --git a/app/scripts/services/ResourceFactoryProvider.js b/app/scripts/services/ResourceFactoryProvider.js index 37a24cd9c0..ac3888eba7 100755 --- a/app/scripts/services/ResourceFactoryProvider.js +++ b/app/scripts/services/ResourceFactoryProvider.js @@ -196,7 +196,15 @@ }), runReportsResource: defineResource(apiVer + "/runreports/:reportSource", {reportSource: '@reportSource'}, { get: {method: 'GET', params: {}, isArray: true}, - getReport: {method: 'GET', params: {}} + getReport: {method: 'GET', params: {}}, + downloadReport: { + method: 'GET', + params: {}, + interceptor: { response: function(response) { + return response; + } + } + } }), reportsResource: defineResource(apiVer + "/reports/:id/:resourceType", {id: '@id', resourceType: '@resourceType'}, { get: {method: 'GET', params: {id: '@id'}}, 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/administration/organization.html b/app/views/administration/organization.html index cd2064ccdf..ce7ad6ca5a 100644 --- a/app/views/administration/organization.html +++ b/app/views/administration/organization.html @@ -2,7 +2,7 @@
-
Organization
+

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


diff --git a/app/views/administration/system.html b/app/views/administration/system.html index 561b162352..da836b1feb 100644 --- a/app/views/administration/system.html +++ b/app/views/administration/system.html @@ -2,7 +2,7 @@
-

System

+

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


diff --git a/app/views/administration/userslist.html b/app/views/administration/userslist.html index 72edd9880f..a9b8b8035e 100644 --- a/app/views/administration/userslist.html +++ b/app/views/administration/userslist.html @@ -4,7 +4,7 @@
-

List of Users

+

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


diff --git a/app/views/banks/bankcheques/approvechequesissuance.html b/app/views/banks/bankcheques/approvechequesissuance.html index 7e72f7674e..d056c06ff5 100644 --- a/app/views/banks/bankcheques/approvechequesissuance.html +++ b/app/views/banks/bankcheques/approvechequesissuance.html @@ -11,37 +11,47 @@

{{'label.anchor.approve.cheques.issuance' | translate}}
-
+
-
- -
-
- -
-
+ +
+ +
+
+ +
+ +
+ +
+
- -
-
- -
-
+
+ +
+ +
+
+ +
+ +
+ +
+
+
+ +
+
@@ -50,15 +60,41 @@

{{'label.anchor.approve.cheques.issuance' | translate}}
-
- -
- -
- -
- -
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+
@@ -83,11 +119,13 @@

{{'label.anchor.approve.cheques.issuance' | translate}} {{'label.heading.chequeNo' | translate}} - {{'label.heading.batchNo' | translate}} {{'label.heading.bankAccNo' | translate}} - {{'label.heading.status' | translate}} + {{'label.input.type' | translate}} + {{'label.input.clientName' | translate}} + {{'label.heading.chequeAmount' | translate}} + {{'label.heading.deposit.number' | translate}} + {{'label.heading.guaranteeamount' | translate}} {{'label.heading.description' | translate}} - {{'label.heading.createdon' | translate}} {{'label.heading.createdby' | translate}} @@ -102,11 +140,13 @@

{{'label.anchor.approve.cheques.issuance' | translate}} {{cheque.chequeNo}} - {{cheque.batchNo}} {{cheque.bankAccNo}} - {{cheque.status.value}} + {{cheque.loanAmount && cheque.loanAmount>0? 'label.heading.disbursement':'label.heading.guarantees'|translate }} + {{cheque.clientName}} + {{cheque.chequeAmount | FormatNumber:2 }} + {{cheque.depositNumber}} + {{cheque.guaranteeAmount | FormatNumber:2}} {{cheque.description}} - {{cheque.createdDate | DateFormat}} {{cheque.createdByUsername}} @@ -119,5 +159,4 @@

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

-
-` \ No newline at end of file +
\ No newline at end of file diff --git a/app/views/banks/bankcheques/authorizechequesissuance.html b/app/views/banks/bankcheques/authorizechequesissuance.html index 489f68a47b..ffafdd3449 100644 --- a/app/views/banks/bankcheques/authorizechequesissuance.html +++ b/app/views/banks/bankcheques/authorizechequesissuance.html @@ -28,11 +28,11 @@

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

@@ -72,7 +72,7 @@

{{'label.anchor.authorize.cheques.issuance' | translate}}<
- @@ -98,7 +99,7 @@

{{'label.anchor.authorize.cheques.issuance' | translate}}<
- @@ -77,6 +77,7 @@

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

{{'label.heading.chequeNo' | translate}} {{'label.heading.batchNo' | translate}} {{'label.heading.bankAccNo' | translate}} + {{'label.heading.chequeAmount' | translate}} {{'label.heading.status' | translate}} {{'label.heading.description' | translate}} {{'label.heading.createdon' | translate}} @@ -89,7 +90,8 @@

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

{{cheque.chequeNo}} {{cheque.batchNo}} {{cheque.bankAccNo}} - {{cheque.status.value}} + {{cheque.chequeAmount}} + {{cheque.status.code | translate}} {{cheque.description}} {{cheque.createdDate | DateFormat}} {{cheque.createdByUsername}} diff --git a/app/views/banks/bankcheques/payguaranteeswithcheques.html b/app/views/banks/bankcheques/payguaranteeswithcheques.html index 0ed073e487..770e97c4fa 100644 --- a/app/views/banks/bankcheques/payguaranteeswithcheques.html +++ b/app/views/banks/bankcheques/payguaranteeswithcheques.html @@ -3,6 +3,28 @@
  • {{'label.anchor.organization' | translate}}
  • {{'label.heading.pay.guarantees.by.cheques' | translate}}
  • +
    @@ -63,7 +85,7 @@

    {{'label.heading.pay.guarantees.by.cheques' | translate}}< - +
    - {{guaranteeData.clientNo}} {{guaranteeData.id}} + {{guaranteeData.clientNo}} {{guaranteeData.clientName}} {{guaranteeData.withdrawalReason}} - {{guaranteeData.requestedAmount}} + {{guaranteeData.requestedAmount | FormatByLocale}} {{guaranteeData.status}} {{guaranteeData.caseId}} {{guaranteeData.chequeData.accountName}} @@ -90,7 +112,7 @@

    {{'label.heading.pay.guarantees.by.cheques' | translate}}<
    diff --git a/app/views/banks/bankcheques/printcheques.html b/app/views/banks/bankcheques/printcheques.html index 9ec5c56294..1d68106476 100644 --- a/app/views/banks/bankcheques/printcheques.html +++ b/app/views/banks/bankcheques/printcheques.html @@ -41,11 +41,11 @@

    {{'label.anchor.print.cheques' | translate}}

    @@ -85,7 +85,7 @@

    {{'label.anchor.print.cheques' | translate}}

    - @@ -111,7 +111,7 @@

    {{'label.anchor.print.cheques' | translate}}

    - @@ -95,6 +95,7 @@

    {{'label.heading.chequebatch' | translate}} ({{'label.head {{'label.heading.chequeNo' | translate}} {{'label.heading.batchNo' | translate}} + {{'label.heading.chequeAmount' | translate}} {{'label.heading.status' | translate}} {{'label.heading.description' | translate}} {{'label.heading.createdon' | translate}} @@ -106,7 +107,8 @@

    {{'label.heading.chequebatch' | translate}} ({{'label.head {{cheque.chequeNo}} {{cheque.batchNo}} - {{cheque.status.value}} + {{cheque.chequeAmount}} + {{cheque.status.code | translate}} {{cheque.description}} {{cheque.createdDate | DateFormat}} {{cheque.createdByUsername}} diff --git a/app/views/banks/bankcheques/viewchequedetails.html b/app/views/banks/bankcheques/viewchequedetails.html index 9cb5ba959c..5149d5decc 100644 --- a/app/views/banks/bankcheques/viewchequedetails.html +++ b/app/views/banks/bankcheques/viewchequedetails.html @@ -90,6 +90,8 @@

    (Cheque No: {{chequeData.chequeNo}})

    {{'label.heading.batchNo' | translate}} {{'label.heading.chequeNo' | translate}} {{'label.heading.status' | translate}} + {{'label.heading.amount' | translate}} + {{'label.heading.client' | translate}} {{'label.heading.createdon' | translate}} {{'label.heading.createdby' | translate}} @@ -115,7 +117,9 @@

    (Cheque No: {{chequeData.chequeNo}})

    {{chequeData.batchNo}} {{chequeData.chequeNo}} - {{chequeData.status.value}} + {{chequeData.status.code | translate}} + {{chequeData.loanAmount?chequeData.loanAmount:chequeData.chequeAmount |FormatByLocale}} + {{chequeData.clientName?chequeData.clientName:'---'}} {{chequeData.createdDate | DateFormat}} {{chequeData.createdByUsername}} diff --git a/app/views/centers/centers.html b/app/views/centers/centers.html index 508e730645..c2a0223a1b 100644 --- a/app/views/centers/centers.html +++ b/app/views/centers/centers.html @@ -4,7 +4,7 @@
    -

    List of Centers

    +

    {{'label.heading.list.of.centers' | translate}}


    diff --git a/app/views/clients/clients.html b/app/views/clients/clients.html index 7be6d14bc9..d8afafcb44 100644 --- a/app/views/clients/clients.html +++ b/app/views/clients/clients.html @@ -6,7 +6,7 @@
    -

    List of Clients

    +

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


    diff --git a/app/views/clients/createclient.html b/app/views/clients/createclient.html index 259af47b65..3dfcb27cff 100755 --- a/app/views/clients/createclient.html +++ b/app/views/clients/createclient.html @@ -232,14 +232,26 @@ ng-pattern="/^[0-9]+$/" class="form-control" required/>
    - - - {{'label.mustbenumeric' | translate}} - - + + + {{'label.mustbenumeric' | translate}} + +
    + +
    + +
    + +
    +
    + +
    +
    - @@ -371,9 +383,9 @@
    + translate}}
    -
    @@ -435,21 +447,25 @@
    - +
    - +
    diff --git a/app/views/clients/editclient.html b/app/views/clients/editclient.html index 71b77c917d..5ebc33b63c 100755 --- a/app/views/clients/editclient.html +++ b/app/views/clients/editclient.html @@ -13,7 +13,7 @@
    - +
    - +
    - +
    @@ -174,7 +174,7 @@
    - +
    @@ -186,6 +186,14 @@
    + +
    + + +
    + +
    +
    @@ -195,14 +203,14 @@
    - +
    - +
    @@ -217,7 +225,7 @@
    - +
    @@ -260,8 +268,8 @@
    -
    @@ -332,7 +340,7 @@
    - +
    {{ 'label.heading.contact.information' | translate }} <
    -
    @@ -695,21 +703,25 @@

    {{ 'label.heading.contact.information' | translate }} <
    - +
    - +
    @@ -788,7 +800,7 @@

    {{ 'label.heading.contact.information' | translate }} <

    - +

    diff --git a/app/views/groups/creategroup.html b/app/views/groups/creategroup.html index ab026fe152..6ba89997ed 100644 --- a/app/views/groups/creategroup.html +++ b/app/views/groups/creategroup.html @@ -161,7 +161,7 @@
    + class="form-control" required late-Validate ng-disabled="true"/>
    @@ -238,7 +238,7 @@ -
    +
    {{'label.input.linkprequalification' | translate}}
    diff --git a/app/views/groups/editgroup.html b/app/views/groups/editgroup.html index 9bebf85bdd..773c5b519a 100644 --- a/app/views/groups/editgroup.html +++ b/app/views/groups/editgroup.html @@ -143,7 +143,7 @@
    + class="form-control" required late-Validate/>
    diff --git a/app/views/groups/groups.html b/app/views/groups/groups.html index 46c1dfce92..33bd84dc99 100644 --- a/app/views/groups/groups.html +++ b/app/views/groups/groups.html @@ -4,7 +4,7 @@
    -

    List of Groups

    +

    {{'label.heading.list.of.groups' | translate}}


    diff --git a/app/views/groups/viewgroup.html b/app/views/groups/viewgroup.html index a515e03952..342e0531e0 100644 --- a/app/views/groups/viewgroup.html +++ b/app/views/groups/viewgroup.html @@ -11,8 +11,8 @@

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

    @@ -40,7 +40,7 @@


    - +
    @@ -62,12 +62,15 @@

    {{'label.button.close' | translate }} {{ 'label.button.groupsavingapplication' | translate }} - {{ 'label.button.gsimapplication' | translate }} {{ 'label.button.bulkjlgloanapplication' | translate }} - - {{ 'label.button.glimloanapplication' | translate }} + + {{ 'label.button.glimloanapplication' | translate }} - + {{ 'label.button.more' | translate}} -

    -

    +

    @@ -139,22 +155,47 @@

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

    -

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

    +

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

    + +
    + +
    - - {{group.name}} + + {{group.name}} -
    - - {{ 'label.button.add' | translate }} - - {{'label.button.managemembers' | translate }} - - {{'label.button.transferclients' | translate }} + - +
    @@ -163,14 +204,23 @@

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

    - - + - - + +
    {{'label.heading.accnum' | translate}}
    - +
    + {{member.accountNo}} {{member.displayName}}{{ 'label.button.newloan' | translate }} + {{member.displayName}} + {{ 'label.button.newloan' | translate + }}
    @@ -183,36 +233,37 @@

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

    {{ 'label.heading.nextmeetingon' | translate }} - {{group.collectionMeetingCalendar.nextTenRecurringDates[0] | DateFormat}}  + {{group.collectionMeetingCalendar.nextTenRecurringDates[0] | DateFormat}}  + ng-show="group.collectionMeetingCalendar && editMeeting"> {{ 'label.unassigned' | translate }} - - - - {{ 'label.heading.meetingfrequency' | translate }} - {{group.collectionMeetingCalendar.humanReadable}} - - - {{ 'label.heading.closedate' | translate }} - {{group.timeline.closedOnDate | DateFormat}} - - -
    -
    -
    - -
    -
    - -
    -
    -
    -
    + + + + {{ 'label.heading.meetingfrequency' | translate }} + {{group.collectionMeetingCalendar.humanReadable}} + + + {{ 'label.heading.closedate' | translate }} + {{group.timeline.closedOnDate | DateFormat}} + + +
    +
    +
    + +
    +
    + +
    +
    +
    +
    {{ 'label.heading.glimloanaccoverview' | translate }} @@ -229,11 +280,26 @@

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

    - {{glimloanaccount.glimId }} - {{glimloanaccount.accountNumber }} - {{glimloanaccount.childGLIMAccounts[0].productName }} - {{glimloanaccount.parentPrincipalAmount}} - {{glimloanaccount.loanStatus}} + + {{glimloanaccount.glimId }} + + + {{glimloanaccount.accountNumber }} + + + {{glimloanaccount.childGLIMAccounts[0].productName }} + + + {{glimloanaccount.parentPrincipalAmount}} + + + {{glimloanaccount.loanStatus}} + @@ -246,7 +312,7 @@

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

    {{ 'label.heading.gsimoverview' | translate }}
    - +
    @@ -259,11 +325,26 @@

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

    - - - - - + + + + + @@ -272,10 +353,12 @@

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

    - - @@ -301,34 +384,55 @@

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

    - - + + + + - - - - - @@ -348,16 +452,26 @@

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

    - - - + + - - - - + + - - @@ -442,13 +585,21 @@

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

    - - - - + + @@ -458,11 +609,14 @@

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

    -

    {{group.name}} {{ 'label.heading.details' | translate }}

    +

    {{group.name}} {{ 'label.heading.details' | translate + }}

    {{'label.heading.gsimId' | translate}}
    {{gsimAccount.gsimId}}{{gsimAccount.accountNumber}}{{gsimAccount.childGSIMAccounts[0].productName}}{{gsimAccount.parentBalance}}{{gsimAccount.savingsStatus}} + {{gsimAccount.gsimId}} + + {{gsimAccount.accountNumber}} + + {{gsimAccount.childGSIMAccounts[0].productName}} + + {{gsimAccount.parentBalance}} + + {{gsimAccount.savingsStatus}} +
    - - {{loanaccount.accountNo}} {{loanaccount.productName}} - + + {{loanaccount.productName}} + + + + {{loanaccount.originalLoan | number}} + + {{loanaccount.loanBalance | number}} + + {{loanaccount.amountPaid | number}} {{loanaccount.originalLoan|number}}{{loanaccount.loanBalance|number}}{{loanaccount.amountPaid|number}} - + + - + - + - + + - + {{loanaccount.accountNo}} {{loanaccount.productName}}{{loanaccount.loanType.value}} - + + {{loanaccount.productName}} + + {{loanaccount.loanType.value}} + + - + + {{loanaccount.timeline.closedOnDate | DateFormat}} @@ -369,10 +483,12 @@

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

    - - @@ -394,36 +510,63 @@

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

    - + + {{savingaccount.accountNo}} {{savingaccount.productName}}{{savingaccount.accountBalance | number}} + {{savingaccount.productName}} + + {{savingaccount.accountBalance | number}} + - + - + - + - + - + + - + + - +
    - + + {{savingaccount.accountNo}} {{savingaccount.productName}}{{ savingaccount.status.value }}{{savingaccount.timeline.closedOnDate | DateFormat}} + + {{savingaccount.productName}} + + {{ savingaccount.status.value }} + + {{savingaccount.timeline.closedOnDate | DateFormat}}
    - + @@ -476,7 +630,8 @@

    {{group.name}} {{ 'label.heading.details' | translate }}

    -
    {{ 'label.heading.activationdate' | translate }}{{group.activationDate | DateFormat}}{{group.activationDate | DateFormat}} +
    {{ 'label.heading.staff' | translate }}
    {{ 'label.heading.center' | translate }}{{group.centerName}} + {{group.centerName}}
    @@ -524,11 +679,15 @@

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

    - +
    - +
    @@ -539,7 +698,8 @@

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

    {{groupNote.note}}

    {{groupNote.id}} {{'label.createdby' | translate}} : {{groupNote.createdByUsername}} - {{'label.createdon' | translate}} : {{groupNote.createdOn | DateFormat}} + {{'label.createdon' | translate}} + : {{groupNote.createdOn | DateFormat}}
    @@ -547,7 +707,8 @@

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

    @@ -566,7 +727,9 @@

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

    {{grouprole.clientName}} {{grouprole.clientId}} - @@ -592,22 +755,27 @@

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

    {{prequal.groupName}} - {{prequal.prequalificationNumber}} + + {{prequal.prequalificationNumber}} + {{prequal.status.value}} {{prequal.addedBy}} - {{prequal.createdAt |DateFormat}} + {{prequal.createdAt | DateFormat}}
    + class="btn btn-danger pull-right" + ng-click="deleteAll(groupdatatable.registeredTableName, group.id)" + has-permission='DELETE_{{groupdatatable.registeredTableName}}'> {{'label.button.deleteall' | translate}} @@ -627,11 +795,14 @@

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

    - + - @@ -640,7 +811,8 @@

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

    data-ng-hide="datatabledetails.isMultirow"> + {{value.key | prettifyDataTableColumn}} +
    {{column.columnName | prettifyDataTableColumn}} + {{column.columnName | prettifyDataTableColumn}} +
    {{row}} + {{row}}
    - {{value.key | prettifyDataTableColumn}} {{value.value}}
    @@ -648,22 +820,6 @@

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

    - -
    - - - -
    + +