/
FR-Tickets & Invoices templates

FR-Tickets & Invoices templates

Objectif

Le but de cet article est de décrire comment configurer et envoyer les sorties du système (tickets et factures) qui sont conformes à la réglementation française.

Tickets

Lorsqu'une transaction POS est effectuée dans MXTS Front Office Manager, l'utilisateur peut imprimer le ticket. Le ticket est personnalisable en ce qui concerne le style et le texte statique, mais les champs obligatoires sont ajoutés dans le modèle par défaut.

<!DOCTYPE html> <html lang="fr"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Reçu de Caisse</title> <style> body { font-family: 'Courier New', Courier, monospace; font-size: 10pt; line-height: 1.2; width: 80mm; margin: 0; padding: 0; } table { width: 100%; border-collapse: collapse; table-layout: fixed; /* Crucial for consistent width */ } td { padding: 2px; vertical-align: top; word-wrap: break-word; /* Handles long words */ } .dashed-line { border-bottom: 1px dashed #000; margin: 2px 0; } .header, .footer { text-align: center; font-weight: bold; } .item-details-right, .amount-right { text-align: right; } .indented { padding-left: 20px; font-size: 8pt; /* Smaller font for quantity/price and VAT */ } .bold { font-weight: bold; } .vat-summary-table { width: 100%; border-collapse: collapse; margin-top: 5px; } .vat-summary-table th, .vat-summary-table td { padding: 0px; font-size: 9pt; text-align: right; /* Default right-align */ } .vat-summary-table th { border-bottom: 1px dashed #000; font-weight: bold; } .vat-summary-table .left { text-align: left; } .item-line { width: 70%; } .price-line { width: 30%; text-align: right; } .footer { padding-top: 10px; /* More space above the footer */ } .item-name { font-size: 10pt; /* Ensure item name is the main size */ } </style> </head> <body> <table> <tr> <td class="header bold"> #set($currentDate = "$current_date") $reservation_resortname $dateFormatter.format("currentDate", "dd-MM-yyyy") </td> </tr> <tr><td class="dashed-line"></td></tr> <tr> <td class="header bold"> #if(!$documentTagList.isEmpty()) Caisse: $documentTagList.get(0).employee_name<br> ID du caissier: $documentTagList.get(0).employee_id<br> #end #if(!$documentTagList.isEmpty()) $documentTagList.get(0).document_type B525/0420 $documentTagList.get(0).signature ver.:2.0 #end </td> </tr> <tr><td class="dashed-line"></td></tr> <tr> <td class="bold"> $admin_organisation_name Siège social: $admin_organisation_housenumber $admin_organisation_address1 $admin_organisation_zipcode $admin_organisation_city $admin_organisation_country RCS: $admin_organisation_rcs SIRET: $admin_organisation_siret APE: $admin_organisation_ape_code N TVA: $admin_organisation_vat_number </td> </tr> <tr><td class="dashed-line"></td></tr> <tr> <td class="header bold"> #if(!$documentTagList.isEmpty()) Ticket: $documentTagList.get(0).document_id #end </td> </tr> <tr><td class="dashed-line"></td></tr> </table> <table> #set($grandTotal = 0) #foreach($bill in $billList) #if($bill.bill_payer_type == "c" && !$bill.bill_linetype.matches("-10|0|60|40|200|20|-20|30|80|90|70")) #set($lineTotal = $convert.toDouble($bill.bill_total_without_format)) #set($grandTotal = $grandTotal + $lineTotal) #set($quantity = $convert.toDouble($bill.bill_quantity)) #set($unitPrice = 0) #if($quantity > 0) #set($unitPrice = $lineTotal / $quantity) #end #set($vatRate = $bill.bill_vat_rate) #if(!$vatRate || $vatRate == "") #set($vatRate = "0") #end #set($vatLetter = "A") #if($vatRate == "0.0") #set($vatLetter = "A") #elseif($vatRate == "5,5" || $vatRate == "5.5") #set($vatLetter = "B") #elseif($vatRate == "10.0") #set($vatLetter = "C") #elseif($vatRate == "20.0") #set($vatLetter = "D") #end <tr> <td class="item-line bold"> <span class="item-name">$bill.bill_type</span> #if($bill.bill_total != "0,00") <br><span class="indented">($quantity x $number.format("0.00", $unitPrice).replace(".", ","))</span> #end #if($bill.bill_vat_rate && $bill.bill_vat_rate != "" && $bill.bill_vat_rate != "0,00") <div class="indented bold">TVA $vatLetter ($bill.bill_vat_rate%)</div> #end </td> <td class="price-line bold"> #if($bill.bill_total != "0,00") $number.format("0.00", $lineTotal).replace(".", ",") #end </td> </tr> #end #end </table> <table> <tr><td class="dashed-line"></td></tr> <tr> <td> <table> <tr> <td width="50%" class="bold">Total:</td> <td width="50%" class="amount-right bold">EUR $number.format("0.00", $grandTotal).replace(".", ",")</td> </tr> <tr> <td class="bold">Déjà payé:</td> #set($amountPaidTotal = 0) #foreach($bill in $billList) #if($bill.bill_linetype == "80") #set($amountPaidTotal = $amountPaidTotal + $convert.toDouble($bill.bill_total_without_format)) #end #end <td class="amount-right bold">EUR $number.format("0.00", $amountPaidTotal).replace(".", ",")</td> </tr> <tr> <td class="bold">Nombre de ligne:</td> #set($articleCount = 0) #foreach($bill in $billList) #if($bill.bill_linetype == "10") #set($articleCount = $articleCount + 1) #end #end <td class="amount-right bold">$articleCount</td> </tr> <tr> <td class="bold"> #set($transactionType = "VENTE") #if($grandTotal < 0) #set($transactionType = "ANNULATION") #end $transactionType </td> </tr> <tr> <td class="bold">Mode de paiement:</td> <td class="amount-right bold"> #if($receivedPaymentList && $receivedPaymentList.size() > 0) #set($printedBanks = []) #foreach($payment in $receivedPaymentList) #if(!$printedBanks.contains($payment.bankname)) #set($ignore = $printedBanks.add($payment.bankname)) $payment.bankname<br/> #end #end #else N/A #end </td> </tr> </table> </td> </tr> <tr><td class="dashed-line"></td></tr> </table> <table class="vat-summary-table"> <thead> <tr> <th class="left">Détails TVA</th> <th>TVA</th> <th>Excl.</th> <th>Incl.</th> </tr> </thead> <tbody> #set($vatMap = {}) #foreach($bill in $billList) #if($bill.bill_payer_type == "c" && $bill.bill_linetype == "10") #set($vatRate = $bill.bill_vat_rate) #if(!$vatRate || $vatRate == "") #set($vatRate = "0") #end ## Assign VAT Rate Letter #set($vatLetter = "A") ## Default value #if($vatRate == "0.0") #set($vatLetter = "A") #elseif($vatRate == "5,5" || $vatRate == "5.5") #set($vatLetter = "B") #elseif($vatRate == "10.0") #set($vatLetter = "C") #elseif($vatRate == "20.0") #set($vatLetter = "D") #end #set($vatKey = "${vatRate}") ## Group by VAT rate #set($vatAmount = $convert.toDouble($bill.bill_total_vat_without_format)) #set($exclAmount = $convert.toDouble($bill.bill_total_excl_vat_without_format)) #set($inclAmount = $convert.toDouble($bill.bill_total_without_format)) #if($vatMap.containsKey($vatKey)) #set($vatEntry = $vatMap.get($vatKey)) #set($vatEntry.vatAmount = $vatEntry.vatAmount + $vatAmount) #set($vatEntry.exclAmount = $vatEntry.exclAmount + $exclAmount) #set($vatEntry.inclAmount = $vatEntry.inclAmount + $inclAmount) #else #set($vatEntry = { "vatRate": $vatRate, "vatLetter": $vatLetter, "vatAmount": $vatAmount, "exclAmount": $exclAmount, "inclAmount": $inclAmount }) #set($void = $vatMap.put($vatKey, $vatEntry)) #end #end #end #set($NETtotal = 0) #set($VATtotal = 0) #set($GROSStotal = 0) #foreach($vatEntry in $vatMap.values()) <tr> <td class="left bold">$vatEntry.vatLetter ($vatEntry.vatRate%)</td> <td class="bold">$number.format("0.00", $vatEntry.vatAmount).replace(".", ",")</td> <td class="bold">$number.format("0.00", $vatEntry.exclAmount).replace(".", ",")</td> <td class="bold">$number.format("0.00", $vatEntry.inclAmount).replace(".", ",")</td> </tr> #set($NETtotal = $NETtotal + $vatEntry.exclAmount) #set($VATtotal = $VATtotal + $vatEntry.vatAmount) #set($GROSStotal = $GROSStotal + $vatEntry.inclAmount) #end <tr> <td class="left bold">Total</td> <td class="bold">$number.format("0.00", $VATtotal).replace(".", ",")</td> <td class="bold">$number.format("0.00", $NETtotal).replace(".", ",")</td> <td class="bold">$number.format("0.00", $GROSStotal).replace(".", ",")</td> </tr> </tbody> </table> <table> <tr><td class="footer bold">Merci et Au revoir</td></tr> </table> </body> </html>

Factures

Différents types de factures sont émis par le système, à savoir la facture, la facture de paiement et la facture d'avoir. Ces factures sont, dans une large mesure, similaires en termes de contenu, mais il existe de petites différences entre les différents types, par exemple au niveau des champs. Par conséquent, pour chaque type de facture, un modèle de facture (invoice_template) est configuré dans le module d'administration MXTS.

Dans ce paragraphe, un format par défaut est disponible pour chaque type de facture, et ce format peut être personnalisé et adapté à chaque client.

 

Facture:

Facture d'avoir:

Facture d'acompte:

Facture d'avoir d'acompte:



Related content