FIX : Using function getSommePaiement() instead of using SQL request
This commit is contained in:
parent
c55c1ab854
commit
07015ef29e
@ -604,15 +604,11 @@ if ($id) {
|
||||
$morehtmlref .= '</form>';
|
||||
}
|
||||
|
||||
$sql = 'SELECT fk_salary, amount';
|
||||
$sql .= ' FROM '.MAIN_DB_PREFIX.'payment_salary';
|
||||
$sql .= ' WHERE fk_salary = '.$object->id;
|
||||
|
||||
$resql = $db->query($sql);
|
||||
$obj = $db->fetch_object($resql);
|
||||
$sal = new Salary($db);
|
||||
$sal->fetch($object->id);
|
||||
//Employee
|
||||
if ($action != 'editfk_user') {
|
||||
if (!empty($obj) && !empty($object->fk_user)) {
|
||||
if ($sal->getSommePaiement() > 0 && !empty($object->fk_user)){
|
||||
$userstatic = new User($db);
|
||||
$result = $userstatic->fetch($object->fk_user);
|
||||
if ($result > 0) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user