diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php
index 6c063c61a8d..abf68f1d30e 100644
--- a/htdocs/comm/propal/card.php
+++ b/htdocs/comm/propal/card.php
@@ -1599,7 +1599,7 @@ if (empty($reshook)) {
$error++;
}
if (!$error) {
- $result = $object->updateExtraField(GETPOST('attribute', 'restricthtml'), 'PROPAL_MODIFY', $user);
+ $result = $object->insertExtraFields('PROPAL_MODIFY');
if ($result < 0) {
setEventMessages($object->error, $object->errors, 'errors');
$error++;
diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php
index 0a95a44488d..6aa633cc4da 100644
--- a/htdocs/compta/facture/class/facture.class.php
+++ b/htdocs/compta/facture/class/facture.class.php
@@ -574,6 +574,7 @@ class Facture extends CommonInvoice
$this->type = self::TYPE_STANDARD;
}
$this->ref_client = trim($this->ref_client);
+ $this->ref_customer = trim($this->ref_customer);
$this->note_public = trim($this->note_public);
$this->note_private = trim($this->note_private);
$this->note_private = dol_concatdesc($this->note_private, $langs->trans("GeneratedFromRecurringInvoice", $_facrec->ref));
@@ -5466,10 +5467,10 @@ class Facture extends CommonInvoice
/**
- * Send reminders by emails for ivoices that are due
+ * Send reminders by emails for invoices that are due
* CAN BE A CRON TASK
*
- * @param int $nbdays Delay after due date (or before if delay is negative)
+ * @param int $nbdays Delay before due date (or after if delay is negative)
* @param string $paymentmode '' or 'all' by default (no filter), or 'LIQ', 'CHQ', CB', ...
* @param int|string $template Name (or id) of email template (Must be a template of type 'facture_send')
* @param string $forcerecipient Force email of recipient (for example to send the email to an accountant supervisor instead of the customer)
diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php
index 4a7485545a6..928ffcfc4bd 100644
--- a/htdocs/compta/facture/list.php
+++ b/htdocs/compta/facture/list.php
@@ -1952,7 +1952,7 @@ if ($resql) {
// Action column
if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
- print '
';
+ print ' | ';
if (($massactionbutton || $massaction) && $contextpage != 'poslist') { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
$selected = 0;
if (in_array($obj->id, $arrayofselected)) {
@@ -2570,7 +2570,7 @@ if ($resql) {
// Action column (Show the massaction button only when this page is not opend from the Extended POS)
if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
- print ' | ';
+ print ' | ';
if (($massactionbutton || $massaction) && $contextpage != 'poslist') { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
$selected = 0;
if (in_array($obj->id, $arrayofselected)) {
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index 113c295a97b..f6b39d1784a 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -619,7 +619,7 @@ function GETPOST($paramname, $check = 'alphanohtml', $method = 0, $filter = null
}
}
if (!empty($conf->global->MAIN_ENABLE_DEFAULT_VALUES)) {
- if (!empty($_GET['action']) && (preg_match('/^create/', $_GET['action']) || preg_match('/^presend/', $_GET['action'])) && !isset($_GET[$paramname]) && !isset($_POST[$paramname])) {
+ if (!empty($_GET['action']) && (preg_match('/^create|^add_price|^make/', $_GET['action']) || preg_match('/^presend/', $_GET['action'])) && !isset($_GET[$paramname]) && !isset($_POST[$paramname])) {
// Now search in setup to overwrite default values
if (!empty($user->default_values)) { // $user->default_values defined from menu 'Setup - Default values'
if (isset($user->default_values[$relativepathstring]['createform'])) {
diff --git a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php
index 34699a6e608..d95d9912c2b 100644
--- a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php
+++ b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php
@@ -368,11 +368,14 @@ class pdf_espadon extends ModelePdfExpedition
if (!empty($notetoshow) || !empty($object->tracking_number)) {
$tab_top -= 2;
+ $tab_topbeforetrackingnumber = $tab_top;
// Tracking number
if (!empty($object->tracking_number)) {
+ $height_trackingnumber = 4;
+
$pdf->SetFont('', 'B', $default_font_size - 2);
- $pdf->writeHTMLCell(60, 4, $this->posxdesc - 1, $tab_top - 1, $outputlangs->transnoentities("TrackingNumber") . " : " . $object->tracking_number, 0, 1, false, true, 'L');
+ $pdf->writeHTMLCell(60, $height_trackingnumber, $this->posxdesc - 1, $tab_top - 1, $outputlangs->transnoentities("TrackingNumber") . " : " . $object->tracking_number, 0, 1, false, true, 'L');
$tab_top_alt = $pdf->GetY();
$object->getUrlTrackingStatus($object->tracking_number);
@@ -390,8 +393,10 @@ class pdf_espadon extends ModelePdfExpedition
$label .= " : ";
$label .= $object->tracking_url;
}
+
+ $height_trackingnumber += 6;
$pdf->SetFont('', 'B', $default_font_size - 2);
- $pdf->writeHTMLCell(60, 4, $this->posxdesc - 1, $tab_top_alt, $label, 0, 1, false, true, 'L');
+ $pdf->writeHTMLCell(60, $height_trackingnumber, $this->posxdesc - 1, $tab_top_alt, $label, 0, 1, false, true, 'L');
$tab_top = $pdf->GetY();
}
@@ -401,7 +406,7 @@ class pdf_espadon extends ModelePdfExpedition
// Notes
$pagenb = $pdf->getPage();
- if (!empty($notetoshow)) {
+ if (!empty($notetoshow) || !empty($object->tracking_number)) {
$tab_top -= 2;
$tab_width = $this->page_largeur - $this->marge_gauche - $this->marge_droite;
@@ -465,10 +470,20 @@ class pdf_espadon extends ModelePdfExpedition
$pdf->SetDrawColor(128, 128, 128);
// Draw note frame
if ($i > $pageposbeforenote) {
- $height_note = $this->page_hauteur - ($tab_top_newpage + $heightforfooter);
+ if (empty($height_trackingnumber)) {
+ $height_note = $this->page_hauteur - ($tab_top_newpage + $heightforfooter);
+ } else {
+ $height_note = $this->page_hauteur - ($tab_top_newpage + $heightforfooter) + $height_trackingnumber + 1;
+ $tab_top_newpage = $tab_topbeforetrackingnumber;
+ }
$pdf->Rect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 1);
} else {
- $height_note = $this->page_hauteur - ($tab_top + $heightforfooter);
+ if (empty($height_trackingnumber)) {
+ $height_note = $this->page_hauteur - ($tab_top + $heightforfooter);
+ } else {
+ $height_note = $this->page_hauteur - ($tab_top + $heightforfooter)+ $height_trackingnumber + 1;
+ $tab_top = $tab_topbeforetrackingnumber;
+ }
$pdf->Rect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 1);
}
@@ -489,7 +504,12 @@ class pdf_espadon extends ModelePdfExpedition
{
$pdf->commitTransaction();
$posyafter = $pdf->GetY();
- $height_note = $posyafter - $tab_top;
+ if (empty($height_trackingnumber)) {
+ $height_note = $posyafter - $tab_top + 1;
+ } else {
+ $height_note = $posyafter - $tab_top + $height_trackingnumber + 1;
+ $tab_top = $tab_topbeforetrackingnumber;
+ }
$pdf->Rect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 1);
diff --git a/htdocs/imports/import.php b/htdocs/imports/import.php
index d46bfb2605c..963581e1350 100644
--- a/htdocs/imports/import.php
+++ b/htdocs/imports/import.php
@@ -1082,9 +1082,9 @@ if ($step == 4 && $datatoimport) {
$valforsourcefieldnb[$lefti] = $key;
$lefti++;
- if ($lefti > count($fieldstarget)) {
+ /*if ($lefti > count($fieldstarget)) {
break; // Other fields are in the not imported area
- }
+ }*/
}
//var_dump($valforsourcefieldnb);
@@ -1138,9 +1138,9 @@ if ($step == 4 && $datatoimport) {
print '';
foreach ($fieldssource as $code => $line) { // $fieldssource is an array code=column num, line=content on first line for column in source file.
- if ($i == $minpos) {
+ /*if ($i == $minpos) {
break;
- }
+ }*/
print '';
$entity = (!empty($objimport->array_import_entities[0][$code]) ? $objimport->array_import_entities[0][$code] : $objimport->array_import_icon[0]);
diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php
index b5a8a076a0e..600bf8eb9c0 100644
--- a/htdocs/product/fournisseurs.php
+++ b/htdocs/product/fournisseurs.php
@@ -1111,7 +1111,7 @@ END;
// Date from
if (!empty($arrayfields['pfp.datec']['checked'])) {
- print '| '.dol_print_date(($productfourn->fourn_date_creation ? $productfourn->fourn_date_creation : $productfourn->date_creation), 'dayhour').' | ';
+ print ''.dol_print_date(($productfourn->fourn_date_creation ? $productfourn->fourn_date_creation : $productfourn->date_creation), 'dayhour', 'tzuserrel').' | ';
}
// Supplier
|