';
-
+ // Num
print '| ';
print $numline;
print ' | ';
-
- /*print '';
- print img_picto($langs->trans("Document"), "object_generic");
- print ' '.$piece_comptable.'';
- print ' | ';*/
-
+ // Date
print ''.dol_print_date($db->jdate($line->date), 'day').' | ';
+ // Project
if (! empty($conf->projet->enabled))
{
print '';
@@ -2094,21 +2090,26 @@ else
{
$projecttmp->id=$line->fk_project;
$projecttmp->ref=$line->projet_ref;
+ $projecttmp->title=$line->projet_title;
print $projecttmp->getNomUrl(1);
}
print ' | ';
}
+ // IK
if (!empty($conf->global->MAIN_USE_EXPENSE_IK))
{
print '';
print dol_getIdFromCode($db, $line->fk_c_exp_tax_cat, 'c_exp_tax_cat', 'rowid', 'label');
print ' | ';
}
+ // Type of fee
print '';
$labeltype = ($langs->trans(($line->type_fees_code)) == $line->type_fees_code ? $line->type_fees_libelle : $langs->trans($line->type_fees_code));
print $labeltype;
print ' | ';
+ // Comment
print ''.dol_nl2br($line->comments).' | ';
+ // VAT rate
print ''.vatrate($line->vatrate, true).' | ';
// Unit price HT
print '';
@@ -2716,9 +2717,6 @@ if ($action != 'create' && $action != 'edit')
print '';
-//$conf->global->DOL_URL_ROOT_DOCUMENT_PHP=dol_buildpath('/expensereport/documentwrapper.php',1);
-
-
// Select mail models is same action as presend
if (GETPOST('modelselected', 'alpha')) {
$action = 'presend';
diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php
index 8028dff3855..a583f195d02 100644
--- a/htdocs/holiday/card.php
+++ b/htdocs/holiday/card.php
@@ -71,6 +71,11 @@ $error = 0;
* Actions
*/
+if (GETPOST('cancel', 'alpha'))
+{
+ $action = '';
+}
+
// If create a request
if ($action == 'create')
{
@@ -193,7 +198,35 @@ if ($action == 'create')
}
}
-if ($action == 'update')
+if ($action == 'update' && GETPOSTISSET('savevalidator') && ! empty($user->rights->holiday->approve))
+{
+ $object = new Holiday($db);
+ $object->fetch($id);
+
+ $object->oldcopy = dol_clone($object);
+
+ $object->fk_validator = GETPOST('valideur', 'int');
+
+ if ($object->fk_validator != $object->oldcopy->fk_validator)
+ {
+ $verif = $object->update($user);
+
+ if ($verif <= 0)
+ {
+ setEventMessages($object->error, $object->errors, 'warnings');
+ $action='editvalidator';
+ }
+ else
+ {
+ header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id);
+ exit;
+ }
+ }
+
+ $action = '';
+}
+
+if ($action == 'update' && ! GETPOSTISSET('savevalidator'))
{
$date_debut = dol_mktime(0, 0, 0, GETPOST('date_debut_month'), GETPOST('date_debut_day'), GETPOST('date_debut_year'));
$date_fin = dol_mktime(0, 0, 0, GETPOST('date_fin_month'), GETPOST('date_fin_day'), GETPOST('date_fin_year'));
@@ -1087,9 +1120,10 @@ else
{
$head=holiday_prepare_head($object);
- if ($action == 'edit' && $object->statut == 1)
+ if (($action == 'edit' && $object->statut == Holiday::STATUS_DRAFT) || ($action == 'editvalidator'))
{
- $edit = true;
+ if ($action == 'edit' && $object->statut == Holiday::STATUS_DRAFT) $edit = true;
+
print ' |
';
- if ($object->statut == 3 || $object->statut == 4) {
+ if ($object->statut == Holiday::STATUS_APPROVED || $object->statut == Holiday::STATUS_CANCELED) {
print '';
print '| '.$langs->trans('DateRefusCP').' | ';
print ''.dol_print_date($object->date_refuse, 'dayhour').' | ';
@@ -1325,20 +1374,21 @@ else
print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id, $langs->trans("TitleSetToDraft"), $langs->trans("ConfirmSetToDraft"), "confirm_draft", '', 1, 1);
}
-
- if ($action == 'edit' && $object->statut == Holiday::STATUS_DRAFT)
+ if (($action == 'edit' && $object->statut == Holiday::STATUS_DRAFT) || ($action == 'editvalidator'))
{
- print '';
print '';
}
-
if (! $edit)
{
print '';
diff --git a/htdocs/langs/en_US/paybox.lang b/htdocs/langs/en_US/paybox.lang
index 269242b910b..d3c26c8e65a 100644
--- a/htdocs/langs/en_US/paybox.lang
+++ b/htdocs/langs/en_US/paybox.lang
@@ -37,3 +37,4 @@ PAYBOX_PAYONLINE_SENDEMAIL=Email notification after payment attempt (success or
PAYBOX_PBX_SITE=Value for PBX SITE
PAYBOX_PBX_RANG=Value for PBX Rang
PAYBOX_PBX_IDENTIFIANT=Value for PBX ID
+PAYBOX_HMAC_KEY=HMAC key
\ No newline at end of file
diff --git a/htdocs/paybox/admin/paybox.php b/htdocs/paybox/admin/paybox.php
index 3c761b930e3..abad76ce228 100644
--- a/htdocs/paybox/admin/paybox.php
+++ b/htdocs/paybox/admin/paybox.php
@@ -73,7 +73,7 @@ if ($action == 'setvalue' && $user->admin)
if (! $result > 0) $error++;
$result=dolibarr_set_const($db, "PAYBOX_HMAC_KEY", dol_encode(GETPOST('PAYBOX_HMAC_KEY', 'alpha')), 'chaine', 0, '', $conf->entity);
if (! $result > 0) $error++;
-
+
if (! $error)
{
@@ -151,7 +151,7 @@ print '
';
print '