diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index f456bc0db8b..f5d38bc001c 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -51,6 +51,8 @@ $date = dol_mktime(0, 0, 0, GETPOST('datemonth'), GETPOST('dateday'), GETPOST('d $fk_projet=GETPOST('fk_projet'); $vatrate=GETPOST('vatrate'); $ref=GETPOST("ref",'alpha'); +$comments=GETPOST('comments'); +$fk_c_type_fees=GETPOST('fk_c_type_fees','int'); // If socid provided by ajax company selector if (! empty($_REQUEST['socid_id'])) @@ -92,7 +94,19 @@ $hideref = (GETPOST('hideref', 'int') ? GETPOST('hideref', 'int') : (! empty($co * Actions */ -if ($cancel) $action=''; +if ($cancel) +{ + $action=''; + $fk_projet=''; + $date_start=''; + $date_end=''; + $date=''; + $comments=''; + $vatrate=''; + $value_unit=''; + $qty=1; + $fk_c_type_fees=-1; +} if ($action == 'confirm_delete' && GETPOST("confirm") == "yes" && $id > 0 && $user->rights->expensereport->supprimer) { @@ -863,7 +877,7 @@ if ($action == "addline") if($object_ligne->value_unit==0) { $error++; - setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("UP")), null, 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("PriceUTTC")), null, 'errors'); } // S'il y'a eu au moins une erreur @@ -1615,7 +1629,19 @@ else $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'projet as pjt ON fde.fk_projet=pjt.rowid'; $sql.= ' WHERE fde.fk_expensereport = '.$object->id; - $resql = $db->query($sql); + print '