Merge remote-tracking branch 'Dolibarr/11.0' into 11
This commit is contained in:
commit
3ab5bd158d
@ -231,3 +231,8 @@ $dolibarr_main_prod='0';
|
||||
# Default value: 0 (use database value if exist)
|
||||
# Examples:
|
||||
# $dolibarr_mailing_limit_sendbycli='0';
|
||||
|
||||
# dolibarr_distrib
|
||||
# A key to identify the distribution used for first installation
|
||||
$dolibarr_distrib = 'deb';
|
||||
|
||||
|
||||
@ -110,7 +110,7 @@ Source: "C:\Program Files\Wamp\bin\mysql\mysql5.0.45\*.*"; DestDir: "{app}\bin\m
|
||||
; Mysql data files (does not overwrite if exists)
|
||||
Source: "build\exe\doliwamp\mysql\*.*"; DestDir: "{app}\bin\mysql\data\mysql"; Flags: onlyifdoesntexist ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db"
|
||||
; Dolibarr
|
||||
Source: "htdocs\*.*"; DestDir: "{app}\www\dolibarr\htdocs"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,custom\*,custom2\*,documents\*,includes\ckeditor\_source\*,includes\savant\*,includes\phpmailer\*,jquery\plugins\template\*,nltechno*\*,PHPExcel\Shared\PDF\*,PHPExcel\Shared\PCLZip\*,tcpdf\fonts\dejavu-fonts-ttf-2.33\*,tcpdf\fonts\freefont-20100919\*,tcpdf\fonts\utils\*,*\conf.php,*\conf.php.mysql,*\conf.php.old,*\conf.php.postgres,*\conf.php.sav,*\install.forced.php"
|
||||
Source: "htdocs\*.*"; DestDir: "{app}\www\dolibarr\htdocs"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,custom\*,custom2\*,documents\*,includes\ckeditor\_source\*,includes\savant\*,includes\phpmailer\*,jquery\plugins\template\*,nltechno*\*,sabre\sabre\*\tests,PHPExcel\Shared\PDF\*,PHPExcel\Shared\PCLZip\*,tcpdf\fonts\dejavu-fonts-ttf-2.33\*,tcpdf\fonts\freefont-20100919\*,tcpdf\fonts\utils\*,*\conf.php,*\conf.php.mysql,*\conf.php.old,*\conf.php.postgres,*\conf.php.sav,*\install.forced.php"
|
||||
Source: "dev\*.*"; DestDir: "{app}\www\dolibarr\dev"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,dbmodel\*,fpdf\*,initdata\*,initdemo\*,iso-normes\*,licence\*,phpcheckstyle\*,phpunit\*,samples\*,test\*,uml\*,vagrant\*,xdebug\*"
|
||||
Source: "doc\*.*"; DestDir: "{app}\www\dolibarr\doc"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,wiki\*,plaquette\*,dev\*,images\dolibarr_screenshot2.png,images\dolibarr_screenshot3.png,images\dolibarr_screenshot4.png,images\dolibarr_screenshot5.png,images\dolibarr_screenshot6.png,images\dolibarr_screenshot7.png,images\dolibarr_screenshot8.png,images\dolibarr_screenshot9.png,images\dolibarr_screenshot10.png,images\dolibarr_screenshot11.png,images\dolibarr_screenshot12.png"
|
||||
Source: "scripts\*.*"; DestDir: "{app}\www\dolibarr\scripts"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,product\materiel.net.php,product\import-product.php"
|
||||
|
||||
@ -180,11 +180,11 @@ if ($action == 'install')
|
||||
$modulename = preg_replace('/module_/', '', $original_file);
|
||||
$modulename = preg_replace('/\-([0-9][0-9\.]*)\.zip$/i', '', $modulename);
|
||||
// Search dir $modulename
|
||||
$modulenamedir = $conf->admin->dir_temp.'/'.$tmpdir.'/'.$modulename; // Example .../mymodule
|
||||
//var_dump($modulenamedir);
|
||||
$modulenamedir = $conf->admin->dir_temp.'/'.$tmpdir.'/'.$modulename; // Example ./mymodule
|
||||
|
||||
if (!dol_is_dir($modulenamedir))
|
||||
{
|
||||
$modulenamedir = $conf->admin->dir_temp.'/'.$tmpdir.'/htdocs/'.$modulename; // Example .../htdocs/mymodule
|
||||
$modulenamedir = $conf->admin->dir_temp.'/'.$tmpdir.'/htdocs/'.$modulename; // Example ./htdocs/mymodule
|
||||
//var_dump($modulenamedir);
|
||||
if (!dol_is_dir($modulenamedir))
|
||||
{
|
||||
@ -207,6 +207,7 @@ if ($action == 'install')
|
||||
$modulenamearrays = explode("\n", $metafile);
|
||||
}
|
||||
$modulenamearrays[$modulename] = $modulename;
|
||||
//var_dump($modulenamearrays);exit;
|
||||
|
||||
foreach ($modulenamearrays as $modulenameval) {
|
||||
if (strpos($modulenameval, '#') === 0) continue; // Discard comments
|
||||
@ -216,15 +217,14 @@ if ($action == 'install')
|
||||
// Now we install the module
|
||||
if (!$error)
|
||||
{
|
||||
//var_dump($dirins);
|
||||
@dol_delete_dir_recursive($dirins.'/'.$modulenameval); // delete the zip file
|
||||
dol_syslog("We copy now directory ".$conf->admin->dir_temp.'/'.$tmpdir.'/htdocs/'.$modulenameval." into target dir ".$dirins.'/'.$modulenameval);
|
||||
$result = dolCopyDir($conf->admin->dir_temp.'/'.$tmpdir.'/htdocs/'.$modulenameval, $dirins.'/'.$modulenameval, '0444', 1);
|
||||
$result = dolCopyDir($modulenamedir, $dirins.'/'.$modulenameval, '0444', 1);
|
||||
if ($result <= 0)
|
||||
{
|
||||
dol_syslog('Failed to call dolCopyDir result='.$result." with param ".$modulenamedir." and ".$dirins.'/'.$modulenameval, LOG_WARNING);
|
||||
$langs->load("errors");
|
||||
setEventMessages($langs->trans("ErrorFailToCopyDir", $conf->admin->dir_temp.'/'.$tmpdir.'/htdocs/'.$modulenameval, $dirins.'/'.$modulenameval), null, 'errors');
|
||||
setEventMessages($langs->trans("ErrorFailToCopyDir", $modulenamedir, $dirins.'/'.$modulenameval), null, 'errors');
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
@ -81,9 +81,9 @@ $type=$db->type;
|
||||
$help_url='EN:Backups|FR:Sauvegardes|ES:Copias_de_seguridad';
|
||||
llxHeader('', '', $help_url);
|
||||
|
||||
print '<script type="text/javascript">
|
||||
jQuery(document).ready(function() {';
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
|
||||
function hideoptions () {
|
||||
jQuery("#mysql_options").hide();
|
||||
@ -242,7 +242,7 @@ if (in_array($type, array('mysql', 'mysqli'))) {
|
||||
print '<input type="checkbox" name="sql_structure" value="structure" id="checkbox_sql_structure" checked />';
|
||||
print '<label for="checkbox_sql_structure">'.$langs->trans('ExportStructure').'</label>';
|
||||
print '</legend>';
|
||||
print '<input type="checkbox" name="drop"'.((! isset($_GET["drop"]) && ! isset($_POST["drop"])) || GETPOST('drop'))?' checked':''.' id="checkbox_dump_drop" />';
|
||||
print '<input type="checkbox" name="drop"'.(((! isset($_GET["drop"]) && ! isset($_POST["drop"])) || GETPOST('drop'))?' checked':'').' id="checkbox_dump_drop" />';
|
||||
print '<label for="checkbox_dump_drop">'.$langs->trans("AddDropTable").'</label>';
|
||||
print '<br>';
|
||||
print '</fieldset>';
|
||||
@ -413,11 +413,6 @@ print '<br>';
|
||||
// Define compressions array
|
||||
$compression=array();
|
||||
if (in_array($type, array('mysql', 'mysqli'))) {
|
||||
$compression['none'] = array(
|
||||
'function' => '',
|
||||
'id' => 'radio_compression_none',
|
||||
'label' => $langs->trans("None")
|
||||
);
|
||||
$compression['gz'] = array(
|
||||
'function' => 'gzopen',
|
||||
'id' => 'radio_compression_gzip',
|
||||
@ -434,13 +429,18 @@ if (in_array($type, array('mysql', 'mysqli'))) {
|
||||
'id' => 'radio_compression_bzip',
|
||||
'label' => $langs->trans("Bzip2")
|
||||
);
|
||||
$compression['none'] = array(
|
||||
'function' => '',
|
||||
'id' => 'radio_compression_none',
|
||||
'label' => $langs->trans("None")
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
$compression['none'] = array(
|
||||
'function' => '',
|
||||
'id' => 'radio_compression_none',
|
||||
'label' => $langs->trans("Default")
|
||||
'label' => $langs->trans("None")
|
||||
);
|
||||
$compression['gz'] = array(
|
||||
'function' => 'gzopen',
|
||||
@ -455,11 +455,14 @@ print "\n";
|
||||
|
||||
print $langs->trans("Compression").': ';
|
||||
|
||||
$i = 0;
|
||||
foreach($compression as $key => $val)
|
||||
{
|
||||
if (! $val['function'] || function_exists($val['function'])) {
|
||||
// Enabled export format
|
||||
print '<input type="radio" name="compression" value="'.$key.'" id="'.$val['id'].'" checked>';
|
||||
$checked = '';
|
||||
if ($key == 'gz') $checked = ' checked';
|
||||
print '<input type="radio" name="compression" value="'.$key.'" id="'.$val['id'].'"'.$checked.'>';
|
||||
print ' <label for="'.$val['id'].'">'.$val['label'].'</label>';
|
||||
}
|
||||
else
|
||||
@ -467,9 +470,10 @@ foreach($compression as $key => $val)
|
||||
// Disabled export format
|
||||
print '<input type="radio" name="compression" value="'.$key.'" id="'.$val['id'].'" disabled>';
|
||||
print ' <label for="'.$val['id'].'">'.$val['label'].'</label>';
|
||||
print ' ('.$langs->trans("NotAvailable").')';
|
||||
print ' <span class="opacitymedium">('.$langs->trans("NotAvailable").')</span>';
|
||||
}
|
||||
print ' ';
|
||||
$i++;
|
||||
}
|
||||
|
||||
print '</div>';
|
||||
@ -534,12 +538,15 @@ print '</div>';
|
||||
print '</form>';
|
||||
print '</fieldset>';
|
||||
|
||||
|
||||
|
||||
print "<br>\n";
|
||||
print "<!-- Dump of a server -->\n";
|
||||
|
||||
print '<form method="post" action="export_files.php" name="dump">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'" />';
|
||||
print '<input type="hidden" name="export_type" value="server" />';
|
||||
print '<input type="hidden" name="page_y" value="" />';
|
||||
|
||||
print '<fieldset><legend class="legendforfieldsetstep" style="font-size: 3em">2</legend>';
|
||||
|
||||
@ -548,39 +555,44 @@ print $langs->trans("BackupDescX").'<br><br>';
|
||||
|
||||
print '<div id="backupfilesleft" class="fichehalfleft">';
|
||||
|
||||
print load_fiche_titre($title?$title:$langs->trans("BackupDumpWizard"));
|
||||
print load_fiche_titre($title?$title:$langs->trans("BackupZipWizard"));
|
||||
|
||||
print '<label for="zipfilename_template">'.$langs->trans("FileNameToGenerate").'</label><br>';
|
||||
$prefix='documents';
|
||||
$ext='zip';
|
||||
$file=$prefix.'_'.$dolibarr_main_db_name.'_'.dol_sanitizeFileName(DOL_VERSION).'_'.strftime("%Y%m%d%H%M").'.'.$ext;
|
||||
$file=$prefix.'_'.$dolibarr_main_db_name.'_'.dol_sanitizeFileName(DOL_VERSION).'_'.strftime("%Y%m%d%H%M");
|
||||
print '<input type="text" name="zipfilename_template" style="width: 90%" id="zipfilename_template" value="'.$file.'" /> <br>';
|
||||
print '<br>';
|
||||
|
||||
|
||||
// Show compression choices
|
||||
// Example: With gz choice, you can compress in 5mn, a file of 2GB directory (after compression) with 10 Mb memory.
|
||||
print '<div class="formelementrow">';
|
||||
print "\n";
|
||||
|
||||
print $langs->trans("Compression").': ';
|
||||
$filecompression = $compression;
|
||||
array_shift($filecompression);
|
||||
unset($filecompression['none']);
|
||||
$filecompression['zip']= array('function' => 'dol_compress_dir', 'id' => 'radio_compression_zip', 'label' => $langs->trans("FormatZip"));
|
||||
|
||||
$i = 0;
|
||||
foreach($filecompression as $key => $val)
|
||||
{
|
||||
if (! $val['function'] || function_exists($val['function'])) // Enabled export format
|
||||
{
|
||||
print '<input type="radio" name="compression" value="'.$key.'" id="'.$val['id'].'" checked>';
|
||||
$checked = '';
|
||||
if ($key == 'gz') $checked = ' checked';
|
||||
print '<input type="radio" name="compression" value="'.$key.'" id="'.$val['id'].'"'.$checked.'>';
|
||||
print ' <label for="'.$val['id'].'">'.$val['label'].'</label>';
|
||||
}
|
||||
else // Disabled export format
|
||||
{
|
||||
print '<input type="radio" name="compression" value="'.$key.'" id="'.$val['id'].'" disabled>';
|
||||
print ' <label for="'.$val['id'].'">'.$val['label'].'</label>';
|
||||
print ' ('.$langs->trans("NotAvailable").')';
|
||||
print ' <span class="opacitymedium">('.$langs->trans("NotAvailable").')</span>';
|
||||
}
|
||||
print ' ';
|
||||
$i++;
|
||||
}
|
||||
|
||||
print '</div>';
|
||||
@ -598,7 +610,7 @@ print '<div id="backupdatabaseright" class="fichehalfright" style="height:480px;
|
||||
print '<div class="ficheaddleft">';
|
||||
|
||||
$filearray=dol_dir_list($conf->admin->dir_output.'/documents', 'files', 0, '', '', $sortfield, (strtolower($sortorder)=='asc'?SORT_ASC:SORT_DESC), 1);
|
||||
$result=$formfile->list_of_documents($filearray, null, 'systemtools', '', 1, 'documents/', 1, 0, $langs->trans("NoBackupFileAvailable"), 0, $langs->trans("PreviousDumpFiles"));
|
||||
$result=$formfile->list_of_documents($filearray, null, 'systemtools', '', 1, 'documents/', 1, 0, $langs->trans("NoBackupFileAvailable"), 0, $langs->trans("PreviousArchiveFiles"));
|
||||
print '<br>';
|
||||
|
||||
print '</div>';
|
||||
|
||||
@ -18,8 +18,8 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/admin/tools/export.php
|
||||
* \brief Page to export a database into a dump file
|
||||
* \file htdocs/admin/tools/export_files.php
|
||||
* \brief Page to export documents into a compressed file
|
||||
*/
|
||||
|
||||
require '../../main.inc.php';
|
||||
@ -33,10 +33,11 @@ $langs->load("admin");
|
||||
$action=GETPOST('action', 'alpha');
|
||||
$what=GETPOST('what', 'alpha');
|
||||
$export_type=GETPOST('export_type', 'alpha');
|
||||
$file=GETPOST('zipfilename_template', 'alpha');
|
||||
$file=trim(GETPOST('zipfilename_template', 'alpha'));
|
||||
$compression = GETPOST('compression');
|
||||
|
||||
$file = dol_sanitizeFileName($file);
|
||||
$file = preg_replace('/(\.zip|\.tar|\.tgz|\.gz|\.tar\.gz|\.bz2)$/i', '', $file);
|
||||
|
||||
$sortfield = GETPOST('sortfield', 'alpha');
|
||||
$sortorder = GETPOST('sortorder', 'alpha');
|
||||
@ -73,7 +74,7 @@ if ($action == 'delete')
|
||||
*/
|
||||
|
||||
// Increase limit of time. Works only if we are not in safe mode
|
||||
$ExecTimeLimit=600;
|
||||
$ExecTimeLimit=1800; // 30mn
|
||||
if (!empty($ExecTimeLimit))
|
||||
{
|
||||
$err=error_reporting();
|
||||
@ -88,7 +89,7 @@ if (!empty($MemoryLimit))
|
||||
@ini_set('memory_limit', $MemoryLimit);
|
||||
}
|
||||
|
||||
$form=new Form($db);
|
||||
$form = new Form($db);
|
||||
$formfile = new FormFile($db);
|
||||
|
||||
//$help_url='EN:Backups|FR:Sauvegardes|ES:Copias_de_seguridad';
|
||||
@ -112,10 +113,18 @@ $utils = new Utils($db);
|
||||
|
||||
if ($compression == 'zip')
|
||||
{
|
||||
$file .= '.zip';
|
||||
$ret = dol_compress_dir(DOL_DATA_ROOT, $outputdir."/".$file, $compression, '/(\.log|\/temp\/|documents\/admin\/documents\/)/');
|
||||
if ($ret < 0)
|
||||
{
|
||||
$errormsg = $langs->trans("ErrorFailedToWriteInDir", $outputdir);
|
||||
if ($ret == -2) {
|
||||
$langs->load("errors");
|
||||
$errormsg = $langs->trans("ErrNoZipEngine");
|
||||
}
|
||||
else {
|
||||
$langs->load("errors");
|
||||
$errormsg = $langs->trans("ErrorFailedToWriteInDir", $outputdir);
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif (in_array($compression, array('gz', 'bz')))
|
||||
@ -124,7 +133,6 @@ elseif (in_array($compression, array('gz', 'bz')))
|
||||
|
||||
$outputfile = $conf->admin->dir_temp.'/export_files.'.$userlogin.'.out'; // File used with popen method
|
||||
|
||||
$file = substr($file, 0, strrpos($file, '.'));
|
||||
$file .= '.tar';
|
||||
// We also exclude '/temp/' dir and 'documents/admin/documents'
|
||||
$cmd = "tar -cf ".$outputdir."/".$file." --exclude-vcs --exclude 'temp' --exclude 'dolibarr.log' --exclude='documents/admin/documents' -C ".dirname(DOL_DATA_ROOT)." ".basename(DOL_DATA_ROOT);
|
||||
|
||||
@ -3541,9 +3541,10 @@ class Propal extends CommonObject
|
||||
* @param string $get_params Parametres added to url
|
||||
* @param int $notooltip 1=Disable tooltip
|
||||
* @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
|
||||
* @param int $addlinktonotes Add linkt to notes
|
||||
* @return string String with URL
|
||||
*/
|
||||
public function getNomUrl($withpicto = 0, $option = '', $get_params = '', $notooltip = 0, $save_lastsearch_value = -1)
|
||||
public function getNomUrl($withpicto = 0, $option = '', $get_params = '', $notooltip = 0, $save_lastsearch_value = -1, $addlinktonotes = 0)
|
||||
{
|
||||
global $langs, $conf, $user;
|
||||
|
||||
@ -3609,6 +3610,22 @@ class Propal extends CommonObject
|
||||
if ($withpicto != 2) $result .= $this->ref;
|
||||
$result .= $linkend;
|
||||
|
||||
if ($addlinktonotes)
|
||||
{
|
||||
$txttoshow = ($user->socid > 0 ? $this->note_public : $this->note_private);
|
||||
if ($txttoshow)
|
||||
{
|
||||
$notetoshow = $langs->trans("ViewPrivateNote").':<br>'.dol_string_nohtmltag($txttoshow, 1);
|
||||
$result .= ' <span class="note inline-block">';
|
||||
$result .= '<a href="'.DOL_URL_ROOT.'/comm/propal/note.php?id='.$this->id.'" class="classfortooltip" title="'.dol_escape_htmltag($notetoshow).'">';
|
||||
$result .= img_picto('', 'note');
|
||||
$result .= '</a>';
|
||||
//$result.=img_picto($langs->trans("ViewNote"),'object_generic');
|
||||
//$result.='</a>';
|
||||
$result .= '</span>';
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@ -275,6 +275,7 @@ $sql .= " ava.rowid as availability,";
|
||||
$sql .= " state.code_departement as state_code, state.nom as state_name,";
|
||||
$sql .= ' p.rowid, p.entity, p.note_private, p.total_ht, p.tva as total_vat, p.total as total_ttc, p.localtax1, p.localtax2, p.ref, p.ref_client, p.fk_statut, p.fk_user_author, p.datep as dp, p.fin_validite as dfv,p.date_livraison as ddelivery,';
|
||||
$sql .= ' p.datec as date_creation, p.tms as date_update, p.date_cloture as date_cloture,';
|
||||
$sql .= ' p.note_public, p.note_private,';
|
||||
$sql .= " pr.rowid as project_id, pr.ref as project_ref, pr.title as project_label,";
|
||||
$sql .= ' u.login';
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user";
|
||||
@ -764,6 +765,8 @@ if ($resql)
|
||||
|
||||
$objectstatic->id = $obj->rowid;
|
||||
$objectstatic->ref = $obj->ref;
|
||||
$objectstatic->note_public = $obj->note_public;
|
||||
$objectstatic->note_private = $obj->note_private;
|
||||
|
||||
$companystatic->id = $obj->socid;
|
||||
$companystatic->name = $obj->name;
|
||||
@ -784,18 +787,11 @@ if ($resql)
|
||||
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
|
||||
// Picto + Ref
|
||||
print '<td class="nobordernopadding nowrap">';
|
||||
print $objectstatic->getNomUrl(1, '', '', 0, 1);
|
||||
print $objectstatic->getNomUrl(1, '', '', 0, 1, 1);
|
||||
print '</td>';
|
||||
// Warning
|
||||
$warnornote = '';
|
||||
if ($obj->fk_statut == 1 && $db->jdate($obj->dfv) < ($now - $conf->propal->cloture->warning_delay)) $warnornote .= img_warning($langs->trans("Late"));
|
||||
if (!empty($obj->note_private))
|
||||
{
|
||||
$warnornote .= ($warnornote ? ' ' : '');
|
||||
$warnornote .= '<span class="note">';
|
||||
$warnornote .= '<a href="note.php?id='.$obj->rowid.'">'.img_picto($langs->trans("ViewPrivateNote"), 'object_generic').'</a>';
|
||||
$warnornote .= '</span>';
|
||||
}
|
||||
if ($warnornote)
|
||||
{
|
||||
print '<td style="min-width: 20px" class="nobordernopadding nowrap">';
|
||||
|
||||
@ -2542,6 +2542,11 @@ if ($action == 'create' && $usercancreate)
|
||||
// Note that $action and $object may be modified by hook
|
||||
$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action);
|
||||
if (empty($reshook)) {
|
||||
// Reopen a closed order
|
||||
if (($object->statut == Commande::STATUS_CLOSED || $object->statut == Commande::STATUS_CANCELED) && $usercancreate) {
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=reopen">'.$langs->trans('ReOpen').'</a></div>';
|
||||
}
|
||||
|
||||
// Send
|
||||
if ($object->statut > Commande::STATUS_DRAFT || !empty($conf->global->COMMANDE_SENDBYEMAIL_FOR_ALL_STATUS)) {
|
||||
if ($usercansend) {
|
||||
@ -2619,11 +2624,6 @@ if ($action == 'create' && $usercancreate)
|
||||
}
|
||||
}
|
||||
|
||||
// Reopen a closed order
|
||||
if (($object->statut == Commande::STATUS_CLOSED || $object->statut == Commande::STATUS_CANCELED) && $usercancreate) {
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=reopen">'.$langs->trans('ReOpen').'</a></div>';
|
||||
}
|
||||
|
||||
// Set to shipped
|
||||
if (($object->statut == Commande::STATUS_VALIDATED || $object->statut == Commande::STATUS_SHIPMENTONPROCESS) && $usercanclose) {
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=shipped">'.$langs->trans('ClassifyShipped').'</a></div>';
|
||||
|
||||
@ -3559,9 +3559,10 @@ class Commande extends CommonOrder
|
||||
* @param int $short ???
|
||||
* @param int $notooltip 1=Disable tooltip
|
||||
* @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
|
||||
* @param int $addlinktonotes Add linkt to notes
|
||||
* @return string String with URL
|
||||
*/
|
||||
public function getNomUrl($withpicto = 0, $option = '', $max = 0, $short = 0, $notooltip = 0, $save_lastsearch_value = -1)
|
||||
public function getNomUrl($withpicto = 0, $option = '', $max = 0, $short = 0, $notooltip = 0, $save_lastsearch_value = -1, $addlinktonotes = 0)
|
||||
{
|
||||
global $conf, $langs, $user;
|
||||
|
||||
@ -3628,6 +3629,22 @@ class Commande extends CommonOrder
|
||||
if ($withpicto != 2) $result .= $this->ref;
|
||||
$result .= $linkend;
|
||||
|
||||
if ($addlinktonotes)
|
||||
{
|
||||
$txttoshow = ($user->socid > 0 ? $this->note_public : $this->note_private);
|
||||
if ($txttoshow)
|
||||
{
|
||||
$notetoshow = $langs->trans("ViewPrivateNote").':<br>'.dol_string_nohtmltag($txttoshow, 1);
|
||||
$result .= ' <span class="note inline-block">';
|
||||
$result .= '<a href="'.DOL_URL_ROOT.'/commande/note.php?id='.$this->id.'" class="classfortooltip" title="'.dol_escape_htmltag($notetoshow).'">';
|
||||
$result .= img_picto('', 'note');
|
||||
$result .= '</a>';
|
||||
//$result.=img_picto($langs->trans("ViewNote"),'object_generic');
|
||||
//$result.='</a>';
|
||||
$result .= '</span>';
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@ -804,6 +804,8 @@ if ($resql)
|
||||
$generic_commande->total_ht = $obj->total_ht;
|
||||
$generic_commande->total_tva = $obj->total_tva;
|
||||
$generic_commande->total_ttc = $obj->total_ttc;
|
||||
$generic_commande->note_public = $obj->note_public;
|
||||
$generic_commande->note_private = $obj->note_private;
|
||||
|
||||
$projectstatic->id = $obj->project_id;
|
||||
$projectstatic->ref = $obj->project_ref;
|
||||
@ -818,7 +820,7 @@ if ($resql)
|
||||
|
||||
$generic_commande->getLinesArray(); // This set ->lines
|
||||
|
||||
print $generic_commande->getNomUrl(1, ($viewstatut != 2 ? 0 : $obj->fk_statut), 0, 0, 0, 1);
|
||||
print $generic_commande->getNomUrl(1, ($viewstatut != 2 ? 0 : $obj->fk_statut), 0, 0, 0, 1, 1);
|
||||
|
||||
// Show shippable Icon (create subloop, so may be slow)
|
||||
if ($conf->stock->enabled)
|
||||
@ -926,12 +928,6 @@ if ($resql)
|
||||
if ($generic_commande->hasDelay()) {
|
||||
print img_picto($langs->trans("Late").' : '.$generic_commande->showDelay(), "warning");
|
||||
}
|
||||
if (!empty($obj->note_private) || !empty($obj->note_public))
|
||||
{
|
||||
print ' <span class="note">';
|
||||
print '<a href="'.DOL_URL_ROOT.'/commande/note.php?id='.$obj->rowid.'">'.img_picto($langs->trans("ViewPrivateNote"), 'object_generic').'</a>';
|
||||
print '</span>';
|
||||
}
|
||||
|
||||
$filename = dol_sanitizeFileName($obj->ref);
|
||||
$filedir = $conf->commande->multidir_output[$conf->entity].'/'.dol_sanitizeFileName($obj->ref);
|
||||
|
||||
@ -103,7 +103,9 @@ $extrafields = new ExtraFields($db);
|
||||
|
||||
// Load object
|
||||
if ($id > 0 || !empty($ref)) {
|
||||
$ret = $object->fetch($id, $ref, '', '', $conf->global->INVOICE_USE_SITUATION);
|
||||
if ($action != 'add') {
|
||||
$ret = $object->fetch($id, $ref, '', '', $conf->global->INVOICE_USE_SITUATION);
|
||||
}
|
||||
}
|
||||
|
||||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||
@ -134,6 +136,7 @@ if ($user->socid) $socid = $user->socid;
|
||||
$isdraft = (($object->statut == Facture::STATUS_DRAFT) ? 1 : 0);
|
||||
$result = restrictedArea($user, 'facture', $id, '', '', 'fk_soc', $fieldid, $isdraft);
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
@ -941,11 +944,13 @@ if (empty($reshook))
|
||||
{
|
||||
$error++;
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), null, 'errors');
|
||||
$action = 'create';
|
||||
}
|
||||
|
||||
if (!($_POST['fac_replacement'] > 0)) {
|
||||
$error++;
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("ReplaceInvoice")), null, 'errors');
|
||||
$action = 'create';
|
||||
}
|
||||
|
||||
$date_pointoftax = dol_mktime(12, 0, 0, $_POST['date_pointoftaxmonth'], $_POST['date_pointoftaxday'], $_POST['date_pointoftaxyear']);
|
||||
@ -992,6 +997,7 @@ if (empty($reshook))
|
||||
{
|
||||
$error++;
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CorrectInvoice")), null, 'errors');
|
||||
$action = 'create';
|
||||
}
|
||||
|
||||
$dateinvoice = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']);
|
||||
@ -999,6 +1005,7 @@ if (empty($reshook))
|
||||
{
|
||||
$error++;
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), null, 'errors');
|
||||
$action = 'create';
|
||||
}
|
||||
|
||||
$date_pointoftax = dol_mktime(12, 0, 0, $_POST['date_pointoftaxmonth'], $_POST['date_pointoftaxday'], $_POST['date_pointoftaxyear']);
|
||||
@ -1181,6 +1188,7 @@ if (empty($reshook))
|
||||
{
|
||||
$error++;
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), null, 'errors');
|
||||
$action = 'create';
|
||||
}
|
||||
|
||||
$date_pointoftax = dol_mktime(12, 0, 0, $_POST['date_pointoftaxmonth'], $_POST['date_pointoftaxday'], $_POST['date_pointoftaxyear']);
|
||||
@ -1223,6 +1231,7 @@ if (empty($reshook))
|
||||
{
|
||||
$error++;
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Customer")), null, 'errors');
|
||||
$action = 'create';
|
||||
}
|
||||
|
||||
$dateinvoice = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']);
|
||||
@ -1230,6 +1239,7 @@ if (empty($reshook))
|
||||
{
|
||||
$error++;
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), null, 'errors');
|
||||
$action = 'create';
|
||||
}
|
||||
|
||||
$date_pointoftax = dol_mktime(12, 0, 0, $_POST['date_pointoftaxmonth'], $_POST['date_pointoftaxday'], $_POST['date_pointoftaxyear']);
|
||||
@ -1642,6 +1652,7 @@ if (empty($reshook))
|
||||
$error++;
|
||||
$mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("InvoiceSituation"));
|
||||
setEventMessages($mesg, null, 'errors');
|
||||
$action = 'create';
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
@ -2123,7 +2134,7 @@ if (empty($reshook))
|
||||
if (!GETPOST('qty')) $special_code = 3;
|
||||
|
||||
$line = new FactureLigne($db);
|
||||
$line->fetch(GETPOST('lineid'));
|
||||
$line->fetch(GETPOST('lineid', 'int'));
|
||||
$percent = $line->get_prev_progress($object->id);
|
||||
|
||||
if ($object->type == Facture::TYPE_CREDIT_NOTE && $object->situation_cycle_ref > 0)
|
||||
@ -2283,17 +2294,17 @@ if (empty($reshook))
|
||||
}
|
||||
}
|
||||
|
||||
elseif ($action == 'updatealllines' && $usercancreate && $_POST['all_percent'] == $langs->trans('Modifier'))
|
||||
elseif ($action == 'updatealllines' && $usercancreate && $_POST['all_percent'] == $langs->trans('Modifier')) // Update all lines of situation invoice
|
||||
{
|
||||
if (!$object->fetch($id) > 0) dol_print_error($db);
|
||||
if (!is_null(GETPOST('all_progress')) && GETPOST('all_progress') != "")
|
||||
if (GETPOST('all_progress') != "")
|
||||
{
|
||||
$all_progress = GETPOST('all_progress', 'int');
|
||||
foreach ($object->lines as $line)
|
||||
{
|
||||
$percent = $line->get_prev_progress($object->id);
|
||||
if (floatval($all_progress) < floatval($percent)) {
|
||||
$mesg = $langs->trans("Line").' '.$i.' '.$line->ref.' : '.$langs->trans("CantBeLessThanMinPercent");
|
||||
$mesg = $langs->trans("Line").' '.$i.' : '.$langs->trans("CantBeLessThanMinPercent");
|
||||
setEventMessages($mesg, null, 'warnings');
|
||||
$result = -1;
|
||||
} else
|
||||
@ -2303,7 +2314,7 @@ if (empty($reshook))
|
||||
}
|
||||
|
||||
elseif ($action == 'updateline' && $usercancreate && $_POST['cancel'] == $langs->trans('Cancel')) {
|
||||
header('Location: '.$_SERVER["PHP_SELF"].'?facid='.$id); // Pour reaffichage de la fiche en cours d'edition
|
||||
header('Location: '.$_SERVER["PHP_SELF"].'?facid='.$id); // To show again edited page
|
||||
exit();
|
||||
}
|
||||
|
||||
@ -2939,7 +2950,7 @@ if ($action == 'create')
|
||||
if (($origin == 'propal') || ($origin == 'commande'))
|
||||
{
|
||||
print '<td class="nowrap" style="padding-left: 5px">';
|
||||
$arraylist = array('amount' => $langs->transnoentitiesnoconv('FixAmount'), 'variable' => $langs->transnoentitiesnoconv('VarAmountOneLine', $langs->transnoentitiesnoconv('Deposit')));
|
||||
$arraylist = array('amount' => $langs->transnoentitiesnoconv('FixAmount', $langs->transnoentitiesnoconv('Deposit')), 'variable' => $langs->transnoentitiesnoconv('VarAmountOneLine', $langs->transnoentitiesnoconv('Deposit')));
|
||||
print $form->selectarray('typedeposit', $arraylist, GETPOST('typedeposit'), 0, 0, 0, '', 1);
|
||||
print '</td>';
|
||||
print '<td class="nowrap" style="padding-left: 5px">'.$langs->trans('Value').':<input type="text" id="valuedeposit" name="valuedeposit" size="3" value="'.GETPOST('valuedeposit', 'int').'"/>';
|
||||
@ -2992,14 +3003,16 @@ if ($action == 'create')
|
||||
exit();
|
||||
}
|
||||
$options = "";
|
||||
foreach ($facids as $facparam)
|
||||
{
|
||||
$options .= '<option value="'.$facparam ['id'].'"';
|
||||
if ($facparam ['id'] == $_POST['fac_replacement'])
|
||||
$options .= ' selected';
|
||||
$options .= '>'.$facparam ['ref'];
|
||||
$options .= ' ('.$facturestatic->LibStatut(0, $facparam ['status']).')';
|
||||
$options .= '</option>';
|
||||
if (is_array($facids)) {
|
||||
foreach ($facids as $facparam)
|
||||
{
|
||||
$options .= '<option value="'.$facparam ['id'].'"';
|
||||
if ($facparam ['id'] == $_POST['fac_replacement'])
|
||||
$options .= ' selected';
|
||||
$options .= '>'.$facparam ['ref'];
|
||||
$options .= ' ('.$facturestatic->LibStatut(0, $facparam ['status']).')';
|
||||
$options .= '</option>';
|
||||
}
|
||||
}
|
||||
|
||||
print '<!-- replacement line -->';
|
||||
@ -4240,7 +4253,7 @@ elseif ($id > 0 || !empty($ref))
|
||||
}
|
||||
else
|
||||
{
|
||||
print $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id, $object->retained_warranty_fk_cond_reglement, 'none');
|
||||
$form->form_conditions_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id, $object->retained_warranty_fk_cond_reglement, 'none');
|
||||
if (!$displayWarranty) {
|
||||
print img_picto($langs->trans('RetainedWarrantyNeed100Percent'), 'warning.png', 'class="pictowarning valignmiddle" ');
|
||||
}
|
||||
@ -4557,7 +4570,7 @@ elseif ($id > 0 || !empty($ref))
|
||||
print '</tr>';
|
||||
|
||||
// Payments already done (from payment on this invoice)
|
||||
$sql = 'SELECT p.datep as dp, p.ref, p.num_paiement, p.rowid, p.fk_bank,';
|
||||
$sql = 'SELECT p.datep as dp, p.ref, p.num_paiement as num_payment, p.rowid, p.fk_bank,';
|
||||
$sql .= ' c.code as payment_code, c.libelle as payment_label,';
|
||||
$sql .= ' pf.amount,';
|
||||
$sql .= ' ba.rowid as baid, ba.ref as baref, ba.label, ba.number as banumber, ba.account_number, ba.fk_accountancy_journal';
|
||||
@ -4583,7 +4596,7 @@ elseif ($id > 0 || !empty($ref))
|
||||
$paymentstatic->id = $objp->rowid;
|
||||
$paymentstatic->datepaye = $db->jdate($objp->dp);
|
||||
$paymentstatic->ref = $objp->ref;
|
||||
$paymentstatic->num_paiement = $objp->num_paiement;
|
||||
$paymentstatic->num_payment = $objp->num_payment;
|
||||
$paymentstatic->payment_code = $objp->payment_code;
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
@ -4591,7 +4604,7 @@ elseif ($id > 0 || !empty($ref))
|
||||
print '</td>';
|
||||
print '<td>'.dol_print_date($db->jdate($objp->dp), 'dayhour').'</td>';
|
||||
$label = ($langs->trans("PaymentType".$objp->payment_code) != ("PaymentType".$objp->payment_code)) ? $langs->trans("PaymentType".$objp->payment_code) : $objp->payment_label;
|
||||
print '<td>'.$label.' '.$objp->num_paiement.'</td>';
|
||||
print '<td>'.$label.' '.$objp->num_payment.'</td>';
|
||||
if (!empty($conf->banque->enabled))
|
||||
{
|
||||
$bankaccountstatic->id = $objp->baid;
|
||||
@ -5082,21 +5095,6 @@ elseif ($id > 0 || !empty($ref))
|
||||
}
|
||||
}
|
||||
|
||||
// Clone
|
||||
if (($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_DEPOSIT || $object->type == Facture::TYPE_PROFORMA) && $usercancreate)
|
||||
{
|
||||
print '<a class="butAction'.($conf->use_javascript_ajax ? ' reposition' : '').'" href="'.$_SERVER['PHP_SELF'].'?facid='.$object->id.'&action=clone&object=invoice">'.$langs->trans("ToClone").'</a>';
|
||||
}
|
||||
|
||||
// Clone as predefined / Create template
|
||||
if (($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_DEPOSIT || $object->type == Facture::TYPE_PROFORMA) && $object->statut == 0 && $usercancreate)
|
||||
{
|
||||
if (!$objectidnext && count($object->lines) > 0)
|
||||
{
|
||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/compta/facture/card-rec.php?facid='.$object->id.'&action=create">'.$langs->trans("ChangeIntoRepeatableInvoice").'</a>';
|
||||
}
|
||||
}
|
||||
|
||||
// Create a credit note
|
||||
if (($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_DEPOSIT || $object->type == Facture::TYPE_PROFORMA) && $object->statut > 0 && $usercancreate)
|
||||
{
|
||||
@ -5123,6 +5121,21 @@ elseif ($id > 0 || !empty($ref))
|
||||
}
|
||||
}
|
||||
|
||||
// Clone
|
||||
if (($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_DEPOSIT || $object->type == Facture::TYPE_PROFORMA) && $usercancreate)
|
||||
{
|
||||
print '<a class="butAction'.($conf->use_javascript_ajax ? ' reposition' : '').'" href="'.$_SERVER['PHP_SELF'].'?facid='.$object->id.'&action=clone&object=invoice">'.$langs->trans("ToClone").'</a>';
|
||||
}
|
||||
|
||||
// Clone as predefined / Create template
|
||||
if (($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_DEPOSIT || $object->type == Facture::TYPE_PROFORMA) && $object->statut == 0 && $usercancreate)
|
||||
{
|
||||
if (!$objectidnext && count($object->lines) > 0)
|
||||
{
|
||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/compta/facture/card-rec.php?facid='.$object->id.'&action=create">'.$langs->trans("ChangeIntoRepeatableInvoice").'</a>';
|
||||
}
|
||||
}
|
||||
|
||||
// Remove situation from cycle
|
||||
if ($object->statut > Facture::STATUS_DRAFT
|
||||
&& $object->type == Facture::TYPE_SITUATION
|
||||
|
||||
@ -637,7 +637,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
}
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<tr class="oddeven'.(($invoice->id == $facid) ? ' highlight' : '').'">';
|
||||
|
||||
print '<td class="nowraponall">';
|
||||
print $invoice->getNomUrl(1, '');
|
||||
@ -715,7 +715,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
}
|
||||
|
||||
// Price
|
||||
print '<td class="right" '.(($invoice->id == $facid) ? ' style="font-weight: bold" ' : '').'>'.price($sign * $objp->total_ttc).'</td>';
|
||||
print '<td class="right">'.price($sign * $objp->total_ttc).'</td>';
|
||||
|
||||
// Received or paid back
|
||||
print '<td class="right">'.price($sign * $paiement);
|
||||
|
||||
@ -309,7 +309,7 @@ class Conf
|
||||
{
|
||||
if (!empty($this->$module->enabled))
|
||||
{
|
||||
foreach ($dirs as $type => $name)
|
||||
foreach ($dirs as $type => $name) // $type is 'output' or 'temp'
|
||||
{
|
||||
$subdir = ($type == 'temp' ? '/temp' : '');
|
||||
// For multicompany sharings
|
||||
|
||||
@ -3008,7 +3008,6 @@ class Form
|
||||
* @param int $productid Id of product
|
||||
* @param string $htmlname Name of HTML field
|
||||
* @param int $selected_supplier Pre-selected supplier if more than 1 result
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function select_product_fourn_price($productid, $htmlname = 'productfournpriceid', $selected_supplier = '')
|
||||
@ -5911,6 +5910,7 @@ class Form
|
||||
//var_dump($objecttmp->filter);
|
||||
$prefixforautocompletemode = $objecttmp->element;
|
||||
if ($prefixforautocompletemode == 'societe') $prefixforautocompletemode = 'company';
|
||||
if ($prefixforautocompletemode == 'product') $prefixforautocompletemode='produit';
|
||||
$confkeyforautocompletemode = strtoupper($prefixforautocompletemode).'_USE_SEARCH_TO_SELECT'; // For example COMPANY_USE_SEARCH_TO_SELECT
|
||||
|
||||
dol_syslog(get_class($this)."::selectForForms object->filter=".$objecttmp->filter, LOG_DEBUG);
|
||||
|
||||
@ -233,7 +233,7 @@ class Utils
|
||||
|
||||
$outputdir = $conf->admin->dir_output.'/backup';
|
||||
$result = dol_mkdir($outputdir);
|
||||
|
||||
$errormsg = '';
|
||||
|
||||
// MYSQL
|
||||
if ($type == 'mysql' || $type == 'mysqli')
|
||||
@ -296,7 +296,6 @@ class Utils
|
||||
$paramclear .= ' -p"'.str_replace(array('"', '`'), array('\"', '\`'), $dolibarr_main_db_pass).'"';
|
||||
}
|
||||
|
||||
$errormsg = '';
|
||||
$handle = '';
|
||||
|
||||
// Start call method to execute dump
|
||||
@ -383,6 +382,8 @@ class Utils
|
||||
{
|
||||
// Get 2048 first chars of error message.
|
||||
$errormsg = fgets($handle, 2048);
|
||||
//$ok=0;$errormsg=''; To force error
|
||||
|
||||
// Close file
|
||||
if ($compression == 'none') fclose($handle);
|
||||
if ($compression == 'gz') gzclose($handle);
|
||||
@ -492,7 +493,7 @@ class Utils
|
||||
}
|
||||
|
||||
// Clean old files
|
||||
if ($keeplastnfiles > 0)
|
||||
if (! $errormsg && $keeplastnfiles > 0)
|
||||
{
|
||||
$tmpfiles = dol_dir_list($conf->admin->dir_output.'/backup', 'files', 0, '', '(\.err|\.old|\.sav)$', 'date', SORT_DESC);
|
||||
$i = 0;
|
||||
@ -504,7 +505,7 @@ class Utils
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
return ($errormsg ? -1 : 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -158,7 +158,7 @@ print '
|
||||
}
|
||||
else
|
||||
{
|
||||
console.log("We click on tag with .reposition class but element is not an <a> html tag, so we try to update input form field page_y with value "+page_y);
|
||||
console.log("We click on tag with .reposition class but element is not an <a> html tag, so we try to update input form field with name=page_y with value "+page_y);
|
||||
jQuery("input[type=hidden][name=page_y]").val(page_y);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2082,9 +2082,10 @@ function dol_uncompress($inputfile, $outputdir)
|
||||
* @param string $outputfile Target file name (output directory must exists and be writable)
|
||||
* @param string $mode 'zip'
|
||||
* @param string $excludefiles A regex pattern. For example: '/\.log$|\/temp\//'
|
||||
* @param string $rootdirinzip Add a root dir level in zip file
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
function dol_compress_dir($inputdir, $outputfile, $mode = "zip", $excludefiles = '')
|
||||
function dol_compress_dir($inputdir, $outputfile, $mode = "zip", $excludefiles = '', $rootdirinzip = '')
|
||||
{
|
||||
$foundhandler=0;
|
||||
|
||||
@ -2145,7 +2146,8 @@ function dol_compress_dir($inputdir, $outputfile, $mode = "zip", $excludefiles =
|
||||
{
|
||||
// Get real and relative path for current file
|
||||
$filePath = $file->getRealPath();
|
||||
$relativePath = substr($filePath, strlen($inputdir) + 1);
|
||||
$relativePath = ($rootdirinzip ? $rootdirinzip.'/' : '').substr($filePath, strlen($inputdir) + 1);
|
||||
|
||||
if (empty($excludefiles) || ! preg_match($excludefiles, $filePath))
|
||||
{
|
||||
// Add current file to archive
|
||||
|
||||
@ -4515,7 +4515,8 @@ function price($amount, $form = 0, $outlangs = '', $trunc = 1, $rounding = -1, $
|
||||
|
||||
/**
|
||||
* Function that return a number with universal decimal format (decimal separator is '.') from an amount typed by a user.
|
||||
* Function to use on each input amount before any numeric test or database insert
|
||||
* Function to use on each input amount before any numeric test or database insert. A better name for this function
|
||||
* should be text2num().
|
||||
*
|
||||
* @param float $amount Amount to convert/clean
|
||||
* @param string $rounding ''=No rounding
|
||||
@ -6039,6 +6040,7 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
|
||||
$substitutionarray['__REFCLIENT__'] = (isset($object->ref_client) ? $object->ref_client : (isset($object->ref_customer) ? $object->ref_customer : null));
|
||||
$substitutionarray['__REFSUPPLIER__'] = (isset($object->ref_supplier) ? $object->ref_supplier : null);
|
||||
$substitutionarray['__SUPPLIER_ORDER_DATE_DELIVERY__'] = (isset($object->date_livraison) ? dol_print_date($object->date_livraison, 'day', 0, $outputlangs) : '');
|
||||
$substitutionarray['__SUPPLIER_ORDER_DELAY_DELIVERY__'] = $outputlangs->transnoentities("AvailabilityType".$object->availability_code)!=('AvailabilityType'.$object->availability_code)?$outputlangs->transnoentities("AvailabilityType".$object->availability_code):$outputlangs->convToOutputCharset(isset($object->availability)?$object->availability:'');
|
||||
|
||||
$birthday = dol_print_date($object->birth, 'day');
|
||||
|
||||
|
||||
@ -222,7 +222,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
|
||||
public $export_permission;
|
||||
public $export_fields_array;
|
||||
public $export_TypeFields_array;
|
||||
public $export_TypeFields_array; // Array of key=>type where type can be 'Numeric', 'Date', 'Text', 'Boolean', 'Status', 'List:xxx:login:rowid'
|
||||
public $export_entities_array;
|
||||
public $export_special_array; // special or computed field
|
||||
public $export_dependencies_array;
|
||||
|
||||
@ -185,7 +185,7 @@ class modCategorie extends DolibarrModules
|
||||
$this->export_sql_end[$r] .=' AND u.type = 2'; // Customer/Prospect categories
|
||||
|
||||
// Add extra fields
|
||||
$sql="SELECT name, label, type, param FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'societe'";
|
||||
$sql="SELECT name, label, type, param FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'societe' AND entity IN (0, ".$conf->entity.")";
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql) // This can fail when class is used on old database (during migration for example)
|
||||
{
|
||||
@ -350,7 +350,7 @@ class modCategorie extends DolibarrModules
|
||||
); // We define here only fields that use another picto
|
||||
|
||||
// Add extra fields
|
||||
$sql="SELECT name, label, type, param FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'socpeople'";
|
||||
$sql="SELECT name, label, type, param FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'socpeople' AND entity IN (0, ".$conf->entity.")";
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql) // This can fail when class is used on old database (during migration for example)
|
||||
{
|
||||
|
||||
@ -320,7 +320,7 @@ class modFournisseur extends DolibarrModules
|
||||
);
|
||||
$this->export_dependencies_array[$r]=array('invoice_line'=>'fd.rowid','product'=>'fd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them
|
||||
// Add extra fields object
|
||||
$sql="SELECT name, label, type, param FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'facture_fourn'";
|
||||
$sql="SELECT name, label, type, param FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'facture_fourn' AND entity IN (0, ".$conf->entity.")";
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql) // This can fail when class is used on old database (during migration for example)
|
||||
{
|
||||
@ -357,7 +357,7 @@ class modFournisseur extends DolibarrModules
|
||||
}
|
||||
// End add extra fields
|
||||
// Add extra fields line
|
||||
$sql="SELECT name, label, type, param FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'facture_fourn_det'";
|
||||
$sql="SELECT name, label, type, param FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'facture_fourn_det' AND entity IN (0, ".$conf->entity.")";
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql) // This can fail when class is used on old database (during migration for example)
|
||||
{
|
||||
@ -440,7 +440,7 @@ class modFournisseur extends DolibarrModules
|
||||
'p.datep'=>'payment','p.num_paiement'=>'payment','project.rowid'=>'project','project.ref'=>'project','project.title'=>'project');
|
||||
$this->export_dependencies_array[$r]=array('payment'=>'p.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them
|
||||
// Add extra fields object
|
||||
$sql="SELECT name, label, type, param FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'facture_fourn'";
|
||||
$sql="SELECT name, label, type, param FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'facture_fourn' AND entity IN (0, ".$conf->entity.")";
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql) // This can fail when class is used on old database (during migration for example)
|
||||
{
|
||||
@ -527,7 +527,7 @@ class modFournisseur extends DolibarrModules
|
||||
);
|
||||
$this->export_dependencies_array[$r]=array('order_line'=>'fd.rowid','product'=>'fd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them
|
||||
// Add extra fields object
|
||||
$sql="SELECT name, label, type, param FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'commande_fournisseur'";
|
||||
$sql="SELECT name, label, type, param FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'commande_fournisseur' AND entity IN (0, ".$conf->entity.")";
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql) // This can fail when class is used on old database (during migration for example)
|
||||
{
|
||||
@ -565,7 +565,7 @@ class modFournisseur extends DolibarrModules
|
||||
}
|
||||
// End add extra fields object
|
||||
// Add extra fields line
|
||||
$sql="SELECT name, label, type, param FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'commande_fournisseurdet'";
|
||||
$sql="SELECT name, label, type, param FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'commande_fournisseurdet' AND entity IN (0, ".$conf->entity.")";
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql) // This can fail when class is used on old database (during migration for example)
|
||||
{
|
||||
|
||||
@ -449,7 +449,7 @@ class modSociete extends DolibarrModules
|
||||
's.multicurrency_code' => 'MulticurrencyCurrency'
|
||||
);
|
||||
// Add extra fields
|
||||
$sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'societe' AND entity = ".$conf->entity;
|
||||
$sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'societe' AND entity IN (0, ".$conf->entity.")";
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) // This can fail when class is used on old database (during migration for example)
|
||||
{
|
||||
@ -597,7 +597,7 @@ class modSociete extends DolibarrModules
|
||||
's.note_public' => "NotePublic"
|
||||
);
|
||||
// Add extra fields
|
||||
$sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'socpeople' AND entity = ".$conf->entity;
|
||||
$sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'socpeople' AND entity IN (0, ".$conf->entity.")";
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) // This can fail when class is used on an old database (during a migration for example)
|
||||
{
|
||||
|
||||
@ -233,7 +233,7 @@ class modUser extends DolibarrModules
|
||||
'u.fk_socpeople'=>"IdContact",'u.fk_soc'=>"IdCompany",'u.fk_member'=>"MemberId"
|
||||
);
|
||||
$this->export_TypeFields_array[$r]=array(
|
||||
'u.login'=>"Text",'u.lastname'=>"Text",'u.firstname'=>"Text",'u.employee'=>'Boolean','u.job'=>'Text',
|
||||
'u.rowid'=>'Numeric', 'u.login'=>"Text",'u.lastname'=>"Text",'u.firstname'=>"Text",'u.employee'=>'Boolean','u.job'=>'Text',
|
||||
'u.accountancy_code'=>'Text',
|
||||
'u.address'=>"Text",'u.zip'=>"Text",'u.town'=>"Text",
|
||||
'u.office_phone'=>'Text','u.user_mobile'=>'Text','u.office_fax'=>'Text',
|
||||
|
||||
@ -29,6 +29,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/supplier_invoice/modules_facturefo
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
|
||||
|
||||
|
||||
|
||||
@ -135,7 +135,13 @@ else
|
||||
echo $form->textwithtooltip($text, dol_htmlentitiesbr($line->description), 3, '', '', $i, 0, (!empty($line->fk_parent_line) ?img_picto('', 'rightarrow') : ''));
|
||||
} else {
|
||||
if (!empty($line->fk_parent_line)) echo img_picto('', 'rightarrow');
|
||||
echo $text.' '.dol_htmlentitiesbr($line->description);
|
||||
if (preg_match('/^\(DEPOSIT\)/', $line->description)) {
|
||||
$newdesc = preg_replace('/^\(DEPOSIT\)/', $langs->trans("Deposit"), $line->description);
|
||||
echo $text.' '.dol_htmlentitiesbr($newdesc);
|
||||
}
|
||||
else {
|
||||
echo $text.' '.dol_htmlentitiesbr($line->description);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -52,10 +52,10 @@ class Export
|
||||
public $array_export_help=array(); // array with tooltip help for fields
|
||||
|
||||
// To store export modules
|
||||
public $hexa;
|
||||
public $hexafiltervalue;
|
||||
public $hexa; // List of fields in the export profile
|
||||
public $hexafiltervalue; // List of search criteria in the export profile
|
||||
public $datatoexport;
|
||||
public $model_name;
|
||||
public $model_name; // Name of export profile
|
||||
|
||||
public $sqlusedforexport;
|
||||
|
||||
|
||||
@ -700,9 +700,10 @@ class CommandeFournisseur extends CommonOrder
|
||||
* @param string $option On what the link points
|
||||
* @param int $notooltip 1=Disable tooltip
|
||||
* @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
|
||||
* @param int $addlinktonotes Add link to show notes
|
||||
* @return string Chain with URL
|
||||
*/
|
||||
public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $save_lastsearch_value = -1)
|
||||
public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $save_lastsearch_value = -1, $addlinktonotes = 0)
|
||||
{
|
||||
global $langs, $conf;
|
||||
|
||||
@ -751,6 +752,22 @@ class CommandeFournisseur extends CommonOrder
|
||||
if ($withpicto != 2) $result .= $this->ref;
|
||||
$result .= $linkend;
|
||||
|
||||
if ($addlinktonotes)
|
||||
{
|
||||
$txttoshow = ($user->socid > 0 ? $this->note_public : $this->note_private);
|
||||
if ($txttoshow)
|
||||
{
|
||||
$notetoshow = $langs->trans("ViewPrivateNote").':<br>'.dol_string_nohtmltag($txttoshow, 1);
|
||||
$result .= ' <span class="note inline-block">';
|
||||
$result .= '<a href="'.DOL_URL_ROOT.'/fourn/commande/note.php?id='.$this->id.'" class="classfortooltip" title="'.dol_escape_htmltag($notetoshow).'">';
|
||||
$result .= img_picto('', 'note');
|
||||
$result .= '</a>';
|
||||
//$result.=img_picto($langs->trans("ViewNote"),'object_generic');
|
||||
//$result.='</a>';
|
||||
$result .= '</span>';
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@ -2248,9 +2248,10 @@ class FactureFournisseur extends CommonInvoice
|
||||
* @param string $moretitle Add more text to title tooltip
|
||||
* @param int $notooltip 1=Disable tooltip
|
||||
* @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
|
||||
* @param int $addlinktonotes Add link to show notes
|
||||
* @return string String with URL
|
||||
*/
|
||||
public function getNomUrl($withpicto = 0, $option = '', $max = 0, $short = 0, $moretitle = '', $notooltip = 0, $save_lastsearch_value = -1)
|
||||
public function getNomUrl($withpicto = 0, $option = '', $max = 0, $short = 0, $moretitle = '', $notooltip = 0, $save_lastsearch_value = -1, $addlinktonotes = 0)
|
||||
{
|
||||
global $langs, $conf;
|
||||
|
||||
@ -2318,6 +2319,22 @@ class FactureFournisseur extends CommonInvoice
|
||||
if ($withpicto != 2) $result.= ($max?dol_trunc($ref, $max):$ref);
|
||||
$result .= $linkend;
|
||||
|
||||
if ($addlinktonotes)
|
||||
{
|
||||
$txttoshow = ($user->socid > 0 ? $this->note_public : $this->note_private);
|
||||
if ($txttoshow)
|
||||
{
|
||||
$notetoshow = $langs->trans("ViewPrivateNote").':<br>'.dol_string_nohtmltag($txttoshow, 1);
|
||||
$result .= ' <span class="note inline-block">';
|
||||
$result .= '<a href="'.DOL_URL_ROOT.'/fourn/facture/note.php?id='.$this->id.'" class="classfortooltip" title="'.dol_escape_htmltag($notetoshow).'">';
|
||||
$result .= img_picto('', 'note');
|
||||
$result .= '</a>';
|
||||
//$result.=img_picto($langs->trans("ViewNote"),'object_generic');
|
||||
//$result.='</a>';
|
||||
$result .= '</span>';
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@ -486,6 +486,7 @@ $sql .= " typent.code as typent_code,";
|
||||
$sql .= " state.code_departement as state_code, state.nom as state_name,";
|
||||
$sql .= " cf.rowid, cf.ref, cf.ref_supplier, cf.fk_statut, cf.billed, cf.total_ht, cf.tva as total_tva, cf.total_ttc, cf.fk_user_author, cf.date_commande as date_commande, cf.date_livraison as date_delivery,";
|
||||
$sql .= ' cf.date_creation as date_creation, cf.tms as date_update,';
|
||||
$sql .= ' cf.note_public, cf.note_private,';
|
||||
$sql .= " p.rowid as project_id, p.ref as project_ref, p.title as project_title,";
|
||||
$sql .= " u.firstname, u.lastname, u.photo, u.login, u.email as user_email";
|
||||
// Add fields from extrafields
|
||||
@ -936,6 +937,8 @@ if ($resql)
|
||||
$objectstatic->total_tva = $obj->total_tva;
|
||||
$objectstatic->total_ttc = $obj->total_ttc;
|
||||
$objectstatic->date_delivery = $db->jdate($obj->date_delivery);
|
||||
$objectstatic->note_public = $obj->note_public;
|
||||
$objectstatic->note_private = $obj->note_private;
|
||||
$objectstatic->statut = $obj->fk_statut;
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
@ -946,7 +949,7 @@ if ($resql)
|
||||
print '<td class="nowrap">';
|
||||
|
||||
// Picto + Ref
|
||||
print $objectstatic->getNomUrl(1);
|
||||
print $objectstatic->getNomUrl(1, '', 0, -1, 1);
|
||||
// Other picto tool
|
||||
$filename = dol_sanitizeFileName($obj->ref);
|
||||
$filedir = $conf->fournisseur->commande->dir_output.'/'.dol_sanitizeFileName($obj->ref);
|
||||
|
||||
@ -1845,7 +1845,7 @@ if ($action == 'create')
|
||||
if (($origin == 'propal') || ($origin == 'commande'))
|
||||
{
|
||||
print '<td class="nowrap" style="padding-left: 5px">';
|
||||
$arraylist = array('amount' => 'FixAmount','variable' => 'VarAmount');
|
||||
$arraylist = array('amount' => $langs->transnoentitiesnoconv('FixAmount', $langs->transnoentitiesnoconv('Deposit')), 'variable' => $langs->transnoentitiesnoconv('VarAmountOneLine', $langs->transnoentitiesnoconv('Deposit')));
|
||||
print $form->selectarray('typedeposit', $arraylist, GETPOST('typedeposit'), 0, 0, 0, '', 1);
|
||||
print '</td>';
|
||||
print '<td class="nowrap" style="padding-left: 5px">' . $langs->trans('Value') . ':<input type="text" id="valuedeposit" name="valuedeposit" size="3" value="' . GETPOST('valuedeposit', 'int') . '"/>';
|
||||
|
||||
@ -269,6 +269,7 @@ if ($search_all || $search_product_category > 0) $sql = 'SELECT DISTINCT';
|
||||
$sql .= " f.rowid as facid, f.ref, f.ref_supplier, f.type, f.datef, f.date_lim_reglement as datelimite, f.fk_mode_reglement,";
|
||||
$sql .= " f.total_ht, f.total_ttc, f.total_tva as total_vat, f.paye as paye, f.fk_statut as fk_statut, f.libelle as label, f.datec as date_creation, f.tms as date_update,";
|
||||
$sql .= " f.localtax1 as total_localtax1, f.localtax2 as total_localtax2,";
|
||||
$sql .= " f.note_public, f.note_private,";
|
||||
$sql .= " s.rowid as socid, s.nom as name, s.email, s.town, s.zip, s.fk_pays, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta as code_compta_client, s.code_compta_fournisseur,";
|
||||
$sql .= " typent.code as typent_code,";
|
||||
$sql .= " state.code_departement as state_code, state.nom as state_name,";
|
||||
@ -371,6 +372,7 @@ if (!$search_all)
|
||||
$sql .= " GROUP BY f.rowid, f.ref, f.ref_supplier, f.type, f.datef, f.date_lim_reglement, f.fk_mode_reglement,";
|
||||
$sql .= " f.total_ht, f.total_ttc, f.total_tva, f.paye, f.fk_statut, f.libelle, f.datec, f.tms,";
|
||||
$sql .= " f.localtax1, f.localtax2,";
|
||||
$sql .= " f.note_public, f.note_private,";
|
||||
$sql .= ' s.rowid, s.nom, s.email, s.town, s.zip, s.fk_pays, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur,';
|
||||
$sql .= " typent.code,";
|
||||
$sql .= " state.code_departement, state.nom,";
|
||||
@ -827,7 +829,8 @@ if ($resql)
|
||||
$facturestatic->ref_supplier = $obj->ref_supplier;
|
||||
$facturestatic->date_echeance = $db->jdate($obj->datelimite);
|
||||
$facturestatic->statut = $obj->fk_statut;
|
||||
|
||||
$facturestatic->note_public = $obj->note_public;
|
||||
$facturestatic->note_private = $obj->note_private;
|
||||
|
||||
$thirdparty->id = $obj->socid;
|
||||
$thirdparty->name = $obj->name;
|
||||
@ -861,13 +864,8 @@ if ($resql)
|
||||
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
|
||||
// Picto + Ref
|
||||
print '<td class="nobordernopadding nowrap">';
|
||||
print $facturestatic->getNomUrl(1);
|
||||
print '</td>';
|
||||
// Warning
|
||||
//print '<td style="min-width: 20px" class="nobordernopadding nowrap">';
|
||||
//print '</td>';
|
||||
// Other picto tool
|
||||
print '<td width="16" class="right nobordernopadding hideonsmartphone">';
|
||||
print $facturestatic->getNomUrl(1, '', 0, 0, '', 0, -1, 1);
|
||||
|
||||
$filename = dol_sanitizeFileName($obj->ref);
|
||||
$filedir = $conf->fournisseur->facture->dir_output.'/'.get_exdir($obj->facid, 2, 0, 0, $facturestatic, 'invoice_supplier').dol_sanitizeFileName($obj->ref);
|
||||
$subdir = get_exdir($obj->facid, 2, 0, 0, $facturestatic, 'invoice_supplier').dol_sanitizeFileName($obj->ref);
|
||||
|
||||
@ -138,7 +138,7 @@ if ($object->id > 0)
|
||||
print '<div class="fichecenter">';
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
|
||||
print '<table class="border centpercent">';
|
||||
print '<table class="border centpercent tableforfield">';
|
||||
|
||||
// Type
|
||||
print '<tr><td class="titlefield">'.$langs->trans('Type').'</td><td>';
|
||||
|
||||
@ -606,7 +606,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
$multicurrency_remaintopay = price2num($invoice->multicurrency_total_ttc - $multicurrency_payment - $multicurrency_creditnotes - $multicurrency_deposits, 'MT');
|
||||
}
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<tr class="oddeven'.(($invoice->id == $facid) ? ' highlight' : '').'">';
|
||||
|
||||
// Ref
|
||||
print '<td class="nowraponall">';
|
||||
@ -619,7 +619,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
// Date
|
||||
if ($objp->df > 0)
|
||||
{
|
||||
print '<td class="center">';
|
||||
print '<td class="center nowraponall">';
|
||||
print dol_print_date($db->jdate($objp->df), 'day').'</td>';
|
||||
}
|
||||
else
|
||||
@ -630,7 +630,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
// Date Max Payment
|
||||
if ($objp->dlr > 0)
|
||||
{
|
||||
print '<td class="center">';
|
||||
print '<td class="center nowraponall">';
|
||||
print dol_print_date($db->jdate($objp->dlr), 'day');
|
||||
|
||||
if ($invoice->hasDelay())
|
||||
|
||||
@ -991,7 +991,9 @@ if ((empty($id) && empty($ref)) || $action == 'add' || $action == 'request' || $
|
||||
{
|
||||
$nb_type = $object->getCPforUser($user->id, $val['rowid']);
|
||||
$nb_holiday += $nb_type;
|
||||
$out .= ' - '.$val['label'].': <strong>'.($nb_type ?price2num($nb_type) : 0).'</strong><br>';
|
||||
|
||||
$out .= ' - ' . ($langs->trans($val['code']) != $val['code'] ? $langs->trans($val['code']) : $val['label']) .': <strong>'.($nb_type ?price2num($nb_type) : 0).'</strong><br>';
|
||||
//$out .= ' - '.$val['label'].': <strong>'.($nb_type ?price2num($nb_type) : 0).'</strong><br>';
|
||||
}
|
||||
print $langs->trans('SoldeCPUser', round($nb_holiday, 5)).'<br>';
|
||||
print $out;
|
||||
@ -1278,9 +1280,17 @@ else
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
// Nb of days
|
||||
print '<tr>';
|
||||
print '<td>'.$langs->trans('NbUseDaysCP').'</td>';
|
||||
print '<td class="nowrap">';
|
||||
$htmlhelp = $langs->trans('NbUseDaysCPHelp');
|
||||
$includesaturday = (isset($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SATURDAY) ? $conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SATURDAY : 1);
|
||||
$includesunday = (isset($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SUNDAY) ? $conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SUNDAY : 1);
|
||||
if ($includesaturday) $htmlhelp.='<br>'.$langs->trans("DayIsANonWorkingDay", $langs->trans("Saturday"));
|
||||
if ($includesunday) $htmlhelp.='<br>'.$langs->trans("DayIsANonWorkingDay", $langs->trans("Sunday"));
|
||||
print $form->textwithpicto($langs->trans('NbUseDaysCP'), $htmlhelp);
|
||||
print '</td>';
|
||||
print '<td>'.num_open_day($object->date_debut_gmt, $object->date_fin_gmt, 0, 1, $object->halfday).'</td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
@ -564,3 +564,5 @@ ALTER TABLE llx_mrp_production ADD INDEX idx_mrp_production_fk_mo (fk_mo);
|
||||
ALTER TABLE llx_emailcollector_emailcollector ADD UNIQUE INDEX uk_emailcollector_emailcollector_ref(ref, entity);
|
||||
|
||||
ALTER TABLE llx_website ADD COLUMN use_manifest integer;
|
||||
|
||||
ALTER TABLE llx_facture_rec MODIFY COLUMN fk_cond_reglement integer NOT NULL DEFAULT 1;
|
||||
|
||||
@ -48,7 +48,7 @@ create table llx_facture_rec
|
||||
|
||||
fk_projet integer, -- projet auquel est associe la facture
|
||||
|
||||
fk_cond_reglement integer DEFAULT 0, -- condition de reglement
|
||||
fk_cond_reglement integer DEFAULT 1 NOT NULL, -- condition de reglement
|
||||
fk_mode_reglement integer DEFAULT 0, -- mode de reglement (Virement, Prelevement)
|
||||
date_lim_reglement date, -- date limite de reglement
|
||||
fk_account integer, -- bank account id
|
||||
|
||||
@ -1156,7 +1156,7 @@ NoEventOrNoAuditSetup=No security event has been logged. This is normal if Audit
|
||||
NoEventFoundWithCriteria=No security event has been found for this search criteria.
|
||||
SeeLocalSendMailSetup=See your local sendmail setup
|
||||
BackupDesc=A <b>complete</b> backup of a Dolibarr installation requires two steps.
|
||||
BackupDesc2=Backup the contents of the "documents" directory (<b>%s</b>) containing all uploaded and generated files. This will also include all the dump files generated in Step 1.
|
||||
BackupDesc2=Backup the contents of the "documents" directory (<b>%s</b>) containing all uploaded and generated files. This will also include all the dump files generated in Step 1. This operation may last several minutes.
|
||||
BackupDesc3=Backup the structure and contents of your database (<b>%s</b>) into a dump file. For this, you can use the following assistant.
|
||||
BackupDescX=The archived directory should be stored in a secure place.
|
||||
BackupDescY=The generated dump file should be stored in a secure place.
|
||||
@ -1167,6 +1167,7 @@ RestoreDesc3=Restore the database structure and data from a backup dump file int
|
||||
RestoreMySQL=MySQL import
|
||||
ForcedToByAModule= This rule is forced to <b>%s</b> by an activated module
|
||||
PreviousDumpFiles=Existing backup files
|
||||
PreviousArchiveFiles=Existing archive files
|
||||
WeekStartOnDay=First day of the week
|
||||
RunningUpdateProcessMayBeRequired=Running the upgrade process seems to be required (Program version %s differs from Database version %s)
|
||||
YouMustRunCommandFromCommandLineAfterLoginToUser=You must run this command from command line after login to a shell with user <b>%s</b> or you must add -W option at end of command line to provide <b>%s</b> password.
|
||||
@ -1765,7 +1766,8 @@ ListOfFixedNotifications=List of automatic fixed notifications
|
||||
GoOntoUserCardToAddMore=Go to the tab "Notifications" of a user to add or remove notifications for users
|
||||
GoOntoContactCardToAddMore=Go to the tab "Notifications" of a third party to add or remove notifications for contacts/addresses
|
||||
Threshold=Threshold
|
||||
BackupDumpWizard=Wizard to build the backup file
|
||||
BackupDumpWizard=Wizard to build the database dump file
|
||||
BackupZipWizard=Wizard to build the archive of documents directory
|
||||
SomethingMakeInstallFromWebNotPossible=Installation of external module is not possible from the web interface for the following reason:
|
||||
SomethingMakeInstallFromWebNotPossible2=For this reason, process to upgrade described here is a manual process only a privileged user may perform.
|
||||
InstallModuleFromWebHasBeenDisabledByFile=Install of external module from application has been disabled by your administrator. You must ask him to remove the file <strong>%s</strong> to allow this feature.
|
||||
|
||||
@ -416,7 +416,7 @@ PaymentConditionShort14D=14 days
|
||||
PaymentCondition14D=14 days
|
||||
PaymentConditionShort14DENDMONTH=14 days of month-end
|
||||
PaymentCondition14DENDMONTH=Within 14 days following the end of the month
|
||||
FixAmount=Fixed amount
|
||||
FixAmount=Fixed amount - 1 line with label '%s'
|
||||
VarAmount=Variable amount (%% tot.)
|
||||
VarAmountOneLine=Variable amount (%% tot.) - 1 line with label '%s'
|
||||
# PaymentType
|
||||
|
||||
@ -39,8 +39,10 @@ TypeOfLeaveId=Type of leave ID
|
||||
TypeOfLeaveCode=Type of leave code
|
||||
TypeOfLeaveLabel=Type of leave label
|
||||
NbUseDaysCP=Number of days of vacation consumed
|
||||
NbUseDaysCPHelp=The calculation takes into account the non working days and the holidays defined in the dictionary.
|
||||
NbUseDaysCPShort=Days consumed
|
||||
NbUseDaysCPShortInMonth=Days consumed in month
|
||||
DayIsANonWorkingDay=%s is a non working day
|
||||
DateStartInMonth=Start date in month
|
||||
DateEndInMonth=End date in month
|
||||
EditCP=Edit
|
||||
|
||||
@ -135,3 +135,5 @@ CSSClass=CSS Class
|
||||
NotEditable=Not editable
|
||||
ForeignKey=Foreign key
|
||||
TypeOfFieldsHelp=Type of fields:<br>varchar(99), double(24,8), real, text, html, datetime, timestamp, integer, integer:ClassName:relativepath/to/classfile.class.php[:1[:filter]] ('1' means we add a + button after the combo to create the record, 'filter' can be 'status=1 AND fk_user = __USER_ID AND entity IN (__SHARED_ENTITIES__)' for example)
|
||||
AsciiToHtmlConverter=Ascii to HTML converter
|
||||
AsciiToPdfConverter=Ascii to PDF converter
|
||||
@ -249,7 +249,7 @@ TimeSpentForInvoice=Time spent
|
||||
OneLinePerUser=One line per user
|
||||
ServiceToUseOnLines=Service to use on lines
|
||||
InvoiceGeneratedFromTimeSpent=Invoice %s has been generated from time spent on project
|
||||
ProjectBillTimeDescription=Check if you enter timesheet on tasks of project AND you plan to generate invoice(s) from the timesheet to bill the customer of the project (do not check if you plan to create invoice that is not based on entered timesheets).
|
||||
ProjectBillTimeDescription=Check if you enter timesheet on tasks of project AND you plan to generate invoice(s) from the timesheet to bill the customer of the project (do not check if you plan to create invoice that is not based on entered timesheets). Note: To generate invoice, go on tab 'Time spent' of the project and select lines to include.
|
||||
ProjectFollowOpportunity=Follow opportunity
|
||||
ProjectFollowTasks=Follow tasks
|
||||
UsageOpportunity=Usage: Opportunity
|
||||
|
||||
@ -716,9 +716,9 @@ if ($id > 0)
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/loan/payment/card.php?id='.$objp->rowid.'">'.img_object($langs->trans("Payment"), "payment").' '.$objp->rowid.'</a></td>';
|
||||
print '<td>'.dol_print_date($db->jdate($objp->dp), 'day')."</td>\n";
|
||||
print "<td>".$objp->paiement_type.' '.$objp->num_payment."</td>\n";
|
||||
print '<td class="right">'.price($objp->amount_insurance, 0, $outputlangs, 1, -1, -1, $conf->currency)."</td>\n";
|
||||
print '<td class="right">'.price($objp->amount_interest, 0, $outputlangs, 1, -1, -1, $conf->currency)."</td>\n";
|
||||
print '<td class="right">'.price($objp->amount_capital, 0, $outputlangs, 1, -1, -1, $conf->currency)."</td>\n";
|
||||
print '<td class="nowrap right">'.price($objp->amount_insurance, 0, $outputlangs, 1, -1, -1, $conf->currency)."</td>\n";
|
||||
print '<td class="nowrap right">'.price($objp->amount_interest, 0, $outputlangs, 1, -1, -1, $conf->currency)."</td>\n";
|
||||
print '<td class="nowrap right">'.price($objp->amount_capital, 0, $outputlangs, 1, -1, -1, $conf->currency)."</td>\n";
|
||||
print "</tr>";
|
||||
$total_capital += $objp->amount_capital;
|
||||
$i++;
|
||||
@ -728,14 +728,14 @@ if ($id > 0)
|
||||
|
||||
if ($object->paid == 0)
|
||||
{
|
||||
print '<tr><td colspan="5" class="right">'.$langs->trans("AlreadyPaid").' :</td><td class="right">'.price($totalpaid, 0, $langs, 0, 0, -1, $conf->currency).'</td></tr>';
|
||||
print '<tr><td colspan="5" class="right">'.$langs->trans("AmountExpected").' :</td><td class="right">'.price($object->capital, 0, $outputlangs, 1, -1, -1, $conf->currency).'</td></tr>';
|
||||
print '<tr><td colspan="5" class="right">'.$langs->trans("AlreadyPaid").' :</td><td class="nowrap right">'.price($totalpaid, 0, $langs, 0, -1, -1, $conf->currency).'</td></tr>';
|
||||
print '<tr><td colspan="5" class="right">'.$langs->trans("AmountExpected").' :</td><td class="nowrap right">'.price($object->capital, 0, $outputlangs, 1, -1, -1, $conf->currency).'</td></tr>';
|
||||
|
||||
$staytopay = $object->capital - $totalpaid;
|
||||
|
||||
print '<tr><td colspan="5" class="right">'.$langs->trans("RemainderToPay").' :</td>';
|
||||
print '<td class="right'.($staytopay ? ' amountremaintopay' : ' amountpaymentcomplete').'">';
|
||||
print price($staytopay, 0, $langs, 0, 0, -1, $conf->currency);
|
||||
print '<td class="nowrap right'.($staytopay ? ' amountremaintopay' : ' amountpaymentcomplete').'">';
|
||||
print price($staytopay, 0, $langs, 0, -1, -1, $conf->currency);
|
||||
print '</td></tr>';
|
||||
}
|
||||
print "</table>";
|
||||
|
||||
@ -124,14 +124,14 @@ if (is_numeric($nbtotalofrecords) && ($limit > $nbtotalofrecords || empty($limit
|
||||
else
|
||||
{
|
||||
if ($limit) $sql .= $db->plimit($limit + 1, $offset);
|
||||
|
||||
|
||||
$resql = $db->query($sql);
|
||||
if (!$resql)
|
||||
{
|
||||
dol_print_error($db);
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
$num = $db->num_rows($resql);
|
||||
}
|
||||
|
||||
@ -185,10 +185,10 @@ if ($resql)
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre"></td>';
|
||||
print '<td class="right liste_titre">';
|
||||
print '<input type="image" class="liste_titre" src="'.img_picto($langs->trans("Search"), 'search.png', '', '', 1).'" name="button_search" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||
print '<input type="image" class="liste_titre" src="'.img_picto($langs->trans("Search"), 'searchclear.png', '', '', 1).'" name="button_removefilter" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">';
|
||||
print '<td class="liste_titre maxwidthsearch">';
|
||||
$searchpicto=$form->showFilterAndCheckAddButtons(0);
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Fields title label
|
||||
// --------------------------------------------------------------------
|
||||
@ -199,7 +199,9 @@ if ($resql)
|
||||
print_liste_field_titre("DateStart", $_SERVER["PHP_SELF"], "l.datestart", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
print_liste_field_titre("DateEnd", $_SERVER["PHP_SELF"], "l.dateend", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "l.paid", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre('');
|
||||
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'maxwidthsearch ');
|
||||
print "</tr>\n";
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
// Loop on record
|
||||
@ -210,7 +212,7 @@ if ($resql)
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
if (empty($obj)) break; // Should not happen
|
||||
|
||||
|
||||
$loan_static->id = $obj->rowid;
|
||||
$loan_static->ref = $obj->rowid;
|
||||
$loan_static->label = $obj->label;
|
||||
@ -252,12 +254,12 @@ if ($resql)
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
|
||||
|
||||
print '</table>'."\n";
|
||||
print '</div>'."\n";
|
||||
|
||||
|
||||
print '</form>'."\n";
|
||||
|
||||
|
||||
$db->free($resql);
|
||||
}
|
||||
else
|
||||
|
||||
@ -2571,6 +2571,10 @@ if (!function_exists("llxFooter"))
|
||||
print "\n".'<!-- Includes JS for Ping of Dolibarr MAIN_FIRST_PING_OK_DATE = '.$conf->global->MAIN_FIRST_PING_OK_DATE.' MAIN_FIRST_PING_OK_ID = '.$conf->global->MAIN_FIRST_PING_OK_ID.' -->'."\n";
|
||||
print "\n<!-- JS CODE TO ENABLE the anonymous Ping -->\n";
|
||||
$url_for_ping = (empty($conf->global->MAIN_URL_FOR_PING) ? "https://ping.dolibarr.org/" : $conf->global->MAIN_URL_FOR_PING);
|
||||
// Try to guess the distrib used
|
||||
$distrib = 'standard';
|
||||
if ($_SERVER["SERVER_ADMIN"] == 'doliwamp@localhost') $distrib = 'doliwamp';
|
||||
if (! empty($dolibarr_distrib)) $distrib = $dolibarr_distrib;
|
||||
?>
|
||||
<script>
|
||||
jQuery(document).ready(function (tmp) {
|
||||
@ -2588,7 +2592,8 @@ if (!function_exists("llxFooter"))
|
||||
dbtype: "<?php echo dol_escape_js($db->type); ?>",
|
||||
country_code: "<?php echo dol_escape_js($mysoc->country_code); ?>",
|
||||
php_version: "<?php echo phpversion(); ?>",
|
||||
os_version: "<?php echo version_os('smr'); ?>"
|
||||
os_version: "<?php echo version_os('smr'); ?>",
|
||||
distrib: "<?php echo $distrib ? $distrib : 'unknown'; ?>"
|
||||
},
|
||||
success: function (data, status, xhr) { // success callback function (data contains body of response)
|
||||
console.log("Ping ok");
|
||||
|
||||
@ -1307,7 +1307,7 @@ if ($dirins && $action == 'generatepackage')
|
||||
if ($dirofmodule)
|
||||
{
|
||||
if (!dol_is_dir($dirofmodule)) dol_mkdir($dirofmodule);
|
||||
$result = dol_compress_dir($dir, $outputfilezip, 'zip');
|
||||
$result = dol_compress_dir($dir, $outputfilezip, 'zip', '', $modulelowercase);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -268,14 +268,6 @@ if ($id > 0 || ! empty($ref))
|
||||
print nl2br($object->description);
|
||||
print '</td></tr>';
|
||||
|
||||
// Bill time
|
||||
if (empty($conf->global->PROJECT_HIDE_TASKS) && ! empty($conf->global->PROJECT_BILL_TIME_SPENT))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("BillTime").'</td><td>';
|
||||
print yn($object->usage_bill_time);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Categories
|
||||
if ($conf->categorie->enabled) {
|
||||
print '<tr><td class="valignmiddle">'.$langs->trans("Categories").'</td><td>';
|
||||
|
||||
@ -244,14 +244,6 @@ print '<td class="titlefield tdtop">'.$langs->trans("Description").'</td><td>';
|
||||
print nl2br($object->description);
|
||||
print '</td></tr>';
|
||||
|
||||
// Bill time
|
||||
if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("BillTime").'</td><td>';
|
||||
print yn($object->usage_bill_time);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Categories
|
||||
if ($conf->categorie->enabled) {
|
||||
print '<tr><td class="valignmiddle">'.$langs->trans("Categories").'</td><td>';
|
||||
|
||||
@ -201,14 +201,6 @@ if (($id > 0 && is_numeric($id)) || !empty($ref))
|
||||
print nl2br($object->description);
|
||||
print '</td></tr>';
|
||||
|
||||
// Bill time
|
||||
if (empty($conf->global->PROJECT_HIDE_TASKS) && ! empty($conf->global->PROJECT_BILL_TIME_SPENT))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("BillTime").'</td><td>';
|
||||
print yn($object->usage_bill_time);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Categories
|
||||
if ($conf->categorie->enabled) {
|
||||
print '<tr><td class="valignmiddle">'.$langs->trans("Categories").'</td><td>';
|
||||
|
||||
@ -90,7 +90,7 @@ $hookmanager->initHooks(array('projecttaskscard', 'globalcard'));
|
||||
|
||||
$progress = GETPOST('progress', 'int');
|
||||
$label = GETPOST('label', 'alpha');
|
||||
$description = GETPOST('description');
|
||||
$description = GETPOST('description', 'none');
|
||||
$planned_workloadhour = (GETPOST('planned_workloadhour', 'int') ?GETPOST('planned_workloadhour', 'int') : 0);
|
||||
$planned_workloadmin = (GETPOST('planned_workloadmin', 'int') ?GETPOST('planned_workloadmin', 'int') : 0);
|
||||
$planned_workload = $planned_workloadhour * 3600 + $planned_workloadmin * 60;
|
||||
@ -445,9 +445,9 @@ if ($id > 0 || !empty($ref))
|
||||
|
||||
// Date start - end
|
||||
print '<tr><td>'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").'</td><td>';
|
||||
$start = dol_print_date($object->date_start, 'dayhour');
|
||||
$start = dol_print_date($object->date_start, 'day');
|
||||
print ($start ? $start : '?');
|
||||
$end = dol_print_date($object->date_end, 'dayhour');
|
||||
$end = dol_print_date($object->date_end, 'day');
|
||||
print ' - ';
|
||||
print ($end ? $end : '?');
|
||||
if ($object->hasDelay()) print img_warning("Late");
|
||||
@ -476,14 +476,6 @@ if ($id > 0 || !empty($ref))
|
||||
print nl2br($object->description);
|
||||
print '</td></tr>';
|
||||
|
||||
// Bill time
|
||||
if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("BillTime").'</td><td>';
|
||||
print yn($object->usage_bill_time);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Categories
|
||||
if ($conf->categorie->enabled) {
|
||||
print '<tr><td valign="middle">'.$langs->trans("Categories").'</td><td>';
|
||||
|
||||
@ -205,7 +205,7 @@ if ($object->id > 0)
|
||||
print '<div class="ficheaddleft">';
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
|
||||
print '<table class="border entpercent tableforfield">';
|
||||
print '<table class="border centpercent tableforfield">';
|
||||
|
||||
// Description
|
||||
print '<td class="titlefield tdtop">'.$langs->trans("Description").'</td><td>';
|
||||
|
||||
@ -509,7 +509,7 @@ if ($id > 0 || !empty($ref))
|
||||
print '<div class="fichehalfleft">';
|
||||
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
print '<table class="border centpercent">';
|
||||
print '<table class="border centpercent tableforfield">';
|
||||
|
||||
// Task parent
|
||||
print '<tr><td>'.$langs->trans("ChildOfTask").'</td><td>';
|
||||
@ -550,7 +550,7 @@ if ($id > 0 || !empty($ref))
|
||||
print '<div class="fichehalfright"><div class="ficheaddleft">';
|
||||
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
print '<table class="border centpercent">';
|
||||
print '<table class="border centpercent tableforfield">';
|
||||
|
||||
// Progress declared
|
||||
print '<tr><td class="titlefield">'.$langs->trans("ProgressDeclared").'</td><td colspan="3">';
|
||||
|
||||
@ -576,14 +576,6 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0)
|
||||
print nl2br($projectstatic->description);
|
||||
print '</td></tr>';
|
||||
|
||||
// Bill time
|
||||
if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("BillTime").'</td><td>';
|
||||
print yn($projectstatic->usage_bill_time);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Categories
|
||||
if ($conf->categorie->enabled) {
|
||||
print '<tr><td class="valignmiddle">'.$langs->trans("Categories").'</td><td>';
|
||||
|
||||
@ -2507,9 +2507,10 @@ class SupplierProposal extends CommonObject
|
||||
* @param string $get_params Parametres added to url
|
||||
* @param int $notooltip 1=Disable tooltip
|
||||
* @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
|
||||
* @param int $addlinktonotes Add link to show notes
|
||||
* @return string String with URL
|
||||
*/
|
||||
public function getNomUrl($withpicto = 0, $option = '', $get_params = '', $notooltip = 0, $save_lastsearch_value = -1)
|
||||
public function getNomUrl($withpicto = 0, $option = '', $get_params = '', $notooltip = 0, $save_lastsearch_value = -1, $addlinktonotes = 0)
|
||||
{
|
||||
global $langs, $conf, $user;
|
||||
|
||||
@ -2567,6 +2568,22 @@ class SupplierProposal extends CommonObject
|
||||
if ($withpicto != 2) $result.= $this->ref;
|
||||
$result .= $linkend;
|
||||
|
||||
if ($addlinktonotes)
|
||||
{
|
||||
$txttoshow = ($user->socid > 0 ? $this->note_public : $this->note_private);
|
||||
if ($txttoshow)
|
||||
{
|
||||
$notetoshow = $langs->trans("ViewPrivateNote").':<br>'.dol_string_nohtmltag($txttoshow, 1);
|
||||
$result .= ' <span class="note inline-block">';
|
||||
$result .= '<a href="'.DOL_URL_ROOT.'/supplier_proposal/note.php?id='.$this->id.'" class="classfortooltip" title="'.dol_escape_htmltag($notetoshow).'">';
|
||||
$result .= img_picto('', 'note');
|
||||
$result .= '</a>';
|
||||
//$result.=img_picto($langs->trans("ViewNote"),'object_generic');
|
||||
//$result.='</a>';
|
||||
$result .= '</span>';
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@ -628,6 +628,8 @@ if ($resql)
|
||||
|
||||
$objectstatic->id = $obj->rowid;
|
||||
$objectstatic->ref = $obj->ref;
|
||||
$objectstatic->note_public = $obj->note_public;
|
||||
$objectstatic->note_private = $obj->note_private;
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
@ -638,18 +640,11 @@ if ($resql)
|
||||
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
|
||||
// Picto + Ref
|
||||
print '<td class="nobordernopadding nowrap">';
|
||||
print $objectstatic->getNomUrl(1);
|
||||
print $objectstatic->getNomUrl(1, '', '', 0, -1, 1);
|
||||
print '</td>';
|
||||
// Warning
|
||||
$warnornote = '';
|
||||
//if ($obj->fk_statut == 1 && $db->jdate($obj->date_valid) < ($now - $conf->supplier_proposal->warning_delay)) $warnornote .= img_warning($langs->trans("Late"));
|
||||
if (!empty($obj->note_private))
|
||||
{
|
||||
$warnornote .= ($warnornote ? ' ' : '');
|
||||
$warnornote .= '<span class="note">';
|
||||
$warnornote .= '<a href="note.php?id='.$obj->rowid.'">'.img_picto($langs->trans("ViewPrivateNote"), 'object_generic').'</a>';
|
||||
$warnornote .= '</span>';
|
||||
}
|
||||
if ($warnornote)
|
||||
{
|
||||
print '<td style="min-width: 20px" class="nobordernopadding nowrap">';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user