mirror of
https://github.com/openMF/community-app.git
synced 2026-02-06 15:36:56 +00:00
33 lines
1.4 KiB
JavaScript
33 lines
1.4 KiB
JavaScript
(function(module) {
|
|
mifosX.controllers = _.extend(module, {
|
|
ViewAccountingClosureController: function(scope, resourceFactory, location, routeParams,$modal) {
|
|
scope.accountClosure = {};
|
|
scope.choice = 0;
|
|
resourceFactory.accountingClosureResource.getView({accId:routeParams.id}, function(data){
|
|
scope.accountClosure = data;
|
|
});
|
|
scope.deleteAcc = function () {
|
|
$modal.open({
|
|
templateUrl: 'deleteacc.html',
|
|
controller: AccDeleteCtrl
|
|
});
|
|
};
|
|
var AccDeleteCtrl = function ($scope, $modalInstance) {
|
|
$scope.delete = function () {
|
|
resourceFactory.accountingClosureResource.delete({accId:routeParams.id},{}, function(data){
|
|
location.path('/accounts_closure');
|
|
});
|
|
$modalInstance.close('delete');
|
|
};
|
|
$scope.cancel = function () {
|
|
$modalInstance.dismiss('cancel');
|
|
};
|
|
};
|
|
|
|
}
|
|
});
|
|
mifosX.ng.application.controller('ViewAccountingClosureController', ['$scope', 'ResourceFactory', '$location','$routeParams','$modal', mifosX.controllers.ViewAccountingClosureController]).run(function($log) {
|
|
$log.info("ViewAccountingClosureController initialized");
|
|
});
|
|
}(mifosX.controllers || {}));
|