From 87f797efe8a8bd090dfe23caaf8923305ee7f565 Mon Sep 17 00:00:00 2001 From: Madhukar Date: Tue, 10 Jun 2014 11:23:28 +0530 Subject: [PATCH] MIFOSX-1310,MIFOSX-1304,MIFOSX-1280,MIFOSX-1279 --- app/global-translations/locale-en.json | 9 ++- .../EditFixedDepositProductController.js | 62 +++++++++--------- .../EditRecurringDepositProductController.js | 63 ++++++++++--------- app/scripts/modules/notificationWidget.js | 2 - .../products/editrecurringdepositproduct.html | 6 +- .../products/viewrecurringdepositproduct.html | 9 ++- 6 files changed, 79 insertions(+), 72 deletions(-) diff --git a/app/global-translations/locale-en.json b/app/global-translations/locale-en.json index 331dd444..4416bd74 100755 --- a/app/global-translations/locale-en.json +++ b/app/global-translations/locale-en.json @@ -1419,7 +1419,7 @@ "label.input.interestcalculatedusing": "Interest calculated using", "label.input.daysinyears": "Days in years", "label.input.minimumopeningbalance": "Minimum opening balance", - "label.input.lockinPeriodFrequency": "Locking period frequency", + "label.input.lockinPeriodFrequency": "Lock-in period", "label.input.withdrawalfeefortransfers": "Apply Withdrawal fee for transfers", "label.input.savingaccountapprovedOnDate": "Approved on", "label.input.rejectedon": "Rejected on", @@ -1670,6 +1670,7 @@ "error.msg.recurring.deposit.account.cannot.create.not.belongs.to.any.groups.to.follow.meeting.frequency":"Cannot create Recurring deposit. Client does not belongs to any group to follow meeting frequency.", "validation.msg.fixeddepositaccount.submittedOnDate.cannot.be.blank":"Submitted on date is mandatory.", + "error.msg.officeToAccountMapping.not.found":"Mapping for office with Id `{{params[0].value}}` does not exist for an account of type `{{params[1].value}}`", "-------": "------------", @@ -1968,7 +1969,7 @@ "interestCompoundingPeriodType":"Interest Compounding Period", "interestPostingPeriodType":"Interest Posting Period", "interestCalculationType":"Interest Calculation Method", - "lockinPeriodFrequencyType":"Lockin Period Frequency", + "lockinPeriodFrequencyType":"Lock-in Period", "minDepositTermTypeId":"Min Deposit Term Frequency", "maxDepositTermTypeId":"Max Deposit Term Frequency", "inMultiplesOfDepositTermTypeId":"InMultiples Of Deposit Term Frequency", @@ -2144,7 +2145,7 @@ "label.heading.interestcalculatedusing": "Interest Calculated Using", "label.heading.daysinyears": "Days in Years", "label.heading.minimumopeningbalance": "Minimum Opening Balance", - "label.heading.lockinPeriodFrequency": "Locking Period Frequency", + "label.heading.lockinPeriodFrequency": "Lock-in Period", "label.heading.withdrawfee": "Withdraw Fee", "label.heading.annualfee": "Annual Fee", "label.heading.annualfeeon": "Annual Fee On", @@ -2308,6 +2309,8 @@ "label.fixeddepositproduct.def":"Add, modify or inactivate a Fixed deposit product", "label.prematureclosure":"For Pre-mature Closure:", "label.recurringdepositproduct.def":"Add, modify or inactivate a Recurring Deposit product", + "label.mandatory":"Mandatory", + "label.voluntary":"Voluntary", "#Enumeration & Error Messages": "..", diff --git a/app/scripts/controllers/product/EditFixedDepositProductController.js b/app/scripts/controllers/product/EditFixedDepositProductController.js index 2efc0f4d..9b53c425 100644 --- a/app/scripts/controllers/product/EditFixedDepositProductController.js +++ b/app/scripts/controllers/product/EditFixedDepositProductController.js @@ -78,39 +78,41 @@ scope.formData.lockinPeriodFrequencyType = data.lockinPeriodFrequencyType.id; } - scope.formData.savingsReferenceAccountId = data.accountingMappings.savingsReferenceAccount.id; - scope.formData.savingsControlAccountId = data.accountingMappings.savingsControlAccount.id; - scope.formData.transfersInSuspenseAccountId = data.accountingMappings.transfersInSuspenseAccount.id; - scope.formData.incomeFromFeeAccountId = data.accountingMappings.incomeFromFeeAccount.id; - scope.formData.incomeFromPenaltyAccountId = data.accountingMappings.incomeFromPenaltyAccount.id; - scope.formData.interestOnSavingsAccountId = data.accountingMappings.interestOnSavingsAccount.id; + if (scope.formData.accountingRule == 2) { + scope.formData.savingsReferenceAccountId = data.accountingMappings.savingsReferenceAccount.id; + scope.formData.savingsControlAccountId = data.accountingMappings.savingsControlAccount.id; + scope.formData.transfersInSuspenseAccountId = data.accountingMappings.transfersInSuspenseAccount.id; + scope.formData.incomeFromFeeAccountId = data.accountingMappings.incomeFromFeeAccount.id; + scope.formData.incomeFromPenaltyAccountId = data.accountingMappings.incomeFromPenaltyAccount.id; + scope.formData.interestOnSavingsAccountId = data.accountingMappings.interestOnSavingsAccount.id; - _.each(scope.product.paymentChannelToFundSourceMappings, function (fundSource) { - scope.configureFundOptions.push({ - paymentTypeId: fundSource.paymentType.id, - fundSourceAccountId: fundSource.fundSourceAccount.id, - paymentTypeOptions: scope.product.paymentTypeOptions, - assetAccountOptions: scope.assetAccountOptions - }) - }); + _.each(scope.product.paymentChannelToFundSourceMappings, function (fundSource) { + scope.configureFundOptions.push({ + paymentTypeId: fundSource.paymentType.id, + fundSourceAccountId: fundSource.fundSourceAccount.id, + paymentTypeOptions: scope.product.paymentTypeOptions, + assetAccountOptions: scope.assetAccountOptions + }) + }); - _.each(scope.product.feeToIncomeAccountMappings, function (fees) { - scope.specificIncomeaccounts.push({ - chargeId: fees.charge.id, - incomeAccountId: fees.incomeAccount.id, - chargeOptions: scope.product.chargeOptions, - incomeAccountOptions: scope.incomeAccountOptions - }) - }); + _.each(scope.product.feeToIncomeAccountMappings, function (fees) { + scope.specificIncomeaccounts.push({ + chargeId: fees.charge.id, + incomeAccountId: fees.incomeAccount.id, + chargeOptions: scope.product.chargeOptions, + incomeAccountOptions: scope.incomeAccountOptions + }) + }); - _.each(scope.product.penaltyToIncomeAccountMappings, function (penalty) { - scope.penaltySpecificIncomeaccounts.push({ - chargeId: penalty.charge.id, - incomeAccountId: penalty.incomeAccount.id, - penaltyOptions: scope.product.penaltyOptions, - incomeAccountOptions: scope.incomeAccountOptions - }) - }); + _.each(scope.product.penaltyToIncomeAccountMappings, function (penalty) { + scope.penaltySpecificIncomeaccounts.push({ + chargeId: penalty.charge.id, + incomeAccountId: penalty.incomeAccount.id, + penaltyOptions: scope.product.penaltyOptions, + incomeAccountOptions: scope.incomeAccountOptions + }) + }); + } }); //advanced accounting rule diff --git a/app/scripts/controllers/product/EditRecurringDepositProductController.js b/app/scripts/controllers/product/EditRecurringDepositProductController.js index a852a95e..d25d1715 100644 --- a/app/scripts/controllers/product/EditRecurringDepositProductController.js +++ b/app/scripts/controllers/product/EditRecurringDepositProductController.js @@ -76,40 +76,41 @@ scope.formData.lockinPeriodFrequencyType = data.lockinPeriodFrequencyType.id; } - scope.formData.savingsReferenceAccountId = data.accountingMappings.savingsReferenceAccount.id; - scope.formData.savingsControlAccountId = data.accountingMappings.savingsControlAccount.id; - scope.formData.transfersInSuspenseAccountId = data.accountingMappings.transfersInSuspenseAccount.id; - scope.formData.incomeFromFeeAccountId = data.accountingMappings.incomeFromFeeAccount.id; - scope.formData.incomeFromPenaltyAccountId = data.accountingMappings.incomeFromPenaltyAccount.id; - scope.formData.interestOnSavingsAccountId = data.accountingMappings.interestOnSavingsAccount.id; + if (scope.formData.accountingRule == 2) { + scope.formData.savingsReferenceAccountId = data.accountingMappings.savingsReferenceAccount.id; + scope.formData.savingsControlAccountId = data.accountingMappings.savingsControlAccount.id; + scope.formData.transfersInSuspenseAccountId = data.accountingMappings.transfersInSuspenseAccount.id; + scope.formData.incomeFromFeeAccountId = data.accountingMappings.incomeFromFeeAccount.id; + scope.formData.incomeFromPenaltyAccountId = data.accountingMappings.incomeFromPenaltyAccount.id; + scope.formData.interestOnSavingsAccountId = data.accountingMappings.interestOnSavingsAccount.id; - _.each(scope.product.paymentChannelToFundSourceMappings, function (fundSource) { - scope.configureFundOptions.push({ - paymentTypeId: fundSource.paymentType.id, - fundSourceAccountId: fundSource.fundSourceAccount.id, - paymentTypeOptions: scope.product.paymentTypeOptions, - assetAccountOptions: scope.assetAccountOptions - }) - }); + _.each(scope.product.paymentChannelToFundSourceMappings, function (fundSource) { + scope.configureFundOptions.push({ + paymentTypeId: fundSource.paymentType.id, + fundSourceAccountId: fundSource.fundSourceAccount.id, + paymentTypeOptions: scope.product.paymentTypeOptions, + assetAccountOptions: scope.assetAccountOptions + }) + }); - _.each(scope.product.feeToIncomeAccountMappings, function (fees) { - scope.specificIncomeaccounts.push({ - chargeId: fees.charge.id, - incomeAccountId: fees.incomeAccount.id, - chargeOptions: scope.product.chargeOptions, - incomeAccountOptions: scope.incomeAccountOptions - }) - }); - - _.each(scope.product.penaltyToIncomeAccountMappings, function (penalty) { - scope.penaltySpecificIncomeaccounts.push({ - chargeId: penalty.charge.id, - incomeAccountId: penalty.incomeAccount.id, - penaltyOptions: scope.product.penaltyOptions, - incomeAccountOptions: scope.incomeAccountOptions - }) - }); + _.each(scope.product.feeToIncomeAccountMappings, function (fees) { + scope.specificIncomeaccounts.push({ + chargeId: fees.charge.id, + incomeAccountId: fees.incomeAccount.id, + chargeOptions: scope.product.chargeOptions, + incomeAccountOptions: scope.incomeAccountOptions + }) + }); + _.each(scope.product.penaltyToIncomeAccountMappings, function (penalty) { + scope.penaltySpecificIncomeaccounts.push({ + chargeId: penalty.charge.id, + incomeAccountId: penalty.incomeAccount.id, + penaltyOptions: scope.product.penaltyOptions, + incomeAccountOptions: scope.incomeAccountOptions + }) + }); + } }); //advanced accounting rule diff --git a/app/scripts/modules/notificationWidget.js b/app/scripts/modules/notificationWidget.js index 906b2ecb..8764fb5e 100644 --- a/app/scripts/modules/notificationWidget.js +++ b/app/scripts/modules/notificationWidget.js @@ -72,8 +72,6 @@ angular.module('notificationWidget', []) $rootScope.errorStatus = 'No connection. Verify application is running.'; } else if (response.status == 401) { $rootScope.errorStatus = 'Unauthorized'; - } else if (response.status == 404) { - $rootScope.errorStatus = 'Requested page not found. [404]'; } else if (response.status == 405) { $rootScope.errorStatus = 'HTTP verb not supported [405]'; } else if (response.status == 500) { diff --git a/app/views/products/editrecurringdepositproduct.html b/app/views/products/editrecurringdepositproduct.html index 64c3775f..ee6c3606 100644 --- a/app/views/products/editrecurringdepositproduct.html +++ b/app/views/products/editrecurringdepositproduct.html @@ -164,7 +164,7 @@
@@ -179,7 +179,7 @@
@@ -191,7 +191,7 @@
diff --git a/app/views/products/viewrecurringdepositproduct.html b/app/views/products/viewrecurringdepositproduct.html index e6057c2a..0d3653e8 100644 --- a/app/views/products/viewrecurringdepositproduct.html +++ b/app/views/products/viewrecurringdepositproduct.html @@ -109,14 +109,17 @@ {{'label.heading.recurringdeposittype' | translate}} - {{depositproduct.recurringDepositType.value}} + +
{{'label.mandatory' | translate}}
+
{{'label.voluntary' | translate}}
+ - +