diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php
index aa513e07794..02f52de7388 100644
--- a/htdocs/comm/action/card.php
+++ b/htdocs/comm/action/card.php
@@ -1237,7 +1237,7 @@ if ($action == 'create') {
print '
| '.$langs->trans("Project").' | ';
print img_picto('', 'project', 'class="pictofixedwidth"');
- print $formproject->select_projects((empty($societe->id) ? '' : $societe->id), $projectid, 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 1, 0, 'maxwidth500 widthcentpercentminusxx');
+ print $formproject->select_projects(($object->socid > 0 ? $object->socid : -1), $projectid, 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 1, 0, 'maxwidth500 widthcentpercentminusxx');
print ' ';
print '';
diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php
index 54e64c73f99..b40092abfaa 100644
--- a/htdocs/comm/propal/card.php
+++ b/htdocs/comm/propal/card.php
@@ -838,7 +838,7 @@ if (empty($reshook)) {
$prod_entry_mode = GETPOST('prod_entry_mode');
if ($prod_entry_mode == 'free') {
$idprod = 0;
- $tva_tx = (GETPOST('tva_tx') ? price2num(GETPOST('tva_tx')) : 0);
+ $tva_tx = (GETPOST('tva_tx') ? price2num(preg_replace('/\s*\(.*\)/', '', GETPOST('tva_tx'))) : 0);
} else {
$idprod = GETPOST('idprod', 'int');
$tva_tx = '';
diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php
index b6e16a22a9e..4eca459300a 100644
--- a/htdocs/commande/card.php
+++ b/htdocs/commande/card.php
@@ -1632,8 +1632,8 @@ if ($action == 'create' && $usercancreate) {
if ($socid > 0) {
// Contacts (ask contact only if thirdparty already defined).
print " |
| ".$langs->trans("DefaultContact").' | ';
- print img_picto('', 'contact');
- print $form->selectcontacts($soc->id, $contactid, 'contactid', 1, $srccontactslist, '', 1);
+ print img_picto('', 'contact', 'class="pictofixedwidth"');
+ print $form->selectcontacts($soc->id, $contactid, 'contactid', 1, $srccontactslist, '', 1, 'maxwidth200 widthcentpercentminusx');
print ' |
';
// Ligne info remises tiers
@@ -1670,8 +1670,8 @@ if ($action == 'create' && $usercancreate) {
// Terms of the settlement
print '| '.$langs->trans('PaymentConditionsShort').' | ';
- print img_picto('', 'paiment');
- $form->select_conditions_paiements($cond_reglement_id, 'cond_reglement_id', - 1, 1);
+ print img_picto('', 'payment', 'class="pictofixedwidth"');
+ $form->select_conditions_paiements($cond_reglement_id, 'cond_reglement_id', - 1, 1, 0, 'maxwidth200 widthcentpercentminusx');
print ' |
';
// Payment mode
@@ -1690,7 +1690,7 @@ if ($action == 'create' && $usercancreate) {
// Shipping Method
if (!empty($conf->expedition->enabled)) {
print '| '.$langs->trans('SendingMethod').' | ';
- print img_picto('', 'object_dollyrevert', 'class="pictofixedwidth"');
+ print img_picto('', 'object_dolly', 'class="pictofixedwidth"');
print $form->selectShippingMethod($shipping_method_id, 'shipping_method_id', '', 1, '', 0, 'maxwidth200 widthcentpercentminusx');
print ' |
';
}
diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php
index f51c8026672..728e0f62ede 100644
--- a/htdocs/commande/class/commande.class.php
+++ b/htdocs/commande/class/commande.class.php
@@ -347,7 +347,7 @@ class Commande extends CommonOrder
'pos_source' =>array('type'=>'varchar(32)', 'label'=>'POSTerminal', 'enabled'=>1, 'visible'=>-1, 'position'=>280),
'fk_user_author' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserAuthor', 'enabled'=>1, 'visible'=>-1, 'position'=>300),
'fk_user_modif' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'position'=>302),
- 'date_creation' =>array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-1, 'position'=>304),
+ 'date_creation' =>array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-2, 'position'=>304),
'tms' =>array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>306),
'import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'position'=>400),
'fk_statut' =>array('type'=>'smallint(6)', 'label'=>'Status', 'enabled'=>1, 'visible'=>-1, 'position'=>500),
diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php
index 047a66a78b9..63c2a1c687b 100644
--- a/htdocs/compta/facture/class/facture-rec.class.php
+++ b/htdocs/compta/facture/class/facture-rec.class.php
@@ -1310,6 +1310,11 @@ class FactureRec extends CommonInvoice
$facture->status = self::STATUS_DRAFT;
$facture->date = (empty($facturerec->date_when) ? $now : $facturerec->date_when); // We could also use dol_now here but we prefer date_when so invoice has real date when we would like even if we generate later.
$facture->socid = $facturerec->socid;
+ if (!empty($facturerec->fk_multicurrency)) {
+ $facture->fk_multicurrency = $facturerec->fk_multicurrency;
+ $facture->multicurrency_code = $facturerec->multicurrency_code;
+ $facture->multicurrency_tx = $facturerec->multicurrency_tx;
+ }
$invoiceidgenerated = $facture->create($user);
if ($invoiceidgenerated <= 0) {
diff --git a/htdocs/core/ajax/onlineSign.php b/htdocs/core/ajax/onlineSign.php
index ce9ae57864d..994ba5c42f3 100644
--- a/htdocs/core/ajax/onlineSign.php
+++ b/htdocs/core/ajax/onlineSign.php
@@ -129,8 +129,12 @@ if ($action == "importSignature") {
$pdf->AddPage();
$pagecount = $pdf->setSourceFile($upload_dir.$ref.".pdf"); // original PDF
- $tppl = $pdf->importPage(1);
- $pdf->useTemplate($tppl);
+ for ($i=1;$i<($pagecount+1);$i++) {
+ if ($i>1) $pdf->AddPage();
+ $tppl=$pdf->importPage($i);
+ $pdf->useTemplate($tppl);
+ }
+
$pdf->Image($upload_dir.$filename, 129, 239.6, 60, 15); // FIXME Position will be wrong with non A4 format. Use a value from width and height of page minus relative offset.
$pdf->Close();
$pdf->Output($newpdffilename, "F");
diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php
index e98a25ddbee..6b3ced3e621 100644
--- a/htdocs/core/lib/company.lib.php
+++ b/htdocs/core/lib/company.lib.php
@@ -188,7 +188,7 @@ function societe_prepare_head(Societe $object)
// Related items
if ((!empty($conf->commande->enabled) || !empty($conf->propal->enabled) || !empty($conf->facture->enabled) || !empty($conf->ficheinter->enabled) || (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled))
- && empty($conf->global->THIRPARTIES_DISABLE_RELATED_OBJECT_TAB)) {
+ && empty($conf->global->THIRDPARTIES_DISABLE_RELATED_OBJECT_TAB)) {
$head[$h][0] = DOL_URL_ROOT.'/societe/consumption.php?socid='.$object->id;
$head[$h][1] = $langs->trans("Referers");
$head[$h][2] = 'consumption';
diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php
index ea8c6c2ce23..eff818fe01d 100644
--- a/htdocs/core/lib/pdf.lib.php
+++ b/htdocs/core/lib/pdf.lib.php
@@ -973,13 +973,15 @@ function pdf_bank(&$pdf, $outputlangs, $curx, $cury, $account, $onlynumber = 0,
* @param Societe $fromcompany Object company
* @param int $marge_basse Margin bottom we use for the autobreak
* @param int $marge_gauche Margin left (no more used)
- * @param int $page_hauteur Page height (no more used)
+ * @param int $page_hauteur Page height
* @param Object $object Object shown in PDF
* @param int $showdetails Show company adress details into footer (0=Nothing, 1=Show address, 2=Show managers, 3=Both)
* @param int $hidefreetext 1=Hide free text, 0=Show free text
+ * @param int $page_largeur Page width
+ * @param int $watermark Watermark text to print on page
* @return int Return height of bottom margin including footer text
*/
-function pdf_pagefoot(&$pdf, $outputlangs, $paramfreetext, $fromcompany, $marge_basse, $marge_gauche, $page_hauteur, $object, $showdetails = 0, $hidefreetext = 0)
+function pdf_pagefoot(&$pdf, $outputlangs, $paramfreetext, $fromcompany, $marge_basse, $marge_gauche, $page_hauteur, $object, $showdetails = 0, $hidefreetext = 0, $page_largeur = 0, $watermark = '')
{
global $conf, $user, $mysoc, $hookmanager;
@@ -1232,6 +1234,11 @@ function pdf_pagefoot(&$pdf, $outputlangs, $paramfreetext, $fromcompany, $marge_
$pdf->MultiCell(15, 2, $pdf->PageNo().'/'.$pdf->getAliasNbPages(), 0, 'R', 0);
}
+ // Show Draft Watermark
+ if (!empty($watermark)) {
+ pdf_watermark($pdf, $outputlangs, $page_hauteur, $page_largeur, 'mm', $watermark);
+ }
+
return $marginwithfooter;
}
diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php
index dcb59df7ebb..83c79da87f4 100644
--- a/htdocs/core/modules/DolibarrModules.class.php
+++ b/htdocs/core/modules/DolibarrModules.class.php
@@ -1430,6 +1430,9 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
if ($command) {
$sql .= " AND command = '".$this->db->escape($command)."'";
}
+ if ($parameters) {
+ $sql .= " AND params = '".$this->db->escape($parameters)."'";
+ }
$sql .= " AND entity = ".((int) $entity); // Must be exact entity
$now = dol_now();
diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
index db961962ba6..27d4fc9870e 100644
--- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
+++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
@@ -164,6 +164,7 @@ class pdf_einstein extends ModelePDFCommandes
$this->option_credit_note = 0; // Support credit notes
$this->option_freetext = 1; // Support add of a personalised text
$this->option_draft_watermark = 1; // Support add of a watermark on drafts
+ $this->watermark = '';
// Get source company
$this->emetteur = $mysoc;
@@ -236,6 +237,11 @@ class pdf_einstein extends ModelePDFCommandes
// Load translation files required by the page
$outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "orders", "deliveries"));
+ // Show Draft Watermark
+ if ($object->statut == $object::STATUS_DRAFT && (!empty($conf->global->COMMANDE_DRAFT_WATERMARK))) {
+ $this->watermark = $conf->global->COMMANDE_DRAFT_WATERMARK;
+ }
+
global $outputlangsbis;
$outputlangsbis = null;
if (!empty($conf->global->PDF_USE_ALSO_LANGUAGE_CODE) && $outputlangs->defaultlang != $conf->global->PDF_USE_ALSO_LANGUAGE_CODE) {
@@ -1282,11 +1288,6 @@ class pdf_einstein extends ModelePDFCommandes
pdf_pagehead($pdf, $outputlangs, $this->page_hauteur);
- // Show Draft Watermark
- if ($object->statut == 0 && (!empty($conf->global->COMMANDE_DRAFT_WATERMARK))) {
- pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur, 'mm', $conf->global->COMMANDE_DRAFT_WATERMARK);
- }
-
$pdf->SetTextColor(0, 0, 60);
$pdf->SetFont('', 'B', $default_font_size + 3);
@@ -1531,6 +1532,6 @@ class pdf_einstein extends ModelePDFCommandes
// phpcs:enable
global $conf;
$showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
- return pdf_pagefoot($pdf, $outputlangs, 'ORDER_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext);
+ return pdf_pagefoot($pdf, $outputlangs, 'ORDER_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext, $this->page_largeur, $this->watermark);
}
}
diff --git a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php
index 560344a9eeb..161c3c60345 100644
--- a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php
+++ b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php
@@ -169,6 +169,7 @@ class pdf_eratosthene extends ModelePDFCommandes
$this->option_credit_note = 0; // Support credit notes
$this->option_freetext = 1; // Support add of a personalised text
$this->option_draft_watermark = 1; // Support add of a watermark on drafts
+ $this->watermark = '';
// Get source company
$this->emetteur = $mysoc;
@@ -220,6 +221,11 @@ class pdf_eratosthene extends ModelePDFCommandes
// Load translation files required by the page
$outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "orders", "deliveries"));
+ // Show Draft Watermark
+ if ($object->statut == $object::STATUS_DRAFT && (!empty($conf->global->COMMANDE_DRAFT_WATERMARK))) {
+ $this->watermark = $conf->global->COMMANDE_DRAFT_WATERMARK;
+ }
+
global $outputlangsbis;
$outputlangsbis = null;
if (!empty($conf->global->PDF_USE_ALSO_LANGUAGE_CODE) && $outputlangs->defaultlang != $conf->global->PDF_USE_ALSO_LANGUAGE_CODE) {
@@ -1449,11 +1455,6 @@ class pdf_eratosthene extends ModelePDFCommandes
pdf_pagehead($pdf, $outputlangs, $this->page_hauteur);
- // Show Draft Watermark
- if ($object->statut == 0 && (!empty($conf->global->COMMANDE_DRAFT_WATERMARK))) {
- pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur, 'mm', $conf->global->COMMANDE_DRAFT_WATERMARK);
- }
-
$pdf->SetTextColor(0, 0, 60);
$pdf->SetFont('', 'B', $default_font_size + 3);
@@ -1716,7 +1717,7 @@ class pdf_eratosthene extends ModelePDFCommandes
// phpcs:enable
global $conf;
$showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
- return pdf_pagefoot($pdf, $outputlangs, 'ORDER_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext);
+ return pdf_pagefoot($pdf, $outputlangs, 'ORDER_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext, $this->page_largeur, $this->watermark);
}
diff --git a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php
index efc061b9e67..00fa6bbbdc5 100644
--- a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php
+++ b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php
@@ -140,6 +140,8 @@ class pdf_espadon extends ModelePdfExpedition
$this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10;
$this->option_logo = 1; // Display logo
+ $this->option_draft_watermark = 1; // Support add of a watermark on drafts
+ $this->watermark = '';
// Get source company
$this->emetteur = $mysoc;
@@ -180,6 +182,11 @@ class pdf_espadon extends ModelePdfExpedition
// Load traductions files required by page
$outputlangs->loadLangs(array("main", "bills", "orders", "products", "dict", "companies", "propal", "deliveries", "sendings", "productbatch"));
+ // Show Draft Watermark
+ if ($object->statut == $object::STATUS_DRAFT && (!empty($conf->global->SHIPPING_DRAFT_WATERMARK))) {
+ $this->watermark = $conf->global->SHIPPING_DRAFT_WATERMARK;
+ }
+
global $outputlangsbis;
$outputlangsbis = null;
if (!empty($conf->global->PDF_USE_ALSO_LANGUAGE_CODE) && $outputlangs->defaultlang != $conf->global->PDF_USE_ALSO_LANGUAGE_CODE) {
@@ -947,11 +954,6 @@ class pdf_espadon extends ModelePdfExpedition
pdf_pagehead($pdf, $outputlangs, $this->page_hauteur);
- // Show Draft Watermark
- if ($object->statut == 0 && (!empty($conf->global->SHIPPING_DRAFT_WATERMARK))) {
- pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur, 'mm', $conf->global->SHIPPING_DRAFT_WATERMARK);
- }
-
//Prepare next
$pdf->SetTextColor(0, 0, 60);
$pdf->SetFont('', 'B', $default_font_size + 3);
@@ -1186,7 +1188,7 @@ class pdf_espadon extends ModelePdfExpedition
{
global $conf;
$showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
- return pdf_pagefoot($pdf, $outputlangs, 'SHIPPING_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext);
+ return pdf_pagefoot($pdf, $outputlangs, 'SHIPPING_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext, $this->page_largeur, $this->watermark);
}
/**
diff --git a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php
index 211231b9812..6b5d2e6fc3d 100644
--- a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php
+++ b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php
@@ -141,6 +141,8 @@ class pdf_rouget extends ModelePdfExpedition
$this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10;
$this->option_logo = 1; // Display logo
+ $this->option_draft_watermark = 1; // Support add of a watermark on drafts
+ $this->watermark = '';
// Get source company
$this->emetteur = $mysoc;
@@ -214,6 +216,11 @@ class pdf_rouget extends ModelePdfExpedition
// Load traductions files required by page
$outputlangs->loadLangs(array("main", "bills", "products", "dict", "companies", "propal", "deliveries", "sendings", "productbatch"));
+ // Show Draft Watermark
+ if ($object->statut == $object::STATUS_DRAFT && (!empty($conf->global->SHIPPING_DRAFT_WATERMARK))) {
+ $this->watermark = $conf->global->SHIPPING_DRAFT_WATERMARK;
+ }
+
$nblines = count($object->lines);
// Loop on each lines to detect if there is at least one image to show
@@ -892,11 +899,6 @@ class pdf_rouget extends ModelePdfExpedition
pdf_pagehead($pdf, $outputlangs, $this->page_hauteur);
- // Show Draft Watermark
- if ($object->statut == 0 && (!empty($conf->global->SHIPPING_DRAFT_WATERMARK))) {
- pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur, 'mm', $conf->global->SHIPPING_DRAFT_WATERMARK);
- }
-
//Prepare la suite
$pdf->SetTextColor(0, 0, 60);
$pdf->SetFont('', 'B', $default_font_size + 3);
@@ -1131,6 +1133,6 @@ class pdf_rouget extends ModelePdfExpedition
{
global $conf;
$showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
- return pdf_pagefoot($pdf, $outputlangs, 'SHIPPING_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext);
+ return pdf_pagefoot($pdf, $outputlangs, 'SHIPPING_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext, $this->page_largeur, $this->watermark);
}
}
diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php
index 8046347e881..4e5c0431170 100644
--- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php
+++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php
@@ -170,6 +170,7 @@ class pdf_crabe extends ModelePDFFactures
$this->option_credit_note = 1; // Support credit notes
$this->option_freetext = 1; // Support add of a personalised text
$this->option_draft_watermark = 1; // Support add of a watermark on drafts
+ $this->watermark = '';
// Get source company
$this->emetteur = $mysoc;
@@ -249,6 +250,11 @@ class pdf_crabe extends ModelePDFFactures
// Load translation files required by the page
$outputlangs->loadLangs(array("main", "bills", "products", "dict", "companies"));
+ // Show Draft Watermark
+ if ($object->statut == $object::STATUS_DRAFT && (!empty($conf->global->FACTURE_DRAFT_WATERMARK))) {
+ $this->watermark = $conf->global->FACTURE_DRAFT_WATERMARK;
+ }
+
global $outputlangsbis;
$outputlangsbis = null;
if (!empty($conf->global->PDF_USE_ALSO_LANGUAGE_CODE) && $outputlangs->defaultlang != $conf->global->PDF_USE_ALSO_LANGUAGE_CODE) {
@@ -1718,11 +1724,6 @@ class pdf_crabe extends ModelePDFFactures
pdf_pagehead($pdf, $outputlangs, $this->page_hauteur);
- // Show Draft Watermark
- if ($object->statut == $object::STATUS_DRAFT && (!empty($conf->global->FACTURE_DRAFT_WATERMARK))) {
- pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur, 'mm', $conf->global->FACTURE_DRAFT_WATERMARK);
- }
-
$pdf->SetTextColor(0, 0, 60);
$pdf->SetFont('', 'B', $default_font_size + 3);
@@ -2048,6 +2049,6 @@ class pdf_crabe extends ModelePDFFactures
{
global $conf;
$showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
- return pdf_pagefoot($pdf, $outputlangs, 'INVOICE_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext);
+ return pdf_pagefoot($pdf, $outputlangs, 'INVOICE_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext, $this->page_largeur, $this->watermark);
}
}
diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php
index ed11f61b74b..228b73d825a 100644
--- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php
+++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php
@@ -171,6 +171,7 @@ class pdf_sponge extends ModelePDFFactures
$this->option_credit_note = 1; // Support credit notes
$this->option_freetext = 1; // Support add of a personalised text
$this->option_draft_watermark = 1; // Support add of a watermark on drafts
+ $this->watermark = '';
// Get source company
$this->emetteur = $mysoc;
@@ -234,6 +235,11 @@ class pdf_sponge extends ModelePDFFactures
$outputlangsbis->loadLangs(array("main", "bills", "products", "dict", "companies"));
}
+ // Show Draft Watermark
+ if ($object->statut == $object::STATUS_DRAFT && (!empty($conf->global->FACTURE_DRAFT_WATERMARK))) {
+ $this->watermark = $conf->global->FACTURE_DRAFT_WATERMARK;
+ }
+
$nblines = count($object->lines);
$hidetop = 0;
@@ -1944,11 +1950,6 @@ class pdf_sponge extends ModelePDFFactures
pdf_pagehead($pdf, $outputlangs, $this->page_hauteur);
- // Show Draft Watermark
- if ($object->statut == $object::STATUS_DRAFT && (!empty($conf->global->FACTURE_DRAFT_WATERMARK))) {
- pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur, 'mm', $conf->global->FACTURE_DRAFT_WATERMARK);
- }
-
$pdf->SetTextColor(0, 0, 60);
$pdf->SetFont('', 'B', $default_font_size + 3);
@@ -2274,7 +2275,7 @@ class pdf_sponge extends ModelePDFFactures
{
global $conf;
$showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
- return pdf_pagefoot($pdf, $outputlangs, 'INVOICE_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext);
+ return pdf_pagefoot($pdf, $outputlangs, 'INVOICE_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext, $this->page_largeur, $this->watermark);
}
/**
diff --git a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php
index 719fb670672..bc2b75e219e 100644
--- a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php
+++ b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php
@@ -149,6 +149,7 @@ class pdf_soleil extends ModelePDFFicheinter
$this->option_codeproduitservice = 0; // Display product-service code
$this->option_multilang = 1; // Available in several languages
$this->option_draft_watermark = 1; // Support add of a watermark on drafts
+ $this->watermark = '';
// Get source company
$this->emetteur = $mysoc;
@@ -188,6 +189,11 @@ class pdf_soleil extends ModelePDFFicheinter
// Load traductions files required by page
$outputlangs->loadLangs(array("main", "interventions", "dict", "companies"));
+ // Show Draft Watermark
+ if ($object->statut == $object::STATUS_DRAFT && (!empty($conf->global->FICHINTER_DRAFT_WATERMARK))) {
+ $this->watermark = $conf->global->FICHINTER_DRAFT_WATERMARK;
+ }
+
if ($conf->ficheinter->dir_output) {
$object->fetch_thirdparty();
@@ -561,11 +567,6 @@ class pdf_soleil extends ModelePDFFicheinter
pdf_pagehead($pdf, $outputlangs, $this->page_hauteur);
- //Affiche le filigrane brouillon - Print Draft Watermark
- if ($object->statut == 0 && (!empty($conf->global->FICHINTER_DRAFT_WATERMARK))) {
- pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur, 'mm', $conf->global->FICHINTER_DRAFT_WATERMARK);
- }
-
//Prepare next
$pdf->SetTextColor(0, 0, 60);
$pdf->SetFont('', 'B', $default_font_size + 3);
@@ -732,6 +733,6 @@ class pdf_soleil extends ModelePDFFicheinter
{
global $conf;
$showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
- return pdf_pagefoot($pdf, $outputlangs, 'FICHINTER_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext);
+ return pdf_pagefoot($pdf, $outputlangs, 'FICHINTER_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext, $this->page_largeur, $this->watermark);
}
}
diff --git a/htdocs/core/modules/modRecruitment.class.php b/htdocs/core/modules/modRecruitment.class.php
index 6da69ed888d..a1a2f7774aa 100644
--- a/htdocs/core/modules/modRecruitment.class.php
+++ b/htdocs/core/modules/modRecruitment.class.php
@@ -134,9 +134,20 @@ class modRecruitment extends DolibarrModules
// Example: $this->const=array(1 => array('RECRUITMENT_MYNEWCONST1', 'chaine', 'myvalue', 'This is a constant to add', 1),
// 2 => array('RECRUITMENT_MYNEWCONST2', 'chaine', 'myvalue', 'This is another constant to add', 0, 'current', 1)
// );
- $this->const = array(
- // 1 => array('RECRUITMENT_MYCONSTANT', 'chaine', 'avalue', 'This is a constant to add', 1, 'allentities', 1)
- );
+ $r = 0;
+ $this->const[$r][0] = "RECRUITMENT_RECRUITMENTJOBPOSITION_ADDON";
+ $this->const[$r][1] = "chaine";
+ $this->const[$r][2] = "mod_recruitmentjobposition_standard";
+ $this->const[$r][3] = 'Name of manager to generate recruitment job position ref number';
+ $this->const[$r][4] = 0;
+ $r++;
+
+ $this->const[$r][0] = "RECRUITMENT_RECRUITMENTCANDIDATURE_ADDON";
+ $this->const[$r][1] = "chaine";
+ $this->const[$r][2] = "mod_recruitmentcandidature_standard";
+ $this->const[$r][3] = 'Name of manager to generate recruitment candidature ref number';
+ $this->const[$r][4] = 0;
+ $r++;
// Some keys to add into the overwriting translation tables
/*$this->overwrite_translation = array(
diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php
index 0e30ec96e44..6e89c17cb2c 100644
--- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php
+++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php
@@ -160,6 +160,7 @@ class pdf_azur extends ModelePDFPropales
$this->option_credit_note = 0; // Support credit notes
$this->option_freetext = 1; // Support add of a personalised text
$this->option_draft_watermark = 1; // Support add of a watermark on drafts
+ $this->watermark = '';
// Get source company
$this->emetteur = $mysoc;
@@ -242,6 +243,11 @@ class pdf_azur extends ModelePDFPropales
$outputlangsbis->loadLangs(array("main", "dict", "companies", "bills", "products", "propal"));
}
+ // Show Draft Watermark
+ if ($object->statut == $object::STATUS_DRAFT && (!empty($conf->global->PROPALE_DRAFT_WATERMARK))) {
+ $this->watermark = $conf->global->PROPALE_DRAFT_WATERMARK;
+ }
+
$nblines = count($object->lines);
// Loop on each lines to detect if there is at least one image to show
@@ -1466,11 +1472,6 @@ class pdf_azur extends ModelePDFPropales
pdf_pagehead($pdf, $outputlangs, $this->page_hauteur);
- // Show Draft Watermark
- if ($object->statut == 0 && (!empty($conf->global->PROPALE_DRAFT_WATERMARK))) {
- pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur, 'mm', $conf->global->PROPALE_DRAFT_WATERMARK);
- }
-
$pdf->SetTextColor(0, 0, 60);
$pdf->SetFont('', 'B', $default_font_size + 3);
@@ -1715,7 +1716,7 @@ class pdf_azur extends ModelePDFPropales
{
global $conf;
$showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
- return pdf_pagefoot($pdf, $outputlangs, 'PROPOSAL_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext);
+ return pdf_pagefoot($pdf, $outputlangs, 'PROPOSAL_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext, $this->page_largeur, $this->watermark);
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
diff --git a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php
index 7f78f86ba07..50061cacd0a 100644
--- a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php
+++ b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php
@@ -163,6 +163,7 @@ class pdf_cyan extends ModelePDFPropales
$this->option_credit_note = 0; // Support credit notes
$this->option_freetext = 1; // Support add of a personalised text
$this->option_draft_watermark = 1; // Support add of a watermark on drafts
+ $this->watermark = '';
// Get source company
$this->emetteur = $mysoc;
@@ -216,6 +217,11 @@ class pdf_cyan extends ModelePDFPropales
// Load translation files required by page
$outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "propal"));
+ // Show Draft Watermark
+ if ($object->statut == $object::STATUS_DRAFT && (!empty($conf->global->PROPALE_DRAFT_WATERMARK))) {
+ $this->watermark = $conf->global->PROPALE_DRAFT_WATERMARK;
+ }
+
global $outputlangsbis;
$outputlangsbis = null;
if (!empty($conf->global->PDF_USE_ALSO_LANGUAGE_CODE) && $outputlangs->defaultlang != $conf->global->PDF_USE_ALSO_LANGUAGE_CODE) {
@@ -1538,11 +1544,6 @@ class pdf_cyan extends ModelePDFPropales
pdf_pagehead($pdf, $outputlangs, $this->page_hauteur);
- // Show Draft Watermark
- if ($object->statut == $object::STATUS_DRAFT && (!empty($conf->global->PROPALE_DRAFT_WATERMARK))) {
- pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur, 'mm', $conf->global->PROPALE_DRAFT_WATERMARK);
- }
-
$pdf->SetTextColor(0, 0, 60);
$pdf->SetFont('', 'B', $default_font_size + 3);
@@ -1804,7 +1805,7 @@ class pdf_cyan extends ModelePDFPropales
{
global $conf;
$showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
- return pdf_pagefoot($pdf, $outputlangs, 'PROPOSAL_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext);
+ return pdf_pagefoot($pdf, $outputlangs, 'PROPOSAL_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext, $this->page_largeur, $this->watermark);
}
/**
diff --git a/htdocs/core/modules/reception/doc/pdf_squille.modules.php b/htdocs/core/modules/reception/doc/pdf_squille.modules.php
index 44ca37eb070..c51209fa6c8 100644
--- a/htdocs/core/modules/reception/doc/pdf_squille.modules.php
+++ b/htdocs/core/modules/reception/doc/pdf_squille.modules.php
@@ -63,6 +63,8 @@ class pdf_squille extends ModelePdfReception
$this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10;
$this->option_logo = 1; // Display logo
+ $this->option_draft_watermark = 1; // Support add of a watermark on drafts
+ $this->watermark = '';
// Get source company
$this->emetteur = $mysoc;
@@ -105,7 +107,7 @@ class pdf_squille extends ModelePdfReception
/**
* Function to build pdf onto disk
*
- * @param Object $object Object reception to generate (or id if old method)
+ * @param Reception $object Object reception to generate (or id if old method)
* @param Translate $outputlangs Lang output object
* @param string $srctemplatepath Full path of source filename for generator using a template file
* @param int $hidedetails Do not show line details
@@ -130,6 +132,11 @@ class pdf_squille extends ModelePdfReception
$outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "propal", "deliveries", "receptions", "productbatch", "sendings"));
+ // Show Draft Watermark
+ if ($object->statut == $object::STATUS_DRAFT && (!empty($conf->global->RECEPTION_DRAFT_WATERMARK))) {
+ $this->watermark = $conf->global->RECEPTION_DRAFT_WATERMARK;
+ }
+
$nblines = count($object->lines);
// Loop on each lines to detect if there is at least one image to show
@@ -817,11 +824,6 @@ class pdf_squille extends ModelePdfReception
pdf_pagehead($pdf, $outputlangs, $this->page_hauteur);
- // Show Draft Watermark
- if ($object->statut == 0 && (!empty($conf->global->RECEPTION_DRAFT_WATERMARK))) {
- pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur, 'mm', $conf->global->RECEPTION_DRAFT_WATERMARK);
- }
-
//Prepare la suite
$pdf->SetTextColor(0, 0, 60);
$pdf->SetFont('', 'B', $default_font_size + 3);
@@ -1055,6 +1057,6 @@ class pdf_squille extends ModelePdfReception
{
global $conf;
$showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
- return pdf_pagefoot($pdf, $outputlangs, 'RECEPTION_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext);
+ return pdf_pagefoot($pdf, $outputlangs, 'RECEPTION_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext, $this->page_largeur, $this->watermark);
}
}
diff --git a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php
index 60b3e6b4922..362d831f3af 100644
--- a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php
+++ b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php
@@ -155,6 +155,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
$this->option_credit_note = 1; // Support credit notes
$this->option_freetext = 1; // Support add of a personalised text
$this->option_draft_watermark = 1; //Support add of a watermark on drafts
+ $this->watermark = '';
// Get source company
$this->emetteur = $mysoc;
@@ -205,7 +206,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
/**
* Function to build pdf onto disk
*
- * @param Object $object Object to generate
+ * @param SupplierProposal $object Object to generate
* @param Translate $outputlangs Lang output object
* @param string $srctemplatepath Full path of source filename for generator using a template file
* @param int $hidedetails Do not show line details
@@ -229,6 +230,11 @@ class pdf_aurore extends ModelePDFSupplierProposal
// Load traductions files required by page
$outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "supplier_proposal"));
+ // Show Draft Watermark
+ if ($object->statut == $object::STATUS_DRAFT && (!empty($conf->global->SUPPLIER_PROPOSAL_DRAFT_WATERMARK))) {
+ $this->watermark = $conf->global->SUPPLIER_PROPOSAL_DRAFT_WATERMARK;
+ }
+
$nblines = count($object->lines);
// Loop on each lines to detect if there is at least one image to show
@@ -1284,11 +1290,6 @@ class pdf_aurore extends ModelePDFSupplierProposal
pdf_pagehead($pdf, $outputlangs, $this->page_hauteur);
- // Show Draft Watermark
- if ($object->statut == 0 && (!empty($conf->global->SUPPLIER_PROPOSAL_DRAFT_WATERMARK))) {
- pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur, 'mm', $conf->global->SUPPLIER_PROPOSAL_DRAFT_WATERMARK);
- }
-
$pdf->SetTextColor(0, 0, 60);
$pdf->SetFont('', 'B', $default_font_size + 3);
@@ -1496,6 +1497,6 @@ class pdf_aurore extends ModelePDFSupplierProposal
{
global $conf;
$showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
- return pdf_pagefoot($pdf, $outputlangs, 'SUPPLIER_PROPOSAL_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext);
+ return pdf_pagefoot($pdf, $outputlangs, 'SUPPLIER_PROPOSAL_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext, $this->page_largeur, $this->watermark);
}
}
diff --git a/htdocs/core/tpl/list_print_total.tpl.php b/htdocs/core/tpl/list_print_total.tpl.php
index 929ea2df50f..09768f71ae4 100644
--- a/htdocs/core/tpl/list_print_total.tpl.php
+++ b/htdocs/core/tpl/list_print_total.tpl.php
@@ -13,7 +13,13 @@ if (isset($totalarray['pos'])) {
while ($i < $totalarray['nbfield']) {
$i++;
if (!empty($totalarray['pos'][$i])) {
- print ''.price(!empty($totalarray['val'][$totalarray['pos'][$i]])?$totalarray['val'][$totalarray['pos'][$i]]:0).' | ';
+ if (!empty($totalarray['type'][$i])) {
+ if ($totalarray['type'][$i] == 'duration') {
+ print ''.(!empty($totalarray['val'][$totalarray['pos'][$i]])? convertSecondToTime($totalarray['val'][$totalarray['pos'][$i]]): '00:00').' | ';
+ }
+ } else {
+ print '' . price(!empty($totalarray['val'][$totalarray['pos'][$i]]) ? $totalarray['val'][$totalarray['pos'][$i]] : 0) . ' | ';
+ }
} else {
if ($i == 1) {
if (is_null($limit) || $num < $limit) {
diff --git a/htdocs/fichinter/list.php b/htdocs/fichinter/list.php
index d710d7cd6cc..08c35e2b002 100644
--- a/htdocs/fichinter/list.php
+++ b/htdocs/fichinter/list.php
@@ -132,7 +132,7 @@ $arrayfields = array(
'f.fk_statut'=>array('label'=>'Status', 'checked'=>1, 'position'=>1000),
'fd.description'=>array('label'=>"DescriptionOfLine", 'checked'=>1, 'enabled'=>empty($conf->global->FICHINTER_DISABLE_DETAILS) ? 1 : 0),
'fd.date'=>array('label'=>'DateOfLine', 'checked'=>1, 'enabled'=>empty($conf->global->FICHINTER_DISABLE_DETAILS) ? 1 : 0),
- 'fd.duree'=>array('label'=>'DurationOfLine', 'checked'=>1, 'enabled'=>empty($conf->global->FICHINTER_DISABLE_DETAILS) ? 1 : 0),
+ 'fd.duree'=>array('label'=>'DurationOfLine', 'type'=> 'duration', 'checked'=>1, 'enabled'=>empty($conf->global->FICHINTER_DISABLE_DETAILS) ? 1 : 0), //type duration is here because in database, column 'duree' is double
);
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php';
@@ -737,9 +737,8 @@ if ($resql) {
print ''.convertSecondToTime($obj->duree, 'allhourmin').' | ';
if (!$i) {
$totalarray['nbfield']++;
- }
- if (!$i) {
$totalarray['pos'][$totalarray['nbfield']] = 'fd.duree';
+ $totalarray['type'][$totalarray['nbfield']] = $arrayfields['fd.duree']['type']; //pass the type for the list_print_total.tpl.php to manage durations
}
$totalarray['val']['fd.duree'] += $obj->duree;
}
@@ -763,6 +762,8 @@ if ($resql) {
$i++;
}
+
+
// Show total line
include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php';
diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php
index a20075295d9..ce1fffba01e 100644
--- a/htdocs/fourn/class/fournisseur.commande.class.php
+++ b/htdocs/fourn/class/fournisseur.commande.class.php
@@ -195,7 +195,7 @@ class CommandeFournisseur extends CommonOrder
'ref_ext' =>array('type'=>'varchar(255)', 'label'=>'Ref ext', 'enabled'=>1, 'visible'=>0, 'position'=>35),
'ref_supplier' =>array('type'=>'varchar(255)', 'label'=>'RefSupplier', 'enabled'=>1, 'visible'=>-1, 'position'=>40),
'fk_projet' =>array('type'=>'integer:Project:projet/class/project.class.php:1:fk_statut=1', 'label'=>'Fk projet', 'enabled'=>1, 'visible'=>-1, 'position'=>45),
- 'date_creation' =>array('type'=>'datetime', 'label'=>'Date creation', 'enabled'=>1, 'visible'=>-1, 'position'=>50),
+ 'date_creation' =>array('type'=>'datetime', 'label'=>'Date creation', 'enabled'=>1, 'visible'=>-2, 'position'=>50),
'date_valid' =>array('type'=>'datetime', 'label'=>'DateValidation', 'enabled'=>1, 'visible'=>-1, 'position'=>55),
'date_approve' =>array('type'=>'datetime', 'label'=>'Date approve', 'enabled'=>1, 'visible'=>-1, 'position'=>60),
'date_approve2' =>array('type'=>'datetime', 'label'=>'Date approve2', 'enabled'=>1, 'visible'=>-1, 'position'=>65),
diff --git a/htdocs/mrp/class/mo.class.php b/htdocs/mrp/class/mo.class.php
index 6f7dfd2260b..92cb819aab3 100644
--- a/htdocs/mrp/class/mo.class.php
+++ b/htdocs/mrp/class/mo.class.php
@@ -1435,7 +1435,7 @@ class MoLine extends CommonObjectLine
'role' =>array('type'=>'varchar(10)', 'label'=>'Role', 'enabled'=>1, 'visible'=>-1, 'position'=>145),
'fk_mrp_production' =>array('type'=>'integer', 'label'=>'Fk mrp production', 'enabled'=>1, 'visible'=>-1, 'position'=>150),
'fk_stock_movement' =>array('type'=>'integer', 'label'=>'StockMovement', 'enabled'=>1, 'visible'=>-1, 'position'=>155),
- 'date_creation' =>array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>160),
+ 'date_creation' =>array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>160),
'tms' =>array('type'=>'timestamp', 'label'=>'Tms', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>165),
'fk_user_creat' =>array('type'=>'integer', 'label'=>'UserCreation', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>170),
'fk_user_modif' =>array('type'=>'integer', 'label'=>'UserModification', 'enabled'=>1, 'visible'=>-1, 'position'=>175),
diff --git a/htdocs/recruitment/class/recruitmentjobposition.class.php b/htdocs/recruitment/class/recruitmentjobposition.class.php
index 3b52e5b4fa6..2edd752786b 100644
--- a/htdocs/recruitment/class/recruitmentjobposition.class.php
+++ b/htdocs/recruitment/class/recruitmentjobposition.class.php
@@ -115,7 +115,7 @@ class RecruitmentJobPosition extends CommonObject
'description' => array('type'=>'html', 'label'=>'Description', 'enabled'=>'1', 'position'=>65, 'notnull'=>0, 'visible'=>3,),
'note_public' => array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>'1', 'position'=>101, 'notnull'=>0, 'visible'=>0,),
'note_private' => array('type'=>'html', 'label'=>'NotePrivate', 'enabled'=>'1', 'position'=>102, 'notnull'=>0, 'visible'=>0,),
- 'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>'1', 'position'=>500, 'notnull'=>1, 'visible'=>-4,),
+ 'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>'1', 'position'=>500, 'notnull'=>1, 'visible'=>-2,),
'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>'1', 'position'=>501, 'notnull'=>0, 'visible'=>-2,),
'fk_user_creat' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserAuthor', 'enabled'=>'1', 'position'=>510, 'notnull'=>1, 'visible'=>-2, 'foreignkey'=>'user.rowid',),
'fk_user_modif' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>'1', 'position'=>511, 'notnull'=>-1, 'visible'=>-2,),