From 89255f68609aa88d7e6b7d79b9d71c9769f74e91 Mon Sep 17 00:00:00 2001 From: mbayopanda Date: Thu, 25 Jul 2019 16:59:33 +0100 Subject: [PATCH] Enhance caution filter and fix cashflow by service report --- client/src/js/components/bhYesNoRadios.js | 3 ++- .../cash/payments/templates/search.modal.html | 12 ++++++------ .../modules/cash/payments/templates/search.modal.js | 5 +++++ client/src/modules/templates/bhYesNoRadios.tmpl.html | 2 ++ server/controllers/finance/reports/cashflow/index.js | 4 ++-- 5 files changed, 17 insertions(+), 9 deletions(-) diff --git a/client/src/js/components/bhYesNoRadios.js b/client/src/js/components/bhYesNoRadios.js index 63a9c5ca97..db00b5aaa3 100644 --- a/client/src/js/components/bhYesNoRadios.js +++ b/client/src/js/components/bhYesNoRadios.js @@ -7,6 +7,7 @@ angular.module('bhima.components') helpText : '@?', onChangeCallback : '&', }, + transclude : true, templateUrl : 'modules/templates/bhYesNoRadios.tmpl.html', controller : YesNoRadioController, }); @@ -21,7 +22,7 @@ function YesNoRadioController() { const $ctrl = this; $ctrl.$onInit = () => { - $ctrl.value = Number.parseInt($ctrl.value, 10); + $ctrl.value = $ctrl.value ? Number.parseInt($ctrl.value, 10) : undefined; }; $ctrl.onChange = (value) => { diff --git a/client/src/modules/cash/payments/templates/search.modal.html b/client/src/modules/cash/payments/templates/search.modal.html index 451954d16c..d4b4fd1be7 100644 --- a/client/src/modules/cash/payments/templates/search.modal.html +++ b/client/src/modules/cash/payments/templates/search.modal.html @@ -48,12 +48,12 @@ -
- -
+ + + { + vm.searchQueries.is_caution = value; + }; + vm.setCurrency = function setCurrency(currencyId) { vm.currencies.forEach(currency => { if (currency.id === currencyId) { diff --git a/client/src/modules/templates/bhYesNoRadios.tmpl.html b/client/src/modules/templates/bhYesNoRadios.tmpl.html index 717046e6e7..7bcc336dce 100644 --- a/client/src/modules/templates/bhYesNoRadios.tmpl.html +++ b/client/src/modules/templates/bhYesNoRadios.tmpl.html @@ -3,6 +3,8 @@ {{$ctrl.label}} + +