Skip to content

Commit

Permalink
Merge branch 'develop' of [email protected]:Dolibarr/dolibarr.git into d…
Browse files Browse the repository at this point in the history
…evelop
  • Loading branch information
eldy committed Jun 29, 2024
2 parents deecb7a + 3e95e31 commit 7a3cd72
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ public function runTrigger($action, $object, User $user, Translate $langs, Conf
}

/**
* @param Object $conf Dolibarr settings object
* @param Conf $conf Dolibarr settings object
* @param float $totalonlinkedelements Sum of total amounts (excl VAT) of
* invoices linked to $object
* @param float $object_total_ht The total amount (excl VAT) of the object
Expand Down
5 changes: 3 additions & 2 deletions htdocs/reception/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@
// Add all links of this new reception to the existing invoice
$objecttmp->fetchObjectLinked();
$rcp->fetchObjectLinked();
if (count($rcp->linkedObjectsIds['order_supplier']) > 0) {
if (!empty($rcp->linkedObjectsIds['order_supplier']) && is_array($rcp->linkedObjectsIds['order_supplier'])) {
foreach ($rcp->linkedObjectsIds['order_supplier'] as $key => $value) {
if (empty($objecttmp->linkedObjectsIds['order_supplier']) || !in_array($value, $objecttmp->linkedObjectsIds['order_supplier'])) { //Don't try to link if already linked
$objecttmp->add_object_linked('order_supplier', $value); // add supplier order linked object
Expand Down Expand Up @@ -405,7 +405,8 @@
$desc = ($lines[$i]->desc ? $lines[$i]->desc : $lines[$i]->libelle);
// If we build one invoice for several reception, we must put the ref of reception on the invoice line
if (!empty($createbills_onebythird)) {
$desc = dol_concatdesc($desc, $langs->trans("Reception").' '.$rcp->ref.' - '.dol_print_date($rcp->date, 'day'));
$desc = dol_concatdesc($desc, $langs->trans("Reception").' '.$rcp->ref);
$desc .= (!empty($rcp->date_reception) ? ' - '.dol_print_date($rcp->date_reception, 'day') : '');
}

if ($lines[$i]->subprice < 0) {
Expand Down

0 comments on commit 7a3cd72

Please sign in to comment.