wip
This commit is contained in:
@@ -361,7 +361,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.unicenta</groupId>
|
<groupId>com.unicenta</groupId>
|
||||||
<artifactId>unicenta-plugins</artifactId>
|
<artifactId>unicenta-plugins</artifactId>
|
||||||
<version>1.2.7</version>
|
<version>1.2.9-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.gluonhq</groupId>
|
<groupId>com.gluonhq</groupId>
|
||||||
|
|||||||
@@ -23,6 +23,8 @@ import com.unicenta.pos.catalog.CatalogSelector;
|
|||||||
import com.unicenta.pos.catalog.JCatalog;
|
import com.unicenta.pos.catalog.JCatalog;
|
||||||
import com.unicenta.pos.forms.AppView;
|
import com.unicenta.pos.forms.AppView;
|
||||||
import com.unicenta.pos.ticket.ProductInfoExt;
|
import com.unicenta.pos.ticket.ProductInfoExt;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
import java.awt.Component;
|
import java.awt.Component;
|
||||||
import java.awt.Dimension;
|
import java.awt.Dimension;
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
@@ -34,6 +36,7 @@ import javax.swing.event.ListSelectionListener;
|
|||||||
*
|
*
|
||||||
* @author JG uniCenta
|
* @author JG uniCenta
|
||||||
*/
|
*/
|
||||||
|
@Slf4j
|
||||||
public class JPanelTicketSales extends JPanelTicket {
|
public class JPanelTicketSales extends JPanelTicket {
|
||||||
|
|
||||||
private CatalogSelector m_cat;
|
private CatalogSelector m_cat;
|
||||||
@@ -95,6 +98,7 @@ public class JPanelTicketSales extends JPanelTicket {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected JTicketsBag getJTicketsBag() {
|
protected JTicketsBag getJTicketsBag() {
|
||||||
|
log.debug("Get JTickets Bag");
|
||||||
return JTicketsBag.createTicketsBag(m_App.getProperties().getProperty("machine.ticketsbag"), m_App, this);
|
return JTicketsBag.createTicketsBag(m_App.getProperties().getProperty("machine.ticketsbag"), m_App, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ public class JTicketsBagShared extends JTicketsBag {
|
|||||||
private DataLogicSales dlSales = null;
|
private DataLogicSales dlSales = null;
|
||||||
private final DataLogicSystem dlSystem;
|
private final DataLogicSystem dlSystem;
|
||||||
private Boolean showList;
|
private Boolean showList;
|
||||||
|
private int existingOrderCount;
|
||||||
|
|
||||||
|
|
||||||
/** Creates new form JTicketsBagShared
|
/** Creates new form JTicketsBagShared
|
||||||
@@ -140,12 +141,26 @@ public class JTicketsBagShared extends JTicketsBag {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void updateCount() {
|
public void updateCount() {
|
||||||
|
|
||||||
|
/*
|
||||||
|
1. Need to get / set the existing count
|
||||||
|
2. When count increases show dialog
|
||||||
|
*/
|
||||||
try {
|
try {
|
||||||
List<SharedTicketInfo> l = dlReceipts.getSharedTicketList();
|
List<SharedTicketInfo> l = dlReceipts.getSharedTicketList();
|
||||||
int count = l.size();
|
int count = l.size();
|
||||||
|
|
||||||
|
if (count > existingOrderCount) {
|
||||||
|
log.info("New Order Received from the API!");
|
||||||
|
// show Order Window
|
||||||
|
// List<ReprintTicketInfo> ticketInfoList= dlSales.getReprintTicketList();
|
||||||
|
// JTicketsReprintList listDialog = JTicketsReprintList.newJDialog(JTicketsBagShared.this);
|
||||||
|
// String id = listDialog.showTicketsList(ticketInfoList, dlSales);
|
||||||
|
}
|
||||||
|
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
m_jListTickets.setText(Integer.toString(count));
|
m_jListTickets.setText(Integer.toString(count));
|
||||||
|
existingOrderCount = count;
|
||||||
} else {
|
} else {
|
||||||
m_jListTickets.setText("");
|
m_jListTickets.setText("");
|
||||||
}
|
}
|
||||||
@@ -427,6 +442,10 @@ public class JTicketsBagShared extends JTicketsBag {
|
|||||||
((JRootApp)m_App).closeAppView();
|
((JRootApp)m_App).closeAppView();
|
||||||
}//GEN-LAST:event_m_jHoldActionPerformed
|
}//GEN-LAST:event_m_jHoldActionPerformed
|
||||||
|
|
||||||
|
private void showOrderWindow() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
private void m_jReprintTicketsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_m_jReprintTicketsActionPerformed
|
private void m_jReprintTicketsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_m_jReprintTicketsActionPerformed
|
||||||
SwingUtilities.invokeLater(new Runnable() {
|
SwingUtilities.invokeLater(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ public class JTicketsReprintList extends javax.swing.JDialog {
|
|||||||
m_ticket = null;
|
m_ticket = null;
|
||||||
m_ticketCopy = null;
|
m_ticketCopy = null;
|
||||||
|
|
||||||
ReprintTicketInfo m_Ticket = null;
|
ReprintTicketInfo m_Ticket = null;
|
||||||
|
|
||||||
for (ReprintTicketInfo aticket : atickets) {
|
for (ReprintTicketInfo aticket : atickets) {
|
||||||
m_jtickets.add(new JButtonTicket(aticket, dlSales));
|
m_jtickets.add(new JButtonTicket(aticket, dlSales));
|
||||||
|
|||||||
Reference in New Issue
Block a user