diff --git a/application/controllers/NanoHealthController.php b/application/controllers/NanoHealthController.php index 53c9ca1a..b8a1fa8d 100644 --- a/application/controllers/NanoHealthController.php +++ b/application/controllers/NanoHealthController.php @@ -77,6 +77,7 @@ class NanoHealthController extends CI_Controller $id = $_POST['id'] ?? null; $_POST['nh_network_config_id'] = $_POST['config_id']; $_POST['amount'] = empty($_POST['amount']) ? null : $_POST['amount']; + $_POST['unit_value'] = empty($_POST['unit_value']) ? null : $_POST['unit_value']; unset($_POST['config_id']); $exist = $this->db->get_where('nh_acts', ['id !=' => $id , 'nh_network_config_id' => $_POST['nh_network_config_id'] , 'code' => $_POST['code']]); diff --git a/application/language/english/message_lang.php b/application/language/english/message_lang.php index 8e0a690d..485b3a57 100755 --- a/application/language/english/message_lang.php +++ b/application/language/english/message_lang.php @@ -904,4 +904,8 @@ $lang['number_of_fractions'] = "Number of fractions"; $lang['PARTIALLY_PAID'] = "Partially paid"; $lang['SUSPENDED'] = "Suspended"; $lang['amount_required'] = "Amount is required"; +$lang['reminder_delay_days'] = "Invoice payment reminder time in days"; +$lang['suspension_delay_days_after_reminder'] = "Suspension period after reminder period in days"; +$lang['unit_value'] = "Unit value"; +$lang['unit_value_required'] = "Unit value is required"; ?> diff --git a/application/language/french/message_lang.php b/application/language/french/message_lang.php index f1e30242..6db14479 100755 --- a/application/language/french/message_lang.php +++ b/application/language/french/message_lang.php @@ -914,4 +914,8 @@ $lang['number_of_fractions'] = "Nombre de fractions"; $lang['PARTIALLY_PAID'] = "Partiellement payée"; $lang['SUSPENDED'] = "Suspendue"; $lang['amount_required'] = "Le montant est requis"; +$lang['reminder_delay_days'] = "Délai de relance de paiement d'une facture en jours"; +$lang['suspension_delay_days_after_reminder'] = "Délai de suspension apres le délai de relance de jours"; +$lang['unit_value'] = "Valeur de l'unité"; +$lang['unit_value_required'] = "La valeur de l'unité est requise"; ?> diff --git a/application/views/nano_health/hyper/gestion_wallet.php b/application/views/nano_health/hyper/gestion_wallet.php index c470cbcd..dcd8c20c 100755 --- a/application/views/nano_health/hyper/gestion_wallet.php +++ b/application/views/nano_health/hyper/gestion_wallet.php @@ -139,7 +139,7 @@ $careRequests = [];
-
+

max_number_of_beneficiaries ?? ''; ?>

@@ -150,7 +150,7 @@ $careRequests = [];
-
+

age_limit_of_insured_and_spouse ?? ''; ?>

@@ -161,7 +161,7 @@ $careRequests = [];
-
+

age_limit_of_child_beneficiary ?? ''; ?>

@@ -172,6 +172,28 @@ $careRequests = [];
+
+
+
+

reminder_delay_days ?? ''; ?>

+

lang->line('reminder_delay_days') ?>

+
+
+ +
+
+
+
+
+
+

suspension_delay_days_after_reminder ?? ''; ?>

+

lang->line('suspension_delay_days_after_reminder') ?>

+
+
+ +
+
+
@@ -346,7 +368,7 @@ $careRequests = [];
-
+

lang->line('list_of_acts') ?>

@@ -365,6 +387,7 @@ $careRequests = []; Code ".$this->lang->line('Nom')." ".$this->lang->line('billing_type')." + ".$this->lang->line('unit_value')." ".$this->lang->line('authorization_type')." ".$this->lang->line('Montant')." Action"; @@ -382,11 +405,12 @@ $careRequests = []; code ?> name ?> lang->line($row->billing_type); ?> + unit_value ?> lang->line($row->authorization_type); ?>
-
+

lang->line('provider_classes') ?>

@@ -494,6 +518,16 @@ $careRequests = [];
+
+ + +
+
+ + +
-
+
+ + +
+
@@ -888,6 +926,8 @@ $careRequests = []; "age_limit_of_insured_and_spouse": $("input[name=age_limit_of_insured_and_spouse]").val(), "age_limit_of_child_beneficiary": $("input[name=age_limit_of_child_beneficiary]").val(), "family_coverage_sharing" : family_coverage_sharing, + "reminder_delay_days" : $("input[name=reminder_delay_days]").val(), + "suspension_delay_days_after_reminder" : $("input[name=suspension_delay_days_after_reminder]").val(), "password_validation" : $("select[name=password_validation]").val(), "current_affection_percentage_insurer": current_affection_percentage_insurer, "current_affection_percentage_insured": current_affection_percentage_insured, @@ -1037,8 +1077,11 @@ $careRequests = []; $("#actForm").submit(function( event ) { let billing_type = $("select[name='billing_type'] :selected",this).val() let amount = parseFloat($("input[name='amount']",this).val()) - if(billing_type === "UNIT_PRICE" && isNaN(amount)){ + let unit_value = $("input[name='unit_value']",this).val() + if(billing_type === "UNIT_PRICE" && isNaN(amount)) { toastr.error("lang->line('amount_required')?>", "lang->line('management_rule')?>"); + }else if(billing_type === "UNIT_PRICE" && unit_value.length === 0) { + toastr.error("lang->line('unit_value_required')?>", "lang->line('management_rule')?>"); }else{ $.ajax({ url: '', @@ -1051,6 +1094,7 @@ $careRequests = []; "name": $("input[name='name']",this).val(), "billing_type": billing_type, "authorization_type": $("select[name='authorization_type'] :selected",this).val(), + "unit_value": $("input[name='unit_value']",this).val(), "amount" : isNaN(amount) ? null : amount }, success: function (data) { @@ -1076,17 +1120,17 @@ $careRequests = []; event.preventDefault(); }); - // function hideOrShowActAmountDiv(billing_type){ - // if(billing_type === 'PACKAGE'){ - // $("#actForm div[id='div-amount']").hide() - // }else{ - // $("#actForm div[id='div-amount']").show() - // } - // } - // - // $("#actForm select[name='billing_type']").change(function () { - // hideOrShowActAmountDiv($(this).val()) - // }); + function hideOrShowUnitValueDiv(billing_type){ + if(billing_type === 'PACKAGE'){ + $("#actForm div[id='div-unit-value']").hide() + }else{ + $("#actForm div[id='div-unit-value']").show() + } + } + + $("#actForm select[name='billing_type']").change(function () { + hideOrShowUnitValueDiv($(this).val()) + }); $('.editAct').click(function (){ selectedActId = $(this).data('id'); @@ -1095,8 +1139,9 @@ $careRequests = []; $("#actForm input[name='name']").val($(this).data('name')); $("#actForm select[name='billing_type']").val($(this).data('billing_type')); $("#actForm input[name='amount']").val($(this).data('amount')); + $("#actForm input[name='unit_value']").val($(this).data('unit_value')); $("#actForm select[name='authorization_type']").val($(this).data('authorization_type')); - // hideOrShowActAmountDiv($(this).data('billing_type')) + hideOrShowUnitValueDiv($(this).data('billing_type')) $('#modal-act').modal('show'); }); @@ -1107,9 +1152,10 @@ $careRequests = []; $("#actForm input[name='name']").val(null); $("#actForm select[name='billing_type']").prop('selectedIndex',0); $("#actForm input[name='amount']").val(null); + $("#actForm input[name='unit_value']").val(null); $("#actForm select[name='authorization_type']").prop('selectedIndex',0); - // $("#actForm div[id='div-amount']").hide(); + $("#actForm div[id='div-unit-value']").hide(); $('#modal-act').modal('show'); });