diff --git a/htdocs/compta/paiement_vat.php b/htdocs/compta/paiement_vat.php index 7db2aa674af..5e073f69c53 100644 --- a/htdocs/compta/paiement_vat.php +++ b/htdocs/compta/paiement_vat.php @@ -1,6 +1,6 @@ - * Copyright (C) 2016-2018 Frédéric France + * Copyright (C) 2016-2021 Frédéric France * Copyright (C) 2021 Gauthier VERDOL * * This program is free software; you can redistribute it and/or modify @@ -111,11 +111,10 @@ if ($action == 'add_payment' || ($action == 'confirm_paiement' && $confirm == 'y $paiement->amounts = $amounts; // Tableau de montant $paiement->paiementtype = GETPOST("paiementtype", 'alphanohtml'); $paiement->num_payment = GETPOST("num_payment", 'alphanohtml'); - $paiement->note = GETPOST("note", 'restricthtml'); - $paiement->note_private = GETPOST("note", 'restricthtml'); + $paiement->note = (string) GETPOST("note", 'restricthtml'); + $paiement->note_private = (string) GETPOST("note", 'restricthtml'); - if (!$error) - { + if (!$error) { $paymentid = $paiement->create($user, (GETPOST('closepaidvat') == 'on' ? 1 : 0)); if ($paymentid < 0) { @@ -193,7 +192,7 @@ if ($action == 'create') print ''; print ''; - dol_fiche_head('', ''); + print dol_get_fiche_head('', ''); print ''; @@ -208,8 +207,7 @@ if ($action == 'create') $sql .= " FROM ".MAIN_DB_PREFIX."payment_vat as p"; $sql .= " WHERE p.fk_tva = ".$chid; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); $sumpaid = $obj->total; $db->free(); @@ -248,7 +246,7 @@ if ($action == 'create') print '
'; - dol_fiche_end(); + print dol_get_fiche_end(); /* * Autres charges impayees @@ -314,8 +312,7 @@ if ($action == 'create') $totalrecu += $objp->am; $i++; } - if ($i > 1) - { + if ($i > 1) { // Print total print ''; print ''.$langs->trans("Total").':'; diff --git a/htdocs/compta/payment_vat/card.php b/htdocs/compta/payment_vat/card.php index 1b085dfe040..dee616eb2ef 100644 --- a/htdocs/compta/payment_vat/card.php +++ b/htdocs/compta/payment_vat/card.php @@ -138,13 +138,12 @@ $h++; */ -dol_fiche_head($head, $hselected, $langs->trans("VATPayment"), -1, 'payment'); +print dol_get_fiche_head($head, $hselected, $langs->trans("VATPayment"), -1, 'payment'); /* * Deletion confirmation of payment */ -if ($action == 'delete') -{ +if ($action == 'delete') { print $form->formconfirm('card.php?id='.$object->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete', '', 0, 2); } @@ -213,7 +212,7 @@ print ''; print ''; -dol_fiche_end(); +print dol_get_fiche_end(); /*