Skip to content

Commit

Permalink
Update expensereport_rules.php
Browse files Browse the repository at this point in the history
  • Loading branch information
frederic34 committed Nov 25, 2019
1 parent 2f3614d commit d280eef
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions htdocs/admin/expensereport_rules.php
Expand Up @@ -2,7 +2,7 @@
/* Copyright (C) 2012 Mikael Carlavan <contact@mika-carl.fr>
* Copyright (C) 2017 ATM Consulting <contact@atm-consulting.fr>
* Copyright (C) 2017 Pierre-Henry Favre <phf@atm-consulting.fr>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -44,8 +44,8 @@
$id = GETPOST('id', 'int');

$apply_to = GETPOST('apply_to');
$fk_user = GETPOST('fk_user');
$fk_usergroup = GETPOST('fk_usergroup');
$fk_user = GETPOST('fk_user', 'int');
$fk_usergroup = GETPOST('fk_usergroup', 'int');

$fk_c_type_fees = GETPOST('fk_c_type_fees');
$code_expense_rules_type = GETPOST('code_expense_rules_type');
Expand Down Expand Up @@ -97,11 +97,11 @@
$object->setValues($_POST);

if($apply_to=='U'){
$object->fk_user=$fk_user;
$object->fk_user = (int) $fk_user;
$object->fk_usergroup=0;
$object->is_for_all=0;
}elseif($apply_to=='G'){
$object->fk_usergroup=$fk_usergroup;
$object->fk_usergroup = (int) $fk_usergroup;
$object->fk_user=0;
$object->is_for_all=0;
}elseif($apply_to=='A'){
Expand Down

0 comments on commit d280eef

Please sign in to comment.