mirror of
https://github.com/openMF/community-app.git
synced 2026-02-06 11:36:48 +00:00
FiX-View-Charge (#3446)
This commit is contained in:
parent
ed9f555c3c
commit
29057438a7
@ -2947,6 +2947,11 @@
|
||||
"label.heading.chargetimetype": "Charge Time Type",
|
||||
"label.heading.chargeappliesto": "Charge Applies to",
|
||||
"label.heading.chargecalculationtype": "Charge Calculation Type",
|
||||
"label.heading.enablewithdrawtype": "Enable Withdraw Type",
|
||||
"label.heading.enablepaymenttype": "Enable Payment Type",
|
||||
"label.heading.freewithdrawalfrequency": "No. of Free Withdrawals",
|
||||
"label.heading.restartcount": "Restart Counting Every",
|
||||
"label.heading.frequencyType": "Frequency Type",
|
||||
"label.heading.chargepaymentmode": "Charge Payment Mode",
|
||||
"label.heading.closedate": "Closed Date",
|
||||
"label.heading.includeborrowercycle": "Include in Customer Loan Counter",
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
scope.first = {};
|
||||
scope.flag = false;
|
||||
scope.showPenalty = true ;
|
||||
scope.paymentTypeOptions = [];
|
||||
|
||||
resourceFactory.chargeResource.getCharge({chargeId: routeParams.id, template: true}, function (data) {
|
||||
scope.template = data;
|
||||
@ -45,6 +46,10 @@
|
||||
scope.flag = true;
|
||||
scope.showFrequencyOptions = false;
|
||||
scope.showGLAccount = true;
|
||||
resourceFactory.paymentTypeResource.getAll( function (data) {
|
||||
scope.paymentTypeOptions = data;
|
||||
});
|
||||
|
||||
if(data.freeWithdrawal === true) {
|
||||
scope.showenablefreewithdrawal = true;
|
||||
scope.showpaymenttype = true;
|
||||
@ -186,15 +191,11 @@
|
||||
|
||||
resourceFactory.loanProductResource.get({resourceType: 'template'}, function (data) {
|
||||
scope.product = data;
|
||||
scope.paymentTypeOptions = data.paymentTypeOptions;
|
||||
|
||||
const i = 1;
|
||||
scope.filteredItems = scope.product.repaymentFrequencyTypeOptions.slice(0, i).concat(scope.product.repaymentFrequencyTypeOptions.slice(i + 1, scope.product.repaymentFrequencyTypeOptions.length));
|
||||
});
|
||||
|
||||
resourceFactory.paymentTypeResource.getAll( function (data) {
|
||||
|
||||
});
|
||||
|
||||
scope.setOptions = function() {
|
||||
if (this.formData.enableFreeWithdrawalCharge) {
|
||||
scope.showfreewithdrawalfrequency = true;
|
||||
|
||||
@ -5,6 +5,22 @@
|
||||
scope.choice = 0;
|
||||
resourceFactory.chargeResource.get({chargeId: routeParams.id}, function (data) {
|
||||
scope.charge = data;
|
||||
|
||||
resourceFactory.loanProductResource.get({resourceType: 'template'}, function (data) {
|
||||
scope.product = data;
|
||||
scope.paymentTypeOptions = data.paymentTypeOptions;
|
||||
const repaymentFrequency = 1;
|
||||
scope.filteredItems = scope.product.repaymentFrequencyTypeOptions.slice(0, repaymentFrequency).concat(scope.product.repaymentFrequencyTypeOptions.slice(repaymentFrequency + 1, scope.product.repaymentFrequencyTypeOptions.length));
|
||||
|
||||
var restartFrequencyId = scope.charge.restartFrequencyEnum;
|
||||
scope.restartEnum = scope.charge.restartFrequencyEnum;
|
||||
|
||||
angular.forEach(scope.filteredItems, function(items, key){
|
||||
if(items.id == restartFrequencyId){
|
||||
scope.frequencyType = items.value;
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
scope.deleteCharge = function () {
|
||||
@ -24,7 +40,6 @@
|
||||
$uibModalInstance.dismiss('cancel');
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
});
|
||||
mifosX.ng.application.controller('ViewChargeController', ['$scope', '$routeParams', 'ResourceFactory', '$location', '$uibModal', mifosX.controllers.ViewChargeController]).run(function ($log) {
|
||||
|
||||
@ -79,9 +79,9 @@
|
||||
<label class="control-label col-sm-2">{{'label.input.paymenttype' | translate}} </label>
|
||||
|
||||
<div class="col-sm-2">
|
||||
<select id="paymentTypeOptions" class="form-control"
|
||||
<select id="paymentTypeId" ng-model="formData.paymentTypeId"
|
||||
data-ng-options="paymentType.id as paymentType.name for paymentType in paymentTypeOptions"
|
||||
ng-model="formData.paymentTypeId" value="{{paymentType.id}}">
|
||||
value="{{paymentType.id}}" class="form-control">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@ -117,7 +117,6 @@
|
||||
<div class="col-sm-3">
|
||||
<input id="freerestartfrequency" name="amount" type="text" ng-model="formData.restartCountFrequency" class="form-control" number-format late-Validate/>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<div class="col-sm-2">
|
||||
|
||||
@ -56,6 +56,30 @@
|
||||
<td>{{'label.heading.chargecalculationtype' | translate}}</td>
|
||||
<td>{{charge.chargeCalculationType.value}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{'label.heading.enablepaymenttype' | translate}}</td>
|
||||
<td>{{charge.isPaymentType}}</td>
|
||||
</tr>
|
||||
<tr ng-show="charge.isPaymentType == true">
|
||||
<td>{{'label.heading.paymenttype' | translate}}</td>
|
||||
<td>{{charge.paymentTypeOptions .name}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{'label.heading.enablewithdrawtype' | translate}}</td>
|
||||
<td>{{charge.freeWithdrawal}}</td>
|
||||
</tr>
|
||||
<tr ng-show="charge.freeWithdrawal == true">
|
||||
<td>{{'label.heading.freewithdrawalfrequency' | translate}}</td>
|
||||
<td>{{charge.freeWithdrawalChargeFrequency}}</td>
|
||||
</tr>
|
||||
<tr ng-show="charge.freeWithdrawal == true">
|
||||
<td>{{'label.heading.restartcount' | translate}}</td>
|
||||
<td>{{charge.restartFrequency}}</td>
|
||||
</tr>
|
||||
<tr ng-show="charge.freeWithdrawal == true">
|
||||
<td>{{'label.heading.frequencyType' | translate}}</td>
|
||||
<td>{{frequencyType}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{'label.heading.active' | translate}}</td>
|
||||
<td>{{charge.active | YesOrNo}}</td>
|
||||
@ -84,4 +108,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user