From 87d69d6a0b2e24b89afdeda6f8a483d3fc99c6a0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 7 Nov 2025 13:26:14 +0100 Subject: [PATCH] Look and feel v23 --- htdocs/compta/facture/card.php | 128 ++++++++++++++++++++++++--------- 1 file changed, 94 insertions(+), 34 deletions(-) diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index f77d7835114..0af31389943 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -6012,8 +6012,8 @@ if ($action == 'create') { if (isModEnabled("bank")) { print ''.$langs->trans('BankAccount').''; } + print ''; print ''.$langs->trans('Amount').''; - print ' '; print ''; // Payments already done (from payment on this invoice) @@ -6044,7 +6044,8 @@ if ($action == 'create') { $paymentstatic->num_payment = $objp->num_payment; $paymentstatic->paiementcode = $objp->payment_code; - print ''; + print ''; + print ''; print $paymentstatic->getNomUrl(1); print ''; print ''; @@ -6080,9 +6081,9 @@ if ($action == 'create') { } print ''; } - print ''.price($sign * $objp->amount).''; - print ''; + // Delete + print ''; $paiement = new Paiement($db); $paiement->fetch($objp->rowid); if ($object->status == Facture::STATUS_VALIDATED && $object->paye == 0 && $user->socid == 0 && !$paiement->isReconciled()) { @@ -6091,6 +6092,10 @@ if ($action == 'create') { print ''; } print ''; + + // Amount + print ''.price($sign * $objp->amount).''; + print ''; $i++; } @@ -6103,14 +6108,18 @@ if ($action == 'create') { if ($object->type != Facture::TYPE_CREDIT_NOTE) { // Total already paid - print ''; + print ''; + print ''; print ''; if ($object->type != Facture::TYPE_DEPOSIT) { print $langs->trans('AlreadyPaidNoCreditNotesNoDeposits'); } else { print $langs->trans('AlreadyPaid'); } - print ''.price($totalpaid).' '; + print ''; + //print ''; + print ''.price($totalpaid).''; + print ''; $resteapayeraffiche = $resteapayer; $cssforamountpaymentcomplete = 'amountpaymentcomplete'; @@ -6131,7 +6140,8 @@ if ($action == 'create') { while ($i < $num) { $obj = $db->fetch_object($resql); $invoice->fetch($obj->fk_facture_source); - print ''; + print ''; + print ''; print ''; if ($invoice->type == Facture::TYPE_CREDIT_NOTE) { print $langs->trans("CreditNote").' '; @@ -6142,12 +6152,15 @@ if ($action == 'create') { print $invoice->getNomUrl(0); print ''; print ''; - print ''.price($obj->amount_ttc).''; + // Delete print ''; print 'rowid.'">'; print img_picto($langs->transnoentitiesnoconv("RemoveDiscount"), 'unlink'); print ''; - print ''; + print ''; + // Amount + print ''.price($obj->amount_ttc).''; + print ''; $i++; if ($invoice->type == Facture::TYPE_CREDIT_NOTE) { $creditnoteamount += $obj->amount_ttc; @@ -6162,40 +6175,53 @@ if ($action == 'create') { // Partially paid 'discount' if (($object->status == Facture::STATUS_CLOSED || $object->status == Facture::STATUS_ABANDONED) && $object->close_code == 'discount_vat') { - print ''; + print ''; + print ''; print ''; print $form->textwithpicto($langs->trans("Discount"), $langs->trans("HelpEscompte"), - 1); print ''; - print ''.price(price2num($object->total_ttc - $creditnoteamount - $depositamount - $totalpaid, 'MT')).' '; + print ''; + print ''; + print ''.price(price2num($object->total_ttc - $creditnoteamount - $depositamount - $totalpaid, 'MT')).''; + print ''; $resteapayeraffiche = 0; $cssforamountpaymentcomplete = 'amountpaymentneutral'; $cssforamountpaymentcompletenoresize = 'amountpaymentneutralnoresize'; } // Partially paid or abandoned 'badcustomer' if (($object->status == Facture::STATUS_CLOSED || $object->status == Facture::STATUS_ABANDONED) && $object->close_code == 'badcustomer') { - print ''; + print ''; + print ''; print ''; print $form->textwithpicto($langs->trans("Abandoned"), $langs->trans("HelpAbandonBadCustomer"), - 1); print ''; - print ''.price(price2num($object->total_ttc - $creditnoteamount - $depositamount - $totalpaid, 'MT')).' '; + print ''; + //print ''; + print ''.price(price2num($object->total_ttc - $creditnoteamount - $depositamount - $totalpaid, 'MT')).''; + print ''; // $resteapayeraffiche=0; $cssforamountpaymentcomplete = 'amountpaymentneutral'; $cssforamountpaymentcompletenoresize = 'amountpaymentneutralnoresize'; } // Partially paid or abandoned 'product_returned' if (($object->status == Facture::STATUS_CLOSED || $object->status == Facture::STATUS_ABANDONED) && $object->close_code == 'product_returned') { - print ''; + print ''; + print ''; print ''; print $form->textwithpicto($langs->trans("ProductReturned"), $langs->trans("HelpAbandonProductReturned"), - 1); print ''; - print ''.price(price2num($object->total_ttc - $creditnoteamount - $depositamount - $totalpaid, 'MT')).' '; + print ''; + //print ''; + print ''.price(price2num($object->total_ttc - $creditnoteamount - $depositamount - $totalpaid, 'MT')).''; + print ''; $resteapayeraffiche = 0; $cssforamountpaymentcomplete = 'amountpaymentneutral'; $cssforamountpaymentcompletenoresize = 'amountpaymentneutralnoresize'; } // Partially paid or abandoned 'abandoned' if (($object->status == Facture::STATUS_CLOSED || $object->status == Facture::STATUS_ABANDONED) && $object->close_code == 'abandon') { - print ''; + print ''; + print ''; $text = $langs->trans("HelpAbandonOther"); if ($object->close_note) { $text .= '

'.$langs->trans("Reason").':'.$object->close_note; @@ -6204,19 +6230,28 @@ if ($action == 'create') { // @phan-suppress-next-line PhanPluginSuspiciousParamPosition print $form->textwithpicto($langs->trans("Abandoned"), $text, - 1); print ''; - print ''.price(price2num($object->total_ttc - $creditnoteamount - $depositamount - $totalpaid, 'MT')).' '; + print ''; + //print ''; + print ''.price(price2num($object->total_ttc - $creditnoteamount - $depositamount - $totalpaid, 'MT')).''; + print ''; $resteapayeraffiche = 0; $cssforamountpaymentcomplete = 'amountpaymentneutral'; $cssforamountpaymentcompletenoresize = 'amountpaymentneutralnoresize'; } // Billed - print ''; + print ''; + print ''; print ''; print $langs->trans("Billed"); - print ''.price($object->total_ttc).' '; + print ''; + //print ''; + print ''.price($object->total_ttc).''; + print ''; + // Remainder to pay - print ''; + print ''; + print ''; print ''; print $langs->trans('RemainderToPay'); if ($resteapayeraffiche < 0) { @@ -6224,11 +6259,14 @@ if ($action == 'create') { } print ''; print ''; - print ''.price($resteapayeraffiche).' '; + //print ''; + print ''.price($resteapayeraffiche).''; + print ''; // Remainder to pay Multicurrency if (isModEnabled('multicurrency') && $object->multicurrency_code && ($object->multicurrency_code != $conf->currency || $object->multicurrency_tx != 1)) { - print ''; + print ''; + print ''; print ''; print $langs->trans('RemainderToPayMulticurrency'); if ($resteapayeraffiche < 0) { @@ -6236,9 +6274,11 @@ if ($action == 'create') { } print ''; print ''; + //print ''; print ''; //print (empty($object->multicurrency_code) ? $conf->currency : $object->multicurrency_code).' '; - print price(price2num($object->multicurrency_tx * $resteapayeraffiche, 'MT'), 1, $langs, 1, -1, -1, (empty($object->multicurrency_code) ? $conf->currency : $object->multicurrency_code)).' '; + print price(price2num($object->multicurrency_tx * $resteapayeraffiche, 'MT'), 1, $langs, 1, -1, -1, (empty($object->multicurrency_code) ? $conf->currency : $object->multicurrency_code)).''; + print ''; } // Retained warranty : usually use on construction industry @@ -6253,13 +6293,21 @@ if ($action == 'create') { $billedWithRetainedWarranty = $object->total_ttc - $retainedWarranty; - print ''.$langs->trans("ToPayOn", dol_print_date($object->date_lim_reglement, 'day')).' :'.price($billedWithRetainedWarranty).' '; + print ''; + print ''.$langs->trans("ToPayOn", dol_print_date($object->date_lim_reglement, 'day')).' :'; + //print ''; + print ''.price($billedWithRetainedWarranty).''; + print ''; // retained warranty - print ''; + print ''; + print ''; print $langs->trans("RetainedWarranty").' ('.$object->retained_warranty.'%)'; print !empty($object->retained_warranty_date_limit) ? ' '.$langs->trans("ToPayOn", dol_print_date($object->retained_warranty_date_limit, 'day')) : ''; - print ' :'.price($retainedWarranty).' '; + print ''; + //print ''; + print ''.price($retainedWarranty).''; + print ''; } } else { // Credit note $resteapayeraffiche = $resteapayer; @@ -6267,36 +6315,48 @@ if ($action == 'create') { $cssforamountpaymentcompletenoresize = 'amountpaymentneutralnoresize'; // Total already paid back - print ''; + print ''; + print ''; print ''.$langs->trans('AlreadyPaidBack').''; - print ''.price($sign * $totalpaid).' '; + print ''; + //print ''; + print ''.price($sign * $totalpaid).''; + print ''; // Billed - print ''.$langs->trans("Billed").''.price($sign * $object->total_ttc).' '; + print ''; + print ''.$langs->trans("Billed").''; + //print ''; + print ''.price($sign * $object->total_ttc).''; + print ''; // Remainder to pay back - print ''; + print ''; print ''.$langs->trans('RemainderToPayBack'); if ($resteapayeraffiche > 0) { print ' ('.$langs->trans('NegativeIfExcessRefunded').')'; } print ''; + //print ''; print ''.price($sign * $resteapayeraffiche); // TODO If credit not was converted into discount, we should show a tooltip to explain that remain to pay // is zero because already converted into discount for a future use, so no need to refund. print ''; - print ' '; + print ''; // Remainder to pay back Multicurrency - if ($object->multicurrency_code != $conf->currency || $object->multicurrency_tx != 1) { - print ''; + if (($object->multicurrency_code && $object->multicurrency_code != $conf->currency) || $object->multicurrency_tx != 1) { + print ''; + print ''; print ''.$langs->trans('RemainderToPayBackMulticurrency'); if ($resteapayeraffiche > 0) { print ' ('.$langs->trans('NegativeIfExcessRefunded').')'; } print ''; print ''; - print ''.price(price2num($sign * $object->multicurrency_tx * $resteapayeraffiche, 'MT'), 1, $langs, 1, -1, -1, (empty($object->multicurrency_code) ? $conf->currency : $object->multicurrency_code)).' '; + //print ''; + print ''.price(price2num($sign * $object->multicurrency_tx * $resteapayeraffiche, 'MT'), 1, $langs, 1, -1, -1, (empty($object->multicurrency_code) ? $conf->currency : $object->multicurrency_code)).''; + print ''; } // Sold credit note