Debug
This commit is contained in:
parent
e0ae7bd430
commit
134cea194d
@ -715,7 +715,7 @@ if ($action == 'set_paid' && $id > 0 && $user->rights->expensereport->to_paid)
|
|||||||
$object = new ExpenseReport($db);
|
$object = new ExpenseReport($db);
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
|
|
||||||
$result = $object->set_paid($id, $user)
|
$result = $object->set_paid($id, $user);
|
||||||
|
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
@ -778,15 +778,15 @@ if ($action == 'set_paid' && $id > 0 && $user->rights->expensereport->to_paid)
|
|||||||
|
|
||||||
// Retour
|
// Retour
|
||||||
if($result):
|
if($result):
|
||||||
Header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id);
|
Header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id);
|
||||||
exit;
|
exit;
|
||||||
else:
|
else:
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
else:
|
else:
|
||||||
dol_print_error($db,$acct->error);
|
dol_print_error($db,$acct->error);
|
||||||
endif;
|
endif;
|
||||||
endif;
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|
||||||
@ -1492,20 +1492,6 @@ else
|
|||||||
print '<td>'.$langs->trans("DATE_SAVE").'</td>';
|
print '<td>'.$langs->trans("DATE_SAVE").'</td>';
|
||||||
print '<td>'.dol_print_date($object->date_create,'dayhour').'</td></tr>';
|
print '<td>'.dol_print_date($object->date_create,'dayhour').'</td></tr>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
if($object->fk_statut==6)
|
|
||||||
{
|
|
||||||
print '<tr>';
|
|
||||||
print '<td>'.$langs->trans("AUTHORPAIEMENT").'</td>';
|
|
||||||
print '<td>';
|
|
||||||
$userfee=new User($db);
|
|
||||||
$userfee->fetch($object->fk_user_paid);
|
|
||||||
print $userfee->getNomUrl(1);
|
|
||||||
print '</td></tr>';
|
|
||||||
print '<tr>';
|
|
||||||
print '<td>'.$langs->trans("DATE_PAIEMENT").'</td>';
|
|
||||||
print '<td>'.$object->date_paiement.'</td></tr>';
|
|
||||||
print '</tr>';
|
|
||||||
}
|
|
||||||
|
|
||||||
// User to inform
|
// User to inform
|
||||||
if($object->fk_statut<3) // informed
|
if($object->fk_statut<3) // informed
|
||||||
|
|||||||
@ -383,7 +383,7 @@ class ExpenseReport extends CommonObject
|
|||||||
function set_paid($id, $fuser)
|
function set_paid($id, $fuser)
|
||||||
{
|
{
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."expensereport";
|
$sql = "UPDATE ".MAIN_DB_PREFIX."expensereport";
|
||||||
$sql.= " SET fk_statut = 6, fk_user_paid = ".$fuser->id.",";
|
$sql.= " SET fk_statut = 6, fk_user_paid = ".$fuser->id;
|
||||||
$sql.= " WHERE rowid = $id AND fk_statut = 5";
|
$sql.= " WHERE rowid = $id AND fk_statut = 5";
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::set_paid sql=".$sql, LOG_DEBUG);
|
dol_syslog(get_class($this)."::set_paid sql=".$sql, LOG_DEBUG);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user