Skip to content

Commit

Permalink
FIX 17.0: warnings due to uninitialized variables + delete code that …
Browse files Browse the repository at this point in the history
…doesn't apply to recurring invoices (AFAIK, there is no recurring credit note feature)
  • Loading branch information
atm-florianm committed Dec 5, 2024
1 parent c418a6f commit 15c19b9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions htdocs/compta/facture/card-rec.php
Original file line number Diff line number Diff line change
Expand Up @@ -1178,6 +1178,7 @@
if ($object->id > 0) {
$object->fetch_thirdparty();

$formconfirm = '';
// Confirmation de la suppression d'une ligne produit
if ($action == 'ask_deleteline') {
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 'no', 1);
Expand Down Expand Up @@ -1302,15 +1303,11 @@
}
print '</tr></table>';
print '</td><td>';
if ($object->type != Facture::TYPE_CREDIT_NOTE) {
if ($action == 'editconditions') {
$form->form_conditions_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id, $object->cond_reglement_id, 'cond_reglement_id');
} else {
$form->form_conditions_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id, $object->cond_reglement_id, 'none');
}
} else {
print '&nbsp;';
}
print '</td></tr>';

// Payment mode
Expand Down Expand Up @@ -1732,6 +1729,7 @@
// List of actions on element
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
$formactions = new FormActions($db);
$morehtmlcenter = '';
$somethingshown = $formactions->showactions($object, $object->element, (is_object($object->thirdparty) ? $object->thirdparty->id : 0), 1, '', $MAXEVENT, '', $morehtmlcenter);

print '</div>';
Expand Down

0 comments on commit 15c19b9

Please sign in to comment.