Integrate fixing from - POS not printing correct document - ID: 2446215
Thanks to William Caicedo
This commit is contained in:
parent
6fd17e8d43
commit
2a4c8714a4
|
|
@ -66,7 +66,7 @@ public class SubCheckout extends PosSubPanel implements ActionListener
|
||||||
private CButton f_summary = null;
|
private CButton f_summary = null;
|
||||||
private CButton f_process = null;
|
private CButton f_process = null;
|
||||||
private CButton f_print = null;
|
private CButton f_print = null;
|
||||||
|
|
||||||
//TODO: credit card
|
//TODO: credit card
|
||||||
/* private CLabel f_lcreditCardNumber = null;
|
/* private CLabel f_lcreditCardNumber = null;
|
||||||
private CTextField f_creditCardNumber = null;
|
private CTextField f_creditCardNumber = null;
|
||||||
|
|
@ -264,9 +264,14 @@ public class SubCheckout extends PosSubPanel implements ActionListener
|
||||||
if (isOrderFullyPay())
|
if (isOrderFullyPay())
|
||||||
{
|
{
|
||||||
displaySummary();
|
displaySummary();
|
||||||
processOrder();
|
//Check if order is completed, if so, print and open drawer, create an empty order and set cashGiven to zero
|
||||||
printTicket();
|
if(processOrder())
|
||||||
openCashDrawer();
|
{
|
||||||
|
printTicket();
|
||||||
|
openCashDrawer();
|
||||||
|
p_posPanel.newOrder();
|
||||||
|
f_cashGiven.setValue(Env.ZERO);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -320,8 +325,10 @@ public class SubCheckout extends PosSubPanel implements ActionListener
|
||||||
* *Basado en Codigo Original Modificado, Revisado y Optimizado de:
|
* *Basado en Codigo Original Modificado, Revisado y Optimizado de:
|
||||||
* *Copyright <EFBFBD> ConSerTi
|
* *Copyright <EFBFBD> ConSerTi
|
||||||
*/
|
*/
|
||||||
public void processOrder()
|
public boolean processOrder()
|
||||||
{
|
{
|
||||||
|
//Returning orderCompleted to check for order completness
|
||||||
|
boolean orderCompleted = false;
|
||||||
p_posPanel.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
|
p_posPanel.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
|
||||||
MOrder order = p_posPanel.f_curLine.getOrder();
|
MOrder order = p_posPanel.f_curLine.getOrder();
|
||||||
if (order != null)
|
if (order != null)
|
||||||
|
|
@ -355,8 +362,9 @@ public class SubCheckout extends PosSubPanel implements ActionListener
|
||||||
else if( order.getDocStatus().equals("CO") )
|
else if( order.getDocStatus().equals("CO") )
|
||||||
{
|
{
|
||||||
order = null;
|
order = null;
|
||||||
p_posPanel.newOrder();
|
orderCompleted = true;
|
||||||
f_cashGiven.setValue(Env.ZERO);
|
//p_posPanel.newOrder();
|
||||||
|
//f_cashGiven.setValue(Env.ZERO);
|
||||||
log.info( "SubCheckout - processOrder OK");
|
log.info( "SubCheckout - processOrder OK");
|
||||||
p_posPanel.f_status.setStatusLine("Order completed.");
|
p_posPanel.f_status.setStatusLine("Order completed.");
|
||||||
}
|
}
|
||||||
|
|
@ -368,6 +376,7 @@ public class SubCheckout extends PosSubPanel implements ActionListener
|
||||||
} // try-finally
|
} // try-finally
|
||||||
}
|
}
|
||||||
p_posPanel.setCursor(Cursor.getDefaultCursor());
|
p_posPanel.setCursor(Cursor.getDefaultCursor());
|
||||||
|
return orderCompleted;
|
||||||
} // processOrder
|
} // processOrder
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -393,6 +402,7 @@ public class SubCheckout extends PosSubPanel implements ActionListener
|
||||||
*/
|
*/
|
||||||
//print standard document
|
//print standard document
|
||||||
ReportCtl.startDocumentPrint(ReportEngine.ORDER, order.getC_Order_ID(), null, Env.getWindowNo(this), true);
|
ReportCtl.startDocumentPrint(ReportEngine.ORDER, order.getC_Order_ID(), null, Env.getWindowNo(this), true);
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue