Merge branch '3.6' of git@github.com:Dolibarr/dolibarr.git into 3.6
This commit is contained in:
commit
5395465cfd
@ -435,17 +435,23 @@ if ($nboftargetok) {
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/doc/images/dolibarr_screenshot11.png`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/doc/images/dolibarr_screenshot12.png`;
|
||||
|
||||
# Security to avoid to package data files
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/document`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/documents`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/document`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/documents`;
|
||||
# Security to avoid to package external modules installed for dolistore validation
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/calling*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/bootstrap*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/custom*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/management*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/multicompany*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/nltechno*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/oscim*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/pos*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/public/test`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/teclib*`;
|
||||
# Removed other test files
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/public/test`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/test`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/Thumbs.db $BUILDROOT/$PROJECT/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/*/Thumbs.db`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/.cvsignore $BUILDROOT/$PROJECT/*/.cvsignore $BUILDROOT/$PROJECT/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/*/*/.cvsignore`;
|
||||
|
||||
@ -141,15 +141,18 @@ abstract class ModelNumRefExpedition
|
||||
}
|
||||
|
||||
/**
|
||||
* Cree un bon d'expedition sur disque
|
||||
* Cree un bon d'expedition sur disque
|
||||
*
|
||||
* @param DoliDB $db Objet base de donnee
|
||||
* @param Object $object Object expedition
|
||||
* @param string $modele Force le modele a utiliser ('' to not force)
|
||||
* @param Translate $outputlangs Objet lang a utiliser pour traduction
|
||||
* @return int <=0 if KO, >0 if OK
|
||||
* @param DoliDB $db Objet base de donnee
|
||||
* @param Object $object Object expedition
|
||||
* @param string $modele Force le modele a utiliser ('' to not force)
|
||||
* @param Translate $outputlangs Objet lang a utiliser pour traduction
|
||||
* @param int $hidedetails Hide details of lines
|
||||
* @param int $hidedesc Hide description
|
||||
* @param int $hideref Hide ref
|
||||
* @return int <=0 if KO, >0 if OK
|
||||
*/
|
||||
function expedition_pdf_create($db, $object, $modele, $outputlangs)
|
||||
function expedition_pdf_create($db, $object, $modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0)
|
||||
{
|
||||
global $conf,$user,$langs;
|
||||
|
||||
@ -214,7 +217,7 @@ function expedition_pdf_create($db, $object, $modele, $outputlangs)
|
||||
// We save charset_output to restore it because write_file can change it if needed for
|
||||
// output format that does not support UTF8.
|
||||
$sav_charset_output=$outputlangs->charset_output;
|
||||
if ($obj->write_file($object, $outputlangs, $srctemplatepath) > 0)
|
||||
if ($obj->write_file($object, $outputlangs, $srctemplatepath, $hidedetails, $hidedesc, $hideref) > 0)
|
||||
{
|
||||
$outputlangs->charset_output=$sav_charset_output;
|
||||
|
||||
|
||||
@ -280,11 +280,9 @@ class modProjet extends DolibarrModules
|
||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'projet_extrafields as extra ON p.rowid = extra.fk_object';
|
||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX."projet_task as pt ON p.rowid = pt.fk_projet";
|
||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'projet_task_extrafields as extra2 ON pt.rowid = extra2.fk_object';
|
||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX."projet_task_time as ptt ON pt.rowid = ptt.fk_task,";
|
||||
$this->export_sql_end[$r] .=' '.MAIN_DB_PREFIX.'societe as s';
|
||||
$this->export_sql_end[$r] .=' WHERE p.fk_soc = s.rowid';
|
||||
$this->export_sql_end[$r] .=' AND p.entity = '.$conf->entity;
|
||||
|
||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX."projet_task_time as ptt ON pt.rowid = ptt.fk_task";
|
||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'societe as s ON p.fk_soc = s.rowid';
|
||||
$this->export_sql_end[$r] .=' WHERE p.entity = '.$conf->entity;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1540,6 +1540,8 @@ class Expedition extends CommonObject
|
||||
if ($this->db->query($sql) )
|
||||
{
|
||||
//TODO: Option to set order billed if 100% of order is shipped
|
||||
$this->billed=1;
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
|
||||
@ -255,7 +255,7 @@ if (empty($reshook)) {
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE))
|
||||
{
|
||||
$ret=$object->fetch($id); // Reload to get new records
|
||||
$result=expedition_pdf_create($db,$object,$object->modelpdf,$outputlangs);
|
||||
$result=expedition_pdf_create($db,$object,$object->modelpdf,$outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
}
|
||||
if ($result < 0)
|
||||
{
|
||||
@ -355,7 +355,7 @@ if (empty($reshook)) {
|
||||
$outputlangs = new Translate("",$conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
$result=expedition_pdf_create($db,$object,$object->modelpdf,$outputlangs);
|
||||
$result=expedition_pdf_create($db,$object,$object->modelpdf,$outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
if ($result <= 0)
|
||||
{
|
||||
dol_print_error($db,$result);
|
||||
|
||||
@ -1682,22 +1682,28 @@ function left_menu($menu_array_before, $helppagename='', $moresearchform='', $me
|
||||
}
|
||||
}
|
||||
|
||||
// Link to bugtrack
|
||||
if (! empty($conf->global->MAIN_BUGTRACK_ENABLELINK))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
// Link to bugtrack
|
||||
if (! empty($conf->global->MAIN_BUGTRACK_ENABLELINK))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
|
||||
$bugbaseurl='https://doliforge.org/tracker/?';
|
||||
$bugbaseurl.='func=add&group_id=144&atid=246';
|
||||
$bugbaseurl.="&details=";
|
||||
$bugbaseurl.=urlencode("\n\n\n\n\n-------------\n");
|
||||
$bugbaseurl.=urlencode($langs->trans("Version").": ".DOL_VERSION."\n");
|
||||
$bugbaseurl.=urlencode($langs->trans("Server").": ".$_SERVER["SERVER_SOFTWARE"]."\n");
|
||||
$bugbaseurl.=urlencode($langs->trans("PHP").": ".version_php()."\n");
|
||||
$bugbaseurl.=urlencode($langs->trans("Url").": ".$_SERVER["REQUEST_URI"]."\n");
|
||||
print '<div id="blockvmenubugtracker" class="blockvmenuhelp"><a class="help" target="_blank" href="'.$bugbaseurl.'">'.$langs->trans("FindBug").'</a></div>';
|
||||
}
|
||||
print "\n";
|
||||
$bugbaseurl = 'https://github.com/Dolibarr/dolibarr/issues/new';
|
||||
$bugbaseurl.= '?title=';
|
||||
$bugbaseurl.= urlencode("Bug: ");
|
||||
$bugbaseurl.= '&body=';
|
||||
$bugbaseurl.= urlencode("# Environment\n");
|
||||
$bugbaseurl.= urlencode("- **Version**: " . DOL_VERSION . "\n");
|
||||
$bugbaseurl.= urlencode("- **OS**: " . php_uname('s') . "\n");
|
||||
$bugbaseurl.= urlencode("- **Web server**: " . $_SERVER["SERVER_SOFTWARE"] . "\n");
|
||||
$bugbaseurl.= urlencode("- **PHP**: " . php_sapi_name() . ' ' . phpversion() . "\n");
|
||||
$bugbaseurl.= urlencode("- **Database**: " . $db::LABEL . ' ' . $db->getVersion() . "\n");
|
||||
$bugbaseurl.= urlencode("- **URL**: " . $_SERVER["REQUEST_URI"] . "\n");
|
||||
$bugbaseurl.= urlencode("\n");
|
||||
$bugbaseurl.= urlencode("# Report\n");
|
||||
print '<p id="blockvmenuhelpbugreport" class="blockvmenuhelp">';
|
||||
print '<a class="help" target="_blank" href="'.$bugbaseurl.'">'.$langs->trans("FindBug").'</a>';
|
||||
print '</p>';
|
||||
}
|
||||
|
||||
print "</div>\n";
|
||||
print "<!-- End left menu -->\n";
|
||||
|
||||
@ -46,7 +46,7 @@ $result = restrictedArea($user, 'user', $id, '&user', $feature2);
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if ($action == 'update' && ! $_POST['cancel'])
|
||||
if ($action == 'update' && ! GETPOST('cancel'))
|
||||
{
|
||||
$edituser = new User($db);
|
||||
$edituser->fetch($id);
|
||||
@ -138,6 +138,11 @@ if ($id > 0)
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
print '<tr><td width="25%" valign="top">ClickToDial '.$langs->trans("IdPhoneCaller").'</td>';
|
||||
print '<td class="valeur">';
|
||||
print '<input name="poste" value="'.(! empty($fuser->clicktodial_poste)?$fuser->clicktodial_poste:'').'"></td>';
|
||||
print "</tr>\n";
|
||||
|
||||
print '<tr><td width="25%" valign="top">ClickToDial '.$langs->trans("Login").'</td>';
|
||||
print '<td class="valeur">';
|
||||
print '<input name="login" value="'.(! empty($fuser->clicktodial_login)?$fuser->clicktodial_login:'').'"></td>';
|
||||
@ -148,11 +153,6 @@ if ($id > 0)
|
||||
print '<input name="password" value="'.(! empty($fuser->clicktodial_password)?$fuser->clicktodial_password:'').'"></td>';
|
||||
print "</tr>\n";
|
||||
|
||||
print '<tr><td width="25%" valign="top">ClickToDial '.$langs->trans("IdPhoneCaller").'</td>';
|
||||
print '<td class="valeur">';
|
||||
print '<input name="poste" value="'.(! empty($fuser->clicktodial_poste)?$fuser->clicktodial_poste:'').'"></td>';
|
||||
print "</tr>\n";
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<br><center><input class="button" type="submit" value="'.$langs->trans("Save").'">';
|
||||
@ -185,15 +185,20 @@ if ($id > 0)
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
print '<tr><td width="25%" valign="top" class="fieldrequired">ClickToDial '.$langs->trans("IdPhoneCaller").'</td>';
|
||||
print '<td class="valeur">'.(! empty($fuser->clicktodial_poste)?$fuser->clicktodial_poste:'').'</td>';
|
||||
print "</tr>";
|
||||
|
||||
print '<tr><td width="25%" valign="top">ClickToDial '.$langs->trans("Login").'</td>';
|
||||
print '<td class="valeur">'.(! empty($fuser->clicktodial_login)?$fuser->clicktodial_login:'').'</td>';
|
||||
print '</tr>';
|
||||
|
||||
print '<tr><td width="25%" valign="top">ClickToDial '.$langs->trans("Password").'</td>';
|
||||
print '<td class="valeur">'.preg_replace('/./','*',(! empty($fuser->clicktodial_password)?$fuser->clicktodial_password:'')).'</a></td>';
|
||||
print "</tr>\n";
|
||||
print '<tr><td width="25%" valign="top">ClickToDial '.$langs->trans("IdPhoneCaller").'</td>';
|
||||
print '<td class="valeur">'.(! empty($fuser->clicktodial_poste)?$fuser->clicktodial_poste:'').'</td>';
|
||||
print "</tr></table>\n";
|
||||
|
||||
print "</table>\n";
|
||||
}
|
||||
|
||||
print "</div>\n";
|
||||
|
||||
@ -961,7 +961,7 @@ else
|
||||
|
||||
if ($id > 0)
|
||||
{
|
||||
$object->fetch($id);
|
||||
$res=$object->fetch($id);
|
||||
if ($res < 0) { dol_print_error($db,$object->error); exit; }
|
||||
$res=$object->fetch_optionals($object->id,$extralabels);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user