Merge pull request #23779 from grandoc/new_branch_04_02_2023

fix : Warning: Undefined property: stdClass:: in /home/httpd/vhosts/a…
This commit is contained in:
Laurent Destailleur 2023-02-04 15:01:23 +01:00 committed by GitHub
commit acef9f674f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View File

@ -1106,7 +1106,7 @@ abstract class CommonDocGenerator
public function getColumnContentXStart($colKey)
{
$colDef = $this->cols[$colKey];
return $colDef['xStartPos'] + $colDef['content']['padding'][3];
return isset($colDef['xStartPos']) ? $colDef['xStartPos'] + $colDef['content']['padding'][3] : null;
}
/**

View File

@ -283,7 +283,7 @@ if ($action == 'create') {
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="action" value="update_extras_line">';
print '<input type="hidden" name="origin" value="'.$origin.'">';
print '<input type="hidden" name="origin" value="'.$object->origin.'">';
print '<input type="hidden" name="id" value="'.$object->id.'">';
print '<input type="hidden" name="ref" value="'.$object->ref.'">';
@ -568,7 +568,7 @@ if ($action == 'create') {
$description = (getDolGlobalInt('PRODUIT_DESC_IN_FORM_ACCORDING_TO_DEVICE') ? '' : dol_htmlentitiesbr($object->lines[$i]->description));
//print $description;
print $form->textwithtooltip($text, $description, 3, '', '', $i);
print_date_range($object->lines[$i]->date_start, $object->lines[$i]->date_end);
//print_date_range($object->lines[$i]->date_start, $object->lines[$i]->date_end);
if (getDolGlobalInt('PRODUIT_DESC_IN_FORM_ACCORDING_TO_DEVICE')) {
print (!empty($object->lines[$i]->description) && $object->lines[$i]->description != $object->lines[$i]->product_label) ? '<br>'.dol_htmlentitiesbr($object->lines[$i]->description) : '';
}
@ -587,7 +587,7 @@ if ($action == 'create') {
print $text.' '.nl2br($object->lines[$i]->description);
}
print_date_range($objp->date_start, $objp->date_end);
//print_date_range($objp->date_start, $objp->date_end);
print "</td>\n";
}

View File

@ -3,7 +3,7 @@
* Copyright (C) 2005-2014 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2006-2007 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be>
* Copyright (C) 2011-2018 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2011-2023 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com>
*
@ -819,7 +819,7 @@ class Delivery extends CommonObject
$line->product_type = $obj->fk_product_type;
$line->fk_origin_line = $obj->fk_origin_line;
$line->price = $obj->price;
$line->price = $obj->subprice;
$line->total_ht = $obj->total_ht;
// units