1

Estoy trabajando con un programa llamando UnicentaOpos que está diseñado en Java, tengo que conectar a la base de datos a través de un iPod a tomar la orden y enviar la comanda a la cocina. Puedo conectar a la base de datos a través de esta aplicación ( https://sourceforge.net/p/nordpos/discussion/restaurant-service/thread/9446cfc9/ ) instalado en un servidor Tomcat y funciona de manera perfecta siempre que el producto tenga un sólo precio ya que puede tener 3 precios diferentes (bar, salón, terraza). Originalmente el programa (UnicentaPos) solo trabaja con un precio por producto pero alguien modificó eso y compartió la solución que es modificar el programa y la base de datos para que pueda trabajar con 3 precios... Aquí viene el problema y es que el .WAR esta hecho para que funcione con un precio por producto peta al intentar utilizarlo cuando se modifica la base de datos. Necesito dos cosas:

  1. Modificar el WAR para que funcione sin ningún problema con productos con 3 precios.
  2. Cómo mandar a imprimir la comanda desde el .WAR?

todo correcto cuando la base de datos NO esta modificada

Como pueden observar en la segunda imagen, se pueden agregar los productos que estan en la base de datos sin ningun problema. Lo que necesito es mandar a imprimir esos productos a la impresora que esta en la cocina.

<?xml version="1.0" encoding="UTF-8"?>
<!--
    uniCenta oPOS - Touch friendly Point Of Sale
    Copyright (c) 2009-2012 uniCenta.
    http://sourceforge.net/projects/unicentaopos

    This file is part of uniCenta oPOS.

    uniCenta oPOS is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    uniCenta oPOS is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with uniCenta oPOS.  If not, see <http://www.gnu.org/licenses/>.
-->

<output>

    <display>
        <line>
            <text align="left" length="10">Order sent to Kitchen</text>
            <text align="right" length="10">${ticket.printTotal()}</text>
        </line>
        <line>
            <text align="center" length="20">Thank you.</text>
        </line>
    </display>

    <ticket printer = "2">
        <line></line>
        <line></line>
        <line size = "1">
            <text bold = "true" align="center" length="42">Kitchen Order</text>
        </line>
        <line></line>
        <line>
            <text align="left" length="15">Receipt:</text>
            <text>${ticket.printId()}</text>
        </line>
        <line>
            <text align="left" length="15">Date:</text>
            <text>${ticket.printDate()}</text>
        </line>

    #if ($ticket.getCustomer())
        <line>
            <text align="left" length="15">Customer:</text>
            <text>${ticket.getCustomer().getName()}</text>
        </line>
        <line>
            <text align="left" length="15"></text>
            <text align="left" length="15">Account #:</text>
            <text>${ticket.getCustomer().getTaxid()}</text>
        </line>
    #end


        #if (${tickettext.place} != ${place})
        <line>
           <text align="left" length="15">Table:</text>
           <text>${place}</text>
        </line>
        #end
        
        <line></line>
        <line>
            <text align ="left" length="17">Item</text>
            <text align ="right" length="5"></text>
        </line>
        <line>
            <text>------------------------------------------</text>
        </line>
    #foreach ($ticketline in $ticket.getLines())
        #if(($ticketline.isProductKitchen()) && ($ticketline.getProperty("sendstatus").equals("No")))
            <line size = "1">
                <text align ="left" length="5">${ticketline.printMultiply()}x</text>
                #if ($ticketline.isProductCom())
                    <text align ="left" length="37">--${ticketline.printName()}</text>
                #else
                    <text align ="left" length="37">${ticketline.printName()}</text>
                #end
            </line>
            <!-- Add the following lines only for 2.30 Attributes -->
              #if ($ticketline.productAttSetInstId)
                <line>
                    <text align ="left" length="42">    ${ticketline.productAttSetInstDesc}</text>
                </line>
                <line></line>
            #end
         #end

    #end
        <line>
            <text>------------------------------------------</text>
        </line>
        <line>
            <text align="left" length="15">Server:</text>
            <text>${ticket.printUser()}</text>
        </line>
    </ticket>
</output>

Éste es el código que se ejecuta en la aplicación del ordenador, prácticamente lo que necesito es que eso mismo que realize en el .WAR

PD: UnicentaOpos esta basado en Java.

1
  • publica todos los enlaces del software y el método de instalación y configuración completo que estas usando para poderlo replicar en una vm y ver el problema con más detalles (servidor tomcat, archivos war, unicenta (version), si es con wamp o todo por separado, etc)
    – acgbox
    el 14 oct. 2019 a las 0:06

0

Tu Respuesta

By clicking “Publica tu respuesta”, you agree to our terms of service and acknowledge you have read our privacy policy.

Examina otras preguntas con la etiqueta o formula tu propia pregunta.