Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into NEW_inventory_coreobject_listview
This commit is contained in:
commit
c3e8a5be62
@ -123,16 +123,21 @@ foreach ($includeconstants as $countrycode => $tmp)
|
||||
|
||||
fputs($fp, '<dolibarr_htdocs_dir includecustom="'.$includecustom.'">'."\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, ' </dir>'."\n");
|
||||
fputs($fp, ' <dir name="'.$newdir.'" >'."\n");
|
||||
@ -160,14 +165,21 @@ $checksumconcat=array();
|
||||
fputs($fp, '<dolibarr_script_dir version="'.$release.'">'."\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, ' </dir>'."\n");
|
||||
|
||||
@ -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))
|
||||
|
||||
@ -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 = '';
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com>
|
||||
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
@ -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 '<td>' . stripslashes(nl2br($objp->comments)) . '</td></tr>';
|
||||
|
||||
print '<tr><td>' . $langs->trans("TypeFees") . '</td>';
|
||||
print '<td>' . dol_trunc($objp->fees_label, 24) . '</td>';
|
||||
print '<td>' . ($langs->trans($objp->type_fees_code) == $objp->type_fees_code ? $objp->type_fees_label : $langs->trans(($objp->type_fees_code))) . '</td>';
|
||||
|
||||
print '<tr><td>' . $langs->trans("Account") . '</td><td>';
|
||||
print $formventilation->select_account($objp->fk_code_ventilation, 'codeventil', 1);
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com>
|
||||
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
@ -148,7 +148,7 @@ print '<script type="text/javascript">
|
||||
$sql = "SELECT er.ref, er.rowid as erid,";
|
||||
$sql .= " erd.rowid, erd.fk_c_type_fees, erd.comments, erd.total_ht, erd.fk_code_ventilation, erd.tva_tx, erd.date,";
|
||||
$sql .= " aa.label, aa.account_number,";
|
||||
$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 .= " FROM " . MAIN_DB_PREFIX . "expensereport as er";
|
||||
$sql .= " , " . MAIN_DB_PREFIX . "accounting_account as aa";
|
||||
$sql .= " , " . MAIN_DB_PREFIX . "expensereport_det as erd";
|
||||
@ -282,7 +282,7 @@ if ($result) {
|
||||
|
||||
print '<td align="center">' . dol_print_date($db->jdate($objp->date), 'day') . '</td>';
|
||||
|
||||
print '<td class="tdoverflow">' . $objp->fees_label . '</td>';
|
||||
print '<td class="tdoverflow">' . ($langs->trans($objp->type_fees_code) == $objp->type_fees_code ? $objp->type_fees_label : $langs->trans(($objp->type_fees_code))) . '</td>';
|
||||
|
||||
print '<td>';
|
||||
$text = dolGetFirstLineOfText(dol_string_nohtmltag($objp->comments));
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com>
|
||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>s
|
||||
@ -175,7 +175,7 @@ llxHeader('', $langs->trans("ExpenseReportsVentilation"));
|
||||
// Expense report lines
|
||||
$sql = "SELECT er.ref, er.rowid as erid, er.date_debut,";
|
||||
$sql .= " erd.rowid, erd.fk_c_type_fees, erd.comments, erd.total_ht as price, erd.fk_code_ventilation, erd.tva_tx as tva_tx_line, erd.date,";
|
||||
$sql .= " f.id as fees_id, f.label as fees_label, f.accountancy_code as code_buy,";
|
||||
$sql .= " f.id as type_fees_id, f.code as type_fees_code, f.label as type_fees_label, f.accountancy_code as code_buy,";
|
||||
$sql .= " aa.rowid as aarowid";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "expensereport as er";
|
||||
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "expensereport_det as erd ON er.rowid = erd.fk_expensereport";
|
||||
@ -302,20 +302,20 @@ if ($result) {
|
||||
|
||||
$expensereport_static->ref = $objp->ref;
|
||||
$expensereport_static->id = $objp->erid;
|
||||
|
||||
|
||||
print '<tr '. $bc[$var].'>';
|
||||
|
||||
// Line id
|
||||
print '<td>' . $objp->rowid . '</td>';
|
||||
|
||||
print '<td align="center">' . dol_print_date($db->jdate($objp->date), 'day') . '</td>';
|
||||
|
||||
// Ref Expense report
|
||||
print '<td>' . $expensereport_static->getNomUrl(1) . '</td>';
|
||||
|
||||
print '<td align="center">' . dol_print_date($db->jdate($objp->date), 'day') . '</td>';
|
||||
|
||||
// Fees label
|
||||
print '<td>';
|
||||
print $objp->fees_label;
|
||||
print ($langs->trans($objp->type_fees_code) == $objp->type_fees_code ? $objp->type_fees_label : $langs->trans(($objp->type_fees_code)));
|
||||
print '</td>';
|
||||
|
||||
// Fees description -- Can be null
|
||||
|
||||
@ -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 = '';
|
||||
|
||||
@ -1775,7 +1775,7 @@ class Adherent extends CommonObject
|
||||
$response->warning_delay=$conf->adherent->subscription->warning_delay/60/60/24;
|
||||
$response->label=$langs->trans("MembersWithSubscriptionToReceive");
|
||||
$response->url=DOL_URL_ROOT.'/adherents/list.php?mainmenu=members&statut=1&filter=outofdate';
|
||||
$response->img=img_object($langs->trans("Members"),"user");
|
||||
$response->img=img_object('',"user");
|
||||
|
||||
$adherentstatic = new Adherent($this->db);
|
||||
|
||||
|
||||
@ -215,8 +215,17 @@ if ($action == 'edit') // Edit
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Disable javascript and ajax
|
||||
print '<tr><td width="35%">'.$langs->trans("DisableJavascript").'</td><td>';
|
||||
// show input border
|
||||
/*
|
||||
print '<tr><td>'.$langs->trans("showInputBorder").'</td><td>';
|
||||
print $form->selectyesno('main_showInputBorder',isset($conf->global->THEME_ELDY_SHOW_BORDER_INPUT)?$conf->global->THEME_ELDY_SHOW_BORDER_INPUT:0,1);
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
*/
|
||||
|
||||
// Disable javascript and ajax
|
||||
print '<tr><td>'.$langs->trans("DisableJavascript").'</td><td>';
|
||||
print $form->selectyesno('main_disable_javascript',isset($conf->global->MAIN_DISABLE_JAVASCRIPT)?$conf->global->MAIN_DISABLE_JAVASCRIPT:0,1);
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
@ -390,12 +399,18 @@ else // Show
|
||||
print '<td width="20"> </td>';
|
||||
print "</tr>";
|
||||
|
||||
/*
|
||||
print '<tr><td>'.$langs->trans("showInputBorder").'</td><td>';
|
||||
print yn($conf->global->THEME_ELDY_SHOW_BORDER_INPUT)."</td>";
|
||||
print '<td width="20"> </td>';
|
||||
print "</tr>";
|
||||
*/
|
||||
|
||||
// Disable javascript/ajax
|
||||
|
||||
print '<tr><td width="35%">'.$langs->trans("DisableJavascript").'</td><td>';
|
||||
print yn($conf->global->MAIN_DISABLE_JAVASCRIPT)."</td>";
|
||||
print '<td width="20"> </td>';
|
||||
print "</tr>";
|
||||
print '<td width="20"> </td>';
|
||||
print "</tr>";
|
||||
|
||||
// Activate preview tab on element card
|
||||
if (class_exists("Imagick"))
|
||||
|
||||
@ -95,13 +95,13 @@ print '<!-- for a local check target=local&xmlshortfile=... -->'."\n";
|
||||
if (dol_is_file($xmlfile))
|
||||
{
|
||||
print '<input type="radio" name="target" value="local"'.((! GETPOST('target') || GETPOST('target') == 'local') ? 'checked="checked"':'').'"> '.$langs->trans("LocalSignature").' = ';
|
||||
print '<input name="xmlshortfile" class="flat minwidth200" value="'.dol_escape_htmltag($xmlshortfile).'">';
|
||||
print '<input name="xmlshortfile" class="flat minwidth400" value="'.dol_escape_htmltag($xmlshortfile).'">';
|
||||
print '<br>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<input type="radio" name="target" value="local"> '.$langs->trans("LocalSignature").' = ';
|
||||
print '<input name="xmlshortfile" class="flat minwidth200" value="'.dol_escape_htmltag($xmlshortfile).'">';
|
||||
print '<input name="xmlshortfile" class="flat minwidth400" value="'.dol_escape_htmltag($xmlshortfile).'">';
|
||||
print ' <span class="warning">('.$langs->trans("AvailableOnlyOnPackagedVersions").')</span>';
|
||||
print '<br>';
|
||||
}
|
||||
@ -109,7 +109,7 @@ print '<!-- for a remote target=remote&xmlremote=... -->'."\n";
|
||||
if ($enableremotecheck)
|
||||
{
|
||||
print '<input type="radio" name="target" value="remote"'.(GETPOST('target') == 'remote' ? 'checked="checked"':'').'> '.$langs->trans("RemoteSignature").' = ';
|
||||
print '<input name="xmlremote" class="flat quatrevingtpercent" value="'.dol_escape_htmltag($xmlremote).'"><br>';
|
||||
print '<input name="xmlremote" class="flat minwidth400" value="'.dol_escape_htmltag($xmlremote).'"><br>';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -936,7 +936,7 @@ class ActionComm extends CommonObject
|
||||
$response->label = $langs->trans("ActionsToDo");
|
||||
$response->url = DOL_URL_ROOT.'/comm/action/listactions.php?status=todo&mainmenu=agenda';
|
||||
if ($user->rights->agenda->allactions->read) $response->url.='&filtert=-1';
|
||||
$response->img = img_object($langs->trans("Actions"),"action");
|
||||
$response->img = img_object('',"action");
|
||||
|
||||
// This assignment in condition is not a bug. It allows walking the results.
|
||||
while ($obj=$this->db->fetch_object($resql))
|
||||
|
||||
@ -3027,7 +3027,7 @@ class Propal extends CommonObject
|
||||
$response->label = $label;
|
||||
$response->url = DOL_URL_ROOT.'/comm/propal/list.php?viewstatut='.$statut.'&mainmenu=commercial&leftmenu=propals';
|
||||
$response->url_late = DOL_URL_ROOT.'/comm/propal/list.php?viewstatut='.$statut.'&mainmenu=commercial&leftmenu=propals&sortfield=p.datep&sortorder=asc';
|
||||
$response->img = img_object($langs->trans("Propals"),"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))
|
||||
|
||||
@ -559,46 +559,8 @@ if ($resql)
|
||||
|
||||
print '<div class="div-table-responsive">';
|
||||
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
|
||||
|
||||
// Fields title
|
||||
print '<tr class="liste_titre">';
|
||||
if (! empty($arrayfields['p.ref']['checked'])) print_liste_field_titre($arrayfields['p.ref']['label'],$_SERVER["PHP_SELF"],'p.ref','',$param,'',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.ref_client']['checked'])) print_liste_field_titre($arrayfields['p.ref_client']['label'],$_SERVER["PHP_SELF"],'p.ref_client','',$param,'',$sortfield,$sortorder);
|
||||
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.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['p.date']['checked'])) print_liste_field_titre($arrayfields['p.date']['label'],$_SERVER["PHP_SELF"],'p.datep','',$param, 'align="center"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.fin_validite']['checked'])) print_liste_field_titre($arrayfields['p.fin_validite']['label'],$_SERVER["PHP_SELF"],'dfv','',$param, 'align="center"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.total_ht']['checked'])) print_liste_field_titre($arrayfields['p.total_ht']['label'],$_SERVER["PHP_SELF"],'p.total_ht','',$param, 'align="right"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.total_vat']['checked'])) print_liste_field_titre($arrayfields['p.total_vat']['label'],$_SERVER["PHP_SELF"],'p.tva','',$param, 'align="right"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.total_ttc']['checked'])) print_liste_field_titre($arrayfields['p.total_ttc']['label'],$_SERVER["PHP_SELF"],'p.total','',$param, 'align="right"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['u.login']['checked'])) print_liste_field_titre($arrayfields['u.login']['label'],$_SERVER["PHP_SELF"],'u.login','',$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['p.datec']['checked'])) print_liste_field_titre($arrayfields['p.datec']['label'],$_SERVER["PHP_SELF"],"p.datec","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.tms']['checked'])) print_liste_field_titre($arrayfields['p.tms']['label'],$_SERVER["PHP_SELF"],"p.tms","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.fk_statut']['checked'])) print_liste_field_titre($arrayfields['p.fk_statut']['label'],$_SERVER["PHP_SELF"],"p.fk_statut","",$param,'align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"],"",'','','align="right"',$sortfield,$sortorder,'maxwidthsearch ');
|
||||
print '</tr>'."\n";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
|
||||
print '<tr class="liste_titre_filter">';
|
||||
if (! empty($arrayfields['p.ref']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre">';
|
||||
@ -739,9 +701,47 @@ if ($resql)
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
// Fields title
|
||||
print '<tr class="liste_titre">';
|
||||
if (! empty($arrayfields['p.ref']['checked'])) print_liste_field_titre($arrayfields['p.ref']['label'],$_SERVER["PHP_SELF"],'p.ref','',$param,'',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.ref_client']['checked'])) print_liste_field_titre($arrayfields['p.ref_client']['label'],$_SERVER["PHP_SELF"],'p.ref_client','',$param,'',$sortfield,$sortorder);
|
||||
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.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['p.date']['checked'])) print_liste_field_titre($arrayfields['p.date']['label'],$_SERVER["PHP_SELF"],'p.datep','',$param, 'align="center"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.fin_validite']['checked'])) print_liste_field_titre($arrayfields['p.fin_validite']['label'],$_SERVER["PHP_SELF"],'dfv','',$param, 'align="center"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.total_ht']['checked'])) print_liste_field_titre($arrayfields['p.total_ht']['label'],$_SERVER["PHP_SELF"],'p.total_ht','',$param, 'align="right"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.total_vat']['checked'])) print_liste_field_titre($arrayfields['p.total_vat']['label'],$_SERVER["PHP_SELF"],'p.tva','',$param, 'align="right"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.total_ttc']['checked'])) print_liste_field_titre($arrayfields['p.total_ttc']['label'],$_SERVER["PHP_SELF"],'p.total','',$param, 'align="right"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['u.login']['checked'])) print_liste_field_titre($arrayfields['u.login']['label'],$_SERVER["PHP_SELF"],'u.login','',$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['p.datec']['checked'])) print_liste_field_titre($arrayfields['p.datec']['label'],$_SERVER["PHP_SELF"],"p.datec","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.tms']['checked'])) print_liste_field_titre($arrayfields['p.tms']['label'],$_SERVER["PHP_SELF"],"p.tms","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.fk_statut']['checked'])) print_liste_field_titre($arrayfields['p.fk_statut']['label'],$_SERVER["PHP_SELF"],"p.fk_statut","",$param,'align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"],"",'','','align="right"',$sortfield,$sortorder,'maxwidthsearch ');
|
||||
print '</tr>'."\n";
|
||||
|
||||
$now = dol_now();
|
||||
$i=0;
|
||||
$var=true;
|
||||
$totalarray=array();
|
||||
while ($i < min($num,$limit))
|
||||
{
|
||||
@ -751,7 +751,7 @@ if ($resql)
|
||||
$objectstatic->id=$obj->rowid;
|
||||
$objectstatic->ref=$obj->ref;
|
||||
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<tr>';
|
||||
|
||||
if (! empty($arrayfields['p.ref']['checked']))
|
||||
{
|
||||
@ -977,7 +977,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 '<tr class="liste_total">';
|
||||
$i=0;
|
||||
|
||||
@ -1769,7 +1769,7 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
$res = $object->fetch_optionals($object->id, $extralabels);
|
||||
|
||||
$head = commande_prepare_head($object);
|
||||
dol_fiche_head($head, 'order', $langs->trans("CustomerOrder"), 0, 'order');
|
||||
dol_fiche_head($head, 'order', $langs->trans("CustomerOrder"), -1, 'order');
|
||||
|
||||
$formconfirm = '';
|
||||
|
||||
@ -2651,6 +2651,7 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
$file = $fileparams['fullname'];
|
||||
}
|
||||
|
||||
print '<div id="formmailbeforetitle" name="formmailbeforetitle"></div>';
|
||||
print '<div class="clearboth"></div>';
|
||||
print '<br>';
|
||||
print load_fiche_titre($langs->trans('SendOrderByMail'));
|
||||
|
||||
@ -3102,6 +3102,8 @@ class Commande extends CommonOrder
|
||||
|
||||
$error = 0;
|
||||
|
||||
dol_syslog(get_class($this) . "::delete ".$this->id, LOG_DEBUG);
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
if (! $error && ! $notrigger)
|
||||
@ -3117,7 +3119,6 @@ class Commande extends CommonOrder
|
||||
{
|
||||
// Delete order details
|
||||
$sql = 'DELETE FROM '.MAIN_DB_PREFIX."commandedet WHERE fk_commande = ".$this->id;
|
||||
dol_syslog(get_class($this)."::delete", LOG_DEBUG);
|
||||
if (! $this->db->query($sql) )
|
||||
{
|
||||
$error++;
|
||||
@ -3126,7 +3127,6 @@ class Commande extends CommonOrder
|
||||
|
||||
// Delete order
|
||||
$sql = 'DELETE FROM '.MAIN_DB_PREFIX."commande WHERE rowid = ".$this->id;
|
||||
dol_syslog(get_class($this)."::delete", LOG_DEBUG);
|
||||
if (! $this->db->query($sql) )
|
||||
{
|
||||
$error++;
|
||||
@ -3184,7 +3184,6 @@ class Commande extends CommonOrder
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
dol_syslog(get_class($this)."::delete $this->id by $user->id", LOG_DEBUG);
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
}
|
||||
@ -3192,7 +3191,6 @@ class Commande extends CommonOrder
|
||||
{
|
||||
foreach($this->errors as $errmsg)
|
||||
{
|
||||
dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR);
|
||||
$this->error.=($this->error?', '.$errmsg:$errmsg);
|
||||
}
|
||||
$this->db->rollback();
|
||||
@ -3233,7 +3231,7 @@ class Commande extends CommonOrder
|
||||
$response->warning_delay=$conf->commande->client->warning_delay/60/60/24;
|
||||
$response->label=$langs->trans("OrdersToProcess");
|
||||
$response->url=DOL_URL_ROOT.'/commande/list.php?viewstatut=-3&mainmenu=commercial&leftmenu=orders';
|
||||
$response->img=img_object($langs->trans("Orders"),"order");
|
||||
$response->img=img_object('',"order");
|
||||
|
||||
$generic_commande = new Commande($this->db);
|
||||
|
||||
|
||||
@ -143,7 +143,7 @@ if ($id > 0 || ! empty($ref))
|
||||
$object->fetch_thirdparty();
|
||||
|
||||
$head = commande_prepare_head($object);
|
||||
dol_fiche_head($head, 'contact', $langs->trans("CustomerOrder"), 0, 'order');
|
||||
dol_fiche_head($head, 'contact', $langs->trans("CustomerOrder"), -1, 'order');
|
||||
|
||||
|
||||
// Order card
|
||||
|
||||
@ -92,7 +92,7 @@ if ($id > 0 || ! empty($ref))
|
||||
$upload_dir = $conf->commande->dir_output.'/'.dol_sanitizeFileName($object->ref);
|
||||
|
||||
$head = commande_prepare_head($object);
|
||||
dol_fiche_head($head, 'documents', $langs->trans('CustomerOrder'), 0, 'order');
|
||||
dol_fiche_head($head, 'documents', $langs->trans('CustomerOrder'), -1, 'order');
|
||||
|
||||
// Construit liste des fichiers
|
||||
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
||||
|
||||
@ -61,7 +61,7 @@ $object->fetch_thirdparty();
|
||||
$object->info($object->id);
|
||||
|
||||
$head = commande_prepare_head($object);
|
||||
dol_fiche_head($head, 'info', $langs->trans("CustomerOrder"), 0, 'order');
|
||||
dol_fiche_head($head, 'info', $langs->trans("CustomerOrder"), -1, 'order');
|
||||
|
||||
// Order card
|
||||
|
||||
|
||||
@ -845,45 +845,7 @@ if ($resql)
|
||||
print '<div class="div-table-responsive">';
|
||||
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
|
||||
|
||||
// Fields title
|
||||
print '<tr class="liste_titre">';
|
||||
if (! empty($arrayfields['c.ref']['checked'])) print_liste_field_titre($arrayfields['c.ref']['label'],$_SERVER["PHP_SELF"],'c.ref','',$param,'',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['c.ref_client']['checked'])) print_liste_field_titre($arrayfields['c.ref_client']['label'],$_SERVER["PHP_SELF"],'c.ref_client','',$param,'',$sortfield,$sortorder);
|
||||
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.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['c.date_commande']['checked'])) print_liste_field_titre($arrayfields['c.date_commande']['label'],$_SERVER["PHP_SELF"],'c.date_commande','',$param, 'align="center"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['c.date_delivery']['checked'])) print_liste_field_titre($arrayfields['c.date_delivery']['label'],$_SERVER["PHP_SELF"],'c.date_livraison','',$param, 'align="center"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['c.total_ht']['checked'])) print_liste_field_titre($arrayfields['c.total_ht']['label'],$_SERVER["PHP_SELF"],'c.total_ht','',$param, 'align="right"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['c.total_vat']['checked'])) print_liste_field_titre($arrayfields['c.total_vat']['label'],$_SERVER["PHP_SELF"],'c.tva','',$param, 'align="right"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['c.total_ttc']['checked'])) print_liste_field_titre($arrayfields['c.total_ttc']['label'],$_SERVER["PHP_SELF"],'c.total_ttc','',$param, 'align="right"',$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['c.datec']['checked'])) print_liste_field_titre($arrayfields['c.datec']['label'],$_SERVER["PHP_SELF"],"c.date_creation","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['c.tms']['checked'])) print_liste_field_titre($arrayfields['c.tms']['label'],$_SERVER["PHP_SELF"],"c.tms","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['c.fk_statut']['checked'])) print_liste_field_titre($arrayfields['c.fk_statut']['label'],$_SERVER["PHP_SELF"],"c.fk_statut","",$param,'align="right"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['c.facture']['checked'])) print_liste_field_titre($arrayfields['c.facture']['label'],$_SERVER["PHP_SELF"],'c.facture','',$param,'align="center"',$sortfield,$sortorder,'');
|
||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"],"",'','','align="right"',$sortfield,$sortorder,'maxwidthsearch ');
|
||||
print '</tr>'."\n";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<tr class="liste_titre_filter">';
|
||||
// Ref
|
||||
if (! empty($arrayfields['c.ref']['checked']))
|
||||
{
|
||||
@ -1036,6 +998,44 @@ if ($resql)
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
// Fields title
|
||||
print '<tr class="liste_titre">';
|
||||
if (! empty($arrayfields['c.ref']['checked'])) print_liste_field_titre($arrayfields['c.ref']['label'],$_SERVER["PHP_SELF"],'c.ref','',$param,'',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['c.ref_client']['checked'])) print_liste_field_titre($arrayfields['c.ref_client']['label'],$_SERVER["PHP_SELF"],'c.ref_client','',$param,'',$sortfield,$sortorder);
|
||||
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.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['c.date_commande']['checked'])) print_liste_field_titre($arrayfields['c.date_commande']['label'],$_SERVER["PHP_SELF"],'c.date_commande','',$param, 'align="center"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['c.date_delivery']['checked'])) print_liste_field_titre($arrayfields['c.date_delivery']['label'],$_SERVER["PHP_SELF"],'c.date_livraison','',$param, 'align="center"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['c.total_ht']['checked'])) print_liste_field_titre($arrayfields['c.total_ht']['label'],$_SERVER["PHP_SELF"],'c.total_ht','',$param, 'align="right"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['c.total_vat']['checked'])) print_liste_field_titre($arrayfields['c.total_vat']['label'],$_SERVER["PHP_SELF"],'c.tva','',$param, 'align="right"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['c.total_ttc']['checked'])) print_liste_field_titre($arrayfields['c.total_ttc']['label'],$_SERVER["PHP_SELF"],'c.total_ttc','',$param, 'align="right"',$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['c.datec']['checked'])) print_liste_field_titre($arrayfields['c.datec']['label'],$_SERVER["PHP_SELF"],"c.date_creation","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['c.tms']['checked'])) print_liste_field_titre($arrayfields['c.tms']['label'],$_SERVER["PHP_SELF"],"c.tms","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['c.fk_statut']['checked'])) print_liste_field_titre($arrayfields['c.fk_statut']['label'],$_SERVER["PHP_SELF"],"c.fk_statut","",$param,'align="right"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['c.facture']['checked'])) print_liste_field_titre($arrayfields['c.facture']['label'],$_SERVER["PHP_SELF"],'c.facture','',$param,'align="center"',$sortfield,$sortorder,'');
|
||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"],"",'','','align="right"',$sortfield,$sortorder,'maxwidthsearch ');
|
||||
print '</tr>'."\n";
|
||||
|
||||
$total=0;
|
||||
$subtotal=0;
|
||||
$productstat_cache=array();
|
||||
@ -1044,13 +1044,11 @@ if ($resql)
|
||||
$generic_product = new Product($db);
|
||||
|
||||
$i=0;
|
||||
$var=true;
|
||||
$totalarray=array();
|
||||
while ($i < min($num,$limit))
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<tr>';
|
||||
|
||||
$notshippable=0;
|
||||
$warning = 0;
|
||||
@ -1393,7 +1391,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 '<tr class="liste_total">';
|
||||
$i=0;
|
||||
|
||||
@ -75,7 +75,7 @@ if ($id > 0 || ! empty($ref))
|
||||
|
||||
$head = commande_prepare_head($object);
|
||||
|
||||
dol_fiche_head($head, 'note', $langs->trans("CustomerOrder"), 0, 'order');
|
||||
dol_fiche_head($head, 'note', $langs->trans("CustomerOrder"), -1, 'order');
|
||||
|
||||
// Order card
|
||||
|
||||
|
||||
@ -1185,7 +1185,7 @@ class Account extends CommonObject
|
||||
$response->warning_delay=$conf->bank->rappro->warning_delay/60/60/24;
|
||||
$response->label=$langs->trans("TransactionsToConciliate");
|
||||
$response->url=DOL_URL_ROOT.'/compta/bank/index.php?leftmenu=bank&mainmenu=bank';
|
||||
$response->img=img_object($langs->trans("TransactionsToConciliate"),"payment");
|
||||
$response->img=img_object('',"payment");
|
||||
|
||||
while ($obj=$this->db->fetch_object($resql))
|
||||
{
|
||||
|
||||
@ -4099,7 +4099,7 @@ else if ($id > 0 || ! empty($ref))
|
||||
if ($resteapayer == 0) {
|
||||
print '<div class="inline-block divButAction"><span class="butActionRefused" title="' . $langs->trans("DisabledBecauseRemainderToPayIsZero") . '">' . $langs->trans('DoPayment') . '</span></div>';
|
||||
} else {
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="paiement.php?facid=' . $object->id . '&action=create&accountid='.$object->fk_account.'">' . $langs->trans('DoPayment') . '</a></div>';
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="'. DOL_URL_ROOT .'/compta/paiement.php?facid=' . $object->id . '&action=create&accountid='.$object->fk_account.'">' . $langs->trans('DoPayment') . '</a></div>';
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -4115,7 +4115,7 @@ else if ($id > 0 || ! empty($ref))
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="paiement.php?facid='.$object->id.'&action=create&accountid='.$object->fk_account.'">'.$langs->trans('DoPaymentBack').'</a></div>';
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="'. DOL_URL_ROOT .'/compta/paiement.php?facid='.$object->id.'&action=create&accountid='.$object->fk_account.'">'.$langs->trans('DoPaymentBack').'</a></div>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -3680,7 +3680,7 @@ class Facture extends CommonInvoice
|
||||
$response->warning_delay=$conf->facture->client->warning_delay/60/60/24;
|
||||
$response->label=$langs->trans("CustomerBillsUnpaid");
|
||||
$response->url=DOL_URL_ROOT.'/compta/facture/list.php?search_status=1&mainmenu=accountancy&leftmenu=customers_bills';
|
||||
$response->img=img_object($langs->trans("Bills"),"bill");
|
||||
$response->img=img_object('',"bill");
|
||||
|
||||
$generic_facture = new Facture($this->db);
|
||||
|
||||
|
||||
@ -511,7 +511,7 @@ class RemiseCheque extends CommonObject
|
||||
$response->warning_delay=$conf->bank->cheque->warning_delay/60/60/24;
|
||||
$response->label=$langs->trans("BankChecksToReceipt");
|
||||
$response->url=DOL_URL_ROOT.'/compta/paiement/cheque/index.php?leftmenu=checks&mainmenu=bank';
|
||||
$response->img=img_object($langs->trans("BankChecksToReceipt"),"payment");
|
||||
$response->img=img_object('',"payment");
|
||||
|
||||
while ($obj=$this->db->fetch_object($resql))
|
||||
{
|
||||
|
||||
@ -30,6 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
$langs->load("compta");
|
||||
$langs->load("salaries");
|
||||
$langs->load("bills");
|
||||
$langs->load("hrm");
|
||||
|
||||
// Security check
|
||||
$socid = GETPOST("socid","int");
|
||||
|
||||
@ -486,45 +486,8 @@ $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfiel
|
||||
print '<div class="div-table-responsive">';
|
||||
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
|
||||
|
||||
// Ligne des titres
|
||||
print '<tr class="liste_titre">';
|
||||
if (! empty($arrayfields['p.lastname']['checked'])) print_liste_field_titre($langs->trans("Lastname"),$_SERVER["PHP_SELF"],"p.lastname", $begin, $param, '', $sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.firstname']['checked'])) print_liste_field_titre($langs->trans("Firstname"),$_SERVER["PHP_SELF"],"p.firstname", $begin, $param, '', $sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.zip']['checked'])) print_liste_field_titre($langs->trans("Zip"),$_SERVER["PHP_SELF"],"p.zip", $begin, $param, '', $sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.town']['checked'])) print_liste_field_titre($langs->trans("Town"),$_SERVER["PHP_SELF"],"p.town", $begin, $param, '', $sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.poste']['checked'])) print_liste_field_titre($langs->trans("PostOrFunction"),$_SERVER["PHP_SELF"],"p.poste", $begin, $param, '', $sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.phone']['checked'])) print_liste_field_titre($langs->trans("Phone"),$_SERVER["PHP_SELF"],"p.phone", $begin, $param, '', $sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.phone_perso']['checked'])) print_liste_field_titre($langs->trans("PhonePerso"),$_SERVER["PHP_SELF"],"p.phone_perso", $begin, $param, '', $sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.phone_mobile']['checked'])) print_liste_field_titre($langs->trans("PhoneMobile"),$_SERVER["PHP_SELF"],"p.phone_mobile", $begin, $param, '', $sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.fax']['checked'])) print_liste_field_titre($langs->trans("Fax"),$_SERVER["PHP_SELF"],"p.fax", $begin, $param, '', $sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.email']['checked'])) print_liste_field_titre($langs->trans("EMail"),$_SERVER["PHP_SELF"],"p.email", $begin, $param, '', $sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.skype']['checked'])) print_liste_field_titre($langs->trans("Skype"),$_SERVER["PHP_SELF"],"p.skype", $begin, $param, '', $sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.thirdparty']['checked'])) print_liste_field_titre($langs->trans("ThirdParty"),$_SERVER["PHP_SELF"],"s.nom", $begin, $param, '', $sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.priv']['checked'])) print_liste_field_titre($langs->trans("ContactVisibility"),$_SERVER["PHP_SELF"],"p.priv", $begin, $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['p.datec']['checked'])) print_liste_field_titre($langs->trans("DateCreationShort"),$_SERVER["PHP_SELF"],"p.datec","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.tms']['checked'])) print_liste_field_titre($langs->trans("DateModificationShort"),$_SERVER["PHP_SELF"],"p.tms","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.statut']['checked'])) print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"p.statut","",$param,'align="center"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"],"",'','','align="right"',$sortfield,$sortorder,'maxwidthsearch ');
|
||||
print "</tr>\n";
|
||||
|
||||
// Lines for filter fields
|
||||
print '<tr class="liste_titre">';
|
||||
print '<tr class="liste_titre_filter">';
|
||||
if (! empty($arrayfields['p.lastname']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre">';
|
||||
@ -645,14 +608,50 @@ print '</td>';
|
||||
|
||||
print '</tr>';
|
||||
|
||||
$var=True;
|
||||
// Ligne des titres
|
||||
print '<tr class="liste_titre">';
|
||||
if (! empty($arrayfields['p.lastname']['checked'])) print_liste_field_titre($langs->trans("Lastname"),$_SERVER["PHP_SELF"],"p.lastname", $begin, $param, '', $sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.firstname']['checked'])) print_liste_field_titre($langs->trans("Firstname"),$_SERVER["PHP_SELF"],"p.firstname", $begin, $param, '', $sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.zip']['checked'])) print_liste_field_titre($langs->trans("Zip"),$_SERVER["PHP_SELF"],"p.zip", $begin, $param, '', $sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.town']['checked'])) print_liste_field_titre($langs->trans("Town"),$_SERVER["PHP_SELF"],"p.town", $begin, $param, '', $sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.poste']['checked'])) print_liste_field_titre($langs->trans("PostOrFunction"),$_SERVER["PHP_SELF"],"p.poste", $begin, $param, '', $sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.phone']['checked'])) print_liste_field_titre($langs->trans("Phone"),$_SERVER["PHP_SELF"],"p.phone", $begin, $param, '', $sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.phone_perso']['checked'])) print_liste_field_titre($langs->trans("PhonePerso"),$_SERVER["PHP_SELF"],"p.phone_perso", $begin, $param, '', $sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.phone_mobile']['checked'])) print_liste_field_titre($langs->trans("PhoneMobile"),$_SERVER["PHP_SELF"],"p.phone_mobile", $begin, $param, '', $sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.fax']['checked'])) print_liste_field_titre($langs->trans("Fax"),$_SERVER["PHP_SELF"],"p.fax", $begin, $param, '', $sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.email']['checked'])) print_liste_field_titre($langs->trans("EMail"),$_SERVER["PHP_SELF"],"p.email", $begin, $param, '', $sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.skype']['checked'])) print_liste_field_titre($langs->trans("Skype"),$_SERVER["PHP_SELF"],"p.skype", $begin, $param, '', $sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.thirdparty']['checked'])) print_liste_field_titre($langs->trans("ThirdParty"),$_SERVER["PHP_SELF"],"s.nom", $begin, $param, '', $sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.priv']['checked'])) print_liste_field_titre($langs->trans("ContactVisibility"),$_SERVER["PHP_SELF"],"p.priv", $begin, $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['p.datec']['checked'])) print_liste_field_titre($langs->trans("DateCreationShort"),$_SERVER["PHP_SELF"],"p.datec","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.tms']['checked'])) print_liste_field_titre($langs->trans("DateModificationShort"),$_SERVER["PHP_SELF"],"p.tms","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.statut']['checked'])) print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"p.statut","",$param,'align="center"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"],"",'','','align="right"',$sortfield,$sortorder,'maxwidthsearch ');
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
$i = 0;
|
||||
while ($i < min($num,$limit))
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print "<tr>";
|
||||
|
||||
$contactstatic->lastname=$obj->lastname;
|
||||
$contactstatic->firstname='';
|
||||
|
||||
@ -1271,7 +1271,7 @@ else
|
||||
|
||||
$hselected = 0;
|
||||
|
||||
dol_fiche_head($head, $hselected, $langs->trans("Contract"), 0, 'contract');
|
||||
dol_fiche_head($head, $hselected, $langs->trans("Contract"), -1, 'contract');
|
||||
|
||||
|
||||
/*
|
||||
@ -1595,7 +1595,7 @@ else
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
// Dates de en service prevues et effectives
|
||||
// Dates of service planed and real
|
||||
if ($objp->subprice >= 0)
|
||||
{
|
||||
$colspan = 6;
|
||||
@ -1862,15 +1862,13 @@ else
|
||||
print '</table>';
|
||||
}
|
||||
|
||||
// Form to activate line
|
||||
if ($user->rights->contrat->activer && $action == 'activateline' && $object->lines[$cursorline-1]->id == GETPOST('ligne'))
|
||||
{
|
||||
/**
|
||||
* Activer la ligne de contrat
|
||||
*/
|
||||
print '<form name="active" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&ligne='.GETPOST('ligne').'&action=active" method="post">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
|
||||
print '<table class="noborder tableforservicepart2" width="100%">';
|
||||
print '<table class="noborder tableforservicepart2'.($cursorline < $nbofservices ?' boxtablenobottom':'').'" width="100%">';
|
||||
|
||||
// Definie date debut et fin par defaut
|
||||
$dateactstart = $objp->date_debut;
|
||||
|
||||
@ -1765,7 +1765,7 @@ class Contrat extends CommonObject
|
||||
/**
|
||||
* Return label of a contract status
|
||||
*
|
||||
* @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Long label of all services, 5=Libelle court + Picto, 6=Picto of all services
|
||||
* @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Long label of all services, 5=Libelle court + Picto, 6=Picto of all services, 7=Same than 6 with fixed length
|
||||
* @return string Label
|
||||
*/
|
||||
function getLibStatut($mode)
|
||||
@ -1777,7 +1777,7 @@ class Contrat extends CommonObject
|
||||
* Renvoi label of a given contrat status
|
||||
*
|
||||
* @param int $statut Status id
|
||||
* @param int $mode 0=Long label, 1=Short label, 2=Picto + Libelle court, 3=Picto, 4=Picto + Long label of all services, 5=Libelle court + Picto, 6=Picto of all services
|
||||
* @param int $mode 0=Long label, 1=Short label, 2=Picto + Libelle court, 3=Picto, 4=Picto + Long label of all services, 5=Libelle court + Picto, 6=Picto of all services, 7=Same than 6 with fixed length
|
||||
* @return string Label
|
||||
*/
|
||||
function LibStatut($statut,$mode)
|
||||
@ -1808,7 +1808,7 @@ class Contrat extends CommonObject
|
||||
if ($statut == 1) { return img_picto($langs->trans('ContractStatusValidated'),'statut4'); }
|
||||
if ($statut == 2) { return img_picto($langs->trans('ContractStatusClosed'),'statut6'); }
|
||||
}
|
||||
if ($mode == 4 || $mode == 6)
|
||||
if ($mode == 4 || $mode == 6 || $mode == 7)
|
||||
{
|
||||
$line=new ContratLigne($this->db);
|
||||
$text='';
|
||||
@ -1818,10 +1818,15 @@ class Contrat extends CommonObject
|
||||
$text.=' '.$langs->trans("Services");
|
||||
$text.=': ';
|
||||
}
|
||||
$text.=$this->nbofserviceswait.' '.$line->LibStatut(0,3).' ';
|
||||
$text.=$this->nbofservicesopened.' '.$line->LibStatut(4,3,0).' ';
|
||||
$text.=$this->nbofservicesexpired.' '.$line->LibStatut(4,3,1).' ';
|
||||
$text.=$this->nbofservicesclosed.' '.$line->LibStatut(5,3);
|
||||
$text.=($mode == 7?'<div class="inline-block">':'');
|
||||
$text.=($mode != 7 || $this->nbofserviceswait > 0) ? $this->nbofserviceswait.' '.$line->LibStatut(0,3).' ' : '';
|
||||
$text.=($mode == 7?'</div><div class="inline-block">':'');
|
||||
$text.=($mode != 7 || $this->nbofservicesopened > 0) ? $this->nbofservicesopened.' '.$line->LibStatut(4,3,0).' ' : '';
|
||||
$text.=($mode == 7?'</div><div class="inline-block">':'');
|
||||
$text.=($mode != 7 || $this->nbofservicesexpired > 0) ? $this->nbofservicesexpired.' '.$line->LibStatut(4,3,1).' ' : '';
|
||||
$text.=($mode == 7?'</div><div class="inline-block">':'');
|
||||
$text.=($mode != 7 || $this->nbofservicesclosed > 0) ? $this->nbofservicesclosed.' '.$line->LibStatut(5,3).' ' : '';
|
||||
$text.=($mode == 7?'</div>':'');
|
||||
return $text;
|
||||
}
|
||||
if ($mode == 5)
|
||||
@ -2070,7 +2075,7 @@ class Contrat extends CommonObject
|
||||
$response->warning_delay = $warning_delay/60/60/24;
|
||||
$response->label = $label;
|
||||
$response->url = $url;
|
||||
$response->img = img_object($langs->trans("Contract"),"contract");
|
||||
$response->img = img_object('',"contract");
|
||||
|
||||
while ($obj=$this->db->fetch_object($resql))
|
||||
{
|
||||
|
||||
@ -340,7 +340,7 @@ if ($resql)
|
||||
print '<input type="hidden" name="action" value="list">';
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
|
||||
|
||||
print_barre_liste($langs->trans("ListOfContracts"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $totalnboflines, 'title_commercial.png', 0, '', '', $limit);
|
||||
|
||||
if ($sall)
|
||||
@ -393,51 +393,12 @@ if ($resql)
|
||||
|
||||
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
|
||||
$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
|
||||
|
||||
if ($massactionbutton) $selectedfields.=$form->showCheckAddButtons('checkforselect', 1);
|
||||
|
||||
print '<div class="div-table-responsive">';
|
||||
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
|
||||
print '<tr class="liste_titre">';
|
||||
if (! empty($arrayfields['c.ref']['checked'])) print_liste_field_titre($arrayfields['c.ref']['label'], $_SERVER["PHP_SELF"], "c.ref","","$param",'',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['c.ref_customer']['checked'])) print_liste_field_titre($arrayfields['c.ref_customer']['label'], $_SERVER["PHP_SELF"], "c.ref_customer","","$param",'',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['c.ref_supplier']['checked'])) print_liste_field_titre($arrayfields['c.ref_supplier']['label'], $_SERVER["PHP_SELF"], "c.ref_supplier","","$param",'',$sortfield,$sortorder);
|
||||
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.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['sale_representative']['checked'])) print_liste_field_titre($arrayfields['sale_representative']['label'], $_SERVER["PHP_SELF"], "","","$param",'',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['c.date_contrat']['checked'])) print_liste_field_titre($arrayfields['c.date_contrat']['label'], $_SERVER["PHP_SELF"], "c.date_contrat","","$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['c.datec']['checked'])) print_liste_field_titre($arrayfields['c.datec']['label'],$_SERVER["PHP_SELF"],"c.date_creation","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['c.tms']['checked'])) print_liste_field_titre($arrayfields['c.tms']['label'],$_SERVER["PHP_SELF"],"c.tms","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['status']['checked']))
|
||||
{
|
||||
print_liste_field_titre($staticcontratligne->LibStatut(0,3), '', '', '', '', 'width="16"');
|
||||
print_liste_field_titre($staticcontratligne->LibStatut(4,3,0), '', '', '', '', 'width="16"');
|
||||
print_liste_field_titre($staticcontratligne->LibStatut(4,3,1), '', '', '', '', 'width="16"');
|
||||
print_liste_field_titre($staticcontratligne->LibStatut(5,3), '', '', '', '', 'width="16"');
|
||||
}
|
||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"],"",'','','align="right"',$sortfield,$sortorder,'maxwidthsearch ');
|
||||
print "</tr>\n";
|
||||
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<tr class="liste_titre_filter">';
|
||||
if (! empty($arrayfields['c.ref']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre">';
|
||||
@ -486,7 +447,7 @@ if ($resql)
|
||||
print '<td class="liste_titre maxwidthonsmartphone" align="center">';
|
||||
print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT)?'ASC':$conf->global->SOCIETE_SORT_ON_TYPEENT));
|
||||
print '</td>';
|
||||
}
|
||||
}
|
||||
if (! empty($arrayfields['sale_representative']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre"></td>';
|
||||
@ -495,12 +456,12 @@ if ($resql)
|
||||
{
|
||||
// Date contract
|
||||
print '<td class="liste_titre center">';
|
||||
//print $langs->trans('Month').': ';
|
||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat" type="text" size="1" maxlength="2" name="day" value="'.$day.'">';
|
||||
print '<input class="flat" type="text" size="1" maxlength="2" name="month" value="'.$month.'">';
|
||||
//print ' '.$langs->trans('Year').': ';
|
||||
$syear = $year;
|
||||
$formother->select_year($syear,'year',1, 20, 5);
|
||||
//print $langs->trans('Month').': ';
|
||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat" type="text" size="1" maxlength="2" name="day" value="'.$day.'">';
|
||||
print '<input class="flat" type="text" size="1" maxlength="2" name="month" value="'.$month.'">';
|
||||
//print ' '.$langs->trans('Year').': ';
|
||||
$syear = $year;
|
||||
$formother->select_year($syear,'year',1, 20, 5);
|
||||
print '</td>';
|
||||
}
|
||||
// Extra fields
|
||||
@ -541,19 +502,58 @@ if ($resql)
|
||||
{
|
||||
print '<td class="liste_titre">';
|
||||
print '</td>';
|
||||
}
|
||||
}
|
||||
// Status
|
||||
if (! empty($arrayfields['status']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" colspan="4" align="right"></td>';
|
||||
}
|
||||
print '<td class="liste_titre" align="middle">';
|
||||
$searchpitco=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1);
|
||||
print $searchpitco;
|
||||
$searchpitco=$form->showFilterButtons();
|
||||
print $searchpitco;
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
if (! empty($arrayfields['c.ref']['checked'])) print_liste_field_titre($arrayfields['c.ref']['label'], $_SERVER["PHP_SELF"], "c.ref","","$param",'',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['c.ref_customer']['checked'])) print_liste_field_titre($arrayfields['c.ref_customer']['label'], $_SERVER["PHP_SELF"], "c.ref_customer","","$param",'',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['c.ref_supplier']['checked'])) print_liste_field_titre($arrayfields['c.ref_supplier']['label'], $_SERVER["PHP_SELF"], "c.ref_supplier","","$param",'',$sortfield,$sortorder);
|
||||
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.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['sale_representative']['checked'])) print_liste_field_titre($arrayfields['sale_representative']['label'], $_SERVER["PHP_SELF"], "","","$param",'',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['c.date_contrat']['checked'])) print_liste_field_titre($arrayfields['c.date_contrat']['label'], $_SERVER["PHP_SELF"], "c.date_contrat","","$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['c.datec']['checked'])) print_liste_field_titre($arrayfields['c.datec']['label'],$_SERVER["PHP_SELF"],"c.date_creation","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['c.tms']['checked'])) print_liste_field_titre($arrayfields['c.tms']['label'],$_SERVER["PHP_SELF"],"c.tms","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['status']['checked']))
|
||||
{
|
||||
print_liste_field_titre($staticcontratligne->LibStatut(0,3), '', '', '', '', 'width="16"');
|
||||
print_liste_field_titre($staticcontratligne->LibStatut(4,3,0), '', '', '', '', 'width="16"');
|
||||
print_liste_field_titre($staticcontratligne->LibStatut(4,3,1), '', '', '', '', 'width="16"');
|
||||
print_liste_field_titre($staticcontratligne->LibStatut(5,3), '', '', '', '', 'width="16"');
|
||||
}
|
||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"],"",'','','align="right"',$sortfield,$sortorder,'maxwidthsearch ');
|
||||
print "</tr>\n";
|
||||
|
||||
$var=true;
|
||||
while ($i < min($num,$limit))
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
@ -563,8 +563,7 @@ if ($resql)
|
||||
$contracttmp->ref_customer=$obj->ref_customer;
|
||||
$contracttmp->ref_supplier=$obj->ref_supplier;
|
||||
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<tr>';
|
||||
if (! empty($arrayfields['c.ref']['checked']))
|
||||
{
|
||||
print '<td class="nowrap">';
|
||||
|
||||
@ -43,7 +43,7 @@ foreach($linkedObjectBlock as $key => $objectlink)
|
||||
<td></td>
|
||||
<td align="center"><?php echo dol_print_date($objectlink->date_contrat,'day'); ?></td>
|
||||
<td align="right"> </td>
|
||||
<td align="right"><?php echo $objectlink->getLibStatut(6); ?></td>
|
||||
<td align="right"><?php echo $objectlink->getLibStatut(7); ?></td>
|
||||
<td align="right"><a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_delete($langs->transnoentitiesnoconv("RemoveLink")); ?></a></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2010 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
||||
* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2010 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
||||
* Copyright (C) 2016-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* 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
|
||||
@ -125,7 +125,7 @@ class box_contracts extends ModeleBoxes
|
||||
|
||||
$this->info_box_contents[$line][] = array(
|
||||
'td' => 'class="nowrap right"',
|
||||
'text' => $contractstatic->getLibStatut(6),
|
||||
'text' => $contractstatic->getLibStatut(7),
|
||||
'asis'=>1,
|
||||
);
|
||||
|
||||
|
||||
@ -325,13 +325,13 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty"
|
||||
if (! empty($contents[$i][$j]['maxlength'])) $maxlength=$contents[$i][$j]['maxlength'];
|
||||
|
||||
if ($maxlength) $textwithnotags=dol_trunc($textwithnotags,$maxlength);
|
||||
if (preg_match('/^<img/i',$text) || ! empty($contents[$i][$j]['asis'])) $out.= $text; // show text with no html cleaning
|
||||
if (preg_match('/^<img/i',$text) || preg_match('/^<div/i',$text) || ! empty($contents[$i][$j]['asis'])) $out.= $text; // show text with no html cleaning
|
||||
else $out.= $textwithnotags; // show text with html cleaning
|
||||
|
||||
// End Url
|
||||
if (! empty($contents[$i][$j]['url'])) $out.= '</a>';
|
||||
|
||||
if (preg_match('/^<img/i',$text2) || ! empty($contents[$i][$j]['asis2'])) $out.= $text2; // show text with no html cleaning
|
||||
if (preg_match('/^<img/i',$text2) || preg_match('/^<div/i',$text2) || ! empty($contents[$i][$j]['asis2'])) $out.= $text2; // show text with no html cleaning
|
||||
else $out.= $text2withnotags; // show text with html cleaning
|
||||
|
||||
if (! empty($textnoformat)) $out.= "\n".$textnoformat."\n";
|
||||
|
||||
@ -5242,8 +5242,7 @@ class Form
|
||||
|
||||
// Try also magic suggest
|
||||
|
||||
// Add data-role="none" to disable jmobile decoration
|
||||
$out .= '<select data-role="none" id="'.$htmlname.'" class="multiselect'.($morecss?' '.$morecss:'').'" multiple name="'.$htmlname.'[]"'.($moreattrib?' '.$moreattrib:'').($width?' style="width: '.(preg_match('/%/',$width)?$width:$width.'px').'"':'').'>'."\n";
|
||||
$out .= '<select id="'.$htmlname.'" class="multiselect'.($morecss?' '.$morecss:'').'" multiple name="'.$htmlname.'[]"'.($moreattrib?' '.$moreattrib:'').($width?' style="width: '.(preg_match('/%/',$width)?$width:$width.'px').'"':'').'>'."\n";
|
||||
if (is_array($array) && ! empty($array))
|
||||
{
|
||||
if ($value_as_key) $array=array_combine($array, $array);
|
||||
@ -5805,8 +5804,8 @@ class Form
|
||||
$navurl = preg_replace('/\/tasks\/(task|contact|time|note|document).php/','/tasks.php',$navurl);
|
||||
$paramid='ref';
|
||||
}
|
||||
$previous_ref = $object->ref_previous?'<a data-role="button" data-icon="arrow-l" data-iconpos="left" href="'.$navurl.'?'.$paramid.'='.urlencode($object->ref_previous).$moreparam.'">'.(($conf->dol_use_jmobile != 4)?'<':' ').'</a>':'<span class="inactive">'.(($conf->dol_use_jmobile != 4)?'<':' ').'</span>';
|
||||
$next_ref = $object->ref_next?'<a data-role="button" data-icon="arrow-r" data-iconpos="right" href="'.$navurl.'?'.$paramid.'='.urlencode($object->ref_next).$moreparam.'">'.(($conf->dol_use_jmobile != 4)?'>':' ').'</a>':'<span class="inactive">'.(($conf->dol_use_jmobile != 4)?'>':' ').'</span>';
|
||||
$previous_ref = $object->ref_previous?'<a href="'.$navurl.'?'.$paramid.'='.urlencode($object->ref_previous).$moreparam.'"><i class="fa fa-chevron-left"></i></a>':'<span class="inactive"><i class="fa fa-chevron-left opacitymedium"></i></span>';
|
||||
$next_ref = $object->ref_next?'<a href="'.$navurl.'?'.$paramid.'='.urlencode($object->ref_next).$moreparam.'"><i class="fa fa-chevron-right"></i></a>':'<span class="inactive"><i class="fa fa-chevron-right opacitymedium"></i></span>';
|
||||
|
||||
//print "xx".$previous_ref."x".$next_ref;
|
||||
$ret.='<!-- Start banner content --><div style="vertical-align: middle">';
|
||||
@ -6159,6 +6158,57 @@ class Form
|
||||
return $out;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return HTML to show the search and clear seach button
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function showFilterButtons()
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
$out='<div class="nowrap">';
|
||||
$out.='<input type="image" class="liste_titre" name="button_search" src="'.img_picto($langs->trans("Search"),'search.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||
$out.='<input type="image" class="liste_titre" name="button_removefilter" src="'.img_picto($langs->trans("Search"),'searchclear.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">';
|
||||
$out.='</div>';
|
||||
|
||||
return $out;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return HTML to show the search and clear seach button
|
||||
*
|
||||
* @param string $cssclass CSS class
|
||||
* @param int $calljsfunction 0=default. 1=call function initCheckForSelect() after changing status of checkboxes
|
||||
* @return string
|
||||
*/
|
||||
function showCheckAddButtons($cssclass='checkforaction', $calljsfunction=0)
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
$out='';
|
||||
if (! empty($conf->use_javascript_ajax)) $out.='<input type="checkbox" id="checkallactions" name="checkallactions" class="checkallactions">';
|
||||
$out.='<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$("#checkallactions").click(function() {
|
||||
if($(this).is(\':checked\')){
|
||||
console.log("We check all");
|
||||
$(".'.$cssclass.'").prop(\'checked\', true);
|
||||
}
|
||||
else
|
||||
{
|
||||
console.log("We uncheck all");
|
||||
$(".'.$cssclass.'").prop(\'checked\', false);
|
||||
}'."\n";
|
||||
if ($calljsfunction) $out.='if (typeof initCheckForSelect == \'function\') { initCheckForSelect(); } else { console.log("No function initCheckForSelect found. Call won\'t be done."); }';
|
||||
$out.=' });
|
||||
});
|
||||
</script>';
|
||||
|
||||
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='<div class="nowrap">';
|
||||
$out.='<input type="image" class="liste_titre" name="button_search" src="'.img_picto($langs->trans("Search"),'search.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||
$out.='<input type="image" class="liste_titre" name="button_removefilter" src="'.img_picto($langs->trans("Search"),'searchclear.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">';
|
||||
$out.='</div>';
|
||||
$out.=$this->showFilterButtons();
|
||||
if ($addcheckuncheckall)
|
||||
{
|
||||
if (! empty($conf->use_javascript_ajax)) $out.='<input type="checkbox" id="checkallactions" name="checkallactions" class="checkallactions">';
|
||||
$out.='<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$("#checkallactions").click(function() {
|
||||
if($(this).is(\':checked\')){
|
||||
console.log("We check all");
|
||||
$(".'.$cssclass.'").prop(\'checked\', true);
|
||||
}
|
||||
else
|
||||
{
|
||||
console.log("We uncheck all");
|
||||
$(".'.$cssclass.'").prop(\'checked\', false);
|
||||
}'."\n";
|
||||
if ($calljsfunction) $out.='if (typeof initCheckForSelect == \'function\') { initCheckForSelect(); } else { console.log("No function initCheckForSelect found. Call won\'t be done."); }';
|
||||
$out.=' });
|
||||
});
|
||||
</script>';
|
||||
$out.=$this->showCheckAddButtons($cssclass, $calljsfunction);
|
||||
}
|
||||
return $out;
|
||||
}
|
||||
|
||||
@ -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.= "</td></tr>\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.= "</td></tr>\n";
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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 '<div class="imglatecoin">'.img_picto($titlealt, 'warning_white.png', 'class="pictowarning valignmiddle"'.($morealt ? ($morealt == '1' ? ' style="float: right"' : ' '.$morealt): '')).'</div>';
|
||||
return img_picto($titlealt, 'warning.png', 'class="pictowarning valignmiddle"'.($morealt ? ($morealt == '1' ? ' style="float: right"' : ' '.$morealt): ''));
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -321,6 +321,7 @@ if (($action=="create") || ($action=="edit"))
|
||||
print '<input type="hidden" name="action" value="add">'."\n";
|
||||
}
|
||||
|
||||
|
||||
dol_fiche_head('');
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
@ -535,7 +536,7 @@ if (($action=="create") || ($action=="edit"))
|
||||
print "</tr>";
|
||||
|
||||
print '</table>';
|
||||
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
print '<div align="center">';
|
||||
@ -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 = '<a href="' . DOL_URL_ROOT . '/cron/list.php?status=-2">' . $langs->trans("BackToList") . '</a>';
|
||||
|
||||
// box add_jobs_box
|
||||
print '<div class="fichecenter">';
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
print '<tr><td class="titlefield">';
|
||||
@ -617,10 +620,13 @@ else
|
||||
print "</td></tr>";
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '</div>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
|
||||
print '<div class="fichecenter">';
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
print '<tr><td class="titlefield">';
|
||||
@ -673,9 +679,12 @@ else
|
||||
print "</td></tr>";
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
print '<div class="fichecenter">';
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
print '<tr><td class="titlefield">';
|
||||
@ -699,7 +708,8 @@ else
|
||||
print "</td></tr>";
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '</div>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
|
||||
@ -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)
|
||||
{
|
||||
|
||||
@ -295,25 +295,9 @@ print '<br>';
|
||||
|
||||
|
||||
print '<div class="div-table-responsive">';
|
||||
print '<table width="100%" class="noborder">';
|
||||
print '<tr class="liste_titre">';
|
||||
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 "</tr>\n";
|
||||
print '<table class="noborder">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<tr class="liste_titre_filter">';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre">';
|
||||
print '<input type="text" class="flat" name="search_label" value="'.$search_label.'" size="10">';
|
||||
@ -336,6 +320,24 @@ print '<input type="image" class="liste_titre" name="button_removefilter" src="'
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
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 "</tr>\n";
|
||||
|
||||
|
||||
if ($num > 0)
|
||||
{
|
||||
// Loop on each job
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -1,22 +1,22 @@
|
||||
<?php
|
||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \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
|
||||
|
||||
@ -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 = '';
|
||||
|
||||
@ -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))
|
||||
{
|
||||
|
||||
@ -1,197 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (C) 2002-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \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 '<table class="border" width="100%">';
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/fichinter/list.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
// Ref
|
||||
print '<tr><td width="25%">'.$langs->trans("Ref").'</td><td colspan="3">';
|
||||
print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref');
|
||||
print '</td></tr>';
|
||||
|
||||
$nbrow=3;
|
||||
// Client
|
||||
print "<tr><td>".$langs->trans("Customer")."</td>";
|
||||
print '<td>';
|
||||
print '<a href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$soc->id.'">'.$soc->name.'</a>';
|
||||
print '</td>';
|
||||
print '<td rowspan="'.$nbrow.'" valign="top" width="50%">';
|
||||
|
||||
/*
|
||||
* 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 '<table class="border" width="100%">';
|
||||
|
||||
print "<tr ".$bc[$var]."><td>".$langs->trans("Intervention")." PDF</td>";
|
||||
|
||||
print '<td><a data-ajax="false" href="'.DOL_URL_ROOT . '/document.php?modulepart=ficheinter&file='.urlencode($relativepath).'">'.$object->ref.'.pdf</a></td>';
|
||||
print '<td align="right">'.dol_print_size(dol_filesize($file)).'</td>';
|
||||
print '<td align="right">'.dol_print_date(dol_filemtime($file),'dayhour').'</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Si fichier detail PDF existe
|
||||
if (file_exists($filedetail))
|
||||
{
|
||||
print "<tr ".$bc[$var]."><td>Fiche d'intervention detaillee</td>";
|
||||
|
||||
print '<td><a data-ajax="false" href="'.DOL_URL_ROOT . '/document.php?modulepart=ficheinter&file='.urlencode($relativepathdetail).'">'.$object->ref.'-detail.pdf</a></td>';
|
||||
print '<td align="right">'.dol_print_size(dol_filesize($filedetail)).'</td>';
|
||||
print '<td align="right">'.dol_print_date(dol_filemtime($filedetail),'dayhour').'</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
print "</table>\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 '<font class="error">'.$langs->trans("ErrorNoImagickReadimage").'</font>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
print "</td></tr>";
|
||||
|
||||
// Statut
|
||||
print '<tr><td>'.$langs->trans("Status").'</td>';
|
||||
print "<td>".$object->getLibStatut(4)."</td>\n";
|
||||
print '</tr>';
|
||||
|
||||
// Date
|
||||
print '<tr><td>'.$langs->trans("Date").'</td>';
|
||||
print "<td>".dol_print_date($object->datec,"daytext")."</td>\n";
|
||||
print '</tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
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 '<img style="background: #FFF" src="'.DOL_URL_ROOT . '/viewimage.php?modulepart=apercufichinter&file='.urlencode($relativepathimage).'">';
|
||||
}
|
||||
// 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 '<img style="background: #FFF" src="'.DOL_URL_ROOT . '/viewimage.php?modulepart=apercufichinter&file='.urlencode($preview).'"><p>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
llxFooter();
|
||||
|
||||
$db->close();
|
||||
@ -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='';
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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 = '<a href="'.DOL_URL_ROOT.'/fichinter/list.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
@ -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 = '<a href="'.DOL_URL_ROOT.'/fichinter/list.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
@ -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))
|
||||
{
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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 '<tr class="liste_total">';
|
||||
$i=0;
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
* Copyright (C) 2012-2016 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2014 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
*
|
||||
* 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 '<tr>';
|
||||
print '<td>'.$langs->trans("DescCP").'</td>';
|
||||
print '<td>';
|
||||
print '<textarea name="description" class="flat" rows="'.ROWS_3.'" cols="70">'.GETPOST('description').'</textarea>';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
print '<td class="tdtop">';
|
||||
$doleditor = new DolEditor('description', GETPOST('description'), '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%');
|
||||
print $doleditor->Create(1);
|
||||
print '</td></tr>';
|
||||
|
||||
print '</tbody>';
|
||||
print '</table>';
|
||||
@ -1104,8 +1106,10 @@ else
|
||||
{
|
||||
print '<tr>';
|
||||
print '<td>'.$langs->trans('DescCP').'</td>';
|
||||
print '<td><textarea name="description" class="flat" rows="'.ROWS_3.'" cols="70">'.$object->description.'</textarea></td>';
|
||||
print '</tr>';
|
||||
print '<td class="tdtop">';
|
||||
$doleditor = new DolEditor('description', $object->description, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%');
|
||||
print $doleditor->Create(1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
print '</tbody>';
|
||||
|
||||
@ -561,14 +561,15 @@ if (! empty($valid_dashboardlines))
|
||||
|
||||
$boxwork .='<div class="boxstatsindicator thumbstat150 nobold nounderline"><div class="boxstats130 boxstatsborder">';
|
||||
$boxwork .= '<div class="boxstatscontent">';
|
||||
$boxwork .= $board->img.' '.$board->label.'<br>';
|
||||
$boxwork .= '<span class="boxstatstext" title="'.dol_escape_htmltag($board->label).'">'.$board->img.' '.$board->label.'</span><br>';
|
||||
$boxwork .= '<a class="valignmiddle dashboardlineindicator" href="'.$board->url.'"><span class="dashboardlineindicator'.(($board->nbtodo == 0)?' dashboardlineok':'').'">'.$board->nbtodo.'</span></a>';
|
||||
$boxwork .= '</div>';
|
||||
if ($board->nbtodolate > 0)
|
||||
{
|
||||
$boxwork .= '<div class="dashboardlinelatecoin nowrap">';
|
||||
$boxwork .= '<a title="'.dol_escape_htmltag($textlate).'" class="valignmiddle dashboardlineindicatorlate'.($board->nbtodolate>0?' dashboardlineko':' dashboardlineok').'" href="'.((!$board->url_late) ? $board->url : $board->url_late ).'">';
|
||||
$boxwork .= img_picto($textlate, "warning", 'class="valigntextbottom"').'';
|
||||
//$boxwork .= img_picto($textlate, "warning_white", 'class="valigntextbottom"').'';
|
||||
$boxwork .= img_picto($textlate, "warning_white", 'class="valigntextbottom"').'';
|
||||
$boxwork .= '<span class="dashboardlineindicatorlate'.($board->nbtodolate>0?' dashboardlineko':' dashboardlineok').'">';
|
||||
$boxwork .= $board->nbtodolate;
|
||||
$boxwork .= '</span>';
|
||||
@ -600,8 +601,6 @@ $boxwork.='</td></tr>';
|
||||
$boxwork.='</table>'; // End table array of working board
|
||||
$boxwork.='</div>';
|
||||
|
||||
//print $boxwork;
|
||||
|
||||
print '</div></div></div><div class="clearboth"></div>';
|
||||
|
||||
print '<div class="fichecenter fichecenterbis">';
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -489,7 +489,7 @@ if ($id > 0)
|
||||
print "</td></tr>";
|
||||
|
||||
// Nbterms
|
||||
print '<tr><td">'.$langs->trans("Nbterms").'</td>';
|
||||
print '<tr><td>'.$langs->trans("Nbterms").'</td>';
|
||||
print '<td>';
|
||||
if ($action == 'edit')
|
||||
{
|
||||
@ -502,7 +502,7 @@ if ($id > 0)
|
||||
print '</td></tr>';
|
||||
|
||||
// Rate
|
||||
print '<tr><td">'.$langs->trans("Rate").'</td>';
|
||||
print '<tr><td>'.$langs->trans("Rate").'</td>';
|
||||
print '<td>';
|
||||
if ($action == 'edit')
|
||||
{
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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))
|
||||
|
||||
@ -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))
|
||||
|
||||
@ -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 '<td class="liste_titre nowrap center">';
|
||||
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 '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['p.opp_percent']['checked']))
|
||||
@ -619,7 +618,6 @@ print '</td>';
|
||||
print '</tr>'."\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 "<tr ".$bc[$var].">";
|
||||
print "<tr>";
|
||||
|
||||
// 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 '<td>';
|
||||
print '<td class="tdoverflowmax100">';
|
||||
print dol_trunc($obj->title,80);
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
@ -659,7 +656,7 @@ while ($i < min($num,$limit))
|
||||
// Company
|
||||
if (! empty($arrayfields['s.nom']['checked']))
|
||||
{
|
||||
print '<td>';
|
||||
print '<td class="tdoverflowmax100">';
|
||||
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 '<td align="middle">';
|
||||
print '<td class="center">';
|
||||
if ($obj->opp_status_code) print $langs->trans("OppStatusShort".$obj->opp_status_code);
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
|
||||
@ -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 "<tr ".$bc[$var].">";
|
||||
print "<tr>";
|
||||
|
||||
// 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 '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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.= '<a href="'.DOL_URL_ROOT.'/comm/action/listactions.php">'.$langs->trans("BackToList").'</a>';
|
||||
@ -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 = '<a href="'.DOL_URL_ROOT.'/fichinter/list.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -592,54 +592,8 @@ if (empty($arrayfields['customerorsupplier']['checked'])) print '<input type="hi
|
||||
print '<div class="div-table-responsive">';
|
||||
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
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 "</tr>\n";
|
||||
|
||||
// Fields title search
|
||||
print '<tr class="liste_titre">';
|
||||
print '<tr class="liste_titre_filter">';
|
||||
if (! empty($arrayfields['s.nom']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre">';
|
||||
@ -889,12 +843,57 @@ print '</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
$var=True;
|
||||
print '<tr class="liste_titre">';
|
||||
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 "</tr>\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 "<tr ".$bc[$var].">";
|
||||
print "<tr>";
|
||||
if (! empty($arrayfields['s.nom']['checked']))
|
||||
{
|
||||
print "<td>";
|
||||
print '<td class="tdoverflowmax200">';
|
||||
print $companystatic->getNomUrl(1,'',100);
|
||||
print "</td>\n";
|
||||
}
|
||||
|
||||
@ -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 '<tr><td class="nowrap">' . $langs->trans('PaymentConditionsShort') . '</td><td colspan="2">';
|
||||
$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 '</td></tr>';
|
||||
|
||||
// Mode of payment
|
||||
print '<tr><td>' . $langs->trans('PaymentMode') . '</td><td colspan="2">';
|
||||
$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 '</td></tr>';
|
||||
|
||||
// Bank Account
|
||||
|
||||
@ -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))
|
||||
|
||||
@ -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'));
|
||||
|
||||
|
||||
BIN
htdocs/theme/eldy/img/warning_white.png
Normal file
BIN
htdocs/theme/eldy/img/warning_white.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 316 B |
@ -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 {
|
||||
<?php } ?>
|
||||
color: rgb(<?php echo $colortext; ?>);
|
||||
font-size: <?php print $fontsize ?>px;
|
||||
line-height: 130%;
|
||||
line-height: 1.4;
|
||||
font-family: <?php print $fontlist ?>;
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
@ -275,7 +276,10 @@ input, input.flat, textarea, textarea.flat, form.flat select, select, select.fla
|
||||
font-size: <?php print $fontsize ?>px;
|
||||
font-family: <?php print $fontlist ?>;
|
||||
|
||||
border: none;
|
||||
<?php if(empty($conf->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(<?php print $colorbackbody; ?>);
|
||||
}
|
||||
#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
|
||||
{
|
||||
<?php if ($usegradienttitle) { ?>
|
||||
background-image: -o-linear-gradient(bottom, rgba(0,0,0,0.1) 0%, rgba(<?php echo $colorbacktitle1; ?>,0.4) 100%);
|
||||
background-image: -moz-linear-gradient(bottom, rgba(0,0,0,0.1) 0%, rgba(<?php echo $colorbacktitle1; ?>,0.4) 100%);
|
||||
background-image: -webkit-linear-gradient(bottom, rgba(0,0,0,0.1) 0%, rgba(<?php echo $colorbacktitle1; ?>,0.4) 100%);
|
||||
background-image: -ms-linear-gradient(bottom, rgba(0,0,0,0.1) 0%, rgba(<?php echo $colorbacktitle1; ?>,0.4) 100%);
|
||||
background-image: linear-gradient(bottom, rgba(0,0,0,0.1) 0%, rgba(<?php echo $colorbacktitle1; ?>,0.4) 100%);
|
||||
<?php } else { ?>
|
||||
background: rgb(<?php echo $colorbacktitle1; ?>);
|
||||
<?php } ?>
|
||||
background: linear-gradient(bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
|
||||
background: -o-linear-gradient(bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
|
||||
background: -moz-linear-gradient(bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
|
||||
background: -webkit-linear-gradient(bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
|
||||
background: -ms-linear-gradient(bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
|
||||
font-weight: <?php echo $useboldtitle?'bold':'normal'; ?>;
|
||||
|
||||
border-bottom: 1px solid #ddd;
|
||||
|
||||
color: rgb(<?php echo $colortexttitle; ?>);
|
||||
font-family: <?php print $fontlist ?>;
|
||||
border-bottom: 1px solid #FDFFFF;
|
||||
text-align: <?php echo $left; ?>;
|
||||
}
|
||||
tr.liste_titre th, tr.liste_titre td, th.liste_titre
|
||||
{
|
||||
border-bottom: 1px solid #<?php echo ($colorbacktitle1 == '255,255,255'?'BBBBBB':'FDFFFF'); ?>;
|
||||
/* border-bottom: 1px solid #<?php echo ($colorbacktitle1 == '255,255,255'?'BBBBBB':'ddd'); ?>; */
|
||||
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: <?php echo round($nbtopmenuentries * $fontsize * 6.9, 0) + 20; ?>px)
|
||||
{
|
||||
div.tmenucenter {
|
||||
max-width: <?php echo round($fontsize * 4); ?>px; /* size of viewport */
|
||||
width: <?php echo round($fontsize * 4); ?>px; /* size of viewport */
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
BIN
htdocs/theme/md/img/object_multicurrency.png
Normal file
BIN
htdocs/theme/md/img/object_multicurrency.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 733 B |
BIN
htdocs/theme/md/img/warning_white.png
Normal file
BIN
htdocs/theme/md/img/warning_white.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 316 B |
@ -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(<?php print $colortextlink; ?>);
|
||||
}
|
||||
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;
|
||||
|
||||
@ -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();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user