Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0

This commit is contained in:
Laurent Destailleur
2023-07-12 16:41:11 +02:00
5 changed files with 29 additions and 23 deletions

View File

@@ -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();

View File

@@ -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);

View File

@@ -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
DateOfPrinting=Date of printing

View File

@@ -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 "<br>".$langs->trans("Customer").': '.$soc->name;
}
}
if (!empty($conf->global->TAKEPOS_SHOW_DATE_OF_PRINING)) {
print "<br>".$langs->trans("DateOfPrinting").': '.dol_print_date(dol_now(), 'dayhour', 'tzuserrel').'<br>';
}
?>
</p>
<br>

View File

@@ -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;
}