diff --git a/build/generate_filelist_xml.php b/build/generate_filelist_xml.php index 1eeac5410b2..c1a56beacd7 100755 --- a/build/generate_filelist_xml.php +++ b/build/generate_filelist_xml.php @@ -123,16 +123,21 @@ foreach ($includeconstants as $countrycode => $tmp) fputs($fp, ''."\n"); -// TODO Replace RecursiveDirectoryIterator with dol_dir_list -$dir_iterator1 = new RecursiveDirectoryIterator(dirname(__FILE__).'/../htdocs/'); +/*$dir_iterator1 = new RecursiveDirectoryIterator(dirname(__FILE__).'/../htdocs/'); $iterator1 = new RecursiveIteratorIterator($dir_iterator1); // Need to ignore document custom etc. Note: this also ignore natively symbolic links. $files = new RegexIterator($iterator1, '#^(?:[A-Z]:)?(?:/(?!(?:'.($includecustom?'':'custom\/|').'documents\/|conf\/|install\/))[^/]+)+/[^/]+\.(?:php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$#i'); +*/ +$regextoinclude='\.(php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$'; +$regextoexclude='('.($includecustom?'':'custom|').'documents|conf|install)$'; // Exclude dirs +$files = dol_dir_list(DOL_DOCUMENT_ROOT, 'files', 1, $regextoinclude, $regextoexclude, 'fullname'); $dir=''; $needtoclose=0; -foreach ($files as $file) { - $newdir = str_replace(dirname(__FILE__).'/../htdocs', '', dirname($file)); - if ($newdir!=$dir) { +foreach ($files as $filetmp) { + $file = $filetmp['fullname']; + //$newdir = str_replace(dirname(__FILE__).'/../htdocs', '', dirname($file)); + $newdir = str_replace(DOL_DOCUMENT_ROOT, '', dirname($file)); + if ($newdir!=$dir) { if ($needtoclose) fputs($fp, ' '."\n"); fputs($fp, ' '."\n"); @@ -160,14 +165,21 @@ $checksumconcat=array(); fputs($fp, ''."\n"); // TODO Replace RecursiveDirectoryIterator with dol_dir_list -$dir_iterator2 = new RecursiveDirectoryIterator(dirname(__FILE__).'/../scripts/'); +/*$dir_iterator2 = new RecursiveDirectoryIterator(dirname(__FILE__).'/../scripts/'); $iterator2 = new RecursiveIteratorIterator($dir_iterator2); // Need to ignore document custom etc. Note: this also ignore natively symbolic links. $files = new RegexIterator($iterator2, '#^(?:[A-Z]:)?(?:/(?!(?:custom|documents|conf|install))[^/]+)+/[^/]+\.(?:php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$#i'); +*/ +$regextoinclude='\.(php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$'; +$regextoexclude='(custom|documents|conf|install)$'; // Exclude dirs +$files = dol_dir_list(dirname(__FILE__).'/../scripts/', 'files', 1, $regextoinclude, $regextoexclude, 'fullname'); $dir=''; $needtoclose=0; -foreach ($files as $file) { - $newdir = str_replace(dirname(__FILE__).'/../scripts', '', dirname($file)); +foreach ($files as $filetmp) { + $file = $filetmp['fullname']; + //$newdir = str_replace(dirname(__FILE__).'/../scripts', '', dirname($file)); + $newdir = str_replace(DOL_DOCUMENT_ROOT, '', dirname($file)); + $newdir = str_replace(dirname(__FILE__).'/../scripts', '', dirname($file)); if ($newdir!=$dir) { if ($needtoclose) fputs($fp, ' '."\n"); diff --git a/htdocs/accountancy/admin/defaultaccounts.php b/htdocs/accountancy/admin/defaultaccounts.php index 1c49b65bac8..08ce543c525 100644 --- a/htdocs/accountancy/admin/defaultaccounts.php +++ b/htdocs/accountancy/admin/defaultaccounts.php @@ -39,6 +39,7 @@ $langs->load("bills"); $langs->load("admin"); $langs->load("accountancy"); $langs->load("salaries"); +$langs->load("loan"); // Security check if (! empty($user->rights->accountancy->chartofaccount)) diff --git a/htdocs/accountancy/customer/card.php b/htdocs/accountancy/customer/card.php index ba6173d8ebf..7ec2a1903c8 100644 --- a/htdocs/accountancy/customer/card.php +++ b/htdocs/accountancy/customer/card.php @@ -73,7 +73,7 @@ if ($action == 'ventil' && $user->rights->accounting->bind->write) { * View */ -llxHeader("", "", "FicheVentilation"); +llxHeader("", $langs->trans(FicheVentilation)); if ($cancel == $langs->trans("Cancel")) { $action = ''; diff --git a/htdocs/accountancy/expensereport/card.php b/htdocs/accountancy/expensereport/card.php index 4819bd656ae..808214becce 100644 --- a/htdocs/accountancy/expensereport/card.php +++ b/htdocs/accountancy/expensereport/card.php @@ -1,7 +1,7 @@ * Copyright (C) 2005 Simon TOSSER - * Copyright (C) 2013-2016 Alexandre Spangaro + * Copyright (C) 2013-2017 Alexandre Spangaro * Copyright (C) 2013-2014 Olivier Geffroy * Copyright (C) 2013-2014 Florian Henry * Copyright (C) 2014 Juanjo Menent @@ -76,7 +76,7 @@ if ($action == 'ventil' && $user->rights->accounting->bind->write) { /* * View */ -llxHeader("", "FicheVentilation"); +llxHeader("", $langs->trans(FicheVentilation)); if ($cancel == $langs->trans("Cancel")) { $action = ''; @@ -89,7 +89,7 @@ $formventilation = new FormVentilation($db); if (! empty($id)) { $sql = "SELECT er.ref, er.rowid as facid, erd.fk_c_type_fees, erd.comments, erd.rowid, erd.fk_code_ventilation,"; - $sql .= " f.id as fees_id, f.label as fees_label,"; + $sql .= " f.id as type_fees_id, f.code as type_fees_code, f.label as type_fees_label,"; $sql .= " aa.account_number, aa.label"; $sql .= " FROM " . MAIN_DB_PREFIX . "expensereport_det as erd"; $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_type_fees as f ON f.id = erd.fk_c_type_fees"; @@ -132,7 +132,7 @@ if (! empty($id)) { print '' . stripslashes(nl2br($objp->comments)) . ''; print '' . $langs->trans("TypeFees") . ''; - print '' . dol_trunc($objp->fees_label, 24) . ''; + print '' . ($langs->trans($objp->type_fees_code) == $objp->type_fees_code ? $objp->type_fees_label : $langs->trans(($objp->type_fees_code))) . ''; print '' . $langs->trans("Account") . ''; print $formventilation->select_account($objp->fk_code_ventilation, 'codeventil', 1); diff --git a/htdocs/accountancy/expensereport/lines.php b/htdocs/accountancy/expensereport/lines.php index 40fd15d7307..56298045532 100644 --- a/htdocs/accountancy/expensereport/lines.php +++ b/htdocs/accountancy/expensereport/lines.php @@ -1,6 +1,6 @@ - * Copyright (C) 2013-2016 Alexandre Spangaro + * Copyright (C) 2013-2017 Alexandre Spangaro * Copyright (C) 2014-2015 Ari Elbaz (elarifr) * Copyright (C) 2013-2016 Florian Henry * Copyright (C) 2014 Juanjo Menent @@ -148,7 +148,7 @@ print ''; + + return $out; + } + /** * Return HTML to show the search and clear seach button * @@ -6169,31 +6219,10 @@ class Form */ function showFilterAndCheckAddButtons($addcheckuncheckall=0, $cssclass='checkforaction', $calljsfunction=0) { - global $conf, $langs; - - $out='
'; - $out.=''; - $out.=''; - $out.='
'; + $out.=$this->showFilterButtons(); if ($addcheckuncheckall) { - if (! empty($conf->use_javascript_ajax)) $out.=''; - $out.=''; + $out.=$this->showCheckAddButtons($cssclass, $calljsfunction); } return $out; } diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index e960b3d6909..d7ab17e60c4 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -527,26 +527,7 @@ class FormMail extends Form { $tmparray[$key]=dol_htmlentities($tmparray[$key], null, 'UTF-8', true); } - $out.= $form->multiselectarray("receiver", $tmparray, GETPOST("receiver"), null, null, null,null, "90%"); - } - if (isset($this->withtosocid) && $this->withtosocid > 0) // deprecated. TODO Remove this. Instead, fill withto with array before calling method. - { - dol_syslog("get_form was called with a deprecated way: ->withtosocid must not be defined, only ->withto", LOG_WARNING); - $liste=array(); - $soc=new Societe($this->db); - $soc->fetch($this->withtosocid); - foreach ($soc->thirdparty_and_contact_email_array(1) as $key=>$value) - { - $liste[$key]=$value; - } - if ($this->withtofree) $out.= " ".$langs->trans("or")." "; - // multiselect array convert html entities into options tags, even if we dont want this, so we encode them a second time - $tmparray = $liste; - foreach($tmparray as $key => $val) - { - $tmparray[$key]=dol_htmlentities($tmparray[$key], null, 'UTF-8', true); - } - $out.= $form->multiselectarray("receiver", $liste, GETPOST("receiver"), null, null, null,null, "90%"); + $out.= $form->multiselectarray("receiver", $tmparray, GETPOST("receiver"), null, null, 'inline-block minwidth500', null, ""); } } $out.= "\n"; @@ -574,8 +555,7 @@ class FormMail extends Form { $tmparray[$key]=dol_htmlentities($tmparray[$key], null, 'UTF-8', true); } - //$out.= $form->selectarray("receivercc", $this->withtocc, GETPOST("receivercc"), 1, 0, 0, '', 0, 0, 0, '', '', 0, '', $disablebademails); - $out.= $form->multiselectarray("receivercc", $tmparray, GETPOST("receivercc"), null, null, null,null, "90%"); + $out.= $form->multiselectarray("receivercc", $tmparray, GETPOST("receivercc"), null, null, 'inline-block minwidth500',null, ""); } } $out.= "\n"; diff --git a/htdocs/core/lib/fichinter.lib.php b/htdocs/core/lib/fichinter.lib.php index 964bbe14b2c..4e91c02f4f2 100644 --- a/htdocs/core/lib/fichinter.lib.php +++ b/htdocs/core/lib/fichinter.lib.php @@ -55,14 +55,6 @@ function fichinter_prepare_head($object) $h++; } - if (! empty($conf->global->MAIN_USE_PREVIEW_TABS)) - { - $head[$h][0] = DOL_URL_ROOT.'/fichinter/apercu.php?id='.$object->id; - $head[$h][1] = $langs->trans('Preview'); - $head[$h][2] = 'preview'; - $h++; - } - // Show more tabs from modules // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index 51be81a7bd5..1cb4da03488 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -1626,7 +1626,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$fu $original_file=$conf->commande->dir_output.'/'.$original_file; } // Wrapping pour les apercu intervention - elseif ($modulepart == 'apercufichinter' && !empty($conf->ficheinter->dir_output)) + elseif (($modulepart == 'apercufichinter' || $modulepart == 'apercuficheinter') && !empty($conf->ficheinter->dir_output)) { if ($fuser->rights->ficheinter->lire) $accessallowed=1; $original_file=$conf->ficheinter->dir_output.'/'.$original_file; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 06419ba5930..20186ebe28d 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -1014,6 +1014,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r if ($object->element == 'propal') $modulepart='propal'; if ($object->element == 'commande') $modulepart='commande'; if ($object->element == 'facture') $modulepart='facture'; + if ($object->element == 'fichinter') $modulepart='ficheinter'; if ($object->element == 'product') { @@ -1041,7 +1042,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r if ($modulepart != 'unknown') { // Check if a preview file is available - if (in_array($modulepart, array('propal', 'commande', 'facture')) && class_exists("Imagick")) + if (in_array($modulepart, array('propal', 'commande', 'facture', 'ficheinter')) && class_exists("Imagick")) { $objectref = dol_sanitizeFileName($object->ref); $dir_output = $conf->$modulepart->dir_output . "/"; @@ -2694,6 +2695,7 @@ function img_warning($titlealt = 'default', $morealt = '') if ($titlealt == 'default') $titlealt = $langs->trans('Warning'); + //return '
'.img_picto($titlealt, 'warning_white.png', 'class="pictowarning valignmiddle"'.($morealt ? ($morealt == '1' ? ' style="float: right"' : ' '.$morealt): '')).'
'; return img_picto($titlealt, 'warning.png', 'class="pictowarning valignmiddle"'.($morealt ? ($morealt == '1' ? ' style="float: right"' : ' '.$morealt): '')); } diff --git a/htdocs/core/modules/mailings/thirdparties.modules.php b/htdocs/core/modules/mailings/thirdparties.modules.php index 148c21aa31d..2f9be84aab4 100644 --- a/htdocs/core/modules/mailings/thirdparties.modules.php +++ b/htdocs/core/modules/mailings/thirdparties.modules.php @@ -23,7 +23,7 @@ include_once DOL_DOCUMENT_ROOT.'/core/modules/mailings/modules_mailings.php'; */ class mailing_thirdparties extends MailingTargets { - var $name='ContactsCategories'; + var $name='ThirdPartiesByCategories'; // This label is used if no translation is found for key XXX neither MailingModuleDescXXX where XXX=name is found var $desc="Third parties (by categories)"; var $require_admin=0; diff --git a/htdocs/cron/card.php b/htdocs/cron/card.php index b4d27eb8878..5e2bc435e56 100644 --- a/htdocs/cron/card.php +++ b/htdocs/cron/card.php @@ -321,6 +321,7 @@ if (($action=="create") || ($action=="edit")) print ''."\n"; } + dol_fiche_head(''); print ''; @@ -535,7 +536,7 @@ if (($action=="create") || ($action=="edit")) print ""; print '
'; - + dol_fiche_end(); print '
'; @@ -554,11 +555,13 @@ else */ $now = dol_now(); - dol_fiche_head($head, 'card', $langs->trans("CronTask"), 0, 'cron'); + dol_fiche_head($head, 'card', $langs->trans("CronTask"), -1, 'cron'); $linkback = '' . $langs->trans("BackToList") . ''; // box add_jobs_box + print '
'; + print '
'; print ''; print '"; print '
'; @@ -617,10 +620,13 @@ else print "
'; - + print '
'; + print '
'; + print '
'; + print '
'; print ''; print '"; print '
'; @@ -673,9 +679,12 @@ else print "
'; + print '
'; print '
'; + print '
'; + print '
'; print ''; print '"; print '
'; @@ -699,7 +708,8 @@ else print "
'; - + print '
'; + dol_fiche_end(); diff --git a/htdocs/cron/class/cronjob.class.php b/htdocs/cron/class/cronjob.class.php index 59a3d025386..2f9ad12a57f 100644 --- a/htdocs/cron/class/cronjob.class.php +++ b/htdocs/cron/class/cronjob.class.php @@ -55,6 +55,7 @@ class Cronjob extends CommonObject var $unitfrequency; var $frequency; var $status; + var $processing; var $fk_user_author; var $fk_user_mod; var $nbrun; @@ -287,6 +288,7 @@ class Cronjob extends CommonObject $sql.= " t.unitfrequency,"; $sql.= " t.frequency,"; $sql.= " t.status,"; + $sql.= " t.processing,"; $sql.= " t.fk_user_author,"; $sql.= " t.fk_user_mod,"; $sql.= " t.note,"; @@ -330,6 +332,7 @@ class Cronjob extends CommonObject $this->unitfrequency = $obj->unitfrequency; $this->frequency = $obj->frequency; $this->status = $obj->status; + $this->processing = $obj->processing; $this->fk_user_author = $obj->fk_user_author; $this->fk_user_mod = $obj->fk_user_mod; $this->note = $obj->note; @@ -352,15 +355,16 @@ class Cronjob extends CommonObject /** * Load object in memory from the database * - * @param string $sortorder sort order - * @param string $sortfield sort field - * @param int $limit limit page - * @param int $offset page - * @param int $status display active or not - * @param array $filter filter output - * @return int <0 if KO, >0 if OK + * @param string $sortorder sort order + * @param string $sortfield sort field + * @param int $limit limit page + * @param int $offset page + * @param int $status display active or not + * @param array $filter filter output + * @param int $processing Processing or not + * @return int <0 if KO, >0 if OK */ - function fetch_all($sortorder='DESC', $sortfield='t.rowid', $limit=0, $offset=0, $status=1, $filter='') + function fetch_all($sortorder='DESC', $sortfield='t.rowid', $limit=0, $offset=0, $status=1, $filter='', $processing=-1) { global $langs; @@ -391,6 +395,7 @@ class Cronjob extends CommonObject $sql.= " t.unitfrequency,"; $sql.= " t.frequency,"; $sql.= " t.status,"; + $sql.= " t.processing,"; $sql.= " t.fk_user_author,"; $sql.= " t.fk_user_mod,"; $sql.= " t.note,"; @@ -399,6 +404,7 @@ class Cronjob extends CommonObject $sql.= " t.test"; $sql.= " FROM ".MAIN_DB_PREFIX."cronjob as t"; $sql.= " WHERE 1 = 1"; + if ($processing >= 0) $sql.= " AND t.processing = ".(empty($processing)?'0':'1'); if ($status >= 0 && $status < 2) $sql.= " AND t.status = ".(empty($status)?'0':'1'); if ($status == 2) $sql.= " AND t.status = 2"; //Manage filter @@ -463,6 +469,7 @@ class Cronjob extends CommonObject $line->unitfrequency = $obj->unitfrequency; $line->frequency = $obj->frequency; $line->status = $obj->status; + $line->processing = $obj->processing; $line->fk_user_author = $obj->fk_user_author; $line->fk_user_mod = $obj->fk_user_mod; $line->note = $obj->note; @@ -520,9 +527,11 @@ 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 (empty($this->maxrun)) $this->maxrun=0; if (isset($this->libname)) $this->libname = trim($this->libname); if (isset($this->test)) $this->test = trim($this->test); + + if (empty($this->maxrun)) $this->maxrun=0; + if (empty($this->processing)) $this->processing=0; // Check parameters // Put here code to add a control on parameters values @@ -588,6 +597,7 @@ class Cronjob extends CommonObject $sql.= " unitfrequency=".(isset($this->unitfrequency)?$this->unitfrequency:"null").","; $sql.= " frequency=".(isset($this->frequency)?$this->frequency:"null").","; $sql.= " status=".(isset($this->status)?$this->status:"null").","; + $sql.= " processing=".((isset($this->processing) && $this->processing > 0)?$this->processing:"0").","; $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").","; @@ -786,7 +796,8 @@ class Cronjob extends CommonObject $this->lastresult=''; $this->unitfrequency=''; $this->frequency=''; - $this->status=''; + $this->status=0; + $this->processing=0; $this->fk_user_author=''; $this->fk_user_mod=''; $this->note=''; @@ -898,6 +909,7 @@ class Cronjob extends CommonObject $this->datelastresult=null; $this->lastoutput=''; $this->lastresult=''; + $this->processing = 1; // To know job was started $this->nbrun=$this->nbrun + 1; $result = $this->update($user); // This include begin/commit if ($result<0) { @@ -1099,6 +1111,7 @@ class Cronjob extends CommonObject dol_syslog(get_class($this)."::run_jobs now we update job to track it is finished (with success or error)"); $this->datelastresult=dol_now(); + $this->processing=0; $result = $this->update($user); // This include begin/commit if ($result < 0) { diff --git a/htdocs/cron/list.php b/htdocs/cron/list.php index 880235a9a17..4703641de20 100644 --- a/htdocs/cron/list.php +++ b/htdocs/cron/list.php @@ -295,25 +295,9 @@ print '
'; print '
'; -print ''; -print ''; -print_liste_field_titre($langs->trans("ID"),$_SERVER["PHP_SELF"],"t.rowid","",$param,'',$sortfield,$sortorder); -print_liste_field_titre($langs->trans("CronLabel"),$_SERVER["PHP_SELF"],"t.label","",$param,'',$sortfield,$sortorder); -print_liste_field_titre($langs->trans("CronTask"),'','',"",$param,'',$sortfield,$sortorder); -print_liste_field_titre($langs->trans("CronFrequency"),'',"","",$param,'',$sortfield,$sortorder); -print_liste_field_titre($langs->trans("CronDtStart"),$_SERVER["PHP_SELF"],"t.datestart","",$param,'align="center"',$sortfield,$sortorder); -print_liste_field_titre($langs->trans("CronDtEnd"),$_SERVER["PHP_SELF"],"t.dateend","",$param,'align="center"',$sortfield,$sortorder); -print_liste_field_titre($langs->trans("CronMaxRun"),$_SERVER["PHP_SELF"],"t.maxrun","",$param,'align="right"',$sortfield,$sortorder); -print_liste_field_titre($langs->trans("CronNbRun"),$_SERVER["PHP_SELF"],"t.nbrun","",$param,'align="right"',$sortfield,$sortorder); -print_liste_field_titre($langs->trans("CronDtNextLaunch"),$_SERVER["PHP_SELF"],"t.datenextrun","",$param,'align="center"',$sortfield,$sortorder); -print_liste_field_titre($langs->trans("CronDtLastLaunch"),$_SERVER["PHP_SELF"],"t.datelastrun","",$param,'align="center"',$sortfield,$sortorder); -print_liste_field_titre($langs->trans("CronLastResult"),$_SERVER["PHP_SELF"],"t.lastresult","",$param,'align="center"',$sortfield,$sortorder); -print_liste_field_titre($langs->trans("CronLastOutput"),$_SERVER["PHP_SELF"],"t.lastoutput","",$param,'',$sortfield,$sortorder); -print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"t.status","",$param,'align="center"',$sortfield,$sortorder); -print_liste_field_titre(''); -print "\n"; +print '
'; -print ''; +print ''; print ''; print '\n"; + + if ($num > 0) { // Loop on each job diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index e179142b19a..727f4ae669d 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -115,7 +115,11 @@ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'e if (empty($reshook)) { - if ($cancel) { $action = ''; } + if ($cancel) + { + $action = ''; + $object->fetch($id); // show shipment also after canceling modification + } include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be include, not include_once diff --git a/htdocs/expedition/contact.php b/htdocs/expedition/contact.php index 80ceb1e8bd5..1354b3d49f1 100644 --- a/htdocs/expedition/contact.php +++ b/htdocs/expedition/contact.php @@ -156,7 +156,7 @@ if ($id > 0 || ! empty($ref)) $langs->trans("OrderCard"); $head = shipping_prepare_head($object); - dol_fiche_head($head, 'contact', $langs->trans("Shipment"), 0, 'sending'); + dol_fiche_head($head, 'contact', $langs->trans("Shipment"), -1, 'sending'); // Shipment card diff --git a/htdocs/expedition/note.php b/htdocs/expedition/note.php index 0f7093fa90c..c32ec5c5124 100644 --- a/htdocs/expedition/note.php +++ b/htdocs/expedition/note.php @@ -1,22 +1,22 @@ * Copyright (C) 2004-2008 Laurent Destailleur -* Copyright (C) 2005-2012 Regis Houssin -* Copyright (C) 2013 Florian Henry -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -*/ + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2013 Florian Henry + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ /** * \file htdocs/expedition/note.php @@ -98,7 +98,7 @@ if ($id > 0 || ! empty($ref)) { $head=shipping_prepare_head($object); - dol_fiche_head($head, 'note', $langs->trans("Shipment"), 0, 'sending'); + dol_fiche_head($head, 'note', $langs->trans("Shipment"), -1, 'sending'); // Shipment card diff --git a/htdocs/expedition/shipment.php b/htdocs/expedition/shipment.php index 3044a1beb10..f53b80b927d 100644 --- a/htdocs/expedition/shipment.php +++ b/htdocs/expedition/shipment.php @@ -245,7 +245,7 @@ if ($id > 0 || ! empty($ref)) $res = $object->fetch_optionals($object->id, $extralabels); $head = commande_prepare_head($object); - dol_fiche_head($head, 'shipping', $langs->trans("CustomerOrder"), 0, 'order'); + dol_fiche_head($head, 'shipping', $langs->trans("CustomerOrder"), -1, 'order'); $formconfirm = ''; diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index 578ab81b339..e4754f4ab60 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -1913,7 +1913,7 @@ class ExpenseReport extends CommonObject $response->label=$langs->trans("ExpenseReportsToPay"); $response->url=DOL_URL_ROOT.'/expensereport/list.php?mainmenu=hrm&statut=5'; } - $response->img=img_object($langs->trans("ExpenseReports"),"trip"); + $response->img=img_object('',"trip"); while ($obj=$this->db->fetch_object($resql)) { diff --git a/htdocs/fichinter/apercu.php b/htdocs/fichinter/apercu.php deleted file mode 100644 index 899ecaf9805..00000000000 --- a/htdocs/fichinter/apercu.php +++ /dev/null @@ -1,197 +0,0 @@ - - * Copyright (C) 2004-2014 Laurent Destailleur - * Copyright (C) 2005-2011 Regis Houssin - * Copyright (C) 2011-2012 Juanjo Menent - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -/** - * \file htdocs/fichinter/apercu.php - * \ingroup fichinter - * \brief Page de l'onglet apercu d'une fiche d'intervention - */ - -require '../main.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/fichinter.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php'; -if (! empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; - -$langs->load('interventions'); - - -// Security check -$socid=0; -$id = GETPOST('id','int'); -$ref = GETPOST('ref','alpha'); -if ($user->societe_id) $socid=$user->societe_id; -$result = restrictedArea($user, 'ficheinter', $id, 'fichinter'); - - -/* - * View - */ - -llxHeader(); - -$form = new Form($db); - -/* *************************************************************************** */ -/* */ -/* Mode fiche */ -/* */ -/* *************************************************************************** */ - -if ($id > 0 || ! empty($ref)) -{ - $object = new Fichinter($db); - - if ($object->fetch($id,$ref) > 0) - { - $soc = new Societe($db); - $soc->fetch($object->socid); - - $head = fichinter_prepare_head($object); - dol_fiche_head($head, 'preview', $langs->trans("InterventionCard"), 0, 'intervention'); - - /* - * Fiche intervention - */ - print '
 '; print ''; @@ -336,6 +320,24 @@ print ''; +print_liste_field_titre($langs->trans("ID"),$_SERVER["PHP_SELF"],"t.rowid","",$param,'',$sortfield,$sortorder); +print_liste_field_titre($langs->trans("CronLabel"),$_SERVER["PHP_SELF"],"t.label","",$param,'',$sortfield,$sortorder); +print_liste_field_titre($langs->trans("CronTask"),'','',"",$param,'',$sortfield,$sortorder); +print_liste_field_titre($langs->trans("CronFrequency"),'',"","",$param,'',$sortfield,$sortorder); +print_liste_field_titre($langs->trans("CronDtStart"),$_SERVER["PHP_SELF"],"t.datestart","",$param,'align="center"',$sortfield,$sortorder); +print_liste_field_titre($langs->trans("CronDtEnd"),$_SERVER["PHP_SELF"],"t.dateend","",$param,'align="center"',$sortfield,$sortorder); +print_liste_field_titre($langs->trans("CronMaxRun"),$_SERVER["PHP_SELF"],"t.maxrun","",$param,'align="right"',$sortfield,$sortorder); +print_liste_field_titre($langs->trans("CronNbRun"),$_SERVER["PHP_SELF"],"t.nbrun","",$param,'align="right"',$sortfield,$sortorder); +print_liste_field_titre($langs->trans("CronDtNextLaunch"),$_SERVER["PHP_SELF"],"t.datenextrun","",$param,'align="center"',$sortfield,$sortorder); +print_liste_field_titre($langs->trans("CronDtLastLaunch"),$_SERVER["PHP_SELF"],"t.datelastrun","",$param,'align="center"',$sortfield,$sortorder); +print_liste_field_titre($langs->trans("CronLastResult"),$_SERVER["PHP_SELF"],"t.lastresult","",$param,'align="center"',$sortfield,$sortorder); +print_liste_field_titre($langs->trans("CronLastOutput"),$_SERVER["PHP_SELF"],"t.lastoutput","",$param,'',$sortfield,$sortorder); +print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"t.status","",$param,'align="center"',$sortfield,$sortorder); +print_liste_field_titre(''); +print "
'; - - $linkback = ''.$langs->trans("BackToList").''; - - // Ref - print ''; - - $nbrow=3; - // Client - print ""; - print ''; - print '"; - - // Statut - print ''; - print "\n"; - print ''; - - // Date - print ''; - print "\n"; - print ''; - - print '
'.$langs->trans("Ref").''; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); - print '
".$langs->trans("Customer")."'; - print ''.$soc->name.''; - print ''; - - /* - * Documents - */ - $objectref = dol_sanitizeFileName($object->ref); - $dir_output = $conf->ficheinter->dir_output . "/"; - $filepath = $dir_output . $objectref . "/"; - $file = $filepath . $objectref . ".pdf"; - $filedetail = $filepath . $objectref . "-detail.pdf"; - $relativepath = "${objectref}/${objectref}.pdf"; - $relativepathdetail = "${objectref}/${objectref}-detail.pdf"; - - // Define path to preview pdf file (preview precompiled "file.ext" are "file.ext_preview.png") - $fileimage = $file.'_preview.png'; // If PDF has 1 page - $fileimagebis = $file.'_preview-0.pdf.png'; // If PDF has more than one page - $relativepathimage = $relativepath.'_preview.png'; - - $var=true; - - // Si fichier PDF existe - if (file_exists($file)) - { - $encfile = urlencode($file); - print load_fiche_titre($langs->trans("Documents")); - print ''; - - print ""; - - print ''; - print ''; - print ''; - print ''; - - // Si fichier detail PDF existe - if (file_exists($filedetail)) - { - print ""; - - print ''; - print ''; - print ''; - print ''; - } - print "
".$langs->trans("Intervention")." PDF'.$object->ref.'.pdf'.dol_print_size(dol_filesize($file)).''.dol_print_date(dol_filemtime($file),'dayhour').'
Fiche d'intervention detaillee'.$object->ref.'-detail.pdf'.dol_print_size(dol_filesize($filedetail)).''.dol_print_date(dol_filemtime($filedetail),'dayhour').'
\n"; - - // Conversion du PDF en image png si fichier png non existant - if ((! file_exists($fileimage) && ! file_exists($fileimagebis)) || (filemtime($fileimage) < filemtime($file))) - { - if (class_exists("Imagick")) - { - $ret = dol_convert_file($file,'png',$fileimage); - if ($ret < 0) $error++; - } - else - { - $langs->load("errors"); - print ''.$langs->trans("ErrorNoImagickReadimage").''; - } - } - } - - print "
'.$langs->trans("Status").'".$object->getLibStatut(4)."
'.$langs->trans("Date").'".dol_print_date($object->datec,"daytext")."
'; - - dol_fiche_end(); - } - else - { - // Object not found - print $langs->trans("ErrorFichinterNotFound",$id); - } -} - -// Si fichier png PDF d'1 page trouve -if (file_exists($fileimage)) -{ - print ''; -} -// Si fichier png PDF de plus d'1 page trouve -elseif (file_exists($fileimagebis)) -{ - $multiple = $relativepath . "-"; - - for ($i = 0; $i < 20; $i++) - { - $preview = $multiple.$i.'.png'; - - if (file_exists($dir_output.$preview)) - { - print '

'; - } - } -} - - -llxFooter(); - -$db->close(); diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index 31f72e18075..cd10e704d90 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -1079,7 +1079,7 @@ else if ($id > 0 || ! empty($ref)) $head = fichinter_prepare_head($object); - dol_fiche_head($head, 'card', $langs->trans("InterventionCard"), 0, 'intervention'); + dol_fiche_head($head, 'card', $langs->trans("InterventionCard"), -1, 'intervention'); $formconfirm=''; diff --git a/htdocs/fichinter/contact.php b/htdocs/fichinter/contact.php index 83825b08a90..2b40553a3d9 100644 --- a/htdocs/fichinter/contact.php +++ b/htdocs/fichinter/contact.php @@ -122,7 +122,7 @@ if ($id > 0 || ! empty($ref)) $object->fetch_thirdparty(); $head = fichinter_prepare_head($object); - dol_fiche_head($head, 'contact', $langs->trans("InterventionCard"), 0, 'intervention'); + dol_fiche_head($head, 'contact', $langs->trans("InterventionCard"), -1, 'intervention'); // Intervention card diff --git a/htdocs/fichinter/document.php b/htdocs/fichinter/document.php index 2e53d6ebc62..f24283e8aa1 100644 --- a/htdocs/fichinter/document.php +++ b/htdocs/fichinter/document.php @@ -89,7 +89,7 @@ if ($object->id) $head=fichinter_prepare_head($object); - dol_fiche_head($head, 'documents', $langs->trans("InterventionCard"), 0, 'intervention'); + dol_fiche_head($head, 'documents', $langs->trans("InterventionCard"), -1, 'intervention'); // Construit liste des fichiers diff --git a/htdocs/fichinter/info.php b/htdocs/fichinter/info.php index de2317eecca..87533644893 100644 --- a/htdocs/fichinter/info.php +++ b/htdocs/fichinter/info.php @@ -58,7 +58,7 @@ $object->fetch_thirdparty(); $object->info($object->id); $head = fichinter_prepare_head($object); -dol_fiche_head($head, 'info', $langs->trans('InterventionCard'), 0, 'intervention'); +dol_fiche_head($head, 'info', $langs->trans('InterventionCard'), -1, 'intervention'); // Intervention card $linkback = ''.$langs->trans("BackToList").''; diff --git a/htdocs/fichinter/note.php b/htdocs/fichinter/note.php index 1da0b0c425c..43a2654d1fd 100644 --- a/htdocs/fichinter/note.php +++ b/htdocs/fichinter/note.php @@ -63,7 +63,7 @@ if ($id > 0 || ! empty($ref)) $object->fetch_thirdparty(); $head = fichinter_prepare_head($object); - dol_fiche_head($head, 'note', $langs->trans('InterventionCard'), 0, 'intervention'); + dol_fiche_head($head, 'note', $langs->trans('InterventionCard'), -1, 'intervention'); // Intervention card $linkback = ''.$langs->trans("BackToList").''; diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index a4deab90768..1da9854791b 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -2624,7 +2624,7 @@ class CommandeFournisseur extends CommonOrder $response->warning_delay=$conf->commande->fournisseur->warning_delay/60/60/24; $response->label=$langs->trans("SuppliersOrdersToProcess"); $response->url=DOL_URL_ROOT.'/fourn/commande/list.php?statut=1,2,3&mainmenu=commercial&leftmenu=orders_suppliers'; - $response->img=img_object($langs->trans("Orders"),"order"); + $response->img=img_object('',"order"); while ($obj=$this->db->fetch_object($resql)) { diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 009f765e5cd..5f435da9daf 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -1787,7 +1787,7 @@ class FactureFournisseur extends CommonInvoice $response->warning_delay=$conf->facture->fournisseur->warning_delay/60/60/24; $response->label=$langs->trans("SupplierBillsToPay"); $response->url=DOL_URL_ROOT.'/fourn/facture/list.php?filtre=fac.fk_statut:1,paye:0&mainmenu=accountancy&leftmenu=suppliers_bills'; - $response->img=img_object($langs->trans("Bills"),"bill"); + $response->img=img_object('',"bill"); $facturestatic = new FactureFournisseur($this->db); diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index bff5c773cfc..3afb97c5fb1 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -956,7 +956,12 @@ if ($resql) } // Show total line - if (isset($totalarray['totalhtfield'])) + if (isset($totalarray['totalhtfield']) + || isset($totalarray['totalvatfield']) + || isset($totalarray['totalttcfield']) + || isset($totalarray['totalamfield']) + || isset($totalarray['totalrtpfield']) + ) { print ''; $i=0; diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php index bd520676f75..ba4f210793e 100644 --- a/htdocs/holiday/card.php +++ b/htdocs/holiday/card.php @@ -4,6 +4,7 @@ * Copyright (C) 2012-2016 Regis Houssin * Copyright (C) 2013 Juanjo Menent * Copyright (C) 2014 Ferran Marcet + * Copyright (C) 2017 Alexandre Spangaro * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -31,6 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/user/class/usergroup.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/holiday.lib.php'; require_once DOL_DOCUMENT_ROOT.'/holiday/common.inc.php'; @@ -875,10 +877,10 @@ if (empty($id) || $action == 'add' || $action == 'request' || $action == 'create // Description print ''; print ''.$langs->trans("DescCP").''; - print ''; - print ''; - print ''; - print ''; + print ''; + $doleditor = new DolEditor('description', GETPOST('description'), '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); + print $doleditor->Create(1); + print ''; print ''; print ''; @@ -1104,8 +1106,10 @@ else { print ''; print ''.$langs->trans('DescCP').''; - print ''; - print ''; + print ''; + $doleditor = new DolEditor('description', $object->description, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); + print $doleditor->Create(1); + print ''; } print ''; diff --git a/htdocs/index.php b/htdocs/index.php index 0e44483118a..e0609c91274 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -561,14 +561,15 @@ if (! empty($valid_dashboardlines)) $boxwork .='

'; print '
'; diff --git a/htdocs/install/mysql/migration/5.0.0-6.0.0.sql b/htdocs/install/mysql/migration/5.0.0-6.0.0.sql index 926aaad25df..0fa4d9f7502 100644 --- a/htdocs/install/mysql/migration/5.0.0-6.0.0.sql +++ b/htdocs/install/mysql/migration/5.0.0-6.0.0.sql @@ -125,6 +125,9 @@ INSERT INTO llx_const (name, entity, value, type, visible, note) VALUES ('USER_A ALTER TABLE llx_chargesociales ADD COLUMN ref varchar(16); ALTER TABLE llx_chargesociales ADD COLUMN fk_projet integer DEFAULT NULL; +ALTER TABLE llx_cronjob ADD COLUMN processing integer NOT NULL DEFAULT 0; + + create table llx_payment_various ( rowid integer AUTO_INCREMENT PRIMARY KEY, diff --git a/htdocs/install/mysql/tables/llx_cronjob.sql b/htdocs/install/mysql/tables/llx_cronjob.sql index f9d2ac1ab7a..96458de8420 100644 --- a/htdocs/install/mysql/tables/llx_cronjob.sql +++ b/htdocs/install/mysql/tables/llx_cronjob.sql @@ -46,6 +46,7 @@ CREATE TABLE llx_cronjob nbrun integer, -- nb of run complete (failed or not) autodelete integer DEFAULT 0, -- 0=Job is kept unchanged once nbrun > maxrun or date > dateend, 2=Job must be archived (archive = status 2) once nbrun > maxrun or date > dateend status integer NOT NULL DEFAULT 1, -- 0=disabled, 1=enabled, 2=archived + processing integer NOT NULL DEFAULT 0, -- 1=process currently running test varchar(255) DEFAULT '1', fk_user_author integer DEFAULT NULL, fk_user_mod integer DEFAULT NULL, diff --git a/htdocs/loan/card.php b/htdocs/loan/card.php index 18ba36ec382..4b1384aeedb 100644 --- a/htdocs/loan/card.php +++ b/htdocs/loan/card.php @@ -489,7 +489,7 @@ if ($id > 0) print ""; // Nbterms - print ''.$langs->trans("Nbterms").''; + print ''.$langs->trans("Nbterms").''; print ''; if ($action == 'edit') { @@ -502,7 +502,7 @@ if ($id > 0) print ''; // Rate - print ''.$langs->trans("Rate").''; + print ''.$langs->trans("Rate").''; print ''; if ($action == 'edit') { diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 7d5e5dfa64c..8d1138e5758 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -848,9 +848,9 @@ if (! defined('NOREQUIRETRAN')) // Define some constants used for style of arrays $bc=array(0=>'class="impair"',1=>'class="pair"'); -$bcdd=array(0=>'class="impair drag drop"',1=>'class="pair drag drop"'); -$bcnd=array(0=>'class="impair nodrag nodrop nohover"',1=>'class="pair nodrag nodrop nohoverpair"'); // Used for tr to add new lines -$bctag=array(0=>'class="impair tagtr"',1=>'class="pair tagtr"'); +$bcdd=array(0=>'class="drag drop"',1=>'class="drag drop"'); +$bcnd=array(0=>'class="nodrag nodrop nohover"',1=>'class="nodrag nodrop nohoverpair"'); // Used for tr to add new lines +$bctag=array(0=>'class="tagtr"',1=>'class="pair tagtr"'); // Define messages variables $mesg=''; $warning=''; $error=0; diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index eeb10281c3a..7748534c970 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -1694,7 +1694,7 @@ class Project extends CommonObject $response->label = $langs->trans("OpenedProjects"); if ($user->rights->projet->all->lire) $response->url = DOL_URL_ROOT.'/projet/list.php?search_status=1&mainmenu=project'; else $response->url = DOL_URL_ROOT.'/projet/list.php?search_project_user=-1&search_status=1&mainmenu=project'; - $response->img = img_object($langs->trans("Projects"),"projectpub"); + $response->img = img_object('',"projectpub"); // This assignment in condition is not a bug. It allows walking the results. while ($obj=$this->db->fetch_object($resql)) diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php index 905098d202a..7c986e4d9a2 100644 --- a/htdocs/projet/class/task.class.php +++ b/htdocs/projet/class/task.class.php @@ -1713,7 +1713,7 @@ class Task extends CommonObject $response->label = $langs->trans("OpenedTasks"); if ($user->rights->projet->all->lire) $response->url = DOL_URL_ROOT.'/projet/tasks/list.php?mainmenu=project'; else $response->url = DOL_URL_ROOT.'/projet/tasks/list.php?mode=mine&mainmenu=project'; - $response->img = img_object($langs->trans("Tasks"),"task"); + $response->img = img_object('',"task"); // This assignment in condition is not a bug. It allows walking the results. while ($obj=$this->db->fetch_object($resql)) diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index c7d213b19ce..7126e454d5c 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -116,7 +116,7 @@ $arrayfields=array( 'p.ref'=>array('label'=>$langs->trans("Ref"), 'checked'=>1), 'p.title'=>array('label'=>$langs->trans("Label"), 'checked'=>1), 's.nom'=>array('label'=>$langs->trans("ThirdParty"), 'checked'=>1, 'enabled'=>$conf->societe->enabled), - 'commercial'=>array('label'=>$langs->trans("SalesRepresentative"), 'checked'=>1), + 'commercial'=>array('label'=>$langs->trans("ThirdPartiesOfSaleRepresentative"), 'checked'=>1), 'p.dateo'=>array('label'=>$langs->trans("DateStart"), 'checked'=>1, 'position'=>100), 'p.datee'=>array('label'=>$langs->trans("DateEnd"), 'checked'=>1, 'position'=>101), 'p.public'=>array('label'=>$langs->trans("Visibility"), 'checked'=>1, 'position'=>102), @@ -339,7 +339,6 @@ if (! $resql) exit; } -$var=true; $num = $db->num_rows($resql); if ($num == 1 && ! empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all) @@ -547,7 +546,7 @@ if (! empty($arrayfields['p.opp_amount']['checked'])) if (! empty($arrayfields['p.fk_opp_status']['checked'])) { print ''; - print $formproject->selectOpportunityStatus('search_opp_status',$search_opp_status,1,1,1); + print $formproject->selectOpportunityStatus('search_opp_status', $search_opp_status, 1, 1, 1, 0, 'maxwidth100'); print ''; } if (! empty($arrayfields['p.opp_percent']['checked'])) @@ -619,7 +618,6 @@ print ''; print ''."\n"; $i=0; -$var=true; $totalarray=array(); while ($i < min($num,$limit)) { @@ -636,8 +634,7 @@ while ($i < min($num,$limit)) $userAccess = $projectstatic->restrictedProjectArea($user); // why this ? if ($userAccess >= 0) { - $var=!$var; - print ""; + print ""; // Project url if (! empty($arrayfields['p.ref']['checked'])) @@ -651,7 +648,7 @@ while ($i < min($num,$limit)) // Title if (! empty($arrayfields['p.title']['checked'])) { - print ''; + print ''; print dol_trunc($obj->title,80); print ''; if (! $i) $totalarray['nbfield']++; @@ -659,7 +656,7 @@ while ($i < min($num,$limit)) // Company if (! empty($arrayfields['s.nom']['checked'])) { - print ''; + print ''; if ($obj->socid) { $socstatic->id=$obj->socid; @@ -701,9 +698,11 @@ while ($i < min($num,$limit)) $userstatic->email=$val['email']; $userstatic->statut=$val['statut']; $userstatic->entity=$val['entity']; - print $userstatic->getNomUrl(1); + $userstatic->photo=$val['photo']; + //print $userstatic->getNomUrl(1, '', 0, 0, 12); + print $userstatic->getNomUrl(-2); $j++; - if ($j < $nbofsalesrepresentative) print ', '; + if ($j < $nbofsalesrepresentative) print ' '; } } //else print $langs->trans("NoSalesRepresentativeAffected"); @@ -756,7 +755,7 @@ while ($i < min($num,$limit)) // Opp Status if (! empty($arrayfields['p.fk_opp_status']['checked'])) { - print ''; + print ''; if ($obj->opp_status_code) print $langs->trans("OppStatusShort".$obj->opp_status_code); print ''; if (! $i) $totalarray['nbfield']++; diff --git a/htdocs/projet/tasks/list.php b/htdocs/projet/tasks/list.php index c9d9e82ea82..7d5e4eea1ae 100644 --- a/htdocs/projet/tasks/list.php +++ b/htdocs/projet/tasks/list.php @@ -335,7 +335,6 @@ if (! $resql) exit; } -$var=true; $num = $db->num_rows($resql); if ($num == 1 && ! empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all) @@ -597,7 +596,6 @@ if (! empty($conf->global->PROJECT_TIMES_SPENT_FORMAT)) $timespentoutputformat=$ $now = dol_now(); $i=0; -$var=true; $totalarray=array(); while ($i < min($num,$limit)) { @@ -621,8 +619,7 @@ while ($i < min($num,$limit)) $userAccess = $projectstatic->restrictedProjectArea($user); // why this ? if ($userAccess >= 0) { - $var=!$var; - print ""; + print ""; // Ref if (! empty($arrayfields['t.ref']['checked'])) @@ -741,7 +738,7 @@ while ($i < min($num,$limit)) if ($obj->planned_workload || $obj->duration_effective) { if ($obj->planned_workload) print round(100 * $obj->duration_effective / $obj->planned_workload,2).' %'; - else print $langs->trans('WorkloadNotDefined'); + else print $form->textwithpicto('',$langs->trans('WorkloadNotDefined'), 1, 'help'); } print ''; if (! $i) $totalarray['nbfield']++; diff --git a/htdocs/public/cron/cron_run_jobs.php b/htdocs/public/cron/cron_run_jobs.php index fc8e15aeed6..a7d3d4b3fcd 100644 --- a/htdocs/public/cron/cron_run_jobs.php +++ b/htdocs/public/cron/cron_run_jobs.php @@ -111,7 +111,7 @@ if (! empty($id)) $filter['t.rowid']=$id; } -$result = $object->fetch_all('DESC','t.rowid', 0, 0, 1, $filter); +$result = $object->fetch_all('DESC','t.rowid', 0, 0, 1, $filter, 0); if ($result<0) { echo "Error: ".$cronjob->error; diff --git a/htdocs/resource/element_resource.php b/htdocs/resource/element_resource.php index a09e9d3db39..fbb75e021ff 100644 --- a/htdocs/resource/element_resource.php +++ b/htdocs/resource/element_resource.php @@ -197,7 +197,7 @@ else $head=actions_prepare_head($act); - dol_fiche_head($head, 'resources', $langs->trans("Action"),0,'action'); + dol_fiche_head($head, 'resources', $langs->trans("Action"), -1, 'action'); $linkback =img_picto($langs->trans("BackToList"),'object_list','class="hideonsmartphone pictoactionview"'); $linkback.= ''.$langs->trans("BackToList").''; @@ -327,7 +327,7 @@ else require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php'; $head = societe_prepare_head($socstatic); - dol_fiche_head($head, 'resources', $langs->trans("ThirdParty"), 0, 'company'); + dol_fiche_head($head, 'resources', $langs->trans("ThirdParty"), -1, 'company'); dol_banner_tab($socstatic, 'socid', '', ($user->societe_id ? 0 : 1), 'rowid', 'nom', '', '&element='.$element); @@ -363,7 +363,7 @@ else if (is_object($fichinter)) { $head=fichinter_prepare_head($fichinter); - dol_fiche_head($head, 'resource', $langs->trans("InterventionCard"),0,'intervention'); + dol_fiche_head($head, 'resource', $langs->trans("InterventionCard"), -1, 'intervention'); // Intervention card $linkback = ''.$langs->trans("BackToList").''; diff --git a/htdocs/societe/class/companybankaccount.class.php b/htdocs/societe/class/companybankaccount.class.php index ec770d628a0..72f237999f8 100644 --- a/htdocs/societe/class/companybankaccount.class.php +++ b/htdocs/societe/class/companybankaccount.class.php @@ -235,24 +235,49 @@ class CompanyBankAccount extends Account /** * Delete a rib from database * - * @param User $user User deleting - * @return int <0 if KO, >0 if OK + * @param User $user User deleting + * @param int $notrigger 1=Disable triggers + * @return int <0 if KO, >0 if OK */ - function delete(User $user = null) + function delete(User $user = null, $notrigger=0) { global $conf; + + $error = 0; + + dol_syslog(get_class($this) . "::delete ".$this->id, LOG_DEBUG); + + $this->db->begin(); + + if (! $error && ! $notrigger) + { + // Call trigger + $result=$this->call_trigger('COMAPNY_RIB_DELETE',$user); + if ($result < 0) $error++; + // End call triggers + } - $sql = "DELETE FROM ".MAIN_DB_PREFIX."societe_rib"; - $sql.= " WHERE rowid = ".$this->id; - - dol_syslog(get_class($this)."::delete", LOG_DEBUG); - $result = $this->db->query($sql); - if ($result) { + if (! $error) + { + $sql = "DELETE FROM " . MAIN_DB_PREFIX . "societe_rib"; + $sql .= " WHERE rowid = " . $this->id; + + if (! $this->db->query($sql)) + { + $error++; + $this->errors[]=$this->db->lasterror(); + } + } + + if (! $error) + { + $this->db->commit(); return 1; } - else { - dol_print_error($this->db); - return -1; + else + { + $this->db->rollback(); + return -1*$error; } } diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index 649965f972c..c4412660ea7 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -592,54 +592,8 @@ if (empty($arrayfields['customerorsupplier']['checked'])) print ''; print ''."\n"; -print ''; -if (! empty($arrayfields['s.nom']['checked'])) print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"],"s.nom","",$param,"",$sortfield,$sortorder); -if (! empty($arrayfields['s.barcode']['checked'])) print_liste_field_titre($arrayfields['s.barcode']['label'], $_SERVER["PHP_SELF"], "s.barcode",$param,'','',$sortfield,$sortorder); -if (! empty($arrayfields['s.code_client']['checked'])) print_liste_field_titre($arrayfields['s.code_client']['label'],$_SERVER["PHP_SELF"],"s.code_client","",$param,'',$sortfield,$sortorder); -if (! empty($arrayfields['s.code_fournisseur']['checked'])) print_liste_field_titre($arrayfields['s.code_fournisseur']['label'],$_SERVER["PHP_SELF"],"s.code_fournisseur","",$param,'',$sortfield,$sortorder); -if (! empty($arrayfields['s.code_compta']['checked'])) print_liste_field_titre($arrayfields['s.code_compta']['label'],$_SERVER["PHP_SELF"],"s.code_compta","",$param,'',$sortfield,$sortorder); -if (! empty($arrayfields['s.code_compta_fournisseur']['checked'])) print_liste_field_titre($arrayfields['s.code_compta_fournisseur']['label'],$_SERVER["PHP_SELF"],"s.code_compta_fournisseur","",$param,'',$sortfield,$sortorder); -if (! empty($arrayfields['s.town']['checked'])) print_liste_field_titre($arrayfields['s.town']['label'],$_SERVER["PHP_SELF"],"s.town","",$param,'',$sortfield,$sortorder); -if (! empty($arrayfields['s.zip']['checked'])) print_liste_field_titre($arrayfields['s.zip']['label'],$_SERVER["PHP_SELF"],"s.zip","",$param,'',$sortfield,$sortorder); -if (! empty($arrayfields['state.nom']['checked'])) print_liste_field_titre($arrayfields['state.nom']['label'],$_SERVER["PHP_SELF"],"state.nom","",$param,'',$sortfield,$sortorder); -if (! empty($arrayfields['country.code_iso']['checked'])) print_liste_field_titre($arrayfields['country.code_iso']['label'],$_SERVER["PHP_SELF"],"country.code_iso","",$param,'align="center"',$sortfield,$sortorder); -if (! empty($arrayfields['typent.code']['checked'])) print_liste_field_titre($arrayfields['typent.code']['label'],$_SERVER["PHP_SELF"],"typent.code","",$param,'align="center"',$sortfield,$sortorder); -if (! empty($arrayfields['s.email']['checked'])) print_liste_field_titre($arrayfields['s.email']['label'],$_SERVER["PHP_SELF"],"s.email","",$param,'',$sortfield,$sortorder); -if (! empty($arrayfields['s.phone']['checked'])) print_liste_field_titre($arrayfields['s.phone']['label'],$_SERVER["PHP_SELF"],"s.phone","",$param,'',$sortfield,$sortorder); -if (! empty($arrayfields['s.url']['checked'])) print_liste_field_titre($arrayfields['s.url']['label'],$_SERVER["PHP_SELF"],"s.url","",$param,'',$sortfield,$sortorder); -if (! empty($arrayfields['s.siren']['checked'])) print_liste_field_titre($form->textwithpicto($langs->trans("ProfId1Short"),$textprofid[1],1,0),$_SERVER["PHP_SELF"],"s.siren","",$param,'class="nowrap"',$sortfield,$sortorder); -if (! empty($arrayfields['s.siret']['checked'])) print_liste_field_titre($form->textwithpicto($langs->trans("ProfId2Short"),$textprofid[2],1,0),$_SERVER["PHP_SELF"],"s.siret","",$param,'class="nowrap"',$sortfield,$sortorder); -if (! empty($arrayfields['s.ape']['checked'])) print_liste_field_titre($form->textwithpicto($langs->trans("ProfId3Short"),$textprofid[3],1,0),$_SERVER["PHP_SELF"],"s.ape","",$param,'class="nowrap"',$sortfield,$sortorder); -if (! empty($arrayfields['s.idprof4']['checked'])) print_liste_field_titre($form->textwithpicto($langs->trans("ProfId4Short"),$textprofid[4],1,0),$_SERVER["PHP_SELF"],"s.idprof4","",$param,'class="nowrap"',$sortfield,$sortorder); -if (! empty($arrayfields['s.idprof5']['checked'])) print_liste_field_titre($form->textwithpicto($langs->trans("ProfId5Short"),$textprofid[4],1,0),$_SERVER["PHP_SELF"],"s.idprof5","",$param,'class="nowrap"',$sortfield,$sortorder); -if (! empty($arrayfields['s.idprof6']['checked'])) print_liste_field_titre($form->textwithpicto($langs->trans("ProfId6Short"),$textprofid[4],1,0),$_SERVER["PHP_SELF"],"s.idprof6","",$param,'class="nowrap"',$sortfield,$sortorder); -if (! empty($arrayfields['customerorsupplier']['checked'])) print_liste_field_titre(''); // type of customer -if (! empty($arrayfields['s.fk_prospectlevel']['checked'])) print_liste_field_titre($arrayfields['s.fk_prospectlevel']['label'],$_SERVER["PHP_SELF"],"s.fk_prospectlevel","",$param,'align="center"',$sortfield,$sortorder); -if (! empty($arrayfields['s.fk_stcomm']['checked'])) print_liste_field_titre($arrayfields['s.fk_stcomm']['label'],$_SERVER["PHP_SELF"],"s.fk_stcomm","",$param,'align="center"',$sortfield,$sortorder); -// Extra fields -if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) -{ - foreach($extrafields->attribute_label as $key => $val) - { - if (! empty($arrayfields["ef.".$key]['checked'])) - { - $align=$extrafields->getAlignFlag($key); - print_liste_field_titre($extralabels[$key],$_SERVER["PHP_SELF"],"ef.".$key,"",$param,($align?'align="'.$align.'"':''),$sortfield,$sortorder); - } - } -} -// Hook fields -$parameters=array('arrayfields'=>$arrayfields); -$reshook=$hookmanager->executeHooks('printFieldListTitle',$parameters); // Note that $action and $object may have been modified by hook -print $hookmanager->resPrint; -if (! empty($arrayfields['s.datec']['checked'])) print_liste_field_titre($arrayfields['s.datec']['label'],$_SERVER["PHP_SELF"],"s.datec","",$param,'align="center" class="nowrap"',$sortfield,$sortorder); -if (! empty($arrayfields['s.tms']['checked'])) print_liste_field_titre($arrayfields['s.tms']['label'],$_SERVER["PHP_SELF"],"s.tms","",$param,'align="center" class="nowrap"',$sortfield,$sortorder); -if (! empty($arrayfields['s.status']['checked'])) print_liste_field_titre($arrayfields['s.status']['label'],$_SERVER["PHP_SELF"],"s.status","",$param,'align="center"',$sortfield,$sortorder); -print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"],"",'','','align="right"',$sortfield,$sortorder,'maxwidthsearch '); -print "\n"; - // Fields title search -print ''; +print ''; if (! empty($arrayfields['s.nom']['checked'])) { print ''; print "\n"; -$var=True; +print ''; +if (! empty($arrayfields['s.nom']['checked'])) print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"],"s.nom","",$param,"",$sortfield,$sortorder); +if (! empty($arrayfields['s.barcode']['checked'])) print_liste_field_titre($arrayfields['s.barcode']['label'], $_SERVER["PHP_SELF"], "s.barcode",$param,'','',$sortfield,$sortorder); +if (! empty($arrayfields['s.code_client']['checked'])) print_liste_field_titre($arrayfields['s.code_client']['label'],$_SERVER["PHP_SELF"],"s.code_client","",$param,'',$sortfield,$sortorder); +if (! empty($arrayfields['s.code_fournisseur']['checked'])) print_liste_field_titre($arrayfields['s.code_fournisseur']['label'],$_SERVER["PHP_SELF"],"s.code_fournisseur","",$param,'',$sortfield,$sortorder); +if (! empty($arrayfields['s.code_compta']['checked'])) print_liste_field_titre($arrayfields['s.code_compta']['label'],$_SERVER["PHP_SELF"],"s.code_compta","",$param,'',$sortfield,$sortorder); +if (! empty($arrayfields['s.code_compta_fournisseur']['checked'])) print_liste_field_titre($arrayfields['s.code_compta_fournisseur']['label'],$_SERVER["PHP_SELF"],"s.code_compta_fournisseur","",$param,'',$sortfield,$sortorder); +if (! empty($arrayfields['s.town']['checked'])) print_liste_field_titre($arrayfields['s.town']['label'],$_SERVER["PHP_SELF"],"s.town","",$param,'',$sortfield,$sortorder); +if (! empty($arrayfields['s.zip']['checked'])) print_liste_field_titre($arrayfields['s.zip']['label'],$_SERVER["PHP_SELF"],"s.zip","",$param,'',$sortfield,$sortorder); +if (! empty($arrayfields['state.nom']['checked'])) print_liste_field_titre($arrayfields['state.nom']['label'],$_SERVER["PHP_SELF"],"state.nom","",$param,'',$sortfield,$sortorder); +if (! empty($arrayfields['country.code_iso']['checked'])) print_liste_field_titre($arrayfields['country.code_iso']['label'],$_SERVER["PHP_SELF"],"country.code_iso","",$param,'align="center"',$sortfield,$sortorder); +if (! empty($arrayfields['typent.code']['checked'])) print_liste_field_titre($arrayfields['typent.code']['label'],$_SERVER["PHP_SELF"],"typent.code","",$param,'align="center"',$sortfield,$sortorder); +if (! empty($arrayfields['s.email']['checked'])) print_liste_field_titre($arrayfields['s.email']['label'],$_SERVER["PHP_SELF"],"s.email","",$param,'',$sortfield,$sortorder); +if (! empty($arrayfields['s.phone']['checked'])) print_liste_field_titre($arrayfields['s.phone']['label'],$_SERVER["PHP_SELF"],"s.phone","",$param,'',$sortfield,$sortorder); +if (! empty($arrayfields['s.url']['checked'])) print_liste_field_titre($arrayfields['s.url']['label'],$_SERVER["PHP_SELF"],"s.url","",$param,'',$sortfield,$sortorder); +if (! empty($arrayfields['s.siren']['checked'])) print_liste_field_titre($form->textwithpicto($langs->trans("ProfId1Short"),$textprofid[1],1,0),$_SERVER["PHP_SELF"],"s.siren","",$param,'class="nowrap"',$sortfield,$sortorder); +if (! empty($arrayfields['s.siret']['checked'])) print_liste_field_titre($form->textwithpicto($langs->trans("ProfId2Short"),$textprofid[2],1,0),$_SERVER["PHP_SELF"],"s.siret","",$param,'class="nowrap"',$sortfield,$sortorder); +if (! empty($arrayfields['s.ape']['checked'])) print_liste_field_titre($form->textwithpicto($langs->trans("ProfId3Short"),$textprofid[3],1,0),$_SERVER["PHP_SELF"],"s.ape","",$param,'class="nowrap"',$sortfield,$sortorder); +if (! empty($arrayfields['s.idprof4']['checked'])) print_liste_field_titre($form->textwithpicto($langs->trans("ProfId4Short"),$textprofid[4],1,0),$_SERVER["PHP_SELF"],"s.idprof4","",$param,'class="nowrap"',$sortfield,$sortorder); +if (! empty($arrayfields['s.idprof5']['checked'])) print_liste_field_titre($form->textwithpicto($langs->trans("ProfId5Short"),$textprofid[4],1,0),$_SERVER["PHP_SELF"],"s.idprof5","",$param,'class="nowrap"',$sortfield,$sortorder); +if (! empty($arrayfields['s.idprof6']['checked'])) print_liste_field_titre($form->textwithpicto($langs->trans("ProfId6Short"),$textprofid[4],1,0),$_SERVER["PHP_SELF"],"s.idprof6","",$param,'class="nowrap"',$sortfield,$sortorder); +if (! empty($arrayfields['customerorsupplier']['checked'])) print_liste_field_titre(''); // type of customer +if (! empty($arrayfields['s.fk_prospectlevel']['checked'])) print_liste_field_titre($arrayfields['s.fk_prospectlevel']['label'],$_SERVER["PHP_SELF"],"s.fk_prospectlevel","",$param,'align="center"',$sortfield,$sortorder); +if (! empty($arrayfields['s.fk_stcomm']['checked'])) print_liste_field_titre($arrayfields['s.fk_stcomm']['label'],$_SERVER["PHP_SELF"],"s.fk_stcomm","",$param,'align="center"',$sortfield,$sortorder); +// Extra fields +if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) +{ + foreach($extrafields->attribute_label as $key => $val) + { + if (! empty($arrayfields["ef.".$key]['checked'])) + { + $align=$extrafields->getAlignFlag($key); + print_liste_field_titre($extralabels[$key],$_SERVER["PHP_SELF"],"ef.".$key,"",$param,($align?'align="'.$align.'"':''),$sortfield,$sortorder); + } + } +} +// Hook fields +$parameters=array('arrayfields'=>$arrayfields); +$reshook=$hookmanager->executeHooks('printFieldListTitle',$parameters); // Note that $action and $object may have been modified by hook +print $hookmanager->resPrint; +if (! empty($arrayfields['s.datec']['checked'])) print_liste_field_titre($arrayfields['s.datec']['label'],$_SERVER["PHP_SELF"],"s.datec","",$param,'align="center" class="nowrap"',$sortfield,$sortorder); +if (! empty($arrayfields['s.tms']['checked'])) print_liste_field_titre($arrayfields['s.tms']['label'],$_SERVER["PHP_SELF"],"s.tms","",$param,'align="center" class="nowrap"',$sortfield,$sortorder); +if (! empty($arrayfields['s.status']['checked'])) print_liste_field_titre($arrayfields['s.status']['label'],$_SERVER["PHP_SELF"],"s.status","",$param,'align="center"',$sortfield,$sortorder); +print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"],"",'','','align="right"',$sortfield,$sortorder,'maxwidthsearch '); +print "\n"; + + $i = 0; while ($i < min($num, $limit)) { $obj = $db->fetch_object($resql); - $var=!$var; $companystatic->id=$obj->rowid; $companystatic->name=$obj->name; @@ -911,10 +910,10 @@ while ($i < min($num, $limit)) $companystatic->fk_prospectlevel=$obj->fk_prospectlevel; $companystatic->name_alias=$obj->name_alias; - print ""; + print ""; if (! empty($arrayfields['s.nom']['checked'])) { - print "\n"; } diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php index 41fe2db302a..5b007d45774 100644 --- a/htdocs/supplier_proposal/card.php +++ b/htdocs/supplier_proposal/card.php @@ -1050,7 +1050,9 @@ if ($action == 'create') } else { - if (!empty($conf->multicurrency->enabled) && !empty($soc->multicurrency_code)) $currency_code = $soc->multicurrency_code; + $cond_reglement_id = $soc->cond_reglement_supplier_id; + $mode_reglement_id = $soc->mode_reglement_supplier_id; + if (!empty($conf->multicurrency->enabled) && !empty($soc->multicurrency_code)) $currency_code = $soc->multicurrency_code; } $object = new SupplierProposal($db); @@ -1087,12 +1089,12 @@ if ($action == 'create') // Terms of payment print ''; // Mode of payment print ''; // Bank Account diff --git a/htdocs/supplier_proposal/class/supplier_proposal.class.php b/htdocs/supplier_proposal/class/supplier_proposal.class.php index 0ec7710ee70..65efb97f824 100644 --- a/htdocs/supplier_proposal/class/supplier_proposal.class.php +++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php @@ -2143,7 +2143,7 @@ class SupplierProposal extends CommonObject $response->warning_delay = $delay_warning/60/60/24; $response->label = $label; $response->url = DOL_URL_ROOT.'/supplier_proposal/list.php?viewstatut='.$statut; - $response->img = img_object($langs->trans("SupplierProposals"),"propal"); + $response->img = img_object('',"propal"); // This assignment in condition is not a bug. It allows walking the results. while ($obj=$this->db->fetch_object($resql)) diff --git a/htdocs/theme/eldy/graph-color.php b/htdocs/theme/eldy/graph-color.php index 4346d007158..42989907747 100644 --- a/htdocs/theme/eldy/graph-color.php +++ b/htdocs/theme/eldy/graph-color.php @@ -28,7 +28,7 @@ global $theme_bordercolor, $theme_datacolor, $theme_bgcolor, $theme_bgcoloronglet; $theme_bordercolor = array(235,235,224); -$theme_datacolor = array(array(140,140,220), array(190,120,120), array(0,160,140), array(190,190,100), array(115,125,150), array(100,170,20), array(250,190,30), array(150,135,125), array(85,135,150), array(150,135,80), array(150,80,150)); +$theme_datacolor = array(array(120,140,220), array(190,120,120), array(0,160,140), array(190,190,100), array(115,125,150), array(100,170,20), array(250,190,30), array(150,135,125), array(85,135,150), array(150,135,80), array(150,80,150)); $theme_bgcolor = array(hexdec('F4'),hexdec('F4'),hexdec('F4')); $theme_bgcoloronglet = array(hexdec('DE'),hexdec('E7'),hexdec('EC')); diff --git a/htdocs/theme/eldy/img/warning_white.png b/htdocs/theme/eldy/img/warning_white.png new file mode 100644 index 00000000000..56ea847427b Binary files /dev/null and b/htdocs/theme/eldy/img/warning_white.png differ diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 24300718a3b..b16d6d13790 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -65,6 +65,7 @@ if (! empty($conf->global->MAIN_OVERWRITE_THEME_RES)) { $path='/'.$conf->global- // Define image path files and other constants $fontlist='roboto,arial,tahoma,verdana,helvetica'; //$fontlist='helvetica, verdana, arial, sans-serif'; +//$fontlist='"open sans", "Helvetica Neue", Helvetica, Arial, sans-serif;'; $img_head=''; $img_button=dol_buildpath($path.'/theme/'.$theme.'/img/button_bg.png',1); $dol_hide_topmenu=$conf->dol_hide_topmenu; @@ -95,7 +96,7 @@ $colortexttitle='0,0,0'; $colortext='0,0,0'; $colortextlink='0,0,120'; $fontsize='13'; -$fontsizesmaller='11'; +$fontsizesmaller='12'; $usegradienttop=(isset($conf->global->THEME_ELDY_TOPMENU_BACK1)?0:1); $usegradienttitle=(isset($conf->global->THEME_ELDY_BACKTITLE1)?0:1); $useboldtitle=(isset($conf->global->THEME_ELDY_USEBOLDTITLE)?$conf->global->THEME_ELDY_USEBOLDTITLE:1); @@ -122,7 +123,7 @@ if (empty($conf->global->THEME_ELDY_ENABLE_PERSONALIZED)) $conf->global->THEME_ELDY_LINEPAIRHOVER='238,246,252'; $conf->global->THEME_ELDY_TEXT='0,0,0'; $conf->global->THEME_ELDY_FONT_SIZE1='13'; - $conf->global->THEME_ELDY_FONT_SIZE2='11'; + $conf->global->THEME_ELDY_FONT_SIZE2='12'; } @@ -240,7 +241,7 @@ body { color: rgb(); font-size: px; - line-height: 130%; + line-height: 1.4; font-family: ; margin-top: 0; margin-bottom: 0; @@ -275,7 +276,10 @@ input, input.flat, textarea, textarea.flat, form.flat select, select, select.fla font-size: px; font-family: ; - border: none; +global->THEME_ELDY_SHOW_BORDER_INPUT)) + print "border: none;" +?> + border-bottom: solid 1px rgba(0,0,0,.2); outline: none; margin: 0px 0px 0px 0px; @@ -580,7 +584,7 @@ div.myavailability { padding-bottom: 4px; } .checkallactions { - vertical-align: top; + vertical-align: text-bottom; margin-top: 6px; margin-left: 4px; } @@ -667,7 +671,7 @@ div.fiche>form>div.div-table-responsive, div.fiche>form>div.div-table-responsive overflow-x: auto; } div.fiche>form>div.div-table-responsive { - min-height: 350px; + min-height: 390px; } .flexcontainer { @@ -679,7 +683,7 @@ div.fiche>form>div.div-table-responsive { flex: 1 1 120px; } .thumbstat150 { - flex: 1 1 150px; + flex: 1 1 170px; } .thumbstat, thumbstat150 { /* flex-grow: 1; */ @@ -873,13 +877,14 @@ td.showDragHandle { #id-right, #id-left { padding-top: 16px; padding-bottom: 8px; - + display: table-cell; /* DOL_XXX Empeche fonctionnement correct du scroll horizontal sur tableau, avec datatable ou CSS */ float: none; vertical-align: top; } #id-right { /* This must stay id-right and not be replaced with echo $right */ width: 100%; + background: rgb(); } #id-left { /* background-color: #fff; @@ -2390,6 +2395,9 @@ table.paddingtopbottomonly tr td { padding-top: 1px; padding-bottom: 2px; } +tr.liste_titre_filter td.liste_titre { + border-bottom: 1px solid #eee; +} .liste_titre_add td, .liste_titre_add th, .liste_titre_add .tagtd { border-top-width: 2px; @@ -2454,7 +2462,7 @@ div.refidpadding { } div.refid { font-weight: bold; - color: #866; + color: #868; font-size: 160%; } div.refidno { @@ -2497,7 +2505,6 @@ div.pagination li { div.pagination li.pagination a, div.pagination li.pagination span { padding: 6px 12px; - margin-left: -1px; line-height: 1.42857143; color: #000; text-decoration: none; @@ -2704,29 +2711,26 @@ tr.liste_titre, tr.liste_titre_sel, form.liste_titre, form.liste_titre_sel, tabl } div.liste_titre_bydiv, .liste_titre div.tagtr, tr.liste_titre, tr.liste_titre_sel, form.liste_titre, form.liste_titre_sel, table.dataTable thead tr { - - background-image: -o-linear-gradient(bottom, rgba(0,0,0,0.1) 0%, rgba(,0.4) 100%); - background-image: -moz-linear-gradient(bottom, rgba(0,0,0,0.1) 0%, rgba(,0.4) 100%); - background-image: -webkit-linear-gradient(bottom, rgba(0,0,0,0.1) 0%, rgba(,0.4) 100%); - background-image: -ms-linear-gradient(bottom, rgba(0,0,0,0.1) 0%, rgba(,0.4) 100%); - background-image: linear-gradient(bottom, rgba(0,0,0,0.1) 0%, rgba(,0.4) 100%); - - background: rgb(); - + background: linear-gradient(bottom, rgb() 85%, rgb() 100%); + background: -o-linear-gradient(bottom, rgb() 85%, rgb() 100%); + background: -moz-linear-gradient(bottom, rgb() 85%, rgb() 100%); + background: -webkit-linear-gradient(bottom, rgb() 85%, rgb() 100%); + background: -ms-linear-gradient(bottom, rgb() 85%, rgb() 100%); font-weight: ; - + border-bottom: 1px solid #ddd; + color: rgb(); font-family: ; - border-bottom: 1px solid #FDFFFF; text-align: ; } tr.liste_titre th, tr.liste_titre td, th.liste_titre { - border-bottom: 1px solid #; +/* border-bottom: 1px solid #; */ + border-bottom: 1px solid #888; } -/* TODO Once title line is moved under title search, make border bottom of all th black and force to whit when it's first tr */ -tr:first-child th.liste_titre { - border-bottom: 1px solid #FFF ! important; +/* TODO Once title line is moved under title search, make border bottom of all th black and force to white when it's first tr */ +tr.liste_titre:first-child th, tr:first-child th.liste_titre { + border-bottom: 1px solid #ddd ! important; } tr.liste_titre th, th.liste_titre, tr.liste_titre td, td.liste_titre, form.liste_titre div { @@ -2879,7 +2883,7 @@ div.tabBar .noborder { width: 105px; } .boxstats130 { - width: 135px; + width: 160px; height: 48px; padding: 3px } @@ -2889,8 +2893,15 @@ div.tabBar .noborder { @media only screen and (max-width: 767px) { - .boxstats, .boxstats130 { - width: 100px; + .thumbstat150 { + flex: 1 1 110px; + } + .boxstats, .boxstats130 { + width: 90px; + } + .dashboardlineindicator { + float: left; + padding-left: 5px; } } @@ -2904,6 +2915,7 @@ span.boxstatstext { span.boxstatsindicator { font-size: 130%; font-weight: normal; + line-height: 29px; } span.dashboardlineindicator, span.dashboardlineindicatorlate { font-size: 130%; @@ -2916,15 +2928,33 @@ span.dashboardlineok { color: #008800; } span.dashboardlineko { - color: #880000; - /* font-weight: bold; */ - font-size: 100%; + color: #FFF; + /*color: #8c4446 ! important; + padding-left: 1px;*/ + + font-size: 80%; } .dashboardlinelatecoin { float: right; position: relative; text-align: right; - top: -22px + top: -24px; + padding: 1px 2px 1px 2px; + border-radius: .25em; + + background-color: #af4705; + padding: 0px 5px 0px 5px; + top: -26px; +} +.imglatecoin { + padding: 1px 3px 1px 1px; + margin-left: 4px; + margin-right: 2px; + background-color: #8c4446; + color: #FFFFFF ! important; + border-radius: .25em; + display: inline-block; + vertical-align: middle; } .boxtable { margin-bottom: 8px !important; @@ -4111,10 +4141,11 @@ a span.select2-chosen .select2-dropdown-open.select2-drop-above .select2-choice, .select2-dropdown-open.select2-drop-above .select2-choices, .select2-container-multi .select2-choices, .select2-container-multi.select2-container-active .select2-choices { - border-bottom: none; + border-bottom: 1px solid #ccc; border-right: none; border-top: none; - border-left: 1px solid #ddd; + border-left: none; + } @@ -4620,7 +4651,7 @@ border-top-right-radius: 6px; @media only screen and (max-width: px) { div.tmenucenter { - max-width: px; /* size of viewport */ + width: px; /* size of viewport */ white-space: nowrap; overflow: hidden; text-overflow: ellipsis; diff --git a/htdocs/theme/md/img/object_multicurrency.png b/htdocs/theme/md/img/object_multicurrency.png new file mode 100644 index 00000000000..51896a4c051 Binary files /dev/null and b/htdocs/theme/md/img/object_multicurrency.png differ diff --git a/htdocs/theme/md/img/warning_white.png b/htdocs/theme/md/img/warning_white.png new file mode 100644 index 00000000000..56ea847427b Binary files /dev/null and b/htdocs/theme/md/img/warning_white.png differ diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index dd0f07b0a95..d80630f0501 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -587,7 +587,7 @@ div.myavailability { padding-bottom: 4px; } .checkallactions { - vertical-align: top; + vertical-align: text-bottom; margin-top: 6px; margin-left: 4px; } @@ -674,7 +674,7 @@ div.fiche>form>div.div-table-responsive, div.fiche>form>div.div-table-responsive overflow-x: auto; } div.fiche>form>div.div-table-responsive { - min-height: 350px; + min-height: 390px; } .flexcontainer { @@ -2301,6 +2301,9 @@ table.paddingtopbottomonly tr td { padding-bottom: 2px; } +tr.liste_titre_filter td.liste_titre { + border-bottom: 1px solid #eee; +} .liste_titre_add td, .liste_titre_add th, .liste_titre_add .tagtd { border-top-width: 2px; @@ -2410,7 +2413,6 @@ div.pagination li { div.pagination li.pagination a, div.pagination li.pagination span { padding: 6px 12px; - margin-left: -1px; line-height: 1.42857143; color: #000; text-decoration: none; @@ -2800,20 +2802,28 @@ div .tdtop { } @media only screen and (max-width: 767px) { - .boxstats, .boxstats130 { - width: 100px; + .thumbstat150 { + flex: 1 1 110px; + } + .boxstats, .boxstats130 { + width: 90px; + } + .dashboardlineindicator { + float: left; + padding-left: 5px; } } .boxstats:hover { box-shadow: 0px 0px 8px 0px rgba(0,0,0,0.20); } span.boxstatstext { - /* opacity: 0.9; Disabled. This make text on top of left menu in smartphone size */ line-height: 18px; + opacity: 0.7; } span.boxstatsindicator { font-size: 110%; font-weight: normal; + font-color: rgb(); } span.dashboardlineindicator, span.dashboardlineindicatorlate { font-size: 120%; @@ -2826,14 +2836,18 @@ span.dashboardlineok { color: #008800; } span.dashboardlineko { - color: #880000; - font-weight: bold; + color: #FFF; + font-size: 80%; } .dashboardlinelatecoin { float: right; position: relative; text-align: right; - top: -22px + top: -24px; + padding: 1px 6px 1px 6px; + background-color: #8c4446; + color: #FFFFFF ! important; + border-radius: .25em; } .boxtable { margin-bottom: 8px !important; diff --git a/scripts/cron/cron_run_jobs.php b/scripts/cron/cron_run_jobs.php index d60218fba22..4360e74cae5 100755 --- a/scripts/cron/cron_run_jobs.php +++ b/scripts/cron/cron_run_jobs.php @@ -128,7 +128,7 @@ if (! empty($id)) { $filter['t.rowid']=$id; } -$result = $object->fetch_all('DESC','t.rowid', 0, 0, 1, $filter); +$result = $object->fetch_all('DESC','t.rowid', 0, 0, 1, $filter, 0); if ($result<0) { echo "Error: ".$object->error; @@ -136,7 +136,7 @@ if ($result<0) exit(-1); } -// TODO This sequence of code must be shared with code into cron_run_jobs.php php page. +// TODO This sequence of code must be shared with code into public/cron/cron_run_jobs.php php page. // current date $now=dol_now();
'; @@ -889,12 +843,57 @@ print '
"; + print ''; print $companystatic->getNomUrl(1,'',100); print "
' . $langs->trans('PaymentConditionsShort') . ''; - $form->select_conditions_paiements(GETPOST('cond_reglement_id') > 0 ? GETPOST('cond_reglement_id') : $soc->cond_reglement_id, 'cond_reglement_id', -1, 1); + $form->select_conditions_paiements(GETPOST('cond_reglement_id') > 0 ? GETPOST('cond_reglement_id') : $cond_reglement_id, 'cond_reglement_id', -1, 1); print '
' . $langs->trans('PaymentMode') . ''; - $form->select_types_paiements(GETPOST('mode_reglement_id') > 0 ? GETPOST('mode_reglement_id') : $soc->mode_reglement_id, 'mode_reglement_id'); + $form->select_types_paiements(GETPOST('mode_reglement_id') > 0 ? GETPOST('mode_reglement_id') : $mode_reglement_id, 'mode_reglement_id'); print '