From 05ea8761a1156f342afb7743fe48e260cffc384f Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Thu, 13 May 2021 08:28:14 +0000 Subject: [PATCH] Fixing style errors. --- htdocs/compta/facture/card.php | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 6dd4d050b8b..e5b4b2d2398 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -1093,19 +1093,19 @@ if (empty($reshook)) { } } $id = $object->create($user); - if ($id < 0) { - $error++; - } else { - // copy internal contacts - if ($object->copy_linked_contact($facture_source, 'internal') < 0) { - $error++; - } elseif ($facture_source->socid == $object->socid) { - // copy external contacts if same company - if ($object->copy_linked_contact($facture_source, 'external') < 0) { + if ($id < 0) { $error++; + } else { + // copy internal contacts + if ($object->copy_linked_contact($facture_source, 'internal') < 0) { + $error++; + } elseif ($facture_source->socid == $object->socid) { + // copy external contacts if same company + if ($object->copy_linked_contact($facture_source, 'external') < 0) { + $error++; + } + } } - } - } // NOTE: Pb with situation invoice // NOTE: fields total on situation invoice are stored as cumulative values on total of lines (bad) but delta on invoice total