Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/cron/card.php htdocs/cron/list.php htdocs/filefunc.inc.php
This commit is contained in:
commit
0debcf745a
@ -121,7 +121,9 @@ $utils = new Utils($db);
|
||||
if ($what == 'mysql')
|
||||
{
|
||||
|
||||
$cmddump=GETPOST("mysqldump"); // Do not sanitize here with 'alpha', will be sanitize later by escapeshellarg
|
||||
$cmddump=GETPOST("mysqldump"); // Do not sanitize here with 'alpha', will be sanitize later by dol_sanitizePathName and escapeshellarg
|
||||
$cmddump=dol_sanitizePathName($cmddump);
|
||||
|
||||
if (! empty($dolibarr_main_restrict_os_commands))
|
||||
{
|
||||
$arrayofallowedcommand=explode(',', $dolibarr_main_restrict_os_commands);
|
||||
@ -168,7 +170,8 @@ if ($what == 'mysqlnobin')
|
||||
// POSTGRESQL
|
||||
if ($what == 'postgresql')
|
||||
{
|
||||
$cmddump=GETPOST("postgresqldump"); // Do not sanitize here with 'alpha', will be sanitize later by escapeshellarg
|
||||
$cmddump=GETPOST("postgresqldump"); // Do not sanitize here with 'alpha', will be sanitize later by dol_sanitizePathName and escapeshellarg
|
||||
$cmddump=dol_sanitizePathName($cmddump);
|
||||
|
||||
if (! $errormsg && $cmddump)
|
||||
{
|
||||
|
||||
@ -48,7 +48,7 @@ $langs->load("cashdesk");
|
||||
onfocus="javascript: this.select(); verifResultat('resultats_dhtml', this.value, <?php echo (isset($conf->global->BARCODE_USE_SEARCH_TO_SELECT) ? (int) $conf->global->BARCODE_USE_SEARCH_TO_SELECT : 1) ?>);"
|
||||
onBlur="javascript: document.getElementById('resultats_dhtml').innerHTML = '';"/>
|
||||
</td>
|
||||
<td class="select_design">
|
||||
<td class="select_design maxwidthonsmartphone">
|
||||
<?php /*
|
||||
$selected='';
|
||||
$htmlname='idprod';
|
||||
@ -60,7 +60,7 @@ $langs->load("cashdesk");
|
||||
*/
|
||||
?>
|
||||
|
||||
<select id="selProduit" name="selProduit" onchange="javascript: setSource('LISTE');">
|
||||
<select id="selProduit" class="maxwidthonsmartphone" name="selProduit" onchange="javascript: setSource('LISTE');">
|
||||
<?php
|
||||
print '<option value="0">'.$top_liste_produits.'</option>'."\n";
|
||||
|
||||
@ -80,7 +80,7 @@ $langs->load("cashdesk");
|
||||
|
||||
$label = $tab_designations[$i]['label'];
|
||||
|
||||
print '<option '.$selected.' value="'.$tab_designations[$i]['rowid'].'">'.dol_trunc($tab_designations[$i]['ref'],7).' - '.dol_trunc($label,35,'middle');
|
||||
print '<option '.$selected.' value="'.$tab_designations[$i]['rowid'].'">'.dol_trunc($tab_designations[$i]['ref'],16).' - '.dol_trunc($label,35,'middle');
|
||||
if (! empty($conf->stock->enabled) && !empty($conf_fkentrepot) && $tab_designations[$i]['fk_product_type']==0) print ' ('.$langs->trans("CashDeskStock").': '.(empty($tab_designations[$i]['reel'])?0:$tab_designations[$i]['reel']).')';
|
||||
print '</option>'."\n";
|
||||
|
||||
|
||||
@ -2395,7 +2395,7 @@ if ($action == 'create')
|
||||
}
|
||||
|
||||
// Payment term
|
||||
print '<tr><td class="nowrap">' . $langs->trans('PaymentConditionsShort') . '</td><td colspan="2">';
|
||||
print '<tr><td class="nowrap fieldrequired">' . $langs->trans('PaymentConditionsShort') . '</td><td colspan="2">';
|
||||
$form->select_conditions_paiements(isset($_POST['cond_reglement_id']) ? $_POST['cond_reglement_id'] : $cond_reglement_id, 'cond_reglement_id');
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
@ -1542,7 +1542,11 @@ else
|
||||
{
|
||||
print dol_print_date($db->jdate($objp->date_debut));
|
||||
// Warning si date prevu passee et pas en service
|
||||
if ($objp->statut == 0 && $db->jdate($objp->date_debut) < ($now - $conf->contrat->services->inactifs->warning_delay)) { print " ".img_warning($langs->trans("Late")); }
|
||||
if ($objp->statut == 0 && $db->jdate($objp->date_debut) < ($now - $conf->contrat->services->inactifs->warning_delay)) {
|
||||
$warning_delay=$conf->contrat->services->inactifs->warning_delay / 3600 / 24;
|
||||
$textlate = $langs->trans("Late").' = '.$langs->trans("DateReference").' > '.$langs->trans("DateToday").' '.(ceil($warning_delay) >= 0 ? '+' : '').ceil($warning_delay).' '.$langs->trans("days");
|
||||
print " ".img_warning($textlate);
|
||||
}
|
||||
}
|
||||
else print $langs->trans("Unknown");
|
||||
print ' - ';
|
||||
@ -1550,7 +1554,11 @@ else
|
||||
if ($objp->date_fin)
|
||||
{
|
||||
print dol_print_date($db->jdate($objp->date_fin));
|
||||
if ($objp->statut == 4 && $db->jdate($objp->date_fin) < ($now - $conf->contrat->services->expires->warning_delay)) { print " ".img_warning($langs->trans("Late")); }
|
||||
if ($objp->statut == 4 && $db->jdate($objp->date_fin) < ($now - $conf->contrat->services->expires->warning_delay)) {
|
||||
$warning_delay=$conf->contrat->services->expires->warning_delay / 3600 / 24;
|
||||
$textlate = $langs->trans("Late").' = '.$langs->trans("DateReference").' > '.$langs->trans("DateToday").' '.(ceil($warning_delay) >= 0 ? '+' : '').ceil($warning_delay).' '.$langs->trans("days");
|
||||
print " ".img_warning($textlate);
|
||||
}
|
||||
}
|
||||
else print $langs->trans("Unknown");
|
||||
|
||||
|
||||
@ -361,7 +361,12 @@ if ($resql)
|
||||
if (($mode == "" || $mode == -1) || $mode < 5)
|
||||
{
|
||||
print '<td align="center">'.($obj->date_fin_validite?dol_print_date($db->jdate($obj->date_fin_validite)):' ');
|
||||
if ($obj->date_fin_validite && $db->jdate($obj->date_fin_validite) < ($now - $conf->contrat->services->expires->warning_delay) && $obj->statut < 5) print img_warning($langs->trans("Late"));
|
||||
if ($obj->date_fin_validite && $db->jdate($obj->date_fin_validite) < ($now - $conf->contrat->services->expires->warning_delay) && $obj->statut < 5)
|
||||
{
|
||||
$warning_delay=$conf->contrat->services->expires->warning_delay / 3600 / 24;
|
||||
$textlate = $langs->trans("Late").' = '.$langs->trans("DateReference").' > '.$langs->trans("DateToday").' '.(ceil($warning_delay) >= 0 ? '+' : '').ceil($warning_delay).' '.$langs->trans("days");
|
||||
print img_warning($textlate);
|
||||
}
|
||||
else print ' ';
|
||||
}
|
||||
if (($mode == "" || $mode == -1) || $mode >= 5) print '<td align="center">'.dol_print_date($db->jdate($obj->date_cloture));
|
||||
|
||||
@ -443,10 +443,10 @@ function dol_size($size,$type='')
|
||||
*
|
||||
* @param string $str String to clean
|
||||
* @param string $newstr String to replace bad chars with
|
||||
* @param int $unaccent 1=Remove also accent (default), 0 do not remove them
|
||||
* @param int $unaccent 1=Remove also accent (default), 0 do not remove them
|
||||
* @return string String cleaned (a-zA-Z_)
|
||||
*
|
||||
* @see dol_string_nospecial, dol_string_unaccent
|
||||
* @see dol_string_nospecial, dol_string_unaccent, dol_sanitizePathName
|
||||
*/
|
||||
function dol_sanitizeFileName($str,$newstr='_',$unaccent=1)
|
||||
{
|
||||
@ -454,6 +454,22 @@ function dol_sanitizeFileName($str,$newstr='_',$unaccent=1)
|
||||
return dol_string_nospecial($unaccent?dol_string_unaccent($str):$str, $newstr, $filesystem_forbidden_chars);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean a string to use it as a path name
|
||||
*
|
||||
* @param string $str String to clean
|
||||
* @param string $newstr String to replace bad chars with
|
||||
* @param int $unaccent 1=Remove also accent (default), 0 do not remove them
|
||||
* @return string String cleaned (a-zA-Z_)
|
||||
*
|
||||
* @see dol_string_nospecial, dol_string_unaccent, dol_sanitizeFileName
|
||||
*/
|
||||
function dol_sanitizePathName($str,$newstr='_',$unaccent=1)
|
||||
{
|
||||
$filesystem_forbidden_chars = array('<','>','?','*','|','"','°');
|
||||
return dol_string_nospecial($unaccent?dol_string_unaccent($str):$str, $newstr, $filesystem_forbidden_chars);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean a string from all accent characters to be used as ref, login or by dol_sanitizeFileName
|
||||
*
|
||||
|
||||
@ -1486,7 +1486,8 @@ class pdf_azur extends ModelePDFPropales
|
||||
if (count($arrayidcontact) > 0)
|
||||
{
|
||||
$object->fetch_user($arrayidcontact[0]);
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Name").": ".$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs))."\n";
|
||||
$labelbeforecontactname=($outputlangs->transnoentities("FromContactName")!='FromContactName'?$outputlangs->transnoentities("FromContactName"):$outputlangs->transnoentities("Name"));
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$labelbeforecontactname." ".$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs))."\n";
|
||||
}
|
||||
|
||||
$carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty);
|
||||
|
||||
@ -1306,7 +1306,8 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
||||
if (count($arrayidcontact) > 0)
|
||||
{
|
||||
$object->fetch_user($arrayidcontact[0]);
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Name").": ".$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs))."\n";
|
||||
$labelbeforecontactname=($outputlangs->transnoentities("FromContactName")!='FromContactName'?$outputlangs->transnoentities("FromContactName"):$outputlangs->transnoentities("Name"));
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$labelbeforecontactname.": ".$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs))."\n";
|
||||
}
|
||||
|
||||
$carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty);
|
||||
|
||||
@ -43,6 +43,7 @@ $action=GETPOST('action','alpha');
|
||||
$confirm=GETPOST('confirm','alpha');
|
||||
$cancel=GETPOST('cancel');
|
||||
$backtourl=GETPOST('backtourl','alpha');
|
||||
$securitykey = GETPOST('securitykey','alpha');
|
||||
|
||||
|
||||
/*
|
||||
@ -100,30 +101,38 @@ if ($action == 'confirm_delete' && $confirm == "yes" && $user->rights->cron->del
|
||||
// Execute jobs
|
||||
if ($action == 'confirm_execute' && $confirm == "yes" && $user->rights->cron->execute)
|
||||
{
|
||||
$now = dol_now(); // Date we start
|
||||
if (! empty($conf->global->CRON_KEY) && $conf->global->CRON_KEY != $securitykey)
|
||||
{
|
||||
setEventMessages('Security key '.$securitykey.' is wrong', null, 'errors');
|
||||
$action='';
|
||||
}
|
||||
else
|
||||
{
|
||||
$now = dol_now(); // Date we start
|
||||
|
||||
$result=$object->run_jobs($user->login);
|
||||
|
||||
$result=$object->run_jobs($user->login);
|
||||
|
||||
if ($result < 0)
|
||||
{
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
$action='';
|
||||
}
|
||||
else
|
||||
{
|
||||
$res = $object->reprogram_jobs($user->login, $now);
|
||||
if ($res > 0)
|
||||
{
|
||||
if ($object->lastresult > 0) setEventMessages($langs->trans("JobFinished"), null, 'warnings');
|
||||
else setEventMessages($langs->trans("JobFinished"), null, 'mesgs');
|
||||
$action='';
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
$action='';
|
||||
}
|
||||
}
|
||||
if ($result < 0)
|
||||
{
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
$action='';
|
||||
}
|
||||
else
|
||||
{
|
||||
$res = $object->reprogram_jobs($user->login, $now);
|
||||
if ($res > 0)
|
||||
{
|
||||
if ($object->lastresult > 0) setEventMessages($langs->trans("JobFinished"), null, 'warnings');
|
||||
else setEventMessages($langs->trans("JobFinished"), null, 'mesgs');
|
||||
$action='';
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
$action='';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -284,7 +293,7 @@ if ($action == 'delete')
|
||||
}
|
||||
|
||||
if ($action == 'execute'){
|
||||
print $form->formconfirm($_SERVER['PHP_SELF']."?id=".$object->id,$langs->trans("CronExecute"),$langs->trans("CronConfirmExecute"),"confirm_execute",'','',1);
|
||||
print $form->formconfirm($_SERVER['PHP_SELF']."?id=".$object->id.'&securitykey='.$securitykey,$langs->trans("CronExecute"),$langs->trans("CronConfirmExecute"),"confirm_execute",'','',1);
|
||||
|
||||
$action='';
|
||||
}
|
||||
@ -316,7 +325,7 @@ if (($action=="create") || ($action=="edit"))
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
print '<tr><td class="titlefieldcreate">';
|
||||
print '<tr><td class="fieldrequired titlefieldcreate">';
|
||||
print $langs->trans('CronLabel')."</td>";
|
||||
print "<td><input type=\"text\" size=\"30\" name=\"label\" value=\"".$object->label."\" /> ";
|
||||
print "</td>";
|
||||
@ -324,7 +333,7 @@ if (($action=="create") || ($action=="edit"))
|
||||
print "</td>";
|
||||
print "</tr>\n";
|
||||
|
||||
print "<tr><td>";
|
||||
print '<tr><td class="fieldrequired">';
|
||||
print $langs->trans('CronType')."</td><td>";
|
||||
print $formCron->select_typejob('jobtype',$object->jobtype);
|
||||
print "</td>";
|
||||
@ -395,7 +404,7 @@ if (($action=="create") || ($action=="edit"))
|
||||
print "</td>";
|
||||
print "</tr>\n";
|
||||
|
||||
print "<tr><td>";
|
||||
print '<tr><td class="fieldrequired">';
|
||||
print $langs->trans('CronEvery')."</td>";
|
||||
print "<td>";
|
||||
print "<select name=\"nbfrequency\">";
|
||||
@ -640,7 +649,8 @@ else
|
||||
|
||||
print "<tr><td>";
|
||||
print $langs->trans('CronMaxRun')."</td>";
|
||||
print "<td>".$object->maxrun;
|
||||
print "<td>";
|
||||
print $object->maxrun>0?$object->maxrun:'';
|
||||
print "</td></tr>";
|
||||
|
||||
print "<tr><td>";
|
||||
@ -709,7 +719,7 @@ else
|
||||
print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->transnoentitiesnoconv("JobDisabled")).'">'.$langs->trans("CronExecute").'</a>';
|
||||
}
|
||||
else {
|
||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?action=execute&id='.$object->id.'">'.$langs->trans("CronExecute").'</a>';
|
||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?action=execute&id='.$object->id.(empty($conf->global->CRON_KEY)?'':'&securitykey='.$conf->global->CRON_KEY).'">'.$langs->trans("CronExecute").'</a>';
|
||||
}
|
||||
|
||||
if (! $user->rights->cron->create) {
|
||||
|
||||
@ -191,7 +191,7 @@ class Cronjob extends CommonObject
|
||||
$sql.= " ".(! isset($this->params)?'NULL':"'".$this->db->escape($this->params)."'").",";
|
||||
$sql.= " ".(! isset($this->md5params)?'NULL':"'".$this->db->escape($this->md5params)."'").",";
|
||||
$sql.= " ".(! isset($this->module_name)?'NULL':"'".$this->db->escape($this->module_name)."'").",";
|
||||
$sql.= " ".(! isset($this->priority)?'NULL':"'".$this->priority."'").",";
|
||||
$sql.= " ".(! isset($this->priority)?'0':$this->priority).",";
|
||||
$sql.= " ".(! isset($this->datelastrun) || dol_strlen($this->datelastrun)==0?'NULL':$this->db->idate($this->datelastrun)).",";
|
||||
$sql.= " ".(! isset($this->datenextrun) || dol_strlen($this->datenextrun)==0?'NULL':$this->db->idate($this->datenextrun)).",";
|
||||
$sql.= " ".(! isset($this->dateend) || dol_strlen($this->dateend)==0?'NULL':$this->db->idate($this->dateend)).",";
|
||||
@ -200,13 +200,13 @@ class Cronjob extends CommonObject
|
||||
$sql.= " ".(! isset($this->datelastresult) || dol_strlen($this->datelastresult)==0?'NULL':$this->db->idate($this->datelastresult)).",";
|
||||
$sql.= " ".(! isset($this->lastoutput)?'NULL':"'".$this->db->escape($this->lastoutput)."'").",";
|
||||
$sql.= " ".(! isset($this->unitfrequency)?'NULL':"'".$this->unitfrequency."'").",";
|
||||
$sql.= " ".(! isset($this->frequency)?'NULL':"'".$this->frequency."'").",";
|
||||
$sql.= " ".(! isset($this->status)?'0':"'".$this->status."'").",";
|
||||
$sql.= " ".(! isset($this->frequency)?'0':$this->frequency).",";
|
||||
$sql.= " ".(! isset($this->status)?'0':$this->status).",";
|
||||
$sql.= " ".$user->id.",";
|
||||
$sql.= " ".$user->id.",";
|
||||
$sql.= " ".(! isset($this->note)?'NULL':"'".$this->db->escape($this->note)."'").",";
|
||||
$sql.= " ".(! isset($this->nbrun)?'0':"'".$this->db->escape($this->nbrun)."'").",";
|
||||
$sql.= " ".(empty($this->maxrun)?'null':"'".$this->db->escape($this->maxrun)."'").",";
|
||||
$sql.= " ".(! isset($this->nbrun)?'0':$this->db->escape($this->nbrun)).",";
|
||||
$sql.= " ".(empty($this->maxrun)?'0':$this->db->escape($this->maxrun)).",";
|
||||
$sql.= " ".(! isset($this->libname)?'NULL':"'".$this->db->escape($this->libname)."'").",";
|
||||
$sql.= " ".(! isset($this->test)?'NULL':"'".$this->db->escape($this->test)."'")."";
|
||||
$sql.= ")";
|
||||
@ -363,6 +363,9 @@ class Cronjob extends CommonObject
|
||||
function fetch_all($sortorder='DESC', $sortfield='t.rowid', $limit=0, $offset=0, $status=1, $filter='')
|
||||
{
|
||||
global $langs;
|
||||
|
||||
$this->lines=array();
|
||||
|
||||
$sql = "SELECT";
|
||||
$sql.= " t.rowid,";
|
||||
$sql.= " t.tms,";
|
||||
@ -399,8 +402,10 @@ class Cronjob extends CommonObject
|
||||
if ($status == 2) $sql.= " AND t.status = 2";
|
||||
//Manage filter
|
||||
if (is_array($filter) && count($filter)>0) {
|
||||
foreach($filter as $key => $value) {
|
||||
$sql.= ' AND '.$key.' LIKE \'%'.$value.'%\'';
|
||||
foreach($filter as $key => $value)
|
||||
{
|
||||
if ($key == 't.rowid') $sql.= ' AND '.$key.' = '.$this->db->escape($value);
|
||||
else $sql.= ' AND '.$key.' LIKE \'%'.$this->db->escape($value).'%\'';
|
||||
}
|
||||
}
|
||||
|
||||
@ -424,8 +429,6 @@ class Cronjob extends CommonObject
|
||||
|
||||
if ($num)
|
||||
{
|
||||
$this->lines=array();
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
|
||||
@ -515,7 +518,7 @@ class Cronjob extends CommonObject
|
||||
if (isset($this->status)) $this->status=trim($this->status);
|
||||
if (isset($this->note)) $this->note=trim($this->note);
|
||||
if (isset($this->nbrun)) $this->nbrun=trim($this->nbrun);
|
||||
if (isset($this->maxrun)) $this->maxrun=trim($this->maxrun);
|
||||
if (empty($this->maxrun)) $this->maxrun=0;
|
||||
if (isset($this->libname)) $this->libname = trim($this->libname);
|
||||
if (isset($this->test)) $this->test = trim($this->test);
|
||||
|
||||
@ -586,7 +589,7 @@ class Cronjob extends CommonObject
|
||||
$sql.= " fk_user_mod=".$user->id.",";
|
||||
$sql.= " note=".(isset($this->note)?"'".$this->db->escape($this->note)."'":"null").",";
|
||||
$sql.= " nbrun=".((isset($this->nbrun) && $this->nbrun >0)?$this->nbrun:"null").",";
|
||||
$sql.= " maxrun=".((isset($this->maxrun) && $this->maxrun > 0)?$this->maxrun:"null").",";
|
||||
$sql.= " maxrun=".((isset($this->maxrun) && $this->maxrun > 0)?$this->maxrun:"0").",";
|
||||
$sql.= " libname=".(isset($this->libname)?"'".$this->db->escape($this->libname)."'":"null").",";
|
||||
$sql.= " test=".(isset($this->test)?"'".$this->db->escape($this->test)."'":"null");
|
||||
$sql.= " WHERE rowid=".$this->id;
|
||||
|
||||
@ -58,7 +58,7 @@ if ($status == '') $status=-2;
|
||||
|
||||
//Search criteria
|
||||
$search_label=GETPOST("search_label",'alpha');
|
||||
if (empty($arch)) $arch = 0;
|
||||
$securitykey = GETPOST('securitykey','alpha');
|
||||
|
||||
$diroutputmassaction=$conf->cronjob->dir_output . '/temp/massgeneration/'.$user->id;
|
||||
|
||||
@ -106,35 +106,43 @@ if ($action == 'confirm_delete' && $confirm == "yes" && $user->rights->cron->del
|
||||
// Execute jobs
|
||||
if ($action == 'confirm_execute' && $confirm == "yes" && $user->rights->cron->execute)
|
||||
{
|
||||
$object = new Cronjob($db);
|
||||
$job = $object->fetch($id);
|
||||
|
||||
$now = dol_now(); // Date we start
|
||||
|
||||
$resrunjob = $object->run_jobs($user->login); // Return -1 if KO, 1 if OK
|
||||
if ($resrunjob < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
|
||||
// Programm next run
|
||||
$res = $object->reprogram_jobs($user->login, $now);
|
||||
if ($res > 0)
|
||||
{
|
||||
if ($resrunjob >= 0) // We add result of reprogram ony if no error message already reported
|
||||
{
|
||||
if ($object->lastresult >= 0) setEventMessages($langs->trans("JobFinished"), null, 'mesgs');
|
||||
else setEventMessages($langs->trans("JobFinished"), null, 'errors');
|
||||
}
|
||||
$action='';
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
$action='';
|
||||
}
|
||||
|
||||
header("Location: ".DOL_URL_ROOT.'/cron/list.php?status=-2'); // Make a call to avoid to run twice job when using back
|
||||
exit;
|
||||
if (! empty($conf->global->CRON_KEY) && $conf->global->CRON_KEY != $securitykey)
|
||||
{
|
||||
setEventMessages('Security key '.$securitykey.' is wrong', null, 'errors');
|
||||
$action='';
|
||||
}
|
||||
else
|
||||
{
|
||||
$object = new Cronjob($db);
|
||||
$job = $object->fetch($id);
|
||||
|
||||
$now = dol_now(); // Date we start
|
||||
|
||||
$resrunjob = $object->run_jobs($user->login); // Return -1 if KO, 1 if OK
|
||||
if ($resrunjob < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
|
||||
// Programm next run
|
||||
$res = $object->reprogram_jobs($user->login, $now);
|
||||
if ($res > 0)
|
||||
{
|
||||
if ($resrunjob >= 0) // We add result of reprogram ony if no error message already reported
|
||||
{
|
||||
if ($object->lastresult >= 0) setEventMessages($langs->trans("JobFinished"), null, 'mesgs');
|
||||
else setEventMessages($langs->trans("JobFinished"), null, 'errors');
|
||||
}
|
||||
$action='';
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
$action='';
|
||||
}
|
||||
|
||||
header("Location: ".DOL_URL_ROOT.'/cron/list.php?status=-2'); // Make a call to avoid to run twice job when using back
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -224,7 +232,13 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||
$nbtotalofrecords = $db->num_rows($result);
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
$sql.= $db->plimit($limit+1, $offset);
|
||||
=======
|
||||
if ($action == 'execute')
|
||||
{
|
||||
print $form->formconfirm($_SERVER['PHP_SELF']."?id=".$id.'&status='.$status.'&securitykey='.$securitykey,$langs->trans("CronExecute"),$langs->trans("CronConfirmExecute"),"confirm_execute",'','',1);
|
||||
>>>>>>> branch '4.0' of git@github.com:Dolibarr/dolibarr.git
|
||||
|
||||
$result=$db->query($sql);
|
||||
if (! $result) dol_print_error($db);
|
||||
@ -442,7 +456,11 @@ if ($num > 0)
|
||||
}
|
||||
if ($user->rights->cron->execute)
|
||||
{
|
||||
<<<<<<< HEAD
|
||||
if (!empty($obj->status)) print "<a href=\"".$_SERVER["PHP_SELF"]."?id=".$obj->rowid."&action=execute".($sortfield?'&sortfield='.$sortfield:'').($sortorder?'&sortorder='.$sortorder:'').$param."\" title=\"".dol_escape_htmltag($langs->trans('CronExecute'))."\">".img_picto($langs->trans('CronExecute'),"play")."</a>";
|
||||
=======
|
||||
if (!empty($line->status)) print "<a href=\"".$_SERVER["PHP_SELF"]."?id=".$line->id."&action=execute".(empty($conf->global->CRON_KEY)?'':'&securitykey='.$conf->global->CRON_KEY).($sortfield?'&sortfield='.$sortfield:'').($sortorder?'&sortorder='.$sortorder:'').$param."\" title=\"".dol_escape_htmltag($langs->trans('CronExecute'))."\">".img_picto($langs->trans('CronExecute'),"play")."</a>";
|
||||
>>>>>>> branch '4.0' of git@github.com:Dolibarr/dolibarr.git
|
||||
else print "<a href=\"#\" title=\"".dol_escape_htmltag($langs->trans('JobDisabled'))."\">".img_picto($langs->trans('JobDisabled'),"play")."</a>";
|
||||
} else {
|
||||
print "<a href=\"#\" title=\"".dol_escape_htmltag($langs->trans('NotEnoughPermissions'))."\">".img_picto($langs->trans('NotEnoughPermissions'),"play")."</a>";
|
||||
|
||||
@ -19,9 +19,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/fourn/commande/index.php
|
||||
* \ingroup commande fournisseur
|
||||
* \brief Home page of supplier's orders area
|
||||
* \file htdocs/fourn/commande/index.php
|
||||
* \ingroup commande fournisseur
|
||||
* \brief Home page of supplier's orders area
|
||||
*/
|
||||
|
||||
require '../../main.inc.php';
|
||||
@ -50,8 +50,7 @@ $formfile = new FormFile($db);
|
||||
|
||||
print load_fiche_titre($langs->trans("SuppliersOrdersArea"));
|
||||
|
||||
print '<table class="notopnoleftnoright" width="100%">';
|
||||
print '<tr valign="top"><td class="notopnoleft" width="30%">';
|
||||
print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||
|
||||
|
||||
/*
|
||||
@ -84,72 +83,72 @@ $sql.= " GROUP BY cf.fk_statut";
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
|
||||
$var=True;
|
||||
$var=True;
|
||||
|
||||
$total=0;
|
||||
$totalinprocess=0;
|
||||
$dataseries=array();
|
||||
$vals=array();
|
||||
// 0=Draft -> 1=Validated -> 2=Approved -> 3=Process runing -> 4=Received partially -> 5=Received totally -> (reopen) 4=Received partially
|
||||
// -> 7=Canceled/Never received -> (reopen) 3=Process runing
|
||||
// -> 6=Canceled -> (reopen) 2=Approved
|
||||
while ($i < $num)
|
||||
{
|
||||
$row = $db->fetch_row($resql);
|
||||
if ($row)
|
||||
{
|
||||
if ($row[1]!=7 && $row[1]!=6 && $row[1]!=5)
|
||||
{
|
||||
$vals[$row[1]]=$row[0];
|
||||
$totalinprocess+=$row[0];
|
||||
}
|
||||
$total+=$row[0];
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
$db->free($resql);
|
||||
$total=0;
|
||||
$totalinprocess=0;
|
||||
$dataseries=array();
|
||||
$vals=array();
|
||||
// 0=Draft -> 1=Validated -> 2=Approved -> 3=Process runing -> 4=Received partially -> 5=Received totally -> (reopen) 4=Received partially
|
||||
// -> 7=Canceled/Never received -> (reopen) 3=Process runing
|
||||
// -> 6=Canceled -> (reopen) 2=Approved
|
||||
while ($i < $num)
|
||||
{
|
||||
$row = $db->fetch_row($resql);
|
||||
if ($row)
|
||||
{
|
||||
if ($row[1]!=7 && $row[1]!=6 && $row[1]!=5)
|
||||
{
|
||||
$vals[$row[1]]=$row[0];
|
||||
$totalinprocess+=$row[0];
|
||||
}
|
||||
$total+=$row[0];
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
$db->free($resql);
|
||||
|
||||
print '<table class="noborder nohover" width="100%">';
|
||||
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Statistics").' - '.$langs->trans("SuppliersOrders").'</td></tr>';
|
||||
print "</tr>\n";
|
||||
foreach (array(0,1,2,3,4,5,6) as $statut)
|
||||
{
|
||||
$dataseries[]=array('label'=>$commandestatic->LibStatut($statut,1),'data'=>(isset($vals[$statut])?(int) $vals[$statut]:0));
|
||||
if (! $conf->use_javascript_ajax)
|
||||
{
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td>'.$commandestatic->LibStatut($statut,0).'</td>';
|
||||
print '<td align="right"><a href="list.php?statut='.$statut.'">'.(isset($vals[$statut])?$vals[$statut]:0).'</a></td>';
|
||||
print "</tr>\n";
|
||||
}
|
||||
}
|
||||
if ($conf->use_javascript_ajax)
|
||||
{
|
||||
print '<tr class="impair"><td align="center" colspan="2">';
|
||||
$data=array('series'=>$dataseries);
|
||||
dol_print_graph('stats',300,180,$data,1,'pie',1,'',0);
|
||||
print '</td></tr>';
|
||||
}
|
||||
//if ($totalinprocess != $total)
|
||||
//print '<tr class="liste_total"><td>'.$langs->trans("Total").' ('.$langs->trans("SuppliersOrdersRunning").')</td><td align="right">'.$totalinprocess.'</td></tr>';
|
||||
print '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td align="right">'.$total.'</td></tr>';
|
||||
print '<table class="noborder nohover" width="100%">';
|
||||
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Statistics").' - '.$langs->trans("SuppliersOrders").'</td></tr>';
|
||||
print "</tr>\n";
|
||||
foreach (array(0,1,2,3,4,5,6) as $statut)
|
||||
{
|
||||
$dataseries[]=array('label'=>$commandestatic->LibStatut($statut,1),'data'=>(isset($vals[$statut])?(int) $vals[$statut]:0));
|
||||
if (! $conf->use_javascript_ajax)
|
||||
{
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td>'.$commandestatic->LibStatut($statut,0).'</td>';
|
||||
print '<td align="right"><a href="list.php?statut='.$statut.'">'.(isset($vals[$statut])?$vals[$statut]:0).'</a></td>';
|
||||
print "</tr>\n";
|
||||
}
|
||||
}
|
||||
if ($conf->use_javascript_ajax)
|
||||
{
|
||||
print '<tr class="impair"><td align="center" colspan="2">';
|
||||
$data=array('series'=>$dataseries);
|
||||
dol_print_graph('stats',300,180,$data,1,'pie',1,'',0);
|
||||
print '</td></tr>';
|
||||
}
|
||||
//if ($totalinprocess != $total)
|
||||
//print '<tr class="liste_total"><td>'.$langs->trans("Total").' ('.$langs->trans("SuppliersOrdersRunning").')</td><td align="right">'.$totalinprocess.'</td></tr>';
|
||||
print '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td align="right">'.$total.'</td></tr>';
|
||||
|
||||
print "</table><br>";
|
||||
print "</table><br>";
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
/*
|
||||
* Legends / Status
|
||||
*
|
||||
* Motivo: Mostrar todos os Status e dar a possibilidade de filtrar apenas um deles
|
||||
* Reason: Show all Status and give the possibility to filter only one
|
||||
* Motivo: Mostrar todos os Status e dar a possibilidade de filtrar apenas um deles
|
||||
* Reason: Show all Status and give the possibility to filter only one
|
||||
*/
|
||||
|
||||
$sql = "SELECT count(cf.rowid), fk_statut";
|
||||
@ -165,34 +164,34 @@ $sql.= " GROUP BY cf.fk_statut";
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
|
||||
print '<table class="liste" width="100%">';
|
||||
print '<table class="liste" width="100%">';
|
||||
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Status").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Nb").'</td>';
|
||||
print "</tr>\n";
|
||||
$var=True;
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Status").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Nb").'</td>';
|
||||
print "</tr>\n";
|
||||
$var=True;
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$row = $db->fetch_row($resql);
|
||||
$var=!$var;
|
||||
while ($i < $num)
|
||||
{
|
||||
$row = $db->fetch_row($resql);
|
||||
$var=!$var;
|
||||
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td>'.$langs->trans($commandestatic->statuts[$row[1]]).'</td>';
|
||||
print '<td align="right"><a href="list.php?statut='.$row[1].'">'.$row[0].' '.$commandestatic->LibStatut($row[1],3).'</a></td>';
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td>'.$langs->trans($commandestatic->statuts[$row[1]]).'</td>';
|
||||
print '<td align="right"><a href="list.php?statut='.$row[1].'">'.$row[0].' '.$commandestatic->LibStatut($row[1],3).'</a></td>';
|
||||
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
print "</table><br>";
|
||||
$db->free($resql);
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
print "</table><br>";
|
||||
$db->free($resql);
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
|
||||
@ -202,41 +201,41 @@ else
|
||||
|
||||
if (! empty($conf->fournisseur->enabled))
|
||||
{
|
||||
$sql = "SELECT c.rowid, c.ref, s.nom as name, s.rowid as socid";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."commande_fournisseur as c";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
$sql.= " WHERE c.fk_soc = s.rowid";
|
||||
$sql.= " AND c.entity = ".$conf->entity;
|
||||
$sql.= " AND c.fk_statut = 0";
|
||||
if (! empty($socid)) $sql.= " AND c.fk_soc = ".$socid;
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||
$sql = "SELECT c.rowid, c.ref, s.nom as name, s.rowid as socid";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."commande_fournisseur as c";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
$sql.= " WHERE c.fk_soc = s.rowid";
|
||||
$sql.= " AND c.entity = ".$conf->entity;
|
||||
$sql.= " AND c.fk_statut = 0";
|
||||
if (! empty($socid)) $sql.= " AND c.fk_soc = ".$socid;
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="2">'.$langs->trans("DraftOrders").'</td></tr>';
|
||||
$langs->load("orders");
|
||||
$num = $db->num_rows($resql);
|
||||
if ($num)
|
||||
{
|
||||
$i = 0;
|
||||
$var = True;
|
||||
while ($i < $num)
|
||||
{
|
||||
$var=!$var;
|
||||
$obj = $db->fetch_object($resql);
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td class="nowrap">';
|
||||
print "<a href=\"card.php?id=".$obj->rowid."\">".img_object($langs->trans("ShowOrder"),"order").' '.$obj->ref."</a></td>";
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/fourn/card.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($obj->name,24).'</a></td></tr>';
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
print "</table><br>";
|
||||
}
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="2">'.$langs->trans("DraftOrders").'</td></tr>';
|
||||
$langs->load("orders");
|
||||
$num = $db->num_rows($resql);
|
||||
if ($num)
|
||||
{
|
||||
$i = 0;
|
||||
$var = True;
|
||||
while ($i < $num)
|
||||
{
|
||||
$var=!$var;
|
||||
$obj = $db->fetch_object($resql);
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td class="nowrap">';
|
||||
print "<a href=\"card.php?id=".$obj->rowid."\">".img_object($langs->trans("ShowOrder"),"order").' '.$obj->ref."</a></td>";
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/fourn/card.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($obj->name,24).'</a></td></tr>';
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
print "</table><br>";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -258,40 +257,40 @@ $sql.= " AND subperms = 'approuver'";
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
|
||||
print '<table class="liste" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("UserWithApproveOrderGrant").'</td>';
|
||||
print "</tr>\n";
|
||||
$var=True;
|
||||
print '<table class="liste" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("UserWithApproveOrderGrant").'</td>';
|
||||
print "</tr>\n";
|
||||
$var=True;
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
$var=!$var;
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
$var=!$var;
|
||||
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td>';
|
||||
$userstatic->id=$obj->rowid;
|
||||
$userstatic->lastname=$obj->lastname;
|
||||
$userstatic->firstname=$obj->firstname;
|
||||
$userstatic->email=$obj->email;
|
||||
print $userstatic->getNomUrl(1);
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
print "</table><br>";
|
||||
$db->free($resql);
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td>';
|
||||
$userstatic->id=$obj->rowid;
|
||||
$userstatic->lastname=$obj->lastname;
|
||||
$userstatic->firstname=$obj->firstname;
|
||||
$userstatic->email=$obj->email;
|
||||
print $userstatic->getNomUrl(1);
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
print "</table><br>";
|
||||
$db->free($resql);
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
|
||||
print '</td><td width="70%" valign="top" class="notopnoleftnoright">';
|
||||
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
||||
|
||||
|
||||
/*
|
||||
@ -314,52 +313,52 @@ $sql.= $db->plimit($max, 0);
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="4">'.$langs->trans("LastModifiedOrders",$max).'</td></tr>';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="4">'.$langs->trans("LastModifiedOrders",$max).'</td></tr>';
|
||||
|
||||
$num = $db->num_rows($resql);
|
||||
if ($num)
|
||||
{
|
||||
$i = 0;
|
||||
$var = True;
|
||||
while ($i < $num)
|
||||
{
|
||||
$var=!$var;
|
||||
$obj = $db->fetch_object($resql);
|
||||
$num = $db->num_rows($resql);
|
||||
if ($num)
|
||||
{
|
||||
$i = 0;
|
||||
$var = True;
|
||||
while ($i < $num)
|
||||
{
|
||||
$var=!$var;
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td width="20%" class="nowrap">';
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td width="20%" class="nowrap">';
|
||||
|
||||
$commandestatic->id=$obj->rowid;
|
||||
$commandestatic->ref=$obj->ref;
|
||||
$commandestatic->id=$obj->rowid;
|
||||
$commandestatic->ref=$obj->ref;
|
||||
|
||||
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
|
||||
print '<td width="96" class="nobordernopadding nowrap">';
|
||||
print $commandestatic->getNomUrl(1);
|
||||
print '</td>';
|
||||
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
|
||||
print '<td width="96" class="nobordernopadding nowrap">';
|
||||
print $commandestatic->getNomUrl(1);
|
||||
print '</td>';
|
||||
|
||||
print '<td width="16" class="nobordernopadding nowrap">';
|
||||
print ' ';
|
||||
print '</td>';
|
||||
print '<td width="16" class="nobordernopadding nowrap">';
|
||||
print ' ';
|
||||
print '</td>';
|
||||
|
||||
print '<td width="16" align="right" class="nobordernopadding hideonsmartphone">';
|
||||
$filename=dol_sanitizeFileName($obj->ref);
|
||||
$filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
||||
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
|
||||
print $formfile->getDocumentsLink($commandestatic->element, $filename, $filedir);
|
||||
print '</td></tr></table>';
|
||||
print '<td width="16" align="right" class="nobordernopadding hideonsmartphone">';
|
||||
$filename=dol_sanitizeFileName($obj->ref);
|
||||
$filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
||||
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
|
||||
print $formfile->getDocumentsLink($commandestatic->element, $filename, $filedir);
|
||||
print '</td></tr></table>';
|
||||
|
||||
print '</td>';
|
||||
print '</td>';
|
||||
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/fourn/card.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.$obj->name.'</a></td>';
|
||||
print '<td>'.dol_print_date($db->jdate($obj->tms),'day').'</td>';
|
||||
print '<td align="right">'.$commandestatic->LibStatut($obj->fk_statut,5).'</td>';
|
||||
print '</tr>';
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
print "</table><br>";
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/fourn/card.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.$obj->name.'</a></td>';
|
||||
print '<td>'.dol_print_date($db->jdate($obj->tms),'day').'</td>';
|
||||
print '<td align="right">'.$commandestatic->LibStatut($obj->fk_statut,5).'</td>';
|
||||
print '</tr>';
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
print "</table><br>";
|
||||
}
|
||||
else dol_print_error($db);
|
||||
|
||||
@ -433,7 +432,7 @@ print "</table><br>";
|
||||
}
|
||||
*/
|
||||
|
||||
print '</td></tr></table>';
|
||||
print '</div></div></div>';
|
||||
|
||||
llxFooter();
|
||||
|
||||
|
||||
@ -299,7 +299,7 @@ print_liste_field_titre($langs->trans("Type"),$_SERVER["PHP_SELF"],'','','','',$
|
||||
print_liste_field_titre($langs->trans("Duration"),$_SERVER["PHP_SELF"],'','','','align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("DateDebCP"),$_SERVER["PHP_SELF"],"cp.date_debut","",'','align="center"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("DateFinCP"),$_SERVER["PHP_SELF"],"cp.date_fin","",'','align="center"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"cp.statut","",'','align="center"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"cp.statut","",'','align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre('',$_SERVER["PHP_SELF"],"",'','','',$sortfield,$sortorder,'maxwidthsearch ');
|
||||
print "</tr>\n";
|
||||
|
||||
@ -318,14 +318,14 @@ print '</td>';
|
||||
// UTILISATEUR
|
||||
if ($user->rights->holiday->write_all)
|
||||
{
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<td class="liste_titre maxwidthonsmartphone" align="left">';
|
||||
print $form->select_dolusers($search_employe,"search_employe",1,"",0,'','',0,32,0,'',0,'','maxwidth200');
|
||||
print '</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
//print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<td class="liste_titre maxwidthonsmartphone" align="left">';
|
||||
print $form->select_dolusers($user->id,"search_employe",1,"",1,'','',0,32,0,'',0,'','maxwidth200');
|
||||
print '</td>';
|
||||
}
|
||||
@ -333,7 +333,7 @@ else
|
||||
// APPROVER
|
||||
if($user->rights->holiday->write_all)
|
||||
{
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<td class="liste_titre maxwidthonsmartphone" align="left">';
|
||||
|
||||
$validator = new UserGroup($db);
|
||||
$excludefilter=$user->admin?'':'u.rowid <> '.$user->id;
|
||||
@ -377,7 +377,7 @@ $formother->select_year($year_end,'year_end',1, $min_year, $max_year);
|
||||
print '</td>';
|
||||
|
||||
// STATUT
|
||||
print '<td class="liste_titre" width="70px;" align="center">';
|
||||
print '<td class="liste_titre maxwidthonsmartphone maxwidth200" align="right">';
|
||||
$holiday->selectStatutCP($search_statut);
|
||||
print '</td>';
|
||||
|
||||
|
||||
@ -627,22 +627,12 @@ function jscheckparam()
|
||||
ok=false;
|
||||
alert('<?php echo dol_escape_js($langs->transnoentities("YouAskToCreateDatabaseSoRootRequired")); ?>');
|
||||
}
|
||||
else if (document.forminstall.db_create_database.checked == true && (document.forminstall.db_user_root.value == ''))
|
||||
{
|
||||
ok=false;
|
||||
alert('<?php echo dol_escape_js($langs->transnoentities("YouAskToCreateDatabaseSoRootRequired")); ?>');
|
||||
}
|
||||
// If create user asked
|
||||
else if (document.forminstall.db_create_user.checked == true && (document.forminstall.db_user_root.value == ''))
|
||||
{
|
||||
ok=false;
|
||||
alert('<?php echo dol_escape_js($langs->transnoentities("YouAskToCreateDatabaseUserSoRootRequired")); ?>');
|
||||
}
|
||||
else if (document.forminstall.db_create_user.checked == true && (document.forminstall.db_user_root.value == ''))
|
||||
{
|
||||
ok=false;
|
||||
alert('<?php echo dol_escape_js($langs->transnoentities("YouAskToCreateDatabaseUserSoRootRequired")); ?>');
|
||||
}
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
||||
@ -544,3 +544,4 @@ INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (178,
|
||||
-- VMYSQL4.1 ALTER TABLE llx_establishment CHANGE COLUMN fk_user_mod fk_user_mod integer NULL;
|
||||
-- VPGSQL8.2 ALTER TABLE llx_establishment ALTER COLUMN fk_user_mod DROP NOT NULL;
|
||||
|
||||
ALTER TABLE llx_multicurrency_rate ADD COLUMN entity integer DEFAULT 1;
|
||||
@ -22,5 +22,6 @@ CREATE TABLE llx_multicurrency_rate
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
date_sync datetime DEFAULT NULL,
|
||||
rate double NOT NULL DEFAULT 0,
|
||||
fk_multicurrency integer NOT NULL
|
||||
fk_multicurrency integer NOT NULL,
|
||||
entity integer DEFAULT 1,
|
||||
) ENGINE=innodb;
|
||||
@ -263,6 +263,7 @@ EditContactAddress=Edit contact/address
|
||||
Contact=Contact
|
||||
ContactId=Contact id
|
||||
ContactsAddresses=Contacts/Addresses
|
||||
FromContactName=Name:
|
||||
NoContactDefinedForThirdParty=No contact defined for this third party
|
||||
NoContactDefined=No contact defined
|
||||
DefaultContact=Default contact/address
|
||||
|
||||
@ -4346,15 +4346,17 @@ border-top-right-radius: 6px;
|
||||
.menu li.menu_choix1 {
|
||||
padding-top: 6px;
|
||||
padding-right: 10px;
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
.menu li.menu_choix2 {
|
||||
padding-top: 6px;
|
||||
padding-right: 10px;
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
@media only screen and (max-width: 767px)
|
||||
{
|
||||
.menu_choix1 a, .menu_choix2 a {
|
||||
background-size: 30px 30px;
|
||||
background-size: 36px 36px;
|
||||
height: 30px;
|
||||
padding-left: 40px;
|
||||
}
|
||||
|
||||
@ -4241,7 +4241,31 @@ border-top-right-radius: 6px;
|
||||
.menu_choix1 a:hover,.menu_choix2 a:hover {
|
||||
color: #6d3f6d;
|
||||
}
|
||||
|
||||
.menu li.menu_choix1 {
|
||||
padding-top: 6px;
|
||||
padding-right: 10px;
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
.menu li.menu_choix2 {
|
||||
padding-top: 6px;
|
||||
padding-right: 10px;
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
@media only screen and (max-width: 767px)
|
||||
{
|
||||
.menu_choix1 a, .menu_choix2 a {
|
||||
background-size: 36px 36px;
|
||||
background-position-y: 6px;
|
||||
padding-left: 40px;
|
||||
}
|
||||
.menu li.menu_choix1, .menu li.menu_choix2 {
|
||||
padding-left: 4px;
|
||||
padding-right: 0;
|
||||
}
|
||||
.liste_articles {
|
||||
margin-right: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user