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>';
|
$morehtmlref .= '</form>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = 'SELECT fk_salary, amount';
|
$sal = new Salary($db);
|
||||||
$sql .= ' FROM '.MAIN_DB_PREFIX.'payment_salary';
|
$sal->fetch($object->id);
|
||||||
$sql .= ' WHERE fk_salary = '.$object->id;
|
|
||||||
|
|
||||||
$resql = $db->query($sql);
|
|
||||||
$obj = $db->fetch_object($resql);
|
|
||||||
//Employee
|
//Employee
|
||||||
if ($action != 'editfk_user') {
|
if ($action != 'editfk_user') {
|
||||||
if (!empty($obj) && !empty($object->fk_user)) {
|
if ($sal->getSommePaiement() > 0 && !empty($object->fk_user)){
|
||||||
$userstatic = new User($db);
|
$userstatic = new User($db);
|
||||||
$result = $userstatic->fetch($object->fk_user);
|
$result = $userstatic->fetch($object->fk_user);
|
||||||
if ($result > 0) {
|
if ($result > 0) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user