Ask Your Question
0

Impossible imprimer ticket de caisse

asked 2017-08-31 18:34:49 +0200

updated 2017-09-11 14:38:27 +0200

Bonjour,

Je vous écris car j'ai un message d'erreur lors de mes encaissements, je ne peux imprimer mes tickets de caisse. J'ouvre ma librairie samedi et je vous serai reconnaissant si vous aviez une solution à m'apporter... Voici le message d'erreur affiché :

" Impossible d'imprimer la facture : com.openbravo.pos.printer.TicketPrinterException : analysis error.Invalid XML file org.xmlsax.saxparseException : le balisage du document suivant l'élément racine doit avoir un format correct."

Je tiens à préciser que j'ai accès à l'impression des tickets via l'édition des ventes, donc l'impression en soi n'est pas réellement impossible, elle l'est uniquement sur la page d'encaissement.

Merci d'avance

edit retag flag offensive close merge delete

Comments

C’est une erreur de la ressource avancée du ticket. Tu as du tenter une modification qui a cassé la structure (c’est du XML, très proche de HTML dans l’idée). Peux-tu donner le code XML du Printer.Ticket que je tente de trouver l’erreur ?

philippe gravatar imagephilippe ( 2017-09-11 14:39:54 +0200 )edit

2 answers

Sort by » oldest newest most voted
0

answered 2017-09-15 20:55:05 +0200

updated 2017-09-15 20:56:03 +0200

Voici le ticket tel que défini par défaut. Copies/colles, ça devrait marcher à nouveau. Attention à la syntaxe, c’est délicat ces petites choses :)

<?xml version="1.0" encoding="UTF-8"?>
<output>
    <display>
        <line>
            <text align="left" length="10">Total.</text>
            <text align="right" length="10">${ticket.printTotal()}</text>
        </line>
        <line>
           <text align="center" length="20">Merci.</text>
        </line>
    </display>
    <ticket>
        <image>Printer.Ticket.Logo</image>
        <line></line>
        #if (${ticket.ticketType} == 0)
        <line>
            <text align="left" length="15">Ticket : </text>
            <text>${ticket.printId()}</text>
        </line>
        #end
        #if (${ticket.ticketType} == 1)
        <line>
            <text align="left" length="15">Refund:</text>
            <text>${ticket.printId()}</text>
        </line>
        #end
        <line>
            <text align="left" length="15">Date  :</text>
            <text>${ticket.printDate()}</text>
        </line>  
         #if ($ticket.getCustomer())
        <line>
            <text align="left" length="15">Client : </text>
            <text>${ticket.getCustomer().printName()}</text>
        </line>      
        <line>
            <text align="left" length="15"></text>
            <text>${ticket.getCustomer().printTaxid()}</text>
        </line>  
        #end
        #if ($place != "")
        <line>
            <text align="left" length="15">Table : </text>
            <text>${place}</text>
        </line>  
        #end
        #if ($ticket.hasCustomersCount())
        <line>
            <text align="left" length="15">Convives : </text>
            <text>${ticket.printCustomersCount()}</text>
        </line>
        #end
        <line></line>    
        <line>
            <text align ="left" length="17">Article</text>
            <text align ="right" length="10">Prix</text>
            <text align ="right" length="5"></text>
            <text align ="right" length="10">Total</text>
        </line>      
        <line>
             <text>------------------------------------------</text>
        </line>   
        #foreach ($ticketline in $ticket.getLines())
        <line>
            #if ($ticketline.isProductCom()) 
                <text align ="left" length="17">*${ticketline.printName()}</text>
            #else
                <text align ="left" length="17">${ticketline.printName()}</text>
            #end
            <text align ="right" length="10">${ticketline.printPriceTax()}</text>
            <text align ="right" length="5">x${ticketline.printMultiply()}</text>
            <text align ="right" length="10">${ticketline.printValue()}</text>
        </line> 
        #if ($ticketline.productAttSetInstId)
        <line>
            <text align ="left" length="42">    ${ticketline.productAttSetInstDesc}</text>
        </line>
        #end
        #end
        <line>
             <text>------------------------------------------</text>
        </line>   
        <line>
            <text>Nb d'articles : </text>
            <text align ="right" length="10">${ticket.printArticlesCount()}</text>
        </line> 
        <line></line>
        #foreach ($taxinfo in $taxes)  
        #set($taxline = $ticket.getTaxLine($taxinfo))
        #if ($taxline.getTax() > 0.0)
        <line>
            <text align ="left" length="18">${taxline.getTaxInfo()}</text>  
            <text align ="right" length="12">${taxline.printSubTotal()}</text> 
            <text align ="right" length="12">${taxline.printTax()}</text> 
        </line>
        #end
        #end
        <line></line>
        <line>
            <text align ="left" length="16">Sous-total</text>
            <text align ="right" length="20">${ticket.printSubTotal()}</text>
        </line> 
        <line>
            <text align ="left" length="16">TVA</text>
            <text align ="right" length="20">${ticket.printTax()}</text>
        </line> 
        <line></line> 
        <line size="1">
            <text align ="left" length="16" bold="true">Total</text>
            <text align ="right" length="20" bold="true">${ticket.printTotal()}</text>
        </line>    
        #foreach ($paymentline in $ticket.payments)      
         #if ($paymentline.name == "cash")
        <line></line>     
        <line>
            <text bold="true">Espèce</text>
        </line>  
        <line>
             <text align="left" length ...
(more)
edit flag offensive delete link more
0

answered 2017-09-12 14:24:02 +0200

Merci encore pour votre aide ! Je ne peux vous répondre en commentaire car le texte est trop long. Oui j'avais essayé de modifier mon ticket de caisse. J'ai effectué un copier coller avant de le modifier mais apparemment ça n'a pas suffit. Merci d'avance pour votre réponse

Voici le Printer.Ticket

<text align="left" length="10">Total.</text>

<output> <display> <line> <text align="left" length="10">Total.</text> <text align="right" length="10">${ticket.printTotal()}</text> </line> <line> <text align="center" length="20">Merci.</text> </line> </display> <ticket> <image>Printer.Ticket.Logo</image> <line></line> #if (${ticket.ticketType} == 0) <line> <text align="left" length="15">Ticket : </text> <text>${ticket.printId()}</text> </line> #end #if (${ticket.ticketType} == 1) <line> <text align="left" length="15">Refund:</text> <text>${ticket.printId()}</text> </line> #end <line> <text align="left" length="15">Date :</text> <text>${ticket.printDate()}</text> </line>
#if ($ticket.getCustomer()) <line> <text align="left" length="15">Client : </text> <text>${ticket.getCustomer().printName()}</text> </line>
<line> <text align="left" length="15"></text> <text>${ticket.getCustomer().printTaxid()}</text> </line>
#end #if ($place != "") <line> <text align="left" length="15">Table : </text> <text>${place}</text> </line>
#end #if ($ticket.hasCustomersCount()) <line> <text align="left" length="15">Convives : </text> <text>${ticket.printCustomersCount()}</text> </line> #end <line></line>
<line> <text align="left" length="17">Article</text> <text align="right" length="10">Prix</text> <text align="right" length="5"></text> <text align="right" length="10">Total</text> </line>
<line> <text>------------------------------------------</text> </line>
#foreach ($ticketline in $ticket.getLines()) <line> #if ($ticketline.isProductCom()) <text align="left" length="17">*${ticketline.printName()}</text> #else <text align="left" length="17">${ticketline.printName()}</text> #end <text align="right" length="10">${ticketline.printPriceTax()}</text> <text align="right" length="5">x${ticketline.printMultiply()}</text> <text align="right" length="10">${ticketline.printValue()}</text> </line> #if ($ticketline.productAttSetInstId) <line> <text align="left" length="42"> ${ticketline.productAttSetInstDesc}</text> </line> #end #end <line> <text>------------------------------------------</text> </line>
<line> <text>Nb d'articles : </text> <text align="right" length="10">${ticket.printArticlesCount()}</text> </line> <line></line> #foreach ($taxinfo in $taxes)
#set($taxline = $ticket.getTaxLine($taxinfo)) #if ($taxline.getTax() > 0.0) <line> <text align="left" length="18">${taxline.getTaxInfo()}</text>
<text align="right" length="12">${taxline.printSubTotal()}</text> <text align="right" length="12">${taxline.printTax()}</text> </line> #end #end <line></line> <line> <text align="left" length="16">Sous-total</text> <text align="right" length="20">${ticket.printSubTotal()}</text> </line> <line> <text align="left" length="16">TVA</text> <text align="right" length="20">${ticket.printTax()}</text> </line> <line></line> <line size="1"> <text align="left" length="16" bold="true">Total</text> <text align="right" length="20" bold="true"> ... (more)

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2017-08-31 18:34:49 +0200

Seen: 15 times

Last updated: Sep 15