Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
2c40e4be94
@ -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>';
|
||||
@ -534,6 +534,8 @@ print '</div>';
|
||||
print '</form>';
|
||||
print '</fieldset>';
|
||||
|
||||
|
||||
|
||||
print "<br>\n";
|
||||
print "<!-- Dump of a server -->\n";
|
||||
|
||||
@ -548,7 +550,7 @@ 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';
|
||||
|
||||
@ -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">';
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -5910,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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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';
|
||||
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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>';
|
||||
|
||||
@ -1278,9 +1278,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>';
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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