Skip to content

Commit

Permalink
improvement(Paiement advance loans)
Browse files Browse the repository at this point in the history
- Select account of type is liability and asset
- Set enable sorting false in grid
  • Loading branch information
lomamech committed Feb 4, 2022
1 parent ed1171b commit 3e023bf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,20 @@ angular.module('bhima.controllers')
.controller('AdvancesLoansInstallmentsKitController', AdvancesLoansInstallmentsKitController);

AdvancesLoansInstallmentsKitController.$inject = [
'$uibModalInstance', 'NotifyService', 'SessionService', 'bhConstants', '$translate',
'$uibModalInstance', 'NotifyService', 'SessionService', 'bhConstants',
'VoucherToolkitService', 'EmployeeService', 'uiGridConstants', 'VoucherForm',
];

// Import transaction rows for Advances Loans Installments of Employees
function AdvancesLoansInstallmentsKitController(
Instance, Notify, Session, bhConstants, $translate, ToolKits,
Instance, Notify, Session, bhConstants, ToolKits,
Employees, uiGridConstants, VoucherForm,
) {
const vm = this;

vm.LIABILITY_ACCOUNT_TYPE_ID = bhConstants.accounts.LIABILITY;
vm.ASSET_ACCOUNT_TYPE_ID = bhConstants.accounts.ASSET;

vm.enterprise = Session.enterprise;
vm.onSelectCashbox = onSelectCashbox;
vm.onSelectAccountCallback = onSelectAccountCallback;
Expand Down Expand Up @@ -104,6 +107,7 @@ function AdvancesLoansInstallmentsKitController(
vm.gridOptions = {
appScopeProvider : vm,
enableFiltering : true,
enableSorting : false,
fastWatch : true,
flatEntityAccess : true,
enableSelectionBatchEvent : false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

<bh-account-select
label="VOUCHERS.GLOBAL.DESTINATION_ACCOUNT"
account-type-id="[ToolCtrl.LIABILITY_ACCOUNT_TYPE_ID, ToolCtrl.ASSET_ACCOUNT_TYPE_ID]"
on-select-callback="ToolCtrl.onSelectAccountCallback(account)"
exclude-title-accounts="true">
(<label translate>FORM.LABELS.DEBIT</label>)
Expand Down

0 comments on commit 3e023bf

Please sign in to comment.