diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index 72312d1d9ce..4f7666986d2 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -824,7 +824,7 @@ class FormMail extends Form $relativepathtofile = substr($val, (strlen(DOL_DATA_ROOT) - strlen($val))); if ($conf->entity > 1) { - $relativepathtofile = str_replace($conf->entity.'/', '', $relativepathtofile); + $relativepathtofile = str_replace('/'.$conf->entity.'/', '/', $relativepathtofile); } // Try to extract data from full path $formfile_params = array(); diff --git a/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php b/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php index b118a0b021e..62e5f062514 100644 --- a/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php +++ b/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php @@ -1162,35 +1162,38 @@ class pdf_vinci extends ModelePDFMo } // product info - $posy += 7; $prodToMake = new Product($this->db); - $prodToMake->fetch($object->fk_product); - $pdf->SetFont('', 'B', $default_font_size + 1); - $pdf->SetXY($posx, $posy); - $pdf->SetTextColor(0, 0, 60); - $pdf->MultiCell($w, 3, $prodToMake->ref, '', 'R'); + $resProdToMake = $prodToMake->fetch($object->fk_product); - $posy += 5; - $prodToMake = new Product($this->db); - $prodToMake->fetch($object->fk_product); - $pdf->SetFont('', 'B', $default_font_size + 3); - $pdf->SetXY($posx, $posy); - $pdf->SetTextColor(0, 0, 60); - $pdf->MultiCell($w, 3, $prodToMake->description, '', 'R'); + if ($resProdToMake > 0) { + // ref + $posy += 7; + $pdf->SetFont('', 'B', $default_font_size + 1); + $pdf->SetXY($posx, $posy); + $pdf->SetTextColor(0, 0, 60); + $pdf->MultiCell($w, 3, $prodToMake->ref, '', 'R'); - $array = array_filter(array($prodToMake->length, $prodToMake->width, $prodToMake->height)); - $dim = implode("x", $array); - if (!empty($dim)) { + // description $posy += 5; $pdf->SetFont('', 'B', $default_font_size + 3); $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); - $pdf->MultiCell($w, 3, $dim, '', 'R'); + $pdf->MultiCell($w, 3, html_entity_decode($prodToMake->description), '', 'R'); + $posy = $pdf->GetY() - 5; + + // dimensions + $array = array_filter(array($prodToMake->length, $prodToMake->width, $prodToMake->height)); + $dim = implode("x", $array); + if (!empty($dim)) { + $posy += 5; + $pdf->SetFont('', 'B', $default_font_size + 3); + $pdf->SetXY($posx, $posy); + $pdf->SetTextColor(0, 0, 60); + $pdf->MultiCell($w, 3, $dim, '', 'R'); + } } $posy += 5; - $prodToMake = new Product($this->db); - $prodToMake->fetch($object->fk_product); $pdf->SetFont('', 'B', $default_font_size + 3); $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index ab6179f525c..5792889cfa6 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -1231,4 +1231,4 @@ DropFileToAddItToObject=Drop a file to add it to this object UploadFileDragDropSuccess=The file(s) have been uploaded successfully SearchSyntaxTooltipForStringOrNum=For searching inside text fields, you can use the characters ^ or $ to make a 'start or end with' search or use the ! to make a 'does not contain' test. You can use the | between two strings instead of a space for a 'OR' condition instead of 'AND'. For numeric values, you can use the operator <, >, <=, >= or != before the value, to filter using a mathematical comparison InProgress=In progress - \ No newline at end of file +DateOfPrinting=Date of printing diff --git a/htdocs/takepos/receipt.php b/htdocs/takepos/receipt.php index 77d00f9b31f..d52df0987b2 100644 --- a/htdocs/takepos/receipt.php +++ b/htdocs/takepos/receipt.php @@ -136,7 +136,7 @@ if ($object->statut == Facture::STATUS_DRAFT) { } else { print $object->ref; } -if ($conf->global->TAKEPOS_SHOW_CUSTOMER) { +if (!empty($conf->global->TAKEPOS_SHOW_CUSTOMER)) { if ($object->socid != getDolGlobalInt('CASHDESK_ID_THIRDPARTY'.$_SESSION["takeposterminal"])) { $soc = new Societe($db); if ($object->socid > 0) { @@ -147,6 +147,9 @@ if ($conf->global->TAKEPOS_SHOW_CUSTOMER) { print "
".$langs->trans("Customer").': '.$soc->name; } } +if (!empty($conf->global->TAKEPOS_SHOW_DATE_OF_PRINING)) { + print "
".$langs->trans("DateOfPrinting").': '.dol_print_date(dol_now(), 'dayhour', 'tzuserrel').'
'; +} ?>


diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index bbc823ecce5..1ed2a82ad60 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -608,7 +608,7 @@ class Ticket extends CommonObject // Check parameters if (empty($id) && empty($ref) && empty($track_id) && empty($email_msgid)) { $this->error = 'ErrorWrongParameters'; - dol_print_error(get_class($this)."::fetch ".$this->error); + dol_print_error('', get_class($this)."::fetch ".$this->error); return -1; }