From b5f05635f70449b1b76e718a65aea3ef9889f670 Mon Sep 17 00:00:00 2001 From: Paulo Borges Date: Sat, 22 Apr 2023 22:19:49 +0100 Subject: [PATCH] App: Rufs update * ColorPicker, MessageInf, PrepareSentence, Session, Rondutils --- kriolos-opos-app/nbactions.xml | 9 +- kriolos-opos-app/pom.xml | 2 +- .../BusinessPartnerListCellRenderer.java} | 19 +- .../JBusinessPartnerFinder.java | 2 +- .../com/openbravo/pos/config/JFrmConfig.form | 3 + .../com/openbravo/pos/config/JFrmConfig.java | 1 + .../pos/config/JPanelConfigSystem.form | 338 ++++---- .../pos/config/JPanelConfigSystem.java | 280 ++++--- .../pos/customers/CustomersPayment.form | 63 +- .../pos/customers/CustomersPayment.java | 35 +- .../pos/customers/CustomersView.form | 42 +- .../pos/customers/CustomersView.java | 42 +- .../pos/customers/JCustomerFinder.form | 4 +- .../pos/customers/JCustomerFinder.java | 7 +- .../pos/customers/JDialogNewCustomer.form | 20 +- .../pos/customers/JDialogNewCustomer.java | 12 +- .../pos/customers/OrderCustomerList.java | 42 +- .../com/openbravo/pos/data/DBMigrator.java | 11 +- .../com/openbravo/pos/forms/JRootApp.java | 29 +- .../com/openbravo/pos/forms/JRootFrame.java | 32 +- .../com/openbravo/pos/sales/JPanelTicket.form | 421 +++++----- .../com/openbravo/pos/sales/JPanelTicket.java | 457 +++++------ .../pos/sales/JPanelTicketSales.java | 1 - .../com/openbravo/pos/sales/JTicketsBag.java | 16 +- .../pos/sales/restaurant/FloorsEditor.form | 2 +- .../pos/sales/restaurant/FloorsEditor.java | 2 +- .../restaurant/JTicketsBagRestaurant.java | 287 ++++--- .../restaurant/JTicketsBagRestaurantMap.java | 728 +++++++++--------- .../restaurant/JTicketsBagRestaurantRes.form | 8 +- .../restaurant/JTicketsBagRestaurantRes.java | 6 +- .../pos/sales/restaurant/PlacesEditor.form | 419 +++++----- .../pos/sales/restaurant/PlacesEditor.java | 123 ++- .../pos/sales/shared/JTicketsBagShared.java | 9 +- .../pos/sales/simple/JTicketsBagSimple.form | 2 +- .../pos/sales/simple/JTicketsBagSimple.java | 14 +- .../reports/customers_messages.properties | 2 +- .../reports/suppliers_messages.properties | 4 +- .../main/resources/pos_messages.properties | 62 +- 38 files changed, 1801 insertions(+), 1755 deletions(-) rename kriolos-opos-app/src/main/java/com/openbravo/pos/{customers/CustomerRenderer.java => businesspartner/BusinessPartnerListCellRenderer.java} (74%) diff --git a/kriolos-opos-app/nbactions.xml b/kriolos-opos-app/nbactions.xml index 7bba1c2a..0d9ee93f 100644 --- a/kriolos-opos-app/nbactions.xml +++ b/kriolos-opos-app/nbactions.xml @@ -39,10 +39,17 @@ along with this program. If not, see . CUSTOM-JasperDesignViewer JasperDesignViewer - compile exec:java -Dexec.mainClass="net.sf.jasperreports.view.JasperDesignViewer" -Dexec.args="-XML -Fsrc/main/resources/com/openbravo/reports/products.jrxml" + + CUSTOM-RunSwingx + run-SwingX + + exec:java + -Dexec.mainClass="org.jdesktop.swingx.color.EyeDropperColorChooserPanel" + + diff --git a/kriolos-opos-app/pom.xml b/kriolos-opos-app/pom.xml index 45705098..bf94b01c 100644 --- a/kriolos-opos-app/pom.xml +++ b/kriolos-opos-app/pom.xml @@ -60,7 +60,7 @@ along with this program. If not, see . ${project.groupId} - kriolos-opos-i18n + kriolos-opos-i18n_pt diff --git a/kriolos-opos-app/src/main/java/com/openbravo/pos/customers/CustomerRenderer.java b/kriolos-opos-app/src/main/java/com/openbravo/pos/businesspartner/BusinessPartnerListCellRenderer.java similarity index 74% rename from kriolos-opos-app/src/main/java/com/openbravo/pos/customers/CustomerRenderer.java rename to kriolos-opos-app/src/main/java/com/openbravo/pos/businesspartner/BusinessPartnerListCellRenderer.java index 0ee9598f..9287675d 100755 --- a/kriolos-opos-app/src/main/java/com/openbravo/pos/customers/CustomerRenderer.java +++ b/kriolos-opos-app/src/main/java/com/openbravo/pos/businesspartner/BusinessPartnerListCellRenderer.java @@ -14,8 +14,9 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package com.openbravo.pos.customers; +package com.openbravo.pos.businesspartner; +import com.openbravo.pos.domain.entity.businesspartner.BusinessPartner; import com.openbravo.pos.resources.ImageResources; import java.awt.Component; @@ -25,16 +26,18 @@ /** * - * @author JG uniCenta + * @author JG uniCenta, poolborges */ -public class CustomerRenderer extends DefaultListCellRenderer { +public class BusinessPartnerListCellRenderer extends DefaultListCellRenderer { - private final Icon icocustomer; + private final Icon icon; - /** Creates a new instance of CustomerRenderer */ - public CustomerRenderer() { + /** + * Creates a new instance of CustomerRenderer + */ + public BusinessPartnerListCellRenderer() { - icocustomer = ImageResources.ICON_CUSTOMER.getIcon(); + icon = ImageResources.ICON_CUSTOMER.getIcon(); } @@ -43,7 +46,7 @@ public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { super.getListCellRendererComponent(list, null, index, isSelected, cellHasFocus); - setIcon(icocustomer); + setIcon(icon); setText(value.toString()); return this; diff --git a/kriolos-opos-app/src/main/java/com/openbravo/pos/businesspartner/JBusinessPartnerFinder.java b/kriolos-opos-app/src/main/java/com/openbravo/pos/businesspartner/JBusinessPartnerFinder.java index ccf0638c..49da3f93 100644 --- a/kriolos-opos-app/src/main/java/com/openbravo/pos/businesspartner/JBusinessPartnerFinder.java +++ b/kriolos-opos-app/src/main/java/com/openbravo/pos/businesspartner/JBusinessPartnerFinder.java @@ -120,7 +120,7 @@ private void init(DataLogicCustomers dlCustomers) { lpr = new ListProviderCreator(dlCustomers.getCustomerList(), this); - jListBPartner.setCellRenderer(new CustomerRenderer()); + jListBPartner.setCellRenderer(new BusinessPartnerListCellRenderer()); getRootPane().setDefaultButton(jcmdOK); diff --git a/kriolos-opos-app/src/main/java/com/openbravo/pos/config/JFrmConfig.form b/kriolos-opos-app/src/main/java/com/openbravo/pos/config/JFrmConfig.form index 7a66499d..85abdd06 100755 --- a/kriolos-opos-app/src/main/java/com/openbravo/pos/config/JFrmConfig.form +++ b/kriolos-opos-app/src/main/java/com/openbravo/pos/config/JFrmConfig.form @@ -3,6 +3,9 @@
+ + + diff --git a/kriolos-opos-app/src/main/java/com/openbravo/pos/config/JFrmConfig.java b/kriolos-opos-app/src/main/java/com/openbravo/pos/config/JFrmConfig.java index 33191b49..456adf51 100755 --- a/kriolos-opos-app/src/main/java/com/openbravo/pos/config/JFrmConfig.java +++ b/kriolos-opos-app/src/main/java/com/openbravo/pos/config/JFrmConfig.java @@ -116,6 +116,7 @@ public void run() { private void initComponents() { setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE); + setPreferredSize(new java.awt.Dimension(800, 600)); setSize(new java.awt.Dimension(0, 0)); setSize(new java.awt.Dimension(808, 794)); diff --git a/kriolos-opos-app/src/main/java/com/openbravo/pos/config/JPanelConfigSystem.form b/kriolos-opos-app/src/main/java/com/openbravo/pos/config/JPanelConfigSystem.form index 4f5759a3..392e72d1 100755 --- a/kriolos-opos-app/src/main/java/com/openbravo/pos/config/JPanelConfigSystem.form +++ b/kriolos-opos-app/src/main/java/com/openbravo/pos/config/JPanelConfigSystem.form @@ -7,7 +7,7 @@ - + @@ -26,110 +26,107 @@ - - - + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + - - - - + + - - - + + + + - - - - - - - - - + - + - - - - - - - - - - - - - - - - - - + + + + + + - + - - - - - + + + - - - - - - - - - + @@ -162,63 +159,66 @@ - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - + @@ -291,7 +291,6 @@ - @@ -348,7 +347,6 @@ - @@ -371,7 +369,6 @@ - @@ -395,7 +392,6 @@ - @@ -419,7 +415,6 @@ - @@ -462,7 +457,6 @@ - @@ -485,7 +479,6 @@ - @@ -506,7 +499,6 @@ - @@ -527,7 +519,6 @@ - @@ -548,7 +539,6 @@ - @@ -569,7 +559,6 @@ - @@ -629,7 +618,6 @@ - @@ -711,7 +699,6 @@ - @@ -735,7 +722,6 @@ - @@ -759,7 +745,6 @@ - @@ -779,7 +764,6 @@ - @@ -788,42 +772,60 @@ - + + + + - - + + - + + + + - + + + + - - + + - + + + + - + + + + - - + + - + + + + @@ -841,7 +843,6 @@ - @@ -873,5 +874,18 @@ + + + + + + + + + + + + + diff --git a/kriolos-opos-app/src/main/java/com/openbravo/pos/config/JPanelConfigSystem.java b/kriolos-opos-app/src/main/java/com/openbravo/pos/config/JPanelConfigSystem.java index 4a2437fa..d21be312 100755 --- a/kriolos-opos-app/src/main/java/com/openbravo/pos/config/JPanelConfigSystem.java +++ b/kriolos-opos-app/src/main/java/com/openbravo/pos/config/JPanelConfigSystem.java @@ -33,8 +33,7 @@ public class JPanelConfigSystem extends javax.swing.JPanel implements PanelConfi public JPanelConfigSystem() { initComponents(); - - + jTextAutoLogoffTime.getDocument().addDocumentListener(dirty); jchkInstance.addActionListener(dirty); jchkTextOverlay.addActionListener(dirty); @@ -269,16 +268,17 @@ private void initComponents() { jchkPriceUpdate = new javax.swing.JCheckBox(); jchkBarcodetype = new javax.swing.JCheckBox(); jchkTransBtn = new javax.swing.JCheckBox(); - WaiterColour = new javax.swing.JButton(); - TableNameColour = new javax.swing.JButton(); - CustomerColour = new javax.swing.JButton(); + WaiterColour = new com.openbravo.data.gui.JColorPicker(); + TableNameColour = new com.openbravo.data.gui.JColorPicker(); + CustomerColour = new com.openbravo.data.gui.JColorPicker(); jchkOverride = new javax.swing.JCheckBox(); jtxtPIN = new javax.swing.JTextField(); jLabel5 = new javax.swing.JLabel(); + jLabel6 = new javax.swing.JLabel(); setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N setOpaque(false); - setPreferredSize(new java.awt.Dimension(700, 500)); + setPreferredSize(new java.awt.Dimension(800, 600)); jLabel1.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("pos_messages"); // NOI18N @@ -302,7 +302,6 @@ private void initComponents() { jchkInstance.setText(bundle.getString("label.instance")); // NOI18N jchkInstance.setMaximumSize(new java.awt.Dimension(0, 25)); jchkInstance.setMinimumSize(new java.awt.Dimension(0, 0)); - jchkInstance.setOpaque(false); jchkInstance.setPreferredSize(new java.awt.Dimension(250, 25)); jTextAutoLogoffTime.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N @@ -322,7 +321,6 @@ private void initComponents() { jchkAutoLogoff.setText(bundle.getString("label.autologonoff")); // NOI18N jchkAutoLogoff.setMaximumSize(new java.awt.Dimension(0, 25)); jchkAutoLogoff.setMinimumSize(new java.awt.Dimension(0, 0)); - jchkAutoLogoff.setOpaque(false); jchkAutoLogoff.setPreferredSize(new java.awt.Dimension(200, 30)); jchkAutoLogoff.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { @@ -334,7 +332,6 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { jchkAutoLogoffToTables.setText(bundle.getString("label.autoloffrestaurant")); // NOI18N jchkAutoLogoffToTables.setMaximumSize(new java.awt.Dimension(0, 25)); jchkAutoLogoffToTables.setMinimumSize(new java.awt.Dimension(0, 0)); - jchkAutoLogoffToTables.setOpaque(false); jchkAutoLogoffToTables.setPreferredSize(new java.awt.Dimension(0, 30)); jchkAutoLogoffToTables.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { @@ -347,7 +344,6 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { jchkShowCustomerDetails.setText(bundle.getString("label.tableshowcustomerdetails")); // NOI18N jchkShowCustomerDetails.setMaximumSize(new java.awt.Dimension(0, 25)); jchkShowCustomerDetails.setMinimumSize(new java.awt.Dimension(0, 0)); - jchkShowCustomerDetails.setOpaque(false); jchkShowCustomerDetails.setPreferredSize(new java.awt.Dimension(350, 30)); jchkShowCustomerDetails.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { @@ -360,7 +356,6 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { jchkShowWaiterDetails.setText(bundle.getString("label.tableshowwaiterdetails")); // NOI18N jchkShowWaiterDetails.setMaximumSize(new java.awt.Dimension(0, 25)); jchkShowWaiterDetails.setMinimumSize(new java.awt.Dimension(0, 0)); - jchkShowWaiterDetails.setOpaque(false); jchkShowWaiterDetails.setPreferredSize(new java.awt.Dimension(350, 30)); jLabelTableNameTextColour.setBackground(new java.awt.Color(255, 255, 255)); @@ -375,7 +370,6 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { jCheckPrice00.setToolTipText(""); jCheckPrice00.setMaximumSize(new java.awt.Dimension(0, 25)); jCheckPrice00.setMinimumSize(new java.awt.Dimension(0, 0)); - jCheckPrice00.setOpaque(false); jCheckPrice00.setPreferredSize(new java.awt.Dimension(250, 25)); jCheckPrice00.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { @@ -387,7 +381,6 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { jTaxIncluded.setText(bundle.getString("label.taxincluded")); // NOI18N jTaxIncluded.setMaximumSize(new java.awt.Dimension(0, 25)); jTaxIncluded.setMinimumSize(new java.awt.Dimension(0, 0)); - jTaxIncluded.setOpaque(false); jTaxIncluded.setPreferredSize(new java.awt.Dimension(250, 25)); jCloseCashbtn.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N @@ -395,7 +388,6 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { jCloseCashbtn.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); jCloseCashbtn.setMaximumSize(new java.awt.Dimension(0, 25)); jCloseCashbtn.setMinimumSize(new java.awt.Dimension(0, 0)); - jCloseCashbtn.setOpaque(false); jCloseCashbtn.setPreferredSize(new java.awt.Dimension(250, 25)); jMoveAMountBoxToTop.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N @@ -403,7 +395,6 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { jMoveAMountBoxToTop.setText(bundle.getString("label.inputamount")); // NOI18N jMoveAMountBoxToTop.setMaximumSize(new java.awt.Dimension(0, 25)); jMoveAMountBoxToTop.setMinimumSize(new java.awt.Dimension(0, 0)); - jMoveAMountBoxToTop.setOpaque(false); jMoveAMountBoxToTop.setPreferredSize(new java.awt.Dimension(250, 25)); jchkTextOverlay.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N @@ -411,7 +402,6 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { jchkTextOverlay.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); jchkTextOverlay.setMaximumSize(new java.awt.Dimension(0, 25)); jchkTextOverlay.setMinimumSize(new java.awt.Dimension(0, 0)); - jchkTextOverlay.setOpaque(false); jchkTextOverlay.setPreferredSize(new java.awt.Dimension(250, 25)); jchkautoRefreshTableMap.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N @@ -419,7 +409,6 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { jchkautoRefreshTableMap.setText(bundle.getString("label.autoRefreshTableMap")); // NOI18N jchkautoRefreshTableMap.setMaximumSize(new java.awt.Dimension(0, 25)); jchkautoRefreshTableMap.setMinimumSize(new java.awt.Dimension(0, 0)); - jchkautoRefreshTableMap.setOpaque(false); jchkautoRefreshTableMap.setPreferredSize(new java.awt.Dimension(200, 30)); jchkautoRefreshTableMap.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { @@ -444,7 +433,6 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { jchkSCOnOff.setText(bundle.getString("label.SCOnOff")); // NOI18N jchkSCOnOff.setMaximumSize(new java.awt.Dimension(0, 25)); jchkSCOnOff.setMinimumSize(new java.awt.Dimension(0, 0)); - jchkSCOnOff.setOpaque(false); jchkSCOnOff.setPreferredSize(new java.awt.Dimension(0, 25)); jchkSCOnOff.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { @@ -480,7 +468,6 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { jchkSCRestaurant.setText(bundle.getString("label.SCRestaurant")); // NOI18N jchkSCRestaurant.setMaximumSize(new java.awt.Dimension(0, 25)); jchkSCRestaurant.setMinimumSize(new java.awt.Dimension(0, 0)); - jchkSCRestaurant.setOpaque(false); jchkSCRestaurant.setPreferredSize(new java.awt.Dimension(0, 25)); jchkPriceUpdate.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N @@ -489,7 +476,6 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { jchkPriceUpdate.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); jchkPriceUpdate.setMaximumSize(new java.awt.Dimension(0, 25)); jchkPriceUpdate.setMinimumSize(new java.awt.Dimension(0, 0)); - jchkPriceUpdate.setOpaque(false); jchkPriceUpdate.setPreferredSize(new java.awt.Dimension(250, 25)); jchkBarcodetype.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N @@ -498,14 +484,12 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { jchkBarcodetype.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); jchkBarcodetype.setMaximumSize(new java.awt.Dimension(0, 25)); jchkBarcodetype.setMinimumSize(new java.awt.Dimension(0, 0)); - jchkBarcodetype.setOpaque(false); jchkBarcodetype.setPreferredSize(new java.awt.Dimension(250, 25)); jchkTransBtn.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N jchkTransBtn.setText(bundle.getString("label.tabletransbutton")); // NOI18N jchkTransBtn.setMaximumSize(new java.awt.Dimension(0, 25)); jchkTransBtn.setMinimumSize(new java.awt.Dimension(0, 0)); - jchkTransBtn.setOpaque(false); jchkTransBtn.setPreferredSize(new java.awt.Dimension(350, 30)); jchkTransBtn.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { @@ -513,23 +497,28 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { } }); - WaiterColour.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N WaiterColour.setToolTipText(bundle.getString("tooltip.prodhtmldisplayColourChooser")); // NOI18N - WaiterColour.setMinimumSize(new java.awt.Dimension(51, 30)); + WaiterColour.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N + WaiterColour.setMaximumSize(new java.awt.Dimension(71, 30)); + WaiterColour.setMinimumSize(new java.awt.Dimension(71, 30)); + WaiterColour.setPreferredSize(new java.awt.Dimension(71, 30)); - TableNameColour.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N TableNameColour.setToolTipText(bundle.getString("tooltip.prodhtmldisplayColourChooser")); // NOI18N - TableNameColour.setMinimumSize(new java.awt.Dimension(51, 30)); + TableNameColour.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N + TableNameColour.setMaximumSize(new java.awt.Dimension(71, 30)); + TableNameColour.setMinimumSize(new java.awt.Dimension(71, 30)); + TableNameColour.setPreferredSize(new java.awt.Dimension(71, 30)); - CustomerColour.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N CustomerColour.setToolTipText(bundle.getString("tooltip.prodhtmldisplayColourChooser")); // NOI18N - CustomerColour.setMinimumSize(new java.awt.Dimension(51, 30)); + CustomerColour.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N + CustomerColour.setMaximumSize(new java.awt.Dimension(71, 30)); + CustomerColour.setMinimumSize(new java.awt.Dimension(71, 30)); + CustomerColour.setPreferredSize(new java.awt.Dimension(71, 30)); jchkOverride.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N jchkOverride.setText(bundle.getString("label.override")); // NOI18N jchkOverride.setMaximumSize(new java.awt.Dimension(0, 25)); jchkOverride.setMinimumSize(new java.awt.Dimension(0, 0)); - jchkOverride.setOpaque(false); jchkOverride.setPreferredSize(new java.awt.Dimension(200, 30)); jtxtPIN.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N @@ -542,90 +531,92 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { jLabel5.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N jLabel5.setText("PIN"); + jLabel6.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N + jLabel6.setText(bundle.getString("label.configOptionLogOff")); // NOI18N + jLabel6.setPreferredSize(new java.awt.Dimension(100, 30)); + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() - .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() - .addGap(10, 10, 10) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(16, 16, 16) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(layout.createSequentialGroup() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jchkTransBtn, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGroup(layout.createSequentialGroup() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jchkShowCustomerDetails, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jchkShowWaiterDetails, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jLabelTableNameTextColour, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGroup(layout.createSequentialGroup() - .addGap(35, 35, 35) - .addComponent(jTextSCRate, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(jLabelSCRatePerCent, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(jLabelSCRate, javax.swing.GroupLayout.PREFERRED_SIZE, 177, javax.swing.GroupLayout.PREFERRED_SIZE))) - .addGap(34, 34, 34) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(TableNameColour, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(WaiterColour, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(CustomerColour, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) - .addComponent(jchkSCOnOff, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(jchkautoRefreshTableMap, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) - .addContainerGap()) - .addGroup(layout.createSequentialGroup() - .addGap(32, 32, 32) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addComponent(jTextAutoLogoffTime, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(jLabelTimedMessage, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(0, 0, Short.MAX_VALUE)) - .addGroup(layout.createSequentialGroup() - .addComponent(jchkAutoLogoffToTables, javax.swing.GroupLayout.PREFERRED_SIZE, 313, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) + .addComponent(jchkOverride, javax.swing.GroupLayout.PREFERRED_SIZE, 145, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jLabel5) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jtxtPIN, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addComponent(jTaxIncluded, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 260, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jchkPriceUpdate, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jchkTextOverlay, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jchkInstance, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addGap(18, 18, 18) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 250, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jCheckPrice00, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jMoveAMountBoxToTop, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jCloseCashbtn, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jchkBarcodetype, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addGroup(layout.createSequentialGroup() + .addGap(32, 32, 32) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jchkSCRestaurant, javax.swing.GroupLayout.PREFERRED_SIZE, 300, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createSequentialGroup() - .addGap(33, 33, 33) .addComponent(jTxtautoRefreshTimer, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(jLblautoRefresh, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(0, 0, Short.MAX_VALUE)))) + .addComponent(jLblautoRefresh, javax.swing.GroupLayout.PREFERRED_SIZE, 244, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addGroup(layout.createSequentialGroup() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 654, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(layout.createSequentialGroup() + .addGap(32, 32, 32) + .addComponent(jTextSCRate, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jLabelSCRatePerCent, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jLabelSCRate, javax.swing.GroupLayout.PREFERRED_SIZE, 229, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addComponent(jchkautoRefreshTableMap, javax.swing.GroupLayout.PREFERRED_SIZE, 327, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup() + .addGap(32, 32, 32) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(jchkAutoLogoffToTables, javax.swing.GroupLayout.PREFERRED_SIZE, 306, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(layout.createSequentialGroup() + .addComponent(jTextAutoLogoffTime, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jLabelTimedMessage, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))) + .addGroup(layout.createSequentialGroup() + .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 260, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createSequentialGroup() - .addGap(10, 10, 10) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jchkInstance, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jTaxIncluded, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jchkTextOverlay, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jchkPriceUpdate, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGroup(layout.createSequentialGroup() - .addComponent(jchkOverride, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(jLabel5) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(jtxtPIN, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE))))) - .addGap(112, 112, 112) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 250, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jCheckPrice00, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jMoveAMountBoxToTop, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jCloseCashbtn, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jchkBarcodetype, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) - .addComponent(jchkSCRestaurant, javax.swing.GroupLayout.PREFERRED_SIZE, 240, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(6, 6, 6) + .addComponent(jchkSCOnOff, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(jchkAutoLogoff, javax.swing.GroupLayout.PREFERRED_SIZE, 327, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 331, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 331, javax.swing.GroupLayout.PREFERRED_SIZE)))) + .addGap(18, 18, 18) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createSequentialGroup() .addGap(10, 10, 10) - .addComponent(jchkAutoLogoff, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) - .addGap(0, 54, Short.MAX_VALUE)))) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(jchkTransBtn, javax.swing.GroupLayout.DEFAULT_SIZE, 274, Short.MAX_VALUE) + .addComponent(jchkShowWaiterDetails, javax.swing.GroupLayout.DEFAULT_SIZE, 0, Short.MAX_VALUE) + .addComponent(jchkShowCustomerDetails, javax.swing.GroupLayout.DEFAULT_SIZE, 0, Short.MAX_VALUE) + .addComponent(jLabelTableNameTextColour, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 0, Short.MAX_VALUE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(WaiterColour, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(CustomerColour, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(TableNameColour, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))))) + .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) @@ -651,54 +642,56 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { .addComponent(jchkPriceUpdate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jchkBarcodetype, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jLabel5, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 38, Short.MAX_VALUE) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(jtxtPIN, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jchkOverride, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(jchkAutoLogoff, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(jchkAutoLogoffToTables, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(jTextAutoLogoffTime, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jLabelTimedMessage, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(jchkautoRefreshTableMap, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(jTxtautoRefreshTimer, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jLblautoRefresh, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(jchkSCOnOff, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(jLabelSCRate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jTextSCRate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jLabelSCRatePerCent, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(jchkSCRestaurant, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jtxtPIN, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jchkOverride, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jchkShowCustomerDetails, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(CustomerColour, javax.swing.GroupLayout.DEFAULT_SIZE, 31, Short.MAX_VALUE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) - .addComponent(jchkShowWaiterDetails, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createSequentialGroup() - .addComponent(WaiterColour, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE) - .addGap(11, 11, 11))) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) - .addComponent(TableNameColour, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(jLabelTableNameTextColour, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(jchkTransBtn, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(32, 32, 32)) + .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jchkAutoLogoff, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jchkAutoLogoffToTables, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jTextAutoLogoffTime, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabelTimedMessage, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jchkautoRefreshTableMap, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(0, 0, 0) + .addComponent(jchkSCRestaurant, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jTxtautoRefreshTimer, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLblautoRefresh, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(1, 1, 1) + .addComponent(jchkSCOnOff, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jTextSCRate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabelSCRate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabelSCRatePerCent, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addGroup(layout.createSequentialGroup() + .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(CustomerColour, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jchkShowCustomerDetails, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(jchkShowWaiterDetails, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(WaiterColour, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(TableNameColour, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jLabelTableNameTextColour, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jchkTransBtn, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addGap(61, 61, 61)) ); }// //GEN-END:initComponents @@ -760,9 +753,9 @@ private void jchkTransBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN- // Variables declaration - do not modify//GEN-BEGIN:variables - private javax.swing.JButton CustomerColour; - private javax.swing.JButton TableNameColour; - private javax.swing.JButton WaiterColour; + private com.openbravo.data.gui.JColorPicker CustomerColour; + private com.openbravo.data.gui.JColorPicker TableNameColour; + private com.openbravo.data.gui.JColorPicker WaiterColour; private javax.swing.JCheckBox jCheckPrice00; private javax.swing.JCheckBox jCloseCashbtn; private javax.swing.JLabel jLabel1; @@ -770,6 +763,7 @@ private void jchkTransBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN- private javax.swing.JLabel jLabel3; private javax.swing.JLabel jLabel4; private javax.swing.JLabel jLabel5; + private javax.swing.JLabel jLabel6; private javax.swing.JLabel jLabelSCRate; private javax.swing.JLabel jLabelSCRatePerCent; private javax.swing.JLabel jLabelTableNameTextColour; diff --git a/kriolos-opos-app/src/main/java/com/openbravo/pos/customers/CustomersPayment.form b/kriolos-opos-app/src/main/java/com/openbravo/pos/customers/CustomersPayment.form index ef7f35f9..0e5363c9 100755 --- a/kriolos-opos-app/src/main/java/com/openbravo/pos/customers/CustomersPayment.form +++ b/kriolos-opos-app/src/main/java/com/openbravo/pos/customers/CustomersPayment.form @@ -11,7 +11,7 @@ - +
@@ -173,6 +173,17 @@ + + + + + + + + + + + @@ -184,24 +195,33 @@ + + + + + + - + + + + + + + + + - + - - - - - @@ -210,8 +230,15 @@ + - + + + + + + + @@ -221,11 +248,6 @@ - - - - - @@ -277,7 +299,7 @@ - + @@ -297,7 +319,7 @@ - + @@ -393,6 +415,9 @@ + + + @@ -476,6 +501,9 @@ + + + @@ -520,6 +548,9 @@ + + + diff --git a/kriolos-opos-app/src/main/java/com/openbravo/pos/customers/CustomersPayment.java b/kriolos-opos-app/src/main/java/com/openbravo/pos/customers/CustomersPayment.java index e2564af6..b948aa42 100755 --- a/kriolos-opos-app/src/main/java/com/openbravo/pos/customers/CustomersPayment.java +++ b/kriolos-opos-app/src/main/java/com/openbravo/pos/customers/CustomersPayment.java @@ -255,7 +255,6 @@ private void printTicket(String resname, TicketInfo ticket, CustomerInfoExt cust */ // //GEN-BEGIN:initComponents private void initComponents() { - java.awt.GridBagConstraints gridBagConstraints; jPanel2 = new javax.swing.JPanel(); jPanel6 = new javax.swing.JPanel(); @@ -366,6 +365,9 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { jPanel4.setLayout(new javax.swing.BoxLayout(jPanel4, javax.swing.BoxLayout.Y_AXIS)); + m_jKeys.setMaximumSize(new java.awt.Dimension(250, 250)); + m_jKeys.setMinimumSize(new java.awt.Dimension(250, 250)); + m_jKeys.setPreferredSize(new java.awt.Dimension(250, 250)); m_jKeys.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { m_jKeysActionPerformed(evt); @@ -374,16 +376,23 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { jPanel4.add(m_jKeys); jPanel5.setBorder(javax.swing.BorderFactory.createEmptyBorder(5, 5, 5, 5)); - jPanel5.setLayout(new java.awt.GridBagLayout()); + jPanel5.setMinimumSize(new java.awt.Dimension(164, 100)); + jPanel5.setPreferredSize(new java.awt.Dimension(170, 100)); + jPanel5.setLayout(new javax.swing.BoxLayout(jPanel5, javax.swing.BoxLayout.Y_AXIS)); editorcard.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N - editorcard.setPreferredSize(new java.awt.Dimension(200, 30)); - jPanel5.add(editorcard, new java.awt.GridBagConstraints()); + editorcard.setMaximumSize(new java.awt.Dimension(2147483647, 30)); + editorcard.setMinimumSize(new java.awt.Dimension(100, 30)); + editorcard.setPreferredSize(new java.awt.Dimension(100, 30)); + jPanel5.add(editorcard); jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/ok.png"))); // NOI18N jButton1.setFocusPainted(false); jButton1.setFocusable(false); - jButton1.setMargin(new java.awt.Insets(8, 14, 8, 14)); + jButton1.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); + jButton1.setMargin(new java.awt.Insets(14, 14, 8, 14)); + jButton1.setMaximumSize(new java.awt.Dimension(104, 44)); + jButton1.setMinimumSize(new java.awt.Dimension(104, 44)); jButton1.setPreferredSize(new java.awt.Dimension(110, 45)); jButton1.setRequestFocusEnabled(false); jButton1.addActionListener(new java.awt.event.ActionListener() { @@ -391,14 +400,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); - gridBagConstraints = new java.awt.GridBagConstraints(); - gridBagConstraints.gridx = 1; - gridBagConstraints.gridy = 0; - gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; - gridBagConstraints.weightx = 1.0; - gridBagConstraints.weighty = 1.0; - gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0); - jPanel5.add(jButton1, gridBagConstraints); + jPanel5.add(jButton1); jPanel4.add(jPanel5); @@ -421,6 +423,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { txtCard.setEditable(false); txtCard.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N txtCard.setFocusable(false); + txtCard.setMinimumSize(new java.awt.Dimension(64, 30)); txtCard.setPreferredSize(new java.awt.Dimension(0, 30)); txtCard.setRequestFocusEnabled(false); @@ -456,6 +459,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { txtName.setEditable(false); txtName.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N txtName.setFocusable(false); + txtName.setMinimumSize(new java.awt.Dimension(64, 30)); txtName.setPreferredSize(new java.awt.Dimension(0, 30)); txtName.setRequestFocusEnabled(false); @@ -475,6 +479,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { txtTaxId.setEditable(false); txtTaxId.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N txtTaxId.setFocusable(false); + txtTaxId.setMinimumSize(new java.awt.Dimension(64, 30)); txtTaxId.setPreferredSize(new java.awt.Dimension(150, 30)); txtTaxId.setRequestFocusEnabled(false); @@ -521,7 +526,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { .addComponent(txtNotes, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(txtPrePay, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))) .addGroup(jPanel1Layout.createSequentialGroup() - .addGap(18, 18, 18) + .addContainerGap() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(txtMaxdebt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) @@ -535,7 +540,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(txtCurdate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))) - .addContainerGap(12, Short.MAX_VALUE)) + .addContainerGap()) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) diff --git a/kriolos-opos-app/src/main/java/com/openbravo/pos/customers/CustomersView.form b/kriolos-opos-app/src/main/java/com/openbravo/pos/customers/CustomersView.form index 8a46ce1f..d094f253 100755 --- a/kriolos-opos-app/src/main/java/com/openbravo/pos/customers/CustomersView.form +++ b/kriolos-opos-app/src/main/java/com/openbravo/pos/customers/CustomersView.form @@ -6,7 +6,7 @@ - + @@ -397,6 +397,9 @@ + + + @@ -925,27 +928,26 @@ - + + - - - - - - - - - + + + + + + + - + @@ -966,12 +968,15 @@ - + + + + @@ -1167,12 +1172,15 @@ - - - + + + + + + - + diff --git a/kriolos-opos-app/src/main/java/com/openbravo/pos/customers/CustomersView.java b/kriolos-opos-app/src/main/java/com/openbravo/pos/customers/CustomersView.java index 2d842c19..16732950 100755 --- a/kriolos-opos-app/src/main/java/com/openbravo/pos/customers/CustomersView.java +++ b/kriolos-opos-app/src/main/java/com/openbravo/pos/customers/CustomersView.java @@ -677,7 +677,7 @@ private void initComponents() { m_jNotes = new javax.swing.JTextArea(); setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N - setPreferredSize(new java.awt.Dimension(1000, 600)); + setPreferredSize(new java.awt.Dimension(700, 400)); jTabbedPane1.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N jTabbedPane1.setPreferredSize(new java.awt.Dimension(650, 300)); @@ -747,6 +747,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { jLabel9.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N jLabel9.setText(AppLocal.getIntString("label.custtaxcategory")); // NOI18N + jLabel9.setToolTipText(AppLocal.getIntString("label.custtaxcategory")); // NOI18N jLabel9.setMaximumSize(new java.awt.Dimension(140, 25)); jLabel9.setMinimumSize(new java.awt.Dimension(140, 25)); jLabel9.setPreferredSize(new java.awt.Dimension(150, 30)); @@ -1150,24 +1151,23 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addContainerGap() - .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel20, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel24, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel23, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel21, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel22, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) - .addComponent(txtCity, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(txtAddress, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(txtAddress2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(txtRegion, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(txtCountry, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addGap(18, 18, 18) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(txtPostal, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jLabel22, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addContainerGap()) + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(txtCity, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(txtAddress, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(txtAddress2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(txtRegion, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(txtCountry, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) + .addGap(113, 113, 113)) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) @@ -1183,12 +1183,14 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel23, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(txtCity, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jLabel22, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(txtCity, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel24, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(txtRegion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(txtRegion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel22, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(txtPostal, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) @@ -1354,11 +1356,13 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { jPanel4Layout.setVerticalGroup( jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel4Layout.createSequentialGroup() - .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) - .addComponent(jBtnShowTrans, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(jLblTranCount, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLblTranCount, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(jPanel4Layout.createSequentialGroup() + .addContainerGap() + .addComponent(jBtnShowTrans, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 264, Short.MAX_VALUE) + .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 260, Short.MAX_VALUE) .addContainerGap()) ); diff --git a/kriolos-opos-app/src/main/java/com/openbravo/pos/customers/JCustomerFinder.form b/kriolos-opos-app/src/main/java/com/openbravo/pos/customers/JCustomerFinder.form index 00fa0953..36c1fc9a 100755 --- a/kriolos-opos-app/src/main/java/com/openbravo/pos/customers/JCustomerFinder.form +++ b/kriolos-opos-app/src/main/java/com/openbravo/pos/customers/JCustomerFinder.form @@ -174,7 +174,7 @@ - + @@ -191,7 +191,7 @@ - + diff --git a/kriolos-opos-app/src/main/java/com/openbravo/pos/customers/JCustomerFinder.java b/kriolos-opos-app/src/main/java/com/openbravo/pos/customers/JCustomerFinder.java index 64789590..a74c1707 100755 --- a/kriolos-opos-app/src/main/java/com/openbravo/pos/customers/JCustomerFinder.java +++ b/kriolos-opos-app/src/main/java/com/openbravo/pos/customers/JCustomerFinder.java @@ -16,6 +16,7 @@ package com.openbravo.pos.customers; +import com.openbravo.pos.businesspartner.BusinessPartnerListCellRenderer; import com.openbravo.basic.BasicException; import com.openbravo.data.loader.QBFCompareEnum; import com.openbravo.data.user.EditorCreator; @@ -118,7 +119,7 @@ private void init(DataLogicCustomers dlCustomers) { lpr = new ListProviderCreator(dlCustomers.getCustomerList(), this); - jListCustomers.setCellRenderer(new CustomerRenderer()); + jListCustomers.setCellRenderer(new BusinessPartnerListCellRenderer()); getRootPane().setDefaultButton(jcmdOK); @@ -439,7 +440,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel7Layout.createSequentialGroup() .addContainerGap() - .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(jPanel7Layout.createSequentialGroup() .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLblName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) @@ -453,7 +454,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { .addGroup(jPanel7Layout.createSequentialGroup() .addComponent(jLblTaxID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(m_jtxtTaxID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(m_jtxtTaxID, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(jPanel7Layout.createSequentialGroup() .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(jLblEmail, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) diff --git a/kriolos-opos-app/src/main/java/com/openbravo/pos/customers/JDialogNewCustomer.form b/kriolos-opos-app/src/main/java/com/openbravo/pos/customers/JDialogNewCustomer.form index 2f6af76c..10ea726c 100755 --- a/kriolos-opos-app/src/main/java/com/openbravo/pos/customers/JDialogNewCustomer.form +++ b/kriolos-opos-app/src/main/java/com/openbravo/pos/customers/JDialogNewCustomer.form @@ -6,13 +6,19 @@ + + + + + + - + - + @@ -36,6 +42,12 @@ + + + + + + @@ -52,12 +64,12 @@ - + - + diff --git a/kriolos-opos-app/src/main/java/com/openbravo/pos/customers/JDialogNewCustomer.java b/kriolos-opos-app/src/main/java/com/openbravo/pos/customers/JDialogNewCustomer.java index c5fcaf39..55d98ac0 100755 --- a/kriolos-opos-app/src/main/java/com/openbravo/pos/customers/JDialogNewCustomer.java +++ b/kriolos-opos-app/src/main/java/com/openbravo/pos/customers/JDialogNewCustomer.java @@ -116,20 +116,24 @@ private void initComponents() { setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setTitle(AppLocal.getIntString("label.customer")); // NOI18N - setPreferredSize(new java.awt.Dimension(610, 430)); + setMaximumSize(new java.awt.Dimension(960, 600)); + setMinimumSize(new java.awt.Dimension(480, 360)); + setPreferredSize(new java.awt.Dimension(700, 480)); setResizable(false); formPanel.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N + formPanel.setMaximumSize(new java.awt.Dimension(695, 420)); + formPanel.setPreferredSize(new java.awt.Dimension(695, 420)); javax.swing.GroupLayout formPanelLayout = new javax.swing.GroupLayout(formPanel); formPanel.setLayout(formPanelLayout); formPanelLayout.setHorizontalGroup( formPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 635, Short.MAX_VALUE) + .addGap(0, 700, Short.MAX_VALUE) ); formPanelLayout.setVerticalGroup( formPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 347, Short.MAX_VALUE) + .addGap(0, 420, Short.MAX_VALUE) ); getContentPane().add(formPanel, java.awt.BorderLayout.NORTH); @@ -169,7 +173,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { getContentPane().add(jPanel2, java.awt.BorderLayout.SOUTH); - setSize(new java.awt.Dimension(651, 455)); + setSize(new java.awt.Dimension(714, 487)); setLocationRelativeTo(null); }// //GEN-END:initComponents diff --git a/kriolos-opos-app/src/main/java/com/openbravo/pos/customers/OrderCustomerList.java b/kriolos-opos-app/src/main/java/com/openbravo/pos/customers/OrderCustomerList.java index 2c78842c..98171224 100755 --- a/kriolos-opos-app/src/main/java/com/openbravo/pos/customers/OrderCustomerList.java +++ b/kriolos-opos-app/src/main/java/com/openbravo/pos/customers/OrderCustomerList.java @@ -26,15 +26,13 @@ import com.openbravo.pos.ticket.TicketInfo; import com.openbravo.pos.util.ThumbNailBuilder; import java.awt.Component; +import java.awt.Image; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.image.BufferedImage; -import java.io.IOException; -import java.io.InputStream; import java.util.*; import java.util.logging.Level; import java.util.logging.Logger; -import javax.imageio.ImageIO; import javax.swing.ImageIcon; import javax.swing.JPanel; import javax.swing.SwingUtilities; @@ -46,7 +44,7 @@ */ public class OrderCustomerList extends JPanel implements TicketSelector { - protected static final Logger LOGGER = Logger.getLogger("com.openbravo.pos.customers.CustomersList"); + protected static final Logger LOGGER = Logger.getLogger("com.openbravo.pos.customers.OrderCustomerList"); private static final long serialVersionUID = 1L; protected AppView application; @@ -55,13 +53,14 @@ public class OrderCustomerList extends JPanel implements TicketSelector { protected EventListenerList listeners = new EventListenerList(); private final DataLogicCustomers dataLogicCustomers; private final DataLogicReceipts dataLogicReceipts; + private final ThumbNailBuilder thumbNailBuilderWithDefault; public OrderCustomerList(DataLogicCustomers dlCustomers, AppView app, TicketsEditor panelticket) { this.application = app; this.panelticket = panelticket; this.dataLogicCustomers = dlCustomers; this.dataLogicReceipts = (DataLogicReceipts) application.getBean("com.openbravo.pos.sales.DataLogicReceipts"); - + this.thumbNailBuilderWithDefault = new ThumbNailBuilder(90, 98, "/com/openbravo/images/no_image.png"); initComponents(); } @@ -88,7 +87,7 @@ public void run() { List customers = null; List ticketList = null; - + long currentTime = System.currentTimeMillis(); try { LOGGER.log(Level.INFO, "Time of getCustomersWithOutImage {0}", (System.currentTimeMillis() - currentTime)); @@ -142,21 +141,20 @@ public void run() { if (customer != null) { String ticketName = ticket.getName(); - BufferedImage image = null; - ThumbNailBuilder tnbbutton = new ThumbNailBuilder(90, 98, "/com/openbravo/images/no_image.png");; + Image thumbImage = thumbNailBuilderWithDefault.getThumbNail(); try { - image = dataLogicCustomers.getCustomerInfo(customer.getId()).getImage(); + BufferedImage image = dataLogicCustomers.getCustomerInfo(customer.getId()).getImage(); if (image != null) { - tnbbutton = new ThumbNailBuilder(90, 98, image); + thumbImage = thumbNailBuilderWithDefault.getThumbNail(image); } } catch (BasicException ex) { LOGGER.log(Level.WARNING, "Exception on getting entity image", ex); } - ImageIcon icon = new ImageIcon(tnbbutton.getThumbNail()); + ImageIcon icon = new ImageIcon(thumbImage); flowTab.addButton( - icon, - new SelectedCustomerAction(ticket.getId()), + icon, + new SelectedCustomerAction(ticket.getId()), ticketName, ticketName); } @@ -206,15 +204,6 @@ private void setActiveTicket(String id) throws BasicException { currentTicket = panelticket.getActiveTicket().getId(); - // save current ticket -// if (currentTicket != null) { -// try { -// dataLogicReceipts.insertSharedTicket(currentTicket, panelticket.getActiveTicket()); -// } catch (BasicException e) { -// new MessageInf(e).show(this); -// } -// } - // set ticket // BEGIN TRANSACTION TicketInfo ticket = dataLogicReceipts.getSharedTicket(id); if (ticket == null) { @@ -229,15 +218,6 @@ private void setActiveTicket(String id) throws BasicException { // END TRANSACTION } -// private void synchroniseData() { -// try { - // get tickets only from selected customer or show all - // add newest tickets from provider -// orderSynchroniseHelper.synchSharedTickets(panelticket.getActiveTicket()); -// } catch (Exception e) { -// LOGGER.log(Level.WARNING, "Error synchronise orders", e); -// } -// } private void fireTicketSelectionChanged(String ticketId) { EventListener[] l = listeners.getListeners(ActionListener.class); ActionEvent e = null; diff --git a/kriolos-opos-app/src/main/java/com/openbravo/pos/data/DBMigrator.java b/kriolos-opos-app/src/main/java/com/openbravo/pos/data/DBMigrator.java index 099c4e38..af878aaa 100644 --- a/kriolos-opos-app/src/main/java/com/openbravo/pos/data/DBMigrator.java +++ b/kriolos-opos-app/src/main/java/com/openbravo/pos/data/DBMigrator.java @@ -17,6 +17,7 @@ package com.openbravo.pos.data; +import com.openbravo.basic.BasicException; import java.sql.Connection; import java.sql.SQLException; import java.util.logging.Level; @@ -41,7 +42,7 @@ public static void main(String[] args) throws SQLException { //execDBMigration(); } - public static boolean execDBMigration(com.openbravo.data.loader.Session dbSession) { + public static void execDBMigration(com.openbravo.data.loader.Session dbSession) throws BasicException { boolean res = false; LOGGER.info("Database Migration init"); try { @@ -58,13 +59,11 @@ public static boolean execDBMigration(com.openbravo.data.loader.Session dbSessio liquibase.update("pos-database-update"); res = true; } catch (DatabaseException ex) { - LOGGER.log(Level.SEVERE, "DB Migration Exception: ", ex); - res = false; + LOGGER.log(Level.SEVERE,"DB Migration Exception: " , ex); + throw new BasicException("DB Migration Exception: ", ex); } catch (LiquibaseException | SQLException ex) { LOGGER.log(Level.SEVERE, "DB Migration Exception: ", ex); - res = false; + throw new BasicException("DB Migration Exception: ", ex); } - - return res; } } diff --git a/kriolos-opos-app/src/main/java/com/openbravo/pos/forms/JRootApp.java b/kriolos-opos-app/src/main/java/com/openbravo/pos/forms/JRootApp.java index 46d49658..b29a2c9b 100755 --- a/kriolos-opos-app/src/main/java/com/openbravo/pos/forms/JRootApp.java +++ b/kriolos-opos-app/src/main/java/com/openbravo/pos/forms/JRootApp.java @@ -40,6 +40,7 @@ import java.nio.file.Files; import java.nio.file.StandardOpenOption; import java.time.Instant; +import org.openide.util.Exceptions; /** * @@ -85,7 +86,7 @@ public JRootApp(AppProperties props) { //m_jLblTitle.repaint(); } - public boolean initApp() { + public void initApp() throws BasicException{ applyComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault())); @@ -94,19 +95,17 @@ public boolean initApp() { } catch (BasicException e) { LOGGER.log(Level.WARNING, "Exception on DB createSession", e); - JMessageDialog.showMessage(this, new MessageInf(MessageInf.SGN_DANGER, e.getMessage(), e)); - return false; + throw new BasicException("Exception on DB createSession", e); } m_dlSystem = (DataLogicSystem) getBean("com.openbravo.pos.forms.DataLogicSystem"); LOGGER.log(Level.INFO, "DB Migration execution Starting"); - if (com.openbravo.pos.data.DBMigrator.execDBMigration(session)) { - //return false; - LOGGER.log(Level.INFO, "DB Migration execution Finished: OK"); - }else { - JMessageDialog.showMessage(this, new MessageInf(MessageInf.SGN_DANGER, "Database migration faile, Cannot continue")); - return false; + try { + com.openbravo.pos.data.DBMigrator.execDBMigration(session); + LOGGER.log(Level.INFO, "Database verification or migration done sucessfully"); + }catch(BasicException ex) { + throw new BasicException("Database verification fail", ex); } logStartup(); @@ -114,8 +113,8 @@ public boolean initApp() { hostSavedProperties = m_dlSystem.getResourceAsProperties(getHostID()); if (checkActiveCash()) { - LOGGER.log(Level.WARNING, "checkActiveCash return : true"); - return false; + LOGGER.log(Level.WARNING, "Fail on verify ActiveCash"); + throw new BasicException("Fail on verify ActiveCash"); } setInventoryLocation(); @@ -127,8 +126,6 @@ public boolean initApp() { setStatusBarPanel(); showLoginPanel(); - - return true; } private void setTitlePanel() { @@ -400,7 +397,11 @@ public void tryToClose() { if (closeAppView()) { releaseResources(); if(session != null){ - session.close(); + try { + session.close(); + } catch (SQLException ex) { + LOGGER.log(Level.WARNING, "", ex); + } } java.awt.Window parent = SwingUtilities.getWindowAncestor(this); if(parent != null){ diff --git a/kriolos-opos-app/src/main/java/com/openbravo/pos/forms/JRootFrame.java b/kriolos-opos-app/src/main/java/com/openbravo/pos/forms/JRootFrame.java index e236b7fa..5857c61c 100755 --- a/kriolos-opos-app/src/main/java/com/openbravo/pos/forms/JRootFrame.java +++ b/kriolos-opos-app/src/main/java/com/openbravo/pos/forms/JRootFrame.java @@ -15,6 +15,9 @@ // along with this program. If not, see . package com.openbravo.pos.forms; +import com.openbravo.basic.BasicException; +import com.openbravo.data.gui.JMessageDialog; +import com.openbravo.data.gui.MessageInf; import java.awt.BorderLayout; import java.io.IOException; import java.rmi.RemoteException; @@ -66,28 +69,34 @@ public void initFrame() { getContentPane().add(splashScreen, BorderLayout.CENTER); //LOAD APP PANEL - if (m_rootapp.initApp()) { + try { + m_rootapp.initApp(); getContentPane().remove(splashScreen); getContentPane().add(m_rootapp, BorderLayout.CENTER); sendInitEnvent(); - } else { + } catch (BasicException ex) { //LOAD CONFIG PANEL - int opionRes = JOptionPane.showConfirmDialog(this, - AppLocal.getIntString("message.databasechange"), - "Connection", JOptionPane.YES_NO_OPTION, JOptionPane.INFORMATION_MESSAGE); + + int opionRes = JMessageDialog.showConfirmDialog(this, + new MessageInf(MessageInf.SGN_DANGER, + "Application fail to start
Do you want to open the configuration panel?", ex)); + + /*opionRes = JOptionPane.showConfirmDialog(this, + "Application fail to start
Do you want to open the configuration panel?", + "Application Error", JOptionPane.YES_NO_OPTION, JOptionPane.INFORMATION_MESSAGE); + + */ if (opionRes == JOptionPane.YES_OPTION) { //JFrmConfig jFrmConfig = new JFrmConfig(m_props); //jFrmConfig.setVisible(true); JPanelConfiguration config = new JPanelConfiguration(m_props); - config.setCloseListener(new JPanelConfiguration.CloseEventListener() { - @Override - public void windowClosed(JPanelConfiguration.CloseEvent e) { - dispose(); //This frame - System.exit(0); //Exit JVM - } + config.setCloseListener((JPanelConfiguration.CloseEvent e) -> { + //This will be call when user press save or close button on config panel + dispose(); + System.exit(0); }); getContentPane().remove(splashScreen); @@ -98,6 +107,7 @@ public void windowClosed(JPanelConfiguration.CloseEvent e) { } } + // THIS IS NEED HERE TO PRESENT CONFIG PANEL String screenmode = m_props.getProperty("machine.screenmode"); if (null == screenmode) { modeWindow(); diff --git a/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/JPanelTicket.form b/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/JPanelTicket.form index 654bf340..9b590625 100755 --- a/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/JPanelTicket.form +++ b/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/JPanelTicket.form @@ -22,7 +22,7 @@ - + @@ -31,7 +31,7 @@ - + @@ -292,7 +292,7 @@ - + @@ -326,7 +326,7 @@ - + @@ -538,7 +538,7 @@ - + @@ -608,7 +608,7 @@ - + @@ -622,7 +622,7 @@ - + @@ -636,7 +636,7 @@ - + @@ -767,254 +767,237 @@ - - - - - - - - - - - - - - - - - - - - + - + + + + - + - - - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - + + - + - - - - - - - - + + - - - - - - - - - - - - - - + + - - + - + + + + + + - + - - - - - + + + + - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ - + diff --git a/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/JPanelTicket.java b/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/JPanelTicket.java index d80384c8..707a071b 100755 --- a/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/JPanelTicket.java +++ b/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/JPanelTicket.java @@ -20,8 +20,6 @@ import com.openbravo.pos.forms.AppView; import com.openbravo.pos.forms.AppLocal; import com.openbravo.basic.BasicException; -import com.openbravo.beans.JEditorTextDialog; -import com.openbravo.beans.JIntegerDialog; import com.openbravo.beans.JPasswordDialog; import com.openbravo.data.gui.ComboBoxValModel; import com.openbravo.data.gui.ListKeyed; @@ -239,7 +237,7 @@ private void initComponentFromChild() { m_jPanelBag.add(m_ticketsbag.getBagComponent(), BorderLayout.LINE_START); add(m_ticketsbag.getNullComponent(), "null"); - catcontainer.add(getSouthComponent(), BorderLayout.CENTER); + m_jPanelCatalog.add(getSouthComponent(), BorderLayout.CENTER); } @Override @@ -261,14 +259,12 @@ public void actionPerformed(ActionEvent ae) { closeAllDialogs(); switch (getTicketsbag()) { case "restaurant": + deactivate(); if ("false".equals(m_App.getProperties().getProperty("till.autoLogoffrestaurant"))) { - deactivate(); ((JRootApp) m_App).closeAppView(); - break; + } else { + setActiveTicket(null, null); } - - deactivate(); - setActiveTicket(null, null); break; default: @@ -307,7 +303,7 @@ private void saveCurrentTicket() { @Override public void activate() throws BasicException { - LOGGER.log(System.Logger.Level.DEBUG, "JPanelTicket.activate"); + LOGGER.log(System.Logger.Level.INFO, "JPanelTicket.activate"); Action logout = new logout(); String autoLogoff = (m_App.getProperties().getProperty("till.autoLogoff")); @@ -478,6 +474,8 @@ public TicketInfo getActiveTicket() { private void refreshTicket() { + CardLayout cl = (CardLayout) (getLayout()); + if (m_oTicket == null) { m_jTicketId.setText(null); m_ticketlines.clearTicketLines(); @@ -485,6 +483,17 @@ private void refreshTicket() { m_jTaxesEuros.setText(null); m_jTotalEuros.setText(null); jCheckStock.setText(null); + + checkStock(); + stateToZero(); + repaint(); + + cl.show(this, "null"); + + if ((m_oTicket != null) && (m_oTicket.getLinesCount() == 0)) { + resetSouthComponent(); + } + } else { if (m_oTicket.getTicketType() == TicketInfo.RECEIPT_REFUND) { m_jEditLine.setVisible(false); @@ -506,16 +515,22 @@ private void refreshTicket() { if (m_oTicket.getLinesCount() == 0) { resetSouthComponent(); } - } - CardLayout cl = (CardLayout) (getLayout()); - cl.show(this, "ticket"); + countArticles(); + printPartialTotals(); + stateToZero(); + repaint(); - checkStock(); - countArticles(); - stateToZero(); - printPartialTotals(); - repaint(); + cl.show(this, "ticket"); + if (m_oTicket.getLinesCount() == 0) { + resetSouthComponent(); + } + + m_jKeyFactory.setText(null); + java.awt.EventQueue.invokeLater(() -> { + m_jKeyFactory.requestFocus(); + }); + } } private void countArticles() { @@ -579,7 +594,19 @@ private void paintTicketLine(int index, TicketLineInfo oLine) { } private void addTicketLine(ProductInfoExt oProduct, double dMul, double dPrice) { - if (m_oTicket != null) { + + LOGGER.log(System.Logger.Level.INFO, "Product onoProduct.isVprice: ", oProduct.isVprice()); + if (oProduct.isVprice()) { + TaxInfo tax = taxeslogic.getTaxInfo(oProduct.getTaxCategoryID(), m_oTicket.getCustomer()); + + if (m_jaddtax.isSelected()) { + dPrice /= (1 + tax.getRate()); + } + + addTicketLine(new TicketLineInfo(oProduct, dMul, dPrice, tax, + (java.util.Properties) (oProduct.getProperties().clone()))); + + } else { CustomerInfoExt customer = m_oTicket.getCustomer(); // get the line product tax @@ -594,8 +621,6 @@ private void addTicketLine(ProductInfoExt oProduct, double dMul, double dPrice) refreshTicket(); j_btnRemotePrt.setEnabled(true); - } else { - Toolkit.getDefaultToolkit().beep(); } } @@ -657,7 +682,6 @@ protected void addTicketLine(TicketLineInfo oLine) { visorTicketLine(oLine); printPartialTotals(); stateToZero(); - checkStock(); countArticles(); executeEvent(m_oTicket, m_oTicketExt, "ticket.change"); @@ -714,7 +738,6 @@ private void removeTicketLine(int i) { visorTicketLine(null); printPartialTotals(); stateToZero(); - checkStock(); countArticles(); } @@ -733,12 +756,13 @@ private ProductInfoExt getInputProduct() { } private double includeTaxes(String tcid, double dValue) { - TaxInfo tax = null; - if (m_oTicket != null) { - tax = taxeslogic.getTaxInfo(tcid, m_oTicket.getCustomer()); + if (m_jaddtax.isSelected()) { + TaxInfo tax = taxeslogic.getTaxInfo(tcid, m_oTicket.getCustomer()); + double dTaxRate = tax == null ? 0.0 : tax.getRate(); + return dValue / (1.0 + dTaxRate); + } else { + return dValue; } - double dTaxRate = tax == null ? 0.0 : tax.getRate(); - return dValue / (1.0 + dTaxRate); } private double excludeTaxes(String tcid, double dValue) { @@ -827,7 +851,12 @@ private void incProductByCodePrice(String sCode, double dPriceSell) { .getIntString("message.noproduct")).show(this); stateToZero(); } else { - addTicketLine(oProduct, 1.0, dPriceSell); + if (m_jaddtax.isSelected()) { + TaxInfo tax = taxeslogic.getTaxInfo(oProduct.getTaxCategoryID(), m_oTicket.getCustomer()); + addTicketLine(oProduct, 1.0, dPriceSell / (1.0 + tax.getRate())); + } else { + addTicketLine(oProduct, 1.0, dPriceSell); + } } } catch (BasicException ex) { LOGGER.log(System.Logger.Level.WARNING, "Exception on: ", ex); @@ -1107,6 +1136,10 @@ private void stateTransition(char cTrans) { break; } + if (m_jaddtax.isSelected()) { + dPriceSell = oProduct.getPriceSellTax(tax); + } + addTicketLine(oProduct, dUnits, dPriceSell); } } catch (BasicException ex) { @@ -1181,7 +1214,11 @@ private void stateTransition(char cTrans) { dUnits = 1; // no sellprice to calculate so must be 1 Unit } - addTicketLine(oProduct, dUnits, dPriceSell / (1.0 + tax.getRate())); + if (m_jaddtax.isSelected()) { + addTicketLine(oProduct, dUnits, dPriceSell); + } else { + addTicketLine(oProduct, dUnits, dPriceSell / (1.0 + tax.getRate())); + } } } catch (BasicException ex) { LOGGER.log(System.Logger.Level.WARNING, "Exception on: ", ex); @@ -1706,9 +1743,9 @@ private boolean closeTicket(TicketInfo ticket, String ticketext) { if ("restaurant".equals(m_App.getProperties() .getProperty("machine.ticketsbag")) && !ticket.getOldTicket()) { - restDB.clearCustomerNameInTable(ticketext.toString()); - restDB.clearWaiterNameInTable(ticketext.toString()); - restDB.clearTicketIdInTable(ticketext.toString()); + restDB.clearCustomerNameInTable(ticketext); + restDB.clearWaiterNameInTable(ticketext); + restDB.clearTicketIdInTable(ticketext); } } } @@ -2065,17 +2102,17 @@ private String setTempjPrice(String jPrice) { public void checkStock() { - int tckLineIndex = m_ticketlines.getSelectedIndex(); - - LOGGER.log(System.Logger.Level.INFO, "Check stock for ticketlines (Selected Index): " + tckLineIndex); - - if (tckLineIndex >= 0) { + int i = m_ticketlines.getSelectedIndex(); + if (i >= 0) { + if (listener != null) { + listener.stop(); + } try { - TicketLineInfo line = m_oTicket.getLine(tckLineIndex); + TicketLineInfo line = m_oTicket.getLine(i); String pId = line.getProductID(); - String location = m_App.getInventoryLocation(); - ProductStock checkProduct = dlSales.getProductStockState(pId, location); + ProductStock checkProduct; + checkProduct = dlSales.getProductStockState(pId, location); if (checkProduct != null) { @@ -2085,15 +2122,38 @@ public void checkStock() { jCheckStock.setForeground(Color.darkGray); } - double dUnits = checkProduct.getUnits(); - jCheckStock.setText(Integer.toString((int) dUnits)); + String content; + + if (!location.equals(checkProduct.getLocation())) { + content = AppLocal.getIntString("message.location.current"); + JFrame frame = new JFrame(); + JOptionPane.showMessageDialog(frame, + content, + "Info", + JOptionPane.INFORMATION_MESSAGE); + } else { + double dUnits = checkProduct.getUnits(); + int iUnits; + iUnits = (int) dUnits; + + jCheckStock.setText(Integer.toString(iUnits)); + } + } else { - jCheckStock.setText(""); + jCheckStock.setText(null); } } catch (BasicException ex) { - LOGGER.log(System.Logger.Level.WARNING, "Exception on check stock for ticketline " + tckLineIndex, ex); + LOGGER.log(System.Logger.Level.WARNING, "Exception on: ", ex); + } finally { + + if (listener != null) { + listener.restart(); + } } + } else { + Toolkit.getDefaultToolkit().beep(); } + } public void checkCustomer() { @@ -2206,8 +2266,8 @@ public Object evalScript(String code, ScriptArg... args) throws ScriptException // //GEN-BEGIN:initComponents private void initComponents() { - m_jPanContainer = new javax.swing.JPanel(); - m_jOptions = new javax.swing.JPanel(); + m_jPanelContainer = new javax.swing.JPanel(); + m_jPanelMainToolbar = new javax.swing.JPanel(); m_jPanelBag = new javax.swing.JPanel(); jTBtnShow = new javax.swing.JToggleButton(); m_jbtnScale = new javax.swing.JButton(); @@ -2218,9 +2278,9 @@ private void initComponents() { jBtnCustomer = new javax.swing.JButton(); m_jPanelScripts = new javax.swing.JPanel(); m_jPanelBagExt = new javax.swing.JPanel(); - jPanel1 = new javax.swing.JPanel(); + m_jPanelBagExtDefaultEmpty = new javax.swing.JPanel(); m_jPanelTicket = new javax.swing.JPanel(); - jPanelLinesToolbar = new javax.swing.JPanel(); + m_jPanelLinesToolbar = new javax.swing.JPanel(); jPanel2 = new javax.swing.JPanel(); m_jDelete = new javax.swing.JButton(); m_jList = new javax.swing.JButton(); @@ -2228,36 +2288,35 @@ private void initComponents() { jEditAttributes = new javax.swing.JButton(); jCheckStock = new javax.swing.JButton(); m_jPanelLines = new javax.swing.JPanel(); - jPanel4 = new javax.swing.JPanel(); + m_jPanelLinesSum = new javax.swing.JPanel(); filler2 = new javax.swing.Box.Filler(new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 32767)); m_jTicketId = new javax.swing.JLabel(); m_jPanelTotals = new javax.swing.JPanel(); - m_jLblTotalEuros3 = new javax.swing.JLabel(); - m_jLblTotalEuros2 = new javax.swing.JLabel(); - m_jLblTotalEuros1 = new javax.swing.JLabel(); + m_jLblSubTotalEuros = new javax.swing.JLabel(); + m_jLblTaxEuros = new javax.swing.JLabel(); + m_jLblTotalEuros = new javax.swing.JLabel(); m_jSubtotalEuros = new javax.swing.JLabel(); m_jTaxesEuros = new javax.swing.JLabel(); m_jTotalEuros = new javax.swing.JLabel(); m_jContEntries = new javax.swing.JPanel(); m_jPanEntries = new javax.swing.JPanel(); m_jNumberKeys = new com.openbravo.beans.JNumberKeys(); - m_jPor = new javax.swing.JLabel(); jPanelScanner = new javax.swing.JPanel(); m_jPrice = new javax.swing.JLabel(); m_jEnter = new javax.swing.JButton(); - jPanelTax = new javax.swing.JPanel(); + m_jPor = new javax.swing.JLabel(); m_jKeyFactory = new javax.swing.JTextField(); + m_jaddtax = new javax.swing.JCheckBox(); m_jTax = new javax.swing.JComboBox(); - m_jaddtax = new javax.swing.JToggleButton(); - catcontainer = new javax.swing.JPanel(); + m_jPanelCatalog = new javax.swing.JPanel(); setBackground(new java.awt.Color(255, 204, 153)); setOpaque(false); setLayout(new java.awt.CardLayout()); - m_jPanContainer.setLayout(new java.awt.BorderLayout()); + m_jPanelContainer.setLayout(new java.awt.BorderLayout()); - m_jOptions.setLayout(new java.awt.BorderLayout()); + m_jPanelMainToolbar.setLayout(new java.awt.BorderLayout()); m_jPanelBag.setAutoscrolls(true); m_jPanelBag.setMaximumSize(new java.awt.Dimension(10, 10)); @@ -2379,30 +2438,30 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { m_jPanelBag.add(m_jButtons); - m_jOptions.add(m_jPanelBag, java.awt.BorderLayout.PAGE_START); + m_jPanelMainToolbar.add(m_jPanelBag, java.awt.BorderLayout.PAGE_START); m_jPanelScripts.setPreferredSize(new java.awt.Dimension(200, 60)); m_jPanelScripts.setLayout(new java.awt.BorderLayout()); m_jPanelBagExt.setPreferredSize(new java.awt.Dimension(20, 60)); - jPanel1.setMinimumSize(new java.awt.Dimension(235, 50)); - jPanel1.setPreferredSize(new java.awt.Dimension(10, 55)); - m_jPanelBagExt.add(jPanel1); + m_jPanelBagExtDefaultEmpty.setMinimumSize(new java.awt.Dimension(235, 50)); + m_jPanelBagExtDefaultEmpty.setPreferredSize(new java.awt.Dimension(10, 55)); + m_jPanelBagExt.add(m_jPanelBagExtDefaultEmpty); m_jPanelScripts.add(m_jPanelBagExt, java.awt.BorderLayout.PAGE_START); - m_jOptions.add(m_jPanelScripts, java.awt.BorderLayout.CENTER); + m_jPanelMainToolbar.add(m_jPanelScripts, java.awt.BorderLayout.CENTER); m_jPanelScripts.getAccessibleContext().setAccessibleDescription(""); - m_jPanContainer.add(m_jOptions, java.awt.BorderLayout.NORTH); + m_jPanelContainer.add(m_jPanelMainToolbar, java.awt.BorderLayout.NORTH); m_jPanelTicket.setBorder(javax.swing.BorderFactory.createEmptyBorder(5, 5, 5, 5)); m_jPanelTicket.setLayout(new java.awt.BorderLayout()); - jPanelLinesToolbar.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N - jPanelLinesToolbar.setPreferredSize(new java.awt.Dimension(75, 270)); - jPanelLinesToolbar.setLayout(new java.awt.BorderLayout()); + m_jPanelLinesToolbar.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N + m_jPanelLinesToolbar.setPreferredSize(new java.awt.Dimension(75, 270)); + m_jPanelLinesToolbar.setLayout(new java.awt.BorderLayout()); jPanel2.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 5, 0, 5)); jPanel2.setPreferredSize(new java.awt.Dimension(70, 250)); @@ -2498,16 +2557,16 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { }); jPanel2.add(jCheckStock); - jPanelLinesToolbar.add(jPanel2, java.awt.BorderLayout.NORTH); + m_jPanelLinesToolbar.add(jPanel2, java.awt.BorderLayout.NORTH); - m_jPanelTicket.add(jPanelLinesToolbar, java.awt.BorderLayout.LINE_START); + m_jPanelTicket.add(m_jPanelLinesToolbar, java.awt.BorderLayout.LINE_START); m_jPanelLines.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N m_jPanelLines.setPreferredSize(new java.awt.Dimension(450, 240)); m_jPanelLines.setLayout(new java.awt.BorderLayout()); - jPanel4.setLayout(new java.awt.BorderLayout()); - jPanel4.add(filler2, java.awt.BorderLayout.LINE_START); + m_jPanelLinesSum.setLayout(new java.awt.BorderLayout()); + m_jPanelLinesSum.add(filler2, java.awt.BorderLayout.LINE_START); m_jTicketId.setFont(new java.awt.Font("Arial", 1, 12)); // NOI18N m_jTicketId.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); @@ -2518,28 +2577,28 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { m_jTicketId.setPreferredSize(new java.awt.Dimension(300, 40)); m_jTicketId.setRequestFocusEnabled(false); m_jTicketId.setVerticalTextPosition(javax.swing.SwingConstants.TOP); - jPanel4.add(m_jTicketId, java.awt.BorderLayout.CENTER); + m_jPanelLinesSum.add(m_jTicketId, java.awt.BorderLayout.CENTER); m_jPanelTotals.setPreferredSize(new java.awt.Dimension(375, 60)); m_jPanelTotals.setLayout(new java.awt.GridLayout(2, 3, 4, 0)); - m_jLblTotalEuros3.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N - m_jLblTotalEuros3.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); - m_jLblTotalEuros3.setLabelFor(m_jSubtotalEuros); - m_jLblTotalEuros3.setText(AppLocal.getIntString("label.subtotalcash")); // NOI18N - m_jPanelTotals.add(m_jLblTotalEuros3); + m_jLblSubTotalEuros.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N + m_jLblSubTotalEuros.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); + m_jLblSubTotalEuros.setLabelFor(m_jSubtotalEuros); + m_jLblSubTotalEuros.setText(AppLocal.getIntString("label.subtotalcash")); // NOI18N + m_jPanelTotals.add(m_jLblSubTotalEuros); - m_jLblTotalEuros2.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N - m_jLblTotalEuros2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); - m_jLblTotalEuros2.setLabelFor(m_jSubtotalEuros); - m_jLblTotalEuros2.setText(AppLocal.getIntString("label.taxcash")); // NOI18N - m_jPanelTotals.add(m_jLblTotalEuros2); + m_jLblTaxEuros.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N + m_jLblTaxEuros.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); + m_jLblTaxEuros.setLabelFor(m_jSubtotalEuros); + m_jLblTaxEuros.setText(AppLocal.getIntString("label.taxcash")); // NOI18N + m_jPanelTotals.add(m_jLblTaxEuros); - m_jLblTotalEuros1.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N - m_jLblTotalEuros1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); - m_jLblTotalEuros1.setLabelFor(m_jTotalEuros); - m_jLblTotalEuros1.setText(AppLocal.getIntString("label.totalcash")); // NOI18N - m_jPanelTotals.add(m_jLblTotalEuros1); + m_jLblTotalEuros.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N + m_jLblTotalEuros.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); + m_jLblTotalEuros.setLabelFor(m_jTotalEuros); + m_jLblTotalEuros.setText(AppLocal.getIntString("label.totalcash")); // NOI18N + m_jPanelTotals.add(m_jLblTotalEuros); m_jSubtotalEuros.setBackground(m_jEditLine.getBackground()); m_jSubtotalEuros.setFont(new java.awt.Font("Arial", 0, 18)); // NOI18N @@ -2580,14 +2639,12 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { m_jTotalEuros.setRequestFocusEnabled(false); m_jPanelTotals.add(m_jTotalEuros); - jPanel4.add(m_jPanelTotals, java.awt.BorderLayout.LINE_END); + m_jPanelLinesSum.add(m_jPanelTotals, java.awt.BorderLayout.LINE_END); - m_jPanelLines.add(jPanel4, java.awt.BorderLayout.SOUTH); + m_jPanelLines.add(m_jPanelLinesSum, java.awt.BorderLayout.SOUTH); m_jPanelTicket.add(m_jPanelLines, java.awt.BorderLayout.CENTER); - m_jPanContainer.add(m_jPanelTicket, java.awt.BorderLayout.CENTER); - m_jContEntries.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N m_jContEntries.setMinimumSize(new java.awt.Dimension(300, 350)); m_jContEntries.setLayout(new java.awt.BorderLayout()); @@ -2595,7 +2652,8 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { m_jPanEntries.setPreferredSize(new java.awt.Dimension(300, 350)); m_jPanEntries.setLayout(new javax.swing.BoxLayout(m_jPanEntries, javax.swing.BoxLayout.Y_AXIS)); - m_jNumberKeys.setMinimumSize(new java.awt.Dimension(300, 300)); + m_jNumberKeys.setMaximumSize(new java.awt.Dimension(300, 300)); + m_jNumberKeys.setMinimumSize(new java.awt.Dimension(250, 250)); m_jNumberKeys.setPreferredSize(new java.awt.Dimension(250, 250)); m_jNumberKeys.addJNumberEventListener(new com.openbravo.beans.JNumberEventListener() { public void keyPerformed(com.openbravo.beans.JNumberEvent evt) { @@ -2604,12 +2662,8 @@ public void keyPerformed(com.openbravo.beans.JNumberEvent evt) { }); m_jPanEntries.add(m_jNumberKeys); - m_jPor.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N - m_jPor.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); - m_jPor.setRequestFocusEnabled(false); - m_jPanEntries.add(m_jPor); - jPanelScanner.setBorder(javax.swing.BorderFactory.createEmptyBorder(5, 5, 5, 5)); + jPanelScanner.setMaximumSize(new java.awt.Dimension(300, 105)); m_jPrice.setFont(new java.awt.Font("Arial", 1, 16)); // NOI18N m_jPrice.setForeground(new java.awt.Color(76, 197, 237)); @@ -2631,32 +2685,10 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { } }); - javax.swing.GroupLayout jPanelScannerLayout = new javax.swing.GroupLayout(jPanelScanner); - jPanelScanner.setLayout(jPanelScannerLayout); - jPanelScannerLayout.setHorizontalGroup( - jPanelScannerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(jPanelScannerLayout.createSequentialGroup() - .addContainerGap(30, Short.MAX_VALUE) - .addComponent(m_jPrice, javax.swing.GroupLayout.PREFERRED_SIZE, 178, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(5, 5, 5) - .addComponent(m_jEnter, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap()) - ); - jPanelScannerLayout.setVerticalGroup( - jPanelScannerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(jPanelScannerLayout.createSequentialGroup() - .addGroup(jPanelScannerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(m_jEnter, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(m_jPrice, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addContainerGap()) - ); - - m_jPanEntries.add(jPanelScanner); - - m_jContEntries.add(m_jPanEntries, java.awt.BorderLayout.NORTH); - - jPanelTax.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1)); - jPanelTax.setPreferredSize(new java.awt.Dimension(276, 44)); + m_jPor.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N + m_jPor.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); + m_jPor.setText("AS"); + m_jPor.setRequestFocusEnabled(false); m_jKeyFactory.setEditable(false); m_jKeyFactory.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N @@ -2677,47 +2709,72 @@ public void keyTyped(java.awt.event.KeyEvent evt) { } }); + m_jaddtax.setToolTipText(bundle.getString("tooltip.switchtax")); // NOI18N + m_jaddtax.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + m_jaddtaxActionPerformed(evt); + } + }); + m_jTax.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N m_jTax.setToolTipText(bundle.getString("tooltip.salestaxswitch")); // NOI18N m_jTax.setFocusable(false); - m_jaddtax.setToolTipText(bundle.getString("tooltip.switchtax")); // NOI18N - - javax.swing.GroupLayout jPanelTaxLayout = new javax.swing.GroupLayout(jPanelTax); - jPanelTax.setLayout(jPanelTaxLayout); - jPanelTaxLayout.setHorizontalGroup( - jPanelTaxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(jPanelTaxLayout.createSequentialGroup() - .addContainerGap() - .addComponent(m_jKeyFactory, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(m_jTax, javax.swing.GroupLayout.PREFERRED_SIZE, 179, javax.swing.GroupLayout.PREFERRED_SIZE) + javax.swing.GroupLayout jPanelScannerLayout = new javax.swing.GroupLayout(jPanelScanner); + jPanelScanner.setLayout(jPanelScannerLayout); + jPanelScannerLayout.setHorizontalGroup( + jPanelScannerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanelScannerLayout.createSequentialGroup() + .addGroup(jPanelScannerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanelScannerLayout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanelScannerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(m_jPor, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 9, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(m_jKeyFactory, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 8, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)) + .addGroup(jPanelScannerLayout.createSequentialGroup() + .addContainerGap() + .addComponent(m_jaddtax))) + .addGroup(jPanelScannerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanelScannerLayout.createSequentialGroup() + .addComponent(m_jPrice, javax.swing.GroupLayout.PREFERRED_SIZE, 187, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(0, 2, Short.MAX_VALUE)) + .addComponent(m_jTax, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(m_jaddtax, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(m_jEnter, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) ); - jPanelTaxLayout.setVerticalGroup( - jPanelTaxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(jPanelTaxLayout.createSequentialGroup() - .addGroup(jPanelTaxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) - .addComponent(m_jTax, javax.swing.GroupLayout.DEFAULT_SIZE, 44, Short.MAX_VALUE) - .addGroup(jPanelTaxLayout.createSequentialGroup() - .addContainerGap() - .addComponent(m_jKeyFactory)) - .addComponent(m_jaddtax, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addGap(0, 4, Short.MAX_VALUE)) + jPanelScannerLayout.setVerticalGroup( + jPanelScannerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanelScannerLayout.createSequentialGroup() + .addComponent(m_jPrice, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(m_jTax, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(jPanelScannerLayout.createSequentialGroup() + .addGroup(jPanelScannerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(m_jEnter, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(jPanelScannerLayout.createSequentialGroup() + .addComponent(m_jPor) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(m_jKeyFactory, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(m_jaddtax, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)) ); - m_jContEntries.add(jPanelTax, java.awt.BorderLayout.CENTER); + m_jPanEntries.add(jPanelScanner); + + m_jContEntries.add(m_jPanEntries, java.awt.BorderLayout.LINE_START); - m_jPanContainer.add(m_jContEntries, java.awt.BorderLayout.LINE_END); + m_jPanelTicket.add(m_jContEntries, java.awt.BorderLayout.LINE_END); - catcontainer.setBorder(javax.swing.BorderFactory.createEmptyBorder(5, 5, 5, 5)); - catcontainer.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N - catcontainer.setLayout(new java.awt.BorderLayout()); - m_jPanContainer.add(catcontainer, java.awt.BorderLayout.SOUTH); + m_jPanelContainer.add(m_jPanelTicket, java.awt.BorderLayout.CENTER); - add(m_jPanContainer, "ticket"); + m_jPanelCatalog.setBorder(javax.swing.BorderFactory.createEmptyBorder(5, 5, 5, 5)); + m_jPanelCatalog.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N + m_jPanelCatalog.setLayout(new java.awt.BorderLayout()); + m_jPanelContainer.add(m_jPanelCatalog, java.awt.BorderLayout.SOUTH); + + add(m_jPanelContainer, "ticket"); }// //GEN-END:initComponents private void m_jbtnScaleActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_m_jbtnScaleActionPerformed @@ -2825,6 +2882,19 @@ private void j_btnRemotePrtActionPerformed(java.awt.event.ActionEvent evt) {//GE scriptEngine.put("user", m_App.getAppUserView().getUser()); scriptEngine.put("sales", this); scriptEngine.put("pickupid", m_oTicket.getPickupId()); + + //TODO PB_NOTE MUST BE IMPROVE HERE + Boolean warrantyPrint = warrantyCheck(m_oTicket); + scriptEngine.put("ticket", m_oTicket); + scriptEngine.put("place", m_oTicketExt); + scriptEngine.put("taxes", taxcollection); + scriptEngine.put("taxeslogic", taxeslogic); + scriptEngine.put("user", m_App.getAppUserView().getUser()); + scriptEngine.put("sales", this); + scriptEngine.put("taxesinc", m_jaddtax.isSelected()); + scriptEngine.put("warranty", warrantyPrint); + scriptEngine.put("pickupid", getPickupString(m_oTicket)); + scriptEngine.eval(rScript); } catch (ScriptException ex) { @@ -2890,57 +2960,7 @@ private void btnSplitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRS private void jCheckStockActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckStockActionPerformed - if (listener != null) { - listener.stop(); - } - - int i = m_ticketlines.getSelectedIndex(); - if (i < 0) { - Toolkit.getDefaultToolkit().beep(); - } else { - try { - TicketLineInfo line = m_oTicket.getLine(i); - String pId = line.getProductID(); - String location = m_App.getInventoryLocation(); - ProductStock checkProduct; - checkProduct = dlSales.getProductStockState(pId, location); - - if (checkProduct != null) { - - if (checkProduct.getUnits() <= 0) { - jCheckStock.setForeground(Color.magenta); - } else { - jCheckStock.setForeground(Color.darkGray); - } - - String content; - - if (!location.equals(checkProduct.getLocation())) { - content = AppLocal.getIntString("message.location.current"); - JFrame frame = new JFrame(); - JOptionPane.showMessageDialog(frame, - content, - "Info", - JOptionPane.INFORMATION_MESSAGE); - } else { - double dUnits = checkProduct.getUnits(); - int iUnits; - iUnits = (int) dUnits; - - jCheckStock.setText(Integer.toString(iUnits)); - } - - } else { - jCheckStock.setText(null); - } - } catch (BasicException ex) { - LOGGER.log(System.Logger.Level.WARNING, "Exception on: ", ex); - } - } - - if (listener != null) { - listener.restart(); - } + checkStock(); }//GEN-LAST:event_jCheckStockActionPerformed private void jCheckStockMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jCheckStockMouseClicked @@ -3026,13 +3046,17 @@ private void jTBtnShowActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIR m_jPanelBagExt.setVisible(false); } refreshTicket(); + m_jKeyFactory.requestFocus(); }//GEN-LAST:event_jTBtnShowActionPerformed private void jBtnCustomerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtnCustomerActionPerformed if (listener != null) { listener.stop(); } - Object[] options = {"Create", "Find", "Cancel"}; + Object[] options = { + AppLocal.getIntString("cboption.create"), + AppLocal.getIntString("cboption.find"), + AppLocal.getIntString("label.cancel")}; int n = JOptionPane.showOptionDialog(this, AppLocal.getIntString("message.customeradd"), @@ -3150,20 +3174,19 @@ private void m_jKeyFactoryActionPerformed(java.awt.event.ActionEvent evt) {//GEN // TODO add your handling code here: }//GEN-LAST:event_m_jKeyFactoryActionPerformed + private void m_jaddtaxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_m_jaddtaxActionPerformed + m_jKeyFactory.requestFocus(); + }//GEN-LAST:event_m_jaddtaxActionPerformed + // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton btnReprint1; private javax.swing.JButton btnSplit; - private javax.swing.JPanel catcontainer; private javax.swing.Box.Filler filler2; private javax.swing.JButton jBtnCustomer; private javax.swing.JButton jCheckStock; private javax.swing.JButton jEditAttributes; - private javax.swing.JPanel jPanel1; private javax.swing.JPanel jPanel2; - private javax.swing.JPanel jPanel4; - private javax.swing.JPanel jPanelLinesToolbar; private javax.swing.JPanel jPanelScanner; - private javax.swing.JPanel jPanelTax; private javax.swing.JToggleButton jTBtnShow; private javax.swing.JButton j_btnRemotePrt; private javax.swing.JPanel m_jButtons; @@ -3172,17 +3195,21 @@ private void m_jKeyFactoryActionPerformed(java.awt.event.ActionEvent evt) {//GEN private javax.swing.JButton m_jEditLine; private javax.swing.JButton m_jEnter; private javax.swing.JTextField m_jKeyFactory; - private javax.swing.JLabel m_jLblTotalEuros1; - private javax.swing.JLabel m_jLblTotalEuros2; - private javax.swing.JLabel m_jLblTotalEuros3; + private javax.swing.JLabel m_jLblSubTotalEuros; + private javax.swing.JLabel m_jLblTaxEuros; + private javax.swing.JLabel m_jLblTotalEuros; private javax.swing.JButton m_jList; private com.openbravo.beans.JNumberKeys m_jNumberKeys; - private javax.swing.JPanel m_jOptions; - private javax.swing.JPanel m_jPanContainer; private javax.swing.JPanel m_jPanEntries; private javax.swing.JPanel m_jPanelBag; private javax.swing.JPanel m_jPanelBagExt; + private javax.swing.JPanel m_jPanelBagExtDefaultEmpty; + private javax.swing.JPanel m_jPanelCatalog; + private javax.swing.JPanel m_jPanelContainer; private javax.swing.JPanel m_jPanelLines; + private javax.swing.JPanel m_jPanelLinesSum; + private javax.swing.JPanel m_jPanelLinesToolbar; + private javax.swing.JPanel m_jPanelMainToolbar; private javax.swing.JPanel m_jPanelScripts; private javax.swing.JPanel m_jPanelTicket; private javax.swing.JPanel m_jPanelTotals; @@ -3193,7 +3220,7 @@ private void m_jKeyFactoryActionPerformed(java.awt.event.ActionEvent evt) {//GEN private javax.swing.JLabel m_jTaxesEuros; private javax.swing.JLabel m_jTicketId; private javax.swing.JLabel m_jTotalEuros; - private javax.swing.JToggleButton m_jaddtax; + private javax.swing.JCheckBox m_jaddtax; private javax.swing.JButton m_jbtnScale; // End of variables declaration//GEN-END:variables diff --git a/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/JPanelTicketSales.java b/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/JPanelTicketSales.java index 69395e74..b0a3399e 100755 --- a/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/JPanelTicketSales.java +++ b/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/JPanelTicketSales.java @@ -51,7 +51,6 @@ public String getTitle() { */ @Override protected Component getSouthComponent() { - // Este metodo esta sendo chamado antes do init() LOGGER.log(System.Logger.Level.DEBUG,"JPanelTicketSales :: getSouthComponent"); m_cat = new JCatalog(dlSales); m_cat.addActionListener(new CatalogListener()); diff --git a/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/JTicketsBag.java b/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/JTicketsBag.java index 5ab3c06d..b34f8590 100755 --- a/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/JTicketsBag.java +++ b/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/JTicketsBag.java @@ -46,9 +46,11 @@ public abstract class JTicketsBag extends JPanel { */ protected TicketsEditor m_panelticket; - /** Creates new form JTicketsBag + /** + * * @param oApp - * @param panelticket */ + * @param panelticket + */ public JTicketsBag(AppView oApp, TicketsEditor panelticket) { m_App = oApp; m_panelticket = panelticket; @@ -56,18 +58,18 @@ public JTicketsBag(AppView oApp, TicketsEditor panelticket) { } /** - * + * Active panel (Call on active panel) */ public abstract void activate(); /** - * + * Desactive panel (Call on Desactive) * @return */ public abstract boolean deactivate(); /** - * + * Delete Current tocket */ public abstract void deleteTicket(); @@ -93,13 +95,13 @@ public JTicketsBag(AppView oApp, TicketsEditor panelticket) { public static JTicketsBag createTicketsBag(String sName, AppView app, TicketsEditor panelticket) { switch (sName) { case "standard": - // return new JTicketsBagMulti(oApp, user, panelticket); return new JTicketsBagShared(app, panelticket); case "restaurant": return new JTicketsBagRestaurantMap(app, panelticket); + case "simple": default: - // "simple" return new JTicketsBagSimple(app, panelticket); + } } } \ No newline at end of file diff --git a/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/restaurant/FloorsEditor.form b/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/restaurant/FloorsEditor.form index 7f61c4aa..9787af2e 100755 --- a/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/restaurant/FloorsEditor.form +++ b/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/restaurant/FloorsEditor.form @@ -23,7 +23,7 @@ - + diff --git a/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/restaurant/FloorsEditor.java b/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/restaurant/FloorsEditor.java index e277406b..180af7d7 100755 --- a/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/restaurant/FloorsEditor.java +++ b/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/restaurant/FloorsEditor.java @@ -157,7 +157,7 @@ private void initComponents() { setMinimumSize(new java.awt.Dimension(91, 125)); setLayout(new java.awt.BorderLayout()); - jPanel1.setPreferredSize(new java.awt.Dimension(150, 100)); + jPanel1.setPreferredSize(new java.awt.Dimension(150, 64)); jPanel1.setLayout(null); jLabel3.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N diff --git a/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/restaurant/JTicketsBagRestaurant.java b/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/restaurant/JTicketsBagRestaurant.java index 8fd863ba..acfe2794 100755 --- a/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/restaurant/JTicketsBagRestaurant.java +++ b/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/restaurant/JTicketsBagRestaurant.java @@ -17,11 +17,9 @@ // Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works // // - package com.openbravo.pos.sales.restaurant; import com.openbravo.basic.BasicException; -import com.openbravo.beans.JIntegerDialog; import com.openbravo.beans.JPasswordDialog; import com.openbravo.data.gui.JMessageDialog; import com.openbravo.data.gui.ListKeyed; @@ -52,64 +50,63 @@ * @author JG uniCenta */ public class JTicketsBagRestaurant extends javax.swing.JPanel { + private static final Logger LOGGER = Logger.getLogger(JTicketsBagRestaurant.class.getName()); private final AppView m_App; private final JTicketsBagRestaurantMap m_restaurant; private List m_aLines; private TicketLineInfo line; private TicketInfo ticket; - private final Object ticketExt; + private final Object ticketExt; private DataLogicSystem m_dlSystem = null; - private final DeviceTicket m_TP; - private final TicketParser m_TTP2; - private final RestaurantDBUtils restDB; - + private final DeviceTicket m_TP; + private final TicketParser m_TTP2; + private final RestaurantDBUtils restDB; + private final DataLogicSystem dlSystem = null; private final DataLogicReceipts dlReceipts = null; private DataLogicSales dlSales = null; - - private TicketParser m_TTP; - + + private TicketParser m_TTP; + private SentenceList senttax; private ListKeyed taxcollection; private TaxesLogic taxeslogic; - - - - /** Creates new form JTicketsBagRestaurantMap + + /** + * Creates new form JTicketsBagRestaurantMap + * * @param app - * @param restaurant */ + * @param restaurant + */ public JTicketsBagRestaurant(AppView app, JTicketsBagRestaurantMap restaurant) { super(); m_App = app; m_restaurant = restaurant; - + initComponents(); - ticketExt = null; - - restDB = new RestaurantDBUtils(m_App); - + ticketExt = null; + + restDB = new RestaurantDBUtils(m_App); + m_dlSystem = (DataLogicSystem) m_App.getBean("com.openbravo.pos.forms.DataLogicSystem"); - dlSales = (DataLogicSales) m_App.getBean("com.openbravo.pos.forms.DataLogicSales"); - //DataLogicReceipts m_dlReceipts = (DataLogicReceipts) m_App.getBean("com.openbravo.pos.sales.DataLogicReceipts"); - + dlSales = (DataLogicSales) m_App.getBean("com.openbravo.pos.forms.DataLogicSales"); + m_TP = new DeviceTicket(); - m_TTP2 = new TicketParser(m_App.getDeviceTicket(), m_dlSystem); - -// j_btnKitchen.setVisible(false); - j_btnKitchen.setVisible(true); + m_TTP2 = new TicketParser(m_App.getDeviceTicket(), m_dlSystem); + j_btnKitchen.setVisible(true); m_TablePlan.setVisible(m_App.getAppUserView().getUser(). - hasPermission("sales.TablePlan")); - + hasPermission("sales.TablePlan")); + } /** * */ public void activate() { - + m_DelTicket.setEnabled(m_App.getAppUserView().getUser() .hasPermission("com.openbravo.pos.sales.JPanelTicketEdits")); @@ -117,24 +114,25 @@ public void activate() { .hasPermission("com.openbravo.pos.sales.JPanelTicketEdits")); m_TablePlan.setVisible(true); } - + /** * * @param pTicket * @return */ - public String getPickupString(TicketInfo pTicket){ - if (pTicket == null){ - return("0"); + public String getPickupString(TicketInfo pTicket) { + if (pTicket == null) { + return ("0"); + } + String tmpPickupId = Integer.toString(pTicket.getPickupId()); + String pickupSize = (m_App.getProperties().getProperty("till.pickupsize")); + if (pickupSize != null && (Integer.parseInt(pickupSize) >= tmpPickupId.length())) { + while (tmpPickupId.length() < (Integer.parseInt(pickupSize))) { + tmpPickupId = "0" + tmpPickupId; + } + } + return (tmpPickupId); } - String tmpPickupId=Integer.toString(pTicket.getPickupId()); - String pickupSize =(m_App.getProperties().getProperty("till.pickupsize")); - if (pickupSize!=null && (Integer.parseInt(pickupSize) >= tmpPickupId.length())){ - while (tmpPickupId.length()< (Integer.parseInt(pickupSize))){ - tmpPickupId="0"+tmpPickupId;} - } - return (tmpPickupId); - } /** * @@ -143,47 +141,47 @@ public String getPickupString(TicketInfo pTicket){ public void printTicket(String resource) { printTicket(resource, ticket, m_restaurant.getTable()); printNotify(); - j_btnKitchen.setEnabled(false); - } - - private void printTicket(String sresourcename, TicketInfo ticket, String table) { - if (ticket != null) { - - if (ticket.getPickupId()== 0){ - try{ - ticket.setPickupId(dlSales.getNextPickupIndex()); - }catch (BasicException e){ - ticket.setPickupId(0); + j_btnKitchen.setEnabled(false); + } + + private void printTicket(String sresourcename, TicketInfo ticket, String table) { + if (ticket != null) { + + if (ticket.getPickupId() == 0) { + try { + ticket.setPickupId(dlSales.getNextPickupIndex()); + } catch (BasicException e) { + LOGGER.log(Level.SEVERE, "Exception print ticket", e); + ticket.setPickupId(0); + } + } + + try { + ScriptEngine script = ScriptFactory.getScriptEngine(ScriptFactory.VELOCITY); + + script.put("ticket", ticket); + script.put("place", m_restaurant.getTableName()); + script.put("pickupid", getPickupString(ticket)); + + m_TTP2.printTicket(script.eval(m_dlSystem.getResourceAsXML(sresourcename)).toString()); + + } catch (ScriptException | TicketPrinterException e) { + LOGGER.log(Level.WARNING, "Exception on executing script: " + sresourcename, e); + JMessageDialog.showMessage(this, + new MessageInf(MessageInf.SGN_NOTICE, + AppLocal.getIntString("message.cannotprint"), e)); } - } - - try { - ScriptEngine script = ScriptFactory.getScriptEngine(ScriptFactory.VELOCITY); - - script.put("ticket", ticket); - script.put("place",m_restaurant.getTableName()); - script.put("pickupid",getPickupString(ticket)); - - m_TTP2.printTicket(script.eval(m_dlSystem.getResourceAsXML(sresourcename)).toString()); - - } catch ( ScriptException | TicketPrinterException e) { - LOGGER.log(Level.WARNING, "Exception on executing script: "+sresourcename, e); - JMessageDialog.showMessage(this, - new MessageInf(MessageInf.SGN_NOTICE, - AppLocal.getIntString("message.cannotprint"), e)); } - } - } - - public void printNotify(){ - - } - - - /** This method is called from within the constructor to - * initialize the form. - * WARNING: Do NOT modify this code. The content of this method is - * always regenerated by the Form Editor. + } + + public void printNotify() { + + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. */ // //GEN-BEGIN:initComponents private void initComponents() { @@ -263,100 +261,96 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { private void m_MoveTableActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_m_MoveTableActionPerformed -// JG 6 Nov 13 - clear Customer from orignal table - Thanks David Kurniawan + LOGGER.log(Level.INFO, "Move table"); restDB.clearCustomerNameInTableById(m_restaurant.getTable()); restDB.clearWaiterNameInTableById(m_restaurant.getTable()); restDB.setTableMovedFlag(m_restaurant.getTable()); - m_restaurant.moveTicket(); - + m_restaurant.moveTicket(); + }//GEN-LAST:event_m_MoveTableActionPerformed - @SuppressWarnings("empty-statement") private void m_DelTicketActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_m_DelTicketActionPerformed - boolean pinOK = false; + LOGGER.log(Level.INFO, "Delete ticket"); // if (ticket != null) { + if (m_App.getProperties().getProperty("override.check").equals("true")) { + String pin = m_App.getProperties().getProperty("override.pin"); + String iValue = JPasswordDialog.showEditor(this, AppLocal.getIntString("title.override.enterpin")); - if (m_App.getProperties().getProperty("override.check").equals("true")) { - String pin = m_App.getProperties().getProperty("override.pin"); - String iValue = JPasswordDialog.showEditor(this, AppLocal.getIntString("title.override.enterpin")); - - if (iValue != null && iValue.equals(pin)) { - pinOK = true; - int res = JOptionPane.showConfirmDialog(this - , AppLocal.getIntString("message.wannadelete") - , AppLocal.getIntString("title.editor") - , JOptionPane.YES_NO_OPTION - , JOptionPane.QUESTION_MESSAGE); - - if (res == JOptionPane.YES_OPTION) { - restDB.clearCustomerNameInTableById(m_restaurant.getTable()); - restDB.clearWaiterNameInTableById(m_restaurant.getTable()); - restDB.clearTicketIdInTableById(m_restaurant.getTable()); - m_restaurant.deleteTicket(); - } - } else { - pinOK = false; - JOptionPane.showMessageDialog(this, AppLocal.getIntString("message.override.badpin")); + if (iValue != null && !iValue.isBlank() && iValue.equals(pin)) { + + int res = JOptionPane.showConfirmDialog(this, + AppLocal.getIntString("message.wannadelete"), + AppLocal.getIntString("title.editor"), + JOptionPane.YES_NO_OPTION, + JOptionPane.QUESTION_MESSAGE); + + if (res == JOptionPane.YES_OPTION) { + restDB.clearCustomerNameInTableById(m_restaurant.getTable()); + restDB.clearWaiterNameInTableById(m_restaurant.getTable()); + restDB.clearTicketIdInTableById(m_restaurant.getTable()); + m_restaurant.deleteTicket(); } + } else { + JOptionPane.showMessageDialog(this, AppLocal.getIntString("message.override.badpin")); } + } - int res = JOptionPane.showConfirmDialog(this - , AppLocal.getIntString("message.wannadelete") - , AppLocal.getIntString("title.editor") - , JOptionPane.YES_NO_OPTION - , JOptionPane.QUESTION_MESSAGE); - - if (res == JOptionPane.YES_OPTION) { - restDB.clearCustomerNameInTableById(m_restaurant.getTable()); - restDB.clearWaiterNameInTableById(m_restaurant.getTable()); - restDB.clearTicketIdInTableById(m_restaurant.getTable()); - m_restaurant.deleteTicket(); - } + int res = JOptionPane.showConfirmDialog(this, + AppLocal.getIntString("message.wannadelete"), + AppLocal.getIntString("title.editor"), + JOptionPane.YES_NO_OPTION, + JOptionPane.QUESTION_MESSAGE); + + if (res == JOptionPane.YES_OPTION) { + restDB.clearCustomerNameInTableById(m_restaurant.getTable()); + restDB.clearWaiterNameInTableById(m_restaurant.getTable()); + restDB.clearTicketIdInTableById(m_restaurant.getTable()); + m_restaurant.deleteTicket(); + } }//GEN-LAST:event_m_DelTicketActionPerformed private void m_TablePlanActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_m_TablePlanActionPerformed - // outta here back to TableMap - m_restaurant.newTicket(); + + LOGGER.log(Level.INFO, "Open Table Plan"); + m_restaurant.newTicket(); }//GEN-LAST:event_m_TablePlanActionPerformed - - @SuppressWarnings("empty-statement") + private void j_btnKitchenActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_j_btnKitchenActionPerformed + + LOGGER.log(Level.INFO, "Kitchen Button"); + ticket = m_restaurant.getActiveTicket(); - + String scriptId = "script.SendOrder"; - try { + try { String rScript = (m_dlSystem.getResourceAsText(scriptId)); ScriptEngine scriptEngine = ScriptFactory.getScriptEngine(ScriptFactory.BEANSHELL); - scriptEngine.put("ticket", ticket); - scriptEngine.put("place",m_restaurant.getTableName()); + scriptEngine.put("ticket", ticket); + scriptEngine.put("place", m_restaurant.getTableName()); scriptEngine.put("user", m_App.getAppUserView().getUser()); scriptEngine.put("sales", this); scriptEngine.put("pickupid", ticket.getPickupId()); scriptEngine.eval(rScript); - + } catch (ScriptException ex) { - LOGGER.log(Level.WARNING, "Exception on executing script: "+scriptId, ex); + LOGGER.log(Level.WARNING, "Exception on executing script: " + scriptId, ex); } - // Autologoff after sales - String autoLogoff = (m_App.getProperties().getProperty("till.autoLogoff")); - String autoLogoffRestaurant =(m_App.getProperties().getProperty("till.autoLogoffrestaurant")); - if (autoLogoff != null){ - if (autoLogoff.equals("true")){ - // check how far to logoof to ie tables or application - if (autoLogoffRestaurant == null){ - ((JRootApp)m_App).closeAppView(); - }else if (autoLogoffRestaurant.equals("true")){ - m_restaurant.newTicket(); - }else{ - ((JRootApp)m_App).closeAppView(); - } - } + // Autologoff after sales + String autoLogoff = (m_App.getProperties().getProperty("till.autoLogoff")); + String autoLogoffRestaurant = (m_App.getProperties().getProperty("till.autoLogoffrestaurant")); + if (autoLogoff != null && autoLogoff.equals("true")) { + // check how far to logoof to ie tables or application + if (autoLogoffRestaurant != null && autoLogoffRestaurant.equals("true")) { + m_restaurant.newTicket(); + } else { + ((JRootApp) m_App).closeAppView(); } + } }//GEN-LAST:event_j_btnKitchenActionPerformed - - + + // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton j_btnKitchen; private javax.swing.JButton m_DelTicket; @@ -364,5 +358,4 @@ private void j_btnKitchenActionPerformed(java.awt.event.ActionEvent evt) {//GEN- private javax.swing.JButton m_TablePlan; // End of variables declaration//GEN-END:variables - -} \ No newline at end of file +} diff --git a/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/restaurant/JTicketsBagRestaurantMap.java b/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/restaurant/JTicketsBagRestaurantMap.java index 2e2587c2..3634f51b 100755 --- a/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/restaurant/JTicketsBagRestaurantMap.java +++ b/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/restaurant/JTicketsBagRestaurantMap.java @@ -13,7 +13,6 @@ // // You should have received a copy of the GNU General Public License // along with this program. If not, see . - package com.openbravo.pos.sales.restaurant; import javax.swing.Timer; @@ -59,88 +58,84 @@ * @author JG uniCenta */ public class JTicketsBagRestaurantMap extends JTicketsBag { - - private static class ServerCurrent { - - public ServerCurrent() { - } - } + private java.util.List m_aplaces; private java.util.List m_afloors; - - private JTicketsBagRestaurant m_restaurantmap; - private final JTicketsBagRestaurantRes m_jreservations; + + private JTicketsBagRestaurant m_restaurantmap; + private final JTicketsBagRestaurantRes m_jreservations; private Place m_PlaceCurrent; - private ServerCurrent m_ServerCurrent; - private Place m_PlaceClipboard; + private Place m_PlaceClipboard; private CustomerInfo customer; private DataLogicReceipts dlReceipts = null; private DataLogicSales dlSales = null; - private DataLogicSystem dlSystem = null; + private DataLogicSystem dlSystem = null; private final RestaurantDBUtils restDB; private static final Icon ICO_OCU_SM = new ImageIcon(Place.class.getResource("/com/openbravo/images/edit_group_sm.png")); - private static final Icon ICO_WAITER = new NullIcon(1, 1); + private static final Icon ICO_WAITER = new NullIcon(1, 1); private static final Icon ICO_FRE = new NullIcon(22, 22); private String waiterDetails; private String customerDetails; private String tableName; private Boolean transBtns; - private Boolean actionEnabled = true; + private Boolean actionEnabled = true; private int newX; - private int newY; + private int newY; private AppView m_app; private Boolean showLayout = false; - - /** Creates new form JTicketsBagRestaurant - * @param app - * @param panelticket */ + /** + * Creates new form JTicketsBagRestaurant + * + * @param app + * @param panelticket + */ public JTicketsBagRestaurantMap(AppView app, TicketsEditor panelticket) { - + super(app, panelticket); - - restDB = new RestaurantDBUtils(app); + + restDB = new RestaurantDBUtils(app); transBtns = AppConfig.getInstance().getBoolean("table.transbtn"); - + dlReceipts = (DataLogicReceipts) app.getBean("com.openbravo.pos.sales.DataLogicReceipts"); dlSales = (DataLogicSales) m_App.getBean("com.openbravo.pos.forms.DataLogicSales"); - dlSystem = (DataLogicSystem) m_App.getBean("com.openbravo.pos.forms.DataLogicSystem"); - + dlSystem = (DataLogicSystem) m_App.getBean("com.openbravo.pos.forms.DataLogicSystem"); + m_restaurantmap = new JTicketsBagRestaurant(app, this); m_PlaceCurrent = null; m_PlaceClipboard = null; customer = null; - + try { SentenceList sent = new StaticSentence( - app.getSession(), - "SELECT ID, NAME, IMAGE FROM floors ORDER BY NAME", - null, - new SerializerReadClass(Floor.class)); + app.getSession(), + "SELECT ID, NAME, IMAGE FROM floors ORDER BY NAME", + null, + new SerializerReadClass(Floor.class)); m_afloors = sent.list(); - + } catch (BasicException ex) { LOGGER.log(System.Logger.Level.WARNING, "Exception: ", ex); m_afloors = new ArrayList<>(); } try { SentenceList sent = new StaticSentence( - app.getSession(), - "SELECT ID, NAME, SEATS, X, Y, FLOOR, CUSTOMER, WAITER, TICKETID, TABLEMOVED FROM places ORDER BY FLOOR", - null, - new SerializerReadClass(Place.class)); + app.getSession(), + "SELECT ID, NAME, SEATS, X, Y, FLOOR, CUSTOMER, WAITER, TICKETID, TABLEMOVED FROM places ORDER BY FLOOR", + null, + new SerializerReadClass(Place.class)); m_aplaces = sent.list(); } catch (BasicException ex) { LOGGER.log(System.Logger.Level.WARNING, "Exception: ", ex); m_aplaces = new ArrayList<>(); - } - - initComponents(); - + } + + initComponents(); + m_jbtnSave.setVisible(false); - + if (m_afloors.size() > 1) { JTabbedPane jTabFloors = new JTabbedPane(); jTabFloors.applyComponentOrientation(getComponentOrientation()); @@ -149,47 +144,47 @@ public JTicketsBagRestaurantMap(AppView app, TicketsEditor panelticket) { jTabFloors.setFocusable(false); jTabFloors.setRequestFocusEnabled(false); m_jPanelMap.add(jTabFloors, BorderLayout.CENTER); - + m_afloors.stream().map((f) -> { f.getContainer().applyComponentOrientation(getComponentOrientation()); - return f; + return f; }).forEach((f) -> { JScrollPane jScrCont = new JScrollPane(); jScrCont.applyComponentOrientation(getComponentOrientation()); - JPanel jPanCont = new JPanel(); + JPanel jPanCont = new JPanel(); jPanCont.applyComponentOrientation(getComponentOrientation()); - - jTabFloors.addTab(f.getName(), f.getIcon(), jScrCont); + + jTabFloors.addTab(f.getName(), f.getIcon(), jScrCont); jScrCont.setViewportView(jPanCont); jPanCont.add(f.getContainer()); }); } else if (m_afloors.size() == 1) { Floor f = m_afloors.get(0); f.getContainer().applyComponentOrientation(getComponentOrientation()); - + JPanel jPlaces = new JPanel(); jPlaces.applyComponentOrientation(getComponentOrientation()); jPlaces.setLayout(new BorderLayout()); jPlaces.setBorder(new javax.swing.border.CompoundBorder( - new javax.swing.border.EmptyBorder(new Insets(5, 5, 5, 5)), - new javax.swing.border.TitledBorder(f.getName()))); - + new javax.swing.border.EmptyBorder(new Insets(5, 5, 5, 5)), + new javax.swing.border.TitledBorder(f.getName()))); + JScrollPane jScrCont = new JScrollPane(); jScrCont.applyComponentOrientation(getComponentOrientation()); JPanel jPanCont = new JPanel(); jPanCont.applyComponentOrientation(getComponentOrientation()); - + m_jPanelMap.add(jPlaces, BorderLayout.CENTER); jPlaces.add(jScrCont, BorderLayout.CENTER); - jScrCont.setViewportView(jPanCont); + jScrCont.setViewportView(jPanCont); jPanCont.add(f.getContainer()); - } - + } + Floor currfloor = null; - + for (Place pl : m_aplaces) { int iFloor = 0; - + if (currfloor == null || !currfloor.getID().equals(pl.getFloor())) { do { currfloor = m_afloors.get(iFloor++); @@ -204,19 +199,19 @@ public JTicketsBagRestaurantMap(AppView app, TicketsEditor panelticket) { pl.getButton().setContentAreaFilled(false); pl.getButton().setBorderPainted(false); } - + pl.getButton().addMouseMotionListener(new MouseAdapter() { - @Override - public void mouseDragged(MouseEvent E) { - if (!actionEnabled) { - if (pl.getDiffX() == 0) { - pl.setDiffX(pl.getButton().getX() - pl.getX()); - pl.setDiffY(pl.getButton().getY() - pl.getY()); - } - newX = E.getX() + pl.getButton().getX(); - newY = E.getY() + pl.getButton().getY(); - pl.getButton().setBounds(newX + pl.getDiffX(), newY + pl.getDiffY(), - pl.getButton().getWidth(), pl.getButton().getHeight()); + @Override + public void mouseDragged(MouseEvent E) { + if (!actionEnabled) { + if (pl.getDiffX() == 0) { + pl.setDiffX(pl.getButton().getX() - pl.getX()); + pl.setDiffY(pl.getButton().getY() - pl.getY()); + } + newX = E.getX() + pl.getButton().getX(); + newY = E.getY() + pl.getButton().getY(); + pl.getButton().setBounds(newX + pl.getDiffX(), newY + pl.getDiffY(), + pl.getButton().getWidth(), pl.getButton().getHeight()); pl.setX(newX); pl.setY(newY); } @@ -226,102 +221,104 @@ public void mouseDragged(MouseEvent E) { pl.getButton().addActionListener(new MyActionListener(pl)); } - + m_jreservations = new JTicketsBagRestaurantRes(app, this); add(m_jreservations, "res"); showLayout = m_App.hasPermission("sales.Layout"); if (showLayout) { m_jbtnLayout.setVisible(true); - m_jbtnSave.setVisible(false); + m_jbtnSave.setVisible(false); } else { m_jbtnLayout.setVisible(false); - m_jbtnSave.setVisible(false); - } - + m_jbtnSave.setVisible(false); + } + if (m_App.getProperties().getProperty("till.autoRefreshTableMap").equals("true")) { webLblautoRefresh.setText(java.util.ResourceBundle.getBundle("pos_messages") - .getString("label.autoRefreshTableMapTimerON")); - + .getString("label.autoRefreshTableMapTimerON")); + Timer autoRefreshTimer = new Timer(Integer.parseInt(m_App.getProperties() - .getProperty("till.autoRefreshTimer"))*1000, new tableMapRefresh()); - + .getProperty("till.autoRefreshTimer")) * 1000, new tableMapRefresh()); + autoRefreshTimer.start(); try { Thread.sleep(1000); } catch (InterruptedException ex) { LOGGER.log(System.Logger.Level.WARNING, "Exception: ", ex); autoRefreshTimer.stop(); - } + } } else { webLblautoRefresh.setText(java.util.ResourceBundle.getBundle("pos_messages") - .getString("label.autoRefreshTableMapTimerOFF")); + .getString("label.autoRefreshTableMapTimerOFF")); } -} + } class tableMapRefresh implements ActionListener { + @Override public void actionPerformed(ActionEvent e) { loadTickets(); - printState(); + printState(); } - } - + } + /** * */ @Override public void activate() { - + LOGGER.log(System.Logger.Level.INFO, "Active"); showLayout = m_App.hasPermission("sales.Layout"); if (showLayout) { m_jbtnLayout.setVisible(true); m_jbtnSave.setVisible(false); } else { m_jbtnLayout.setVisible(false); - m_jbtnSave.setVisible(false); - } - + m_jbtnSave.setVisible(false); + } + m_PlaceClipboard = null; customer = null; - loadTickets(); - printState(); - - m_panelticket.setActiveTicket(null, null); + loadTickets(); + printState(); + + m_panelticket.setActiveTicket(new TicketInfo(), null); m_restaurantmap.activate(); - - showView("map"); + + showView("map"); } - + /** * * @return */ @Override public boolean deactivate() { - + + LOGGER.log(System.Logger.Level.INFO, "deactivate"); if (viewTables()) { m_PlaceClipboard = null; customer = null; if (m_PlaceCurrent != null) { - + try { - dlReceipts.updateSharedTicket(m_PlaceCurrent.getId(), - m_panelticket.getActiveTicket(), - m_panelticket.getActiveTicket().getPickupId()); - dlReceipts.unlockSharedTicket(m_PlaceCurrent.getId(),null); + dlReceipts.updateSharedTicket(m_PlaceCurrent.getId(), + m_panelticket.getActiveTicket(), + m_panelticket.getActiveTicket().getPickupId()); + dlReceipts.unlockSharedTicket(m_PlaceCurrent.getId(), null); } catch (BasicException ex) { LOGGER.log(System.Logger.Level.WARNING, "Exception: ", ex); new MessageInf(ex).show(this); - } - + } + m_PlaceCurrent = null; } - printState(); - m_panelticket.setActiveTicket(null, null); + printState(); + m_panelticket.setActiveTicket(null, null); return true; } else { @@ -360,25 +357,25 @@ public TicketInfo getActiveTicket() { */ public void moveTicket() { if (m_PlaceCurrent != null) { - + try { - dlReceipts.updateRSharedTicket(m_PlaceCurrent.getId(), - m_panelticket.getActiveTicket(),m_panelticket.getActiveTicket().getPickupId()); + dlReceipts.updateRSharedTicket(m_PlaceCurrent.getId(), + m_panelticket.getActiveTicket(), m_panelticket.getActiveTicket().getPickupId()); } catch (BasicException ex) { LOGGER.log(System.Logger.Level.WARNING, "Exception: ", ex); new MessageInf(ex).show(this); - } - - m_PlaceClipboard = m_PlaceCurrent; - + } + + m_PlaceClipboard = m_PlaceCurrent; + customer = null; m_PlaceCurrent = null; } - + printState(); m_panelticket.setActiveTicket(null, null); } - + /** * * @param c @@ -387,15 +384,15 @@ public void moveTicket() { public boolean viewTables(CustomerInfo c) { if (m_jreservations.deactivate()) { showView("map"); - m_PlaceClipboard = null; - customer = c; + m_PlaceClipboard = null; + customer = c; printState(); return true; } else { return false; - } + } } - + /** * * @return @@ -403,10 +400,7 @@ public boolean viewTables(CustomerInfo c) { public boolean viewTables() { return viewTables(null); } - - /** - * - */ + public void newTicket() { if (m_PlaceCurrent != null) { @@ -419,25 +413,25 @@ public void newTicket() { if ("override".equals(m_lockState) || "locked".equals(m_lockState)) { dlReceipts.updateSharedTicket(m_PlaceCurrent.getId(), - m_panelticket.getActiveTicket(), - m_panelticket.getActiveTicket().getPickupId()); + m_panelticket.getActiveTicket(), + m_panelticket.getActiveTicket().getPickupId()); dlReceipts.unlockSharedTicket(m_PlaceCurrent.getId(), null); - m_PlaceCurrent = null; + m_PlaceCurrent = null; } else { - JOptionPane.showMessageDialog(null - , AppLocal.getIntString("message.sharedticketlockoverriden") - , AppLocal.getIntString("title.editor") - , JOptionPane.INFORMATION_MESSAGE); + JOptionPane.showMessageDialog(null, + AppLocal.getIntString("message.sharedticketlockoverriden"), + AppLocal.getIntString("title.editor"), + JOptionPane.INFORMATION_MESSAGE); } } catch (BasicException ex) { LOGGER.log(System.Logger.Level.WARNING, "Exception: ", ex); } } - - printState(); - m_panelticket.setActiveTicket(null, null); + + printState(); + m_panelticket.setActiveTicket(null, null); } - + /** * * @return @@ -446,10 +440,10 @@ public String getTable() { String id = null; if (m_PlaceCurrent != null) { id = m_PlaceCurrent.getId(); + } + return (id); } - return(id); - } - + /** * * @return @@ -458,8 +452,8 @@ public String getTableName() { String stableName = null; if (m_PlaceCurrent != null) { stableName = m_PlaceCurrent.getName(); - } - return(stableName); + } + return (stableName); } /** @@ -467,7 +461,7 @@ public String getTableName() { */ @Override public void deleteTicket() { - + if (m_PlaceCurrent != null) { String id = m_PlaceCurrent.getId(); try { @@ -475,32 +469,23 @@ public void deleteTicket() { } catch (BasicException ex) { LOGGER.log(System.Logger.Level.WARNING, "Exception: ", ex); new MessageInf(ex).show(this); - } - + } + m_PlaceCurrent.setPeople(false); m_PlaceCurrent = null; - } - - printState(); - m_panelticket.setActiveTicket(null, null); - } - - /** - * - */ - public void changeServer() { - - if (m_ServerCurrent != null) { } + + printState(); + m_panelticket.setActiveTicket(null, null); } - + /** * */ public void loadTickets() { - + Set atickets = new HashSet<>(); - + try { java.util.List l = dlReceipts.getSharedTicketList(); l.stream().forEach((ticket) -> { @@ -509,16 +494,16 @@ public void loadTickets() { } catch (BasicException ex) { LOGGER.log(System.Logger.Level.WARNING, "Exception: ", ex); new MessageInf(ex).show(this); - } - + } + m_aplaces.stream().forEach((table) -> { table.setPeople(atickets.contains(table.getId())); }); } - -/* + + /* * Populate the floor plans and tables -*/ + */ private void printState() { if (m_PlaceClipboard == null) { @@ -529,78 +514,78 @@ private void printState() { place.getButton().setEnabled(true); return place; }).map((place) -> { - if (m_App.getProperties().getProperty("table.tablecolour")== null){ - tableName="" - + place.getName()+""; - }else{ - tableName="" - + place.getName()+""; + if (m_App.getProperties().getProperty("table.tablecolour") == null) { + tableName = "" + + place.getName() + ""; + } else { + tableName = "" + + place.getName() + ""; } - return place; + return place; }).map((place) -> { - if (Boolean.parseBoolean(m_App.getProperties().getProperty("table.showwaiterdetails"))){ - if (m_App.getProperties().getProperty("table.waitercolour")== null){ - waiterDetails = (restDB.getWaiterNameInTable(place.getName()) ==null)? "" - :"" - + restDB.getWaiterNameInTableById(place.getId())+"
"; - }else{ - waiterDetails = (restDB.getWaiterNameInTable(place.getName()) ==null)? "" - :"" - + restDB.getWaiterNameInTableById(place.getId())+"
"; + if (Boolean.parseBoolean(m_App.getProperties().getProperty("table.showwaiterdetails"))) { + if (m_App.getProperties().getProperty("table.waitercolour") == null) { + waiterDetails = (restDB.getWaiterNameInTable(place.getName()) == null) ? "" + : "" + + restDB.getWaiterNameInTableById(place.getId()) + "
"; + } else { + waiterDetails = (restDB.getWaiterNameInTable(place.getName()) == null) ? "" + : "" + + restDB.getWaiterNameInTableById(place.getId()) + "
"; } place.getButton().setIcon(ICO_OCU_SM); } else { - waiterDetails = ""; + waiterDetails = ""; } - return place; + return place; }).map((place) -> { - if (Boolean.parseBoolean(m_App.getProperties().getProperty("table.showcustomerdetails"))){ + if (Boolean.parseBoolean(m_App.getProperties().getProperty("table.showcustomerdetails"))) { place.getButton().setIcon((Boolean.parseBoolean(m_App.getProperties().getProperty("table.showwaiterdetails")) - && (restDB.getCustomerNameInTable(place.getName()) !=null)) - ? ICO_WAITER:ICO_OCU_SM); - if (m_App.getProperties().getProperty("table.customercolour")== null){ - customerDetails = (restDB.getCustomerNameInTable(place.getName()) ==null)? "" - :"" - + restDB.getCustomerNameInTableById(place.getId())+"
"; - }else{ - customerDetails = (restDB.getCustomerNameInTable(place.getName()) ==null)? "" - :"" - + restDB.getCustomerNameInTableById(place.getId())+"
"; + && (restDB.getCustomerNameInTable(place.getName()) != null)) + ? ICO_WAITER : ICO_OCU_SM); + if (m_App.getProperties().getProperty("table.customercolour") == null) { + customerDetails = (restDB.getCustomerNameInTable(place.getName()) == null) ? "" + : "" + + restDB.getCustomerNameInTableById(place.getId()) + "
"; + } else { + customerDetails = (restDB.getCustomerNameInTable(place.getName()) == null) ? "" + : "" + + restDB.getCustomerNameInTableById(place.getId()) + "
"; } } else { - customerDetails = ""; + customerDetails = ""; } return place; - }).map((place) -> { + }).map((place) -> { if ((Boolean.parseBoolean(m_App.getProperties().getProperty("table.showwaiterdetails"))) || (Boolean.parseBoolean(m_App.getProperties().getProperty("table.showcustomerdetails")))) { place.getButton().setText("
" - + customerDetails + waiterDetails +tableName+"" ); - }else{ - if (m_App.getProperties().getProperty("table.tablecolour")== null){ - tableName="" - + place.getName()+""; - }else{ - tableName="" - + place.getName()+""; + + customerDetails + waiterDetails + tableName + ""); + } else { + if (m_App.getProperties().getProperty("table.tablecolour") == null) { + tableName = "" + + place.getName() + ""; + } else { + tableName = "" + + place.getName() + ""; } - - place.getButton().setText("
"+tableName+""); + + place.getButton().setText("
" + tableName + ""); } return place; }).filter((place) -> (!place.hasPeople())).forEach((place) -> { place.getButton().setIcon(ICO_FRE); }); - + m_jbtnReservations.setEnabled(true); } else { - m_jText.setText(AppLocal.getIntString("label.restaurantcustomer" - , new Object[] {customer.getName() - } + m_jText.setText(AppLocal.getIntString("label.restaurantcustomer", + new Object[]{customer.getName() + } )); m_aplaces.stream().forEach((place) -> { @@ -609,220 +594,221 @@ private void printState() { m_jbtnReservations.setEnabled(false); } } else { - m_jText.setText(AppLocal.getIntString("label.restaurantmove" - , new Object[] {m_PlaceClipboard.getName() - } + m_jText.setText(AppLocal.getIntString("label.restaurantmove", + new Object[]{m_PlaceClipboard.getName() + } )); m_aplaces.stream().forEach((place) -> { place.getButton().setEnabled(true); - }); + }); m_jbtnReservations.setEnabled(false); - } + } } - + private TicketInfo getTicketInfo(Place place) { TicketInfo ticketInfo = null; - + try { - ticketInfo= dlReceipts.getSharedTicket(place.getId()); + ticketInfo = dlReceipts.getSharedTicket(place.getId()); } catch (BasicException ex) { LOGGER.log(System.Logger.Level.WARNING, "Exception: ", ex); new MessageInf(ex).show(JTicketsBagRestaurantMap.this); } - + return ticketInfo; } - + private void setActivePlace(Place place, TicketInfo ticket) { m_PlaceCurrent = place; m_panelticket.setActiveTicket(ticket, m_PlaceCurrent.getName()); try { - dlReceipts.lockSharedTicket(m_PlaceCurrent.getId(),"locked"); + dlReceipts.lockSharedTicket(m_PlaceCurrent.getId(), "locked"); } catch (BasicException ex) { Logger.getLogger(JTicketsBagRestaurantMap.class.getName()).log(Level.SEVERE, null, ex); - } - } + } + } private void showView(String view) { - CardLayout cl = (CardLayout)(getLayout()); - cl.show(this, view); + CardLayout cl = (CardLayout) (getLayout()); + cl.show(this, view); } private class MyActionListener implements ActionListener { private final Place m_place; + public MyActionListener(Place place) { m_place = place; } + @Override - public void actionPerformed(ActionEvent evt) { - m_App.getAppUserView().getUser(); - - if (!actionEnabled) { - m_place.setDiffX(0); - } else { + public void actionPerformed(ActionEvent evt) { + m_App.getAppUserView().getUser(); - if (m_PlaceClipboard == null) { - TicketInfo ticket = getTicketInfo(m_place); - if (ticket == null) { - ticket = new TicketInfo(); - ticket.setUser(m_App.getAppUserView().getUser().getUserInfo()); - try { - dlReceipts.insertSharedTicket(m_place.getId(), ticket, ticket.getPickupId()); - } catch (BasicException ex) { - LOGGER.log(System.Logger.Level.WARNING, "Exception: ", ex); - new MessageInf(ex).show(JTicketsBagRestaurantMap.this); - } - m_place.setPeople(true); - setActivePlace(m_place, ticket); - } else { - String m_lockState = null; - try { - m_lockState = dlReceipts.getLockState(m_place.getId(), m_lockState); - if ("locked".equals(m_lockState)) { - JOptionPane.showMessageDialog(null, - AppLocal.getIntString("message.sharedticketlock")); - if (m_App.hasPermission("sales.Override")) { - int res = JOptionPane.showConfirmDialog(null - , AppLocal.getIntString("message.sharedticketlockoverride") - , AppLocal.getIntString("title.editor") - , JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE); - if (res == JOptionPane.YES_OPTION) { - m_place.setPeople(true); - m_PlaceClipboard = null; - setActivePlace(m_place, ticket); - dlReceipts.lockSharedTicket(m_PlaceCurrent.getId(),"locked"); - } + if (!actionEnabled) { + m_place.setDiffX(0); + } else { + + if (m_PlaceClipboard == null) { + TicketInfo ticket = getTicketInfo(m_place); + if (ticket == null) { + ticket = new TicketInfo(); + ticket.setUser(m_App.getAppUserView().getUser().getUserInfo()); + try { + dlReceipts.insertSharedTicket(m_place.getId(), ticket, ticket.getPickupId()); + } catch (BasicException ex) { + LOGGER.log(System.Logger.Level.WARNING, "Exception: ", ex); + new MessageInf(ex).show(JTicketsBagRestaurantMap.this); } - } else { - String m_user = m_App.getAppUserView().getUser().getName(); - String ticketuser = m_place.getWaiter(); - if (m_user.equals(ticketuser) || - m_App.hasPermission("sales.Override")) { - m_place.setPeople(true); - m_PlaceClipboard = null; - m_lockState = "locked"; - setActivePlace(m_place, ticket); - } else { - JOptionPane.showMessageDialog(null - , AppLocal.getIntString("message.sharedticket") - , AppLocal.getIntString("title.editor") - , JOptionPane.OK_OPTION); + m_place.setPeople(true); + setActivePlace(m_place, ticket); + } else { + String m_lockState = null; + try { + m_lockState = dlReceipts.getLockState(m_place.getId(), m_lockState); + if ("locked".equals(m_lockState)) { + JOptionPane.showMessageDialog(null, + AppLocal.getIntString("message.sharedticketlock")); + if (m_App.hasPermission("sales.Override")) { + int res = JOptionPane.showConfirmDialog(null, + AppLocal.getIntString("message.sharedticketlockoverride"), + AppLocal.getIntString("title.editor"), + JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE); + if (res == JOptionPane.YES_OPTION) { + m_place.setPeople(true); + m_PlaceClipboard = null; + setActivePlace(m_place, ticket); + dlReceipts.lockSharedTicket(m_PlaceCurrent.getId(), "locked"); + } + } + } else { + String m_user = m_App.getAppUserView().getUser().getName(); + String ticketuser = m_place.getWaiter(); + if (m_user.equals(ticketuser) + || m_App.hasPermission("sales.Override")) { + m_place.setPeople(true); + m_PlaceClipboard = null; + m_lockState = "locked"; + setActivePlace(m_place, ticket); + } else { + JOptionPane.showMessageDialog(null, + AppLocal.getIntString("message.sharedticket"), + AppLocal.getIntString("title.editor"), + JOptionPane.OK_OPTION); + } + } + } catch (BasicException ex) { + LOGGER.log(System.Logger.Level.WARNING, "Exception: ", ex); } } - } catch (BasicException ex) { - LOGGER.log(System.Logger.Level.WARNING, "Exception: ", ex); } - } - } // This block handles Merge - if (m_PlaceClipboard != null) { - TicketInfo ticketclip = getTicketInfo(m_PlaceClipboard); - if (ticketclip != null) { - if (m_PlaceClipboard == m_place) { - Place placeclip = m_PlaceClipboard; - m_PlaceClipboard = null; - customer = null; - printState(); - setActivePlace(placeclip, ticketclip); - } - if (m_place.hasPeople()) { - TicketInfo ticket = getTicketInfo(m_place); - if (ticket != null) { - if (JOptionPane.showConfirmDialog(JTicketsBagRestaurantMap.this, - AppLocal.getIntString("message.mergetablequestion"), - AppLocal.getIntString("message.mergetable"), - JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) { - try { - m_PlaceClipboard.setPeople(false); - if (ticket.getCustomer() == null) { - ticket.setCustomer(ticketclip.getCustomer()); - } - ticketclip.getLines().stream().forEach((line) -> { - ticket.addLine(line); - }); - dlReceipts.updateRSharedTicket(m_place.getId(), - ticket, ticket.getPickupId()); - dlReceipts.deleteSharedTicket(m_PlaceClipboard.getId()); - } catch (BasicException ex) { - LOGGER.log(System.Logger.Level.WARNING, "Exception: ", ex); - new MessageInf(ex).show(JTicketsBagRestaurantMap.this); - } - m_PlaceClipboard = null; - customer = null; - restDB.clearCustomerNameInTable(restDB.getTableDetails(ticketclip.getId())); - restDB.clearWaiterNameInTable(restDB.getTableDetails(ticketclip.getId())); - restDB.clearTableMovedFlag(restDB.getTableDetails(ticketclip.getId())); - restDB.clearTicketIdInTable(restDB.getTableDetails(ticketclip.getId())); - printState(); - setActivePlace(m_place, ticket); - } else { - Place placeclip = m_PlaceClipboard; + if (m_PlaceClipboard != null) { + TicketInfo ticketclip = getTicketInfo(m_PlaceClipboard); + if (ticketclip != null) { + if (m_PlaceClipboard == m_place) { + Place placeclip = m_PlaceClipboard; m_PlaceClipboard = null; customer = null; printState(); - setActivePlace(placeclip, ticketclip); + setActivePlace(placeclip, ticketclip); } - } else { - new MessageInf(MessageInf.SGN_WARNING, - AppLocal.getIntString("message.tableempty")) - .show(JTicketsBagRestaurantMap.this); - m_place.setPeople(false); - } - } else { - TicketInfo ticket = getTicketInfo(m_place); - if (ticket == null) { - try { - dlReceipts.insertRSharedTicket(m_place.getId(), - ticketclip, ticketclip.getPickupId()); - m_place.setPeople(true); - dlReceipts.deleteSharedTicket(m_PlaceClipboard.getId()); - m_PlaceClipboard.setPeople(false); - } catch (BasicException ex) { - LOGGER.log(System.Logger.Level.WARNING, "Exception: ", ex); - new MessageInf(ex).show(JTicketsBagRestaurantMap.this); + if (m_place.hasPeople()) { + TicketInfo ticket = getTicketInfo(m_place); + if (ticket != null) { + if (JOptionPane.showConfirmDialog(JTicketsBagRestaurantMap.this, + AppLocal.getIntString("message.mergetablequestion"), + AppLocal.getIntString("message.mergetable"), + JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) { + try { + m_PlaceClipboard.setPeople(false); + if (ticket.getCustomer() == null) { + ticket.setCustomer(ticketclip.getCustomer()); + } + ticketclip.getLines().stream().forEach((line) -> { + ticket.addLine(line); + }); + dlReceipts.updateRSharedTicket(m_place.getId(), + ticket, ticket.getPickupId()); + dlReceipts.deleteSharedTicket(m_PlaceClipboard.getId()); + } catch (BasicException ex) { + LOGGER.log(System.Logger.Level.WARNING, "Exception: ", ex); + new MessageInf(ex).show(JTicketsBagRestaurantMap.this); + } + m_PlaceClipboard = null; + customer = null; + restDB.clearCustomerNameInTable(restDB.getTableDetails(ticketclip.getId())); + restDB.clearWaiterNameInTable(restDB.getTableDetails(ticketclip.getId())); + restDB.clearTableMovedFlag(restDB.getTableDetails(ticketclip.getId())); + restDB.clearTicketIdInTable(restDB.getTableDetails(ticketclip.getId())); + printState(); + setActivePlace(m_place, ticket); + } else { + Place placeclip = m_PlaceClipboard; + m_PlaceClipboard = null; + customer = null; + printState(); + setActivePlace(placeclip, ticketclip); + } + } else { + new MessageInf(MessageInf.SGN_WARNING, + AppLocal.getIntString("message.tableempty")) + .show(JTicketsBagRestaurantMap.this); + m_place.setPeople(false); + } + } else { + TicketInfo ticket = getTicketInfo(m_place); + if (ticket == null) { + try { + dlReceipts.insertRSharedTicket(m_place.getId(), + ticketclip, ticketclip.getPickupId()); + m_place.setPeople(true); + dlReceipts.deleteSharedTicket(m_PlaceClipboard.getId()); + m_PlaceClipboard.setPeople(false); + } catch (BasicException ex) { + LOGGER.log(System.Logger.Level.WARNING, "Exception: ", ex); + new MessageInf(ex).show(JTicketsBagRestaurantMap.this); + } + m_PlaceClipboard = null; + customer = null; + printState(); + setActivePlace(m_place, ticketclip); + } else { + new MessageInf(MessageInf.SGN_WARNING, + AppLocal.getIntString("message.tablefull")) + .show(JTicketsBagRestaurantMap.this); + m_PlaceClipboard.setPeople(true); + printState(); + } } + } else { + new MessageInf(MessageInf.SGN_WARNING, + AppLocal.getIntString("message.tableempty")).show(JTicketsBagRestaurantMap.this); + m_PlaceClipboard.setPeople(false); m_PlaceClipboard = null; customer = null; printState(); - setActivePlace(m_place, ticketclip); - } else { - new MessageInf(MessageInf.SGN_WARNING, - AppLocal.getIntString("message.tablefull")) - .show(JTicketsBagRestaurantMap.this); - m_PlaceClipboard.setPeople(true); - printState(); } } - } else { - new MessageInf(MessageInf.SGN_WARNING, - AppLocal.getIntString("message.tableempty")).show(JTicketsBagRestaurantMap.this); - m_PlaceClipboard.setPeople(false); - m_PlaceClipboard = null; - customer = null; - printState(); } - }} - } + } } /** * * @param btnText */ - public void setButtonTextBags(String btnText){ - m_PlaceClipboard.setButtonText(btnText); - } + public void setButtonTextBags(String btnText) { + m_PlaceClipboard.setButtonText(btnText); + } - - - /** This method is called from within the constructor to - * initialize the form. - * WARNING: Do NOT modify this code. The content of this method is - * always regenerated by the Form Editor. + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. */ // //GEN-BEGIN:initComponents private void initComponents() { @@ -939,8 +925,8 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { private void m_jbtnRefreshActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_m_jbtnRefreshActionPerformed m_PlaceClipboard = null; customer = null; - loadTickets(); - printState(); + loadTickets(); + printState(); }//GEN-LAST:event_m_jbtnRefreshActionPerformed private void m_jbtnReservationsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_m_jbtnReservationsActionPerformed @@ -955,7 +941,7 @@ private void m_jbtnLayoutActionPerformed(java.awt.event.ActionEvent evt) {//GEN- m_jbtnSave.setVisible(true); m_jbtnLayout.setText(java.util.ResourceBundle .getBundle("pos_messages").getString("button.disablelayout")); - + for (Place pl : m_aplaces) { if (transBtns) { pl.getButton().setOpaque(true); @@ -988,8 +974,8 @@ private void m_jbtnSaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FI } } }//GEN-LAST:event_m_jbtnSaveActionPerformed - - + + // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JPanel jPanel1; private javax.swing.JPanel jPanel2; @@ -1001,5 +987,5 @@ private void m_jbtnSaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FI private javax.swing.JButton m_jbtnSave; private javax.swing.JLabel webLblautoRefresh; // End of variables declaration//GEN-END:variables - + } diff --git a/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/restaurant/JTicketsBagRestaurantRes.form b/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/restaurant/JTicketsBagRestaurantRes.form index 82890ddf..08c9acfe 100755 --- a/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/restaurant/JTicketsBagRestaurantRes.form +++ b/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/restaurant/JTicketsBagRestaurantRes.form @@ -16,7 +16,7 @@ - + @@ -69,7 +69,7 @@ - + @@ -136,7 +136,7 @@ - + @@ -400,7 +400,7 @@ - + diff --git a/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/restaurant/JTicketsBagRestaurantRes.java b/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/restaurant/JTicketsBagRestaurantRes.java index e26de087..f46d5428 100755 --- a/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/restaurant/JTicketsBagRestaurantRes.java +++ b/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/restaurant/JTicketsBagRestaurantRes.java @@ -530,7 +530,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { .addGap(4, 4, 4) .addComponent(m_jtxtDescription, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanNorthLayout.createSequentialGroup() - .addGap(22, 22, 22) + .addGap(0, 0, 0) .addComponent(m_jPanelList, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap()) .addGroup(jPanNorthLayout.createSequentialGroup() @@ -580,7 +580,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { .addGroup(jPanNorthLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.CENTER, jPanNorthLayout.createSequentialGroup() .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(42, 42, 42) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jbtnShowCalendar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(m_jPanelTime, javax.swing.GroupLayout.Alignment.CENTER, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(m_jPanelList, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) @@ -605,7 +605,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { jPanSouth.setLayout(jPanSouthLayout); jPanSouthLayout.setHorizontalGroup( jPanSouthLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 1015, Short.MAX_VALUE) + .addGap(0, 1000, Short.MAX_VALUE) .addGroup(jPanSouthLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanSouthLayout.createSequentialGroup() .addGap(0, 0, Short.MAX_VALUE) diff --git a/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/restaurant/PlacesEditor.form b/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/restaurant/PlacesEditor.form index 56b42d01..228863ac 100755 --- a/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/restaurant/PlacesEditor.form +++ b/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/restaurant/PlacesEditor.form @@ -23,45 +23,8 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + @@ -69,189 +32,211 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/restaurant/PlacesEditor.java b/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/restaurant/PlacesEditor.java index a67d6444..48b9ce19 100755 --- a/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/restaurant/PlacesEditor.java +++ b/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/restaurant/PlacesEditor.java @@ -194,6 +194,7 @@ public Component getComponent() { // //GEN-BEGIN:initComponents private void initComponents() { + jPanel1 = new javax.swing.JPanel(); jLabel2 = new javax.swing.JLabel(); m_jName = new javax.swing.JTextField(); jLabel1 = new javax.swing.JLabel(); @@ -203,7 +204,6 @@ private void initComponents() { jLabel3 = new javax.swing.JLabel(); m_jX = new javax.swing.JTextField(); m_jY = new javax.swing.JTextField(); - jLabel7 = new javax.swing.JLabel(); jLabel8 = new javax.swing.JLabel(); m_jSeats = new javax.swing.JTextField(); @@ -241,15 +241,8 @@ private void initComponents() { m_jY.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N m_jY.setPreferredSize(new java.awt.Dimension(56, 30)); - jLabel7.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N - jLabel7.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); - java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("pos_messages"); // NOI18N - jLabel7.setText(bundle.getString("message.places")); // NOI18N - jLabel7.setVerticalAlignment(javax.swing.SwingConstants.TOP); - jLabel7.setMinimumSize(new java.awt.Dimension(50, 40)); - jLabel7.setPreferredSize(new java.awt.Dimension(489, 40)); - jLabel8.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N + jLabel8.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING); jLabel8.setText(AppLocal.getIntString("label.seats")); // NOI18N jLabel8.setPreferredSize(new java.awt.Dimension(110, 30)); @@ -257,72 +250,74 @@ private void initComponents() { m_jSeats.setMinimumSize(new java.awt.Dimension(56, 30)); m_jSeats.setPreferredSize(new java.awt.Dimension(56, 30)); - javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); - this.setLayout(layout); - layout.setHorizontalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addContainerGap() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jLabel7, javax.swing.GroupLayout.DEFAULT_SIZE, 646, Short.MAX_VALUE) - .addGroup(layout.createSequentialGroup() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() + javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); + jPanel1.setLayout(jPanel1Layout); + jPanel1Layout.setHorizontalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(m_jX, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(33, 33, 33) + .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(m_jY, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(m_jName, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGroup(layout.createSequentialGroup() + .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(m_jFloor, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGroup(layout.createSequentialGroup() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) - .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup() - .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(m_jSeats, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup() - .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(54, 54, 54) - .addComponent(m_jX, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(36, 36, 36) - .addComponent(m_jY, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))) - .addGap(0, 0, Short.MAX_VALUE))) + .addComponent(m_jFloor, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addGap(18, 18, 18) + .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(m_jSeats, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap()) ); - layout.setVerticalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addContainerGap() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(m_jName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + jPanel1Layout.setVerticalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(m_jFloor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(m_jName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(m_jSeats, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addGap(9, 9, 9) - .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGroup(layout.createSequentialGroup() - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(m_jX, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(m_jY, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))) - .addGap(49, 49, 49) - .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(m_jX, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(m_jY, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addContainerGap()) + ); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); + this.setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) ); }// //GEN-END:initComponents @@ -334,8 +329,8 @@ private void initComponents() { private javax.swing.JLabel jLabel3; private javax.swing.JLabel jLabel5; private javax.swing.JLabel jLabel6; - private javax.swing.JLabel jLabel7; private javax.swing.JLabel jLabel8; + private javax.swing.JPanel jPanel1; private javax.swing.JComboBox m_jFloor; private javax.swing.JTextField m_jName; private javax.swing.JTextField m_jSeats; diff --git a/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/shared/JTicketsBagShared.java b/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/shared/JTicketsBagShared.java index f2f205c2..47bc2c18 100755 --- a/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/shared/JTicketsBagShared.java +++ b/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/shared/JTicketsBagShared.java @@ -62,7 +62,9 @@ public JTicketsBagShared(AppView app, TicketsEditor panelticket) { initComponents(); - //m_jReprintTickets.setVisible(false); + m_jReprintTickets.setVisible(true); + + LOGGER.log(System.Logger.Level.INFO, "JTicketsBagShared "); } /** @@ -74,6 +76,8 @@ public void activate() { m_jDelTicket.setEnabled(m_App.hasPermission("com.openbravo.pos.sales.JPanelTicketEdits")); m_jDelTicket.setEnabled(m_App.hasPermission("sales.DeleteTicket")); + + LOGGER.log(System.Logger.Level.INFO, "JTicketsBagShared "); } /** @@ -222,14 +226,11 @@ private void newTicket() { TicketInfo ticket = new TicketInfo(); LOGGER.log(System.Logger.Level.DEBUG, "newTicket has id: " + ticket.getId()); m_panelticket.setActiveTicket(ticket, null); - - saveCurrentTicket(); updateCount(); } catch (Exception ex) { LOGGER.log(System.Logger.Level.WARNING, "Exception while exec newTicket: ", ex); } - } /** diff --git a/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/simple/JTicketsBagSimple.form b/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/simple/JTicketsBagSimple.form index 22b1d156..8019ab00 100755 --- a/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/simple/JTicketsBagSimple.form +++ b/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/simple/JTicketsBagSimple.form @@ -15,7 +15,7 @@ - + diff --git a/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/simple/JTicketsBagSimple.java b/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/simple/JTicketsBagSimple.java index 19866ca0..b397f666 100755 --- a/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/simple/JTicketsBagSimple.java +++ b/kriolos-opos-app/src/main/java/com/openbravo/pos/sales/simple/JTicketsBagSimple.java @@ -29,24 +29,22 @@ */ public class JTicketsBagSimple extends JTicketsBag { - /** Creates new form JTicketsBagSimple + /** + * * @param app - * @param panelticket */ + * @param panelticket + */ public JTicketsBagSimple(AppView app, TicketsEditor panelticket) { super(app, panelticket); initComponents(); } - - /** - * - */ + + @Override public void activate() { m_panelticket.setActiveTicket(new TicketInfo(), null); - - // Authorization m_jDelTicket.setEnabled(m_App.hasPermission("com.openbravo.pos.sales.JPanelTicketEdits")); } diff --git a/kriolos-opos-app/src/main/resources/com/openbravo/reports/customers_messages.properties b/kriolos-opos-app/src/main/resources/com/openbravo/reports/customers_messages.properties index c182b06a..84bebca7 100755 --- a/kriolos-opos-app/src/main/resources/com/openbravo/reports/customers_messages.properties +++ b/kriolos-opos-app/src/main/resources/com/openbravo/reports/customers_messages.properties @@ -27,7 +27,7 @@ label.curdate=Date label.curdebt=Owing label.customer=Customer label.date=Date -label.email=eMail +label.email=E-Mail label.firstname=First Name label.fulladdress = Address : label.fullname = Holder : diff --git a/kriolos-opos-app/src/main/resources/com/openbravo/reports/suppliers_messages.properties b/kriolos-opos-app/src/main/resources/com/openbravo/reports/suppliers_messages.properties index 32fd981a..2c87eb6f 100755 --- a/kriolos-opos-app/src/main/resources/com/openbravo/reports/suppliers_messages.properties +++ b/kriolos-opos-app/src/main/resources/com/openbravo/reports/suppliers_messages.properties @@ -24,7 +24,7 @@ label.contact=Contact label.curdate=Date label.curdebt=Owing label.date=Date -label.email=eMail +label.email=E-Mail label.firstname=First Name label.fulladdress = Address : label.fullname = Holder : @@ -79,5 +79,5 @@ reason.-6=Free reason.-7=Used reason.-8=Rectify - Subtract label.barcode=Barcode -label.titledebtor=Debtor +label.titledebtor=Devedores label.customer=Customer diff --git a/kriolos-opos-app/src/main/resources/pos_messages.properties b/kriolos-opos-app/src/main/resources/pos_messages.properties index 3b7c4578..cbade99b 100755 --- a/kriolos-opos-app/src/main/resources/pos_messages.properties +++ b/kriolos-opos-app/src/main/resources/pos_messages.properties @@ -15,34 +15,34 @@ # along with uniCenta oPOS. If not, see . button.backup=Backup -button.cancel=Cancel -button.catalogadd=Add to Cataloge -button.catalogdel=Remove from Cataloge +button.cancel=Cancelar +button.catalogadd=Adicionar no catalogo +button.catalogdel=Remover do catalogo button.clean=Reset -button.close=Close -button.closecash=Close Cash -button.closecashpreview=Preview Close -button.closecashreprint=Reprint Close Cash -button.CustomerTrans=Show -button.discount=Discount -button.discountticket=Ticket Discount +button.close=Fechar +button.closecash=Fecho de caixa +button.closecashpreview=Prev. fecho de caixa +button.closecashreprint=Re-impr. fecho de caixa +button.CustomerTrans=Mostrar +button.discount=Desconto +button.discountticket=Tal\u00e3o de desconto button.edit=Edit -button.email=email -button.executechart=Execute Chart -button.executefilter=Execute Filter -button.executereport=Execute Report +button.email=E-Mail +button.executechart=Gerar grafico +button.executefilter=Executar filtro +button.executereport=Gerar relatorio button.exit=Exit button.factory=Factory Restore button.htmltest=Display Text button.injectxml=Insert XML Header button.linediscount=Disc' % button.listtickets=List -button.memberdiscount=Member Disc +button.memberdiscount=Desconto de membro button.movetable=Move -button.newcustomer=New Customer -button.newticket=New +button.newcustomer=Novo cliente +button.newticket=Novo tal\u00e3o button.ok=Ok -button.opendrawer=Drawer +button.opendrawer=Caixa registadora button.pay=Pay button.peoplepassword=Password button.prepay=PrePay @@ -176,14 +176,14 @@ label.companyaddr1=Street label.companyaddr2=Address line2 label.companyaddr3=Town/City label.companyaddr4=PostCode -label.companyemail=Email Address +label.companyemail=E-Mail label.companyFax=Fax number label.companyname=Company Name label.companytax=VAT number label.companytelephone=Phone 1 label.companywww=Web site label.configOptionKeypad=Keypad -label.configOptionLogOff=Automatics +label.configOptionLogOff=Others label.configOptionRestaurant=Restaurant label.configOptionStartup=System label.configreceipt=Receipt Setup @@ -202,7 +202,7 @@ label.csvfile=File label.csvimpostbtn=Import label.csvinvalid=Invalid Products label.csvmissing=Missing Data -label.csvnewcustomers=New Customers +label.csvnewcustomers=Novo clientes label.csvnewproducts=New Products label.csvnotchanged=Not Changed label.csvnotchanged=Not Changed @@ -252,7 +252,7 @@ label.dutyid=ID label.dutyname=Tax Name label.dutyrate=Rate label.editline=Edit Line -label.email=email +label.email=E-Mail label.EndDate=End Date label.epm.employee.id=Employee ID label.epm.employee=Employee @@ -589,7 +589,7 @@ Menu.ChangePassword=Change Password Menu.CheckInCheckOut=Check In/Out Menu.ClosedProducts=Sales
By Product Menu.ClosedProducts1=Products
By Category -Menu.CloseTPV=Close Cash +Menu.CloseTPV=Fecho de caixa Menu.Closing=Cash Closed Menu.Closing1=Cash Closed
Export Menu.Closing2=Cash Closed
Export @@ -744,7 +744,7 @@ message.cannotcalculatetaxes=Unable to calculate Receipt taxes.\nOne or more Pro message.cannotchangepassword=Cannot change Password message.cannotcheckin=Cannot Check In message.cannotcheckout=Cannot Check Out -message.cannotclosecash=Cannot Close Cash +message.cannotclosecash=Cannot Fecho de caixa message.cannotdeleteconfig=Unable to delete configuration file message.cannotexecute=Unable to execute action message.cannotfillchart=Unable to Load Chart Data @@ -785,7 +785,7 @@ message.customerchangeyn=Are you sure you want to change Customer for current Ti message.customercheck=A Search Key and Name is required message.customerclear=Are you sure? Cancel will clear Customer from Ticket. message.customerdebtexceded=Customer Credit Limit exceeded -message.customernotfound=Customer not found.
Would you like to create a new Customer record? +message.customernotfound=Customer not found.
Would you like to create a Novo cliente record? message.databasechange=

Database credentials are incorrect!
Please enter the correct details

The database Configuration will now open message.databasechoose=

Please select the application database for this session message.databaseconnectionerror=Unable to connect to database: Database not available @@ -874,7 +874,7 @@ message.sharedtickettitle=Shared Ticket List message.startupText=Changing the content of the default Startup Text and not declaring that this is free software is in violation of the Free Software Foundation's GNU General Public License GPL message.supplierinvalid=Invalid Supplier message.systemclosecas=Invalid Product -message.systemclosecash=Move Close Cash buttons +message.systemclosecash=Move Fecho de caixa buttons message.tableempty=This Table's ticket is being edited by another User
Try Later message.tablefull=Table is now full message.ticketrefunded=This Ticket has already been Refunded
Only one Refund is allowed per Ticket @@ -895,7 +895,7 @@ message.uuidcopy=

UUID has been copied to your clipboard message.vipno=Customer is not a VIP message.vipyes=Customer is a VIP message.voucherdelete=Voucher has been redeemed
Delete is not possible -message.wannaclosecash=Are you sure you want to Close Cash? +message.wannaclosecash=Are you sure you want to Fecho de caixa? message.wannadelete=Are you sure you want to Delete the current Order? message.wannasave=Save changes before exit? messsage.title.supplierinvalid=Invalid Supplier @@ -969,10 +969,10 @@ tooltip.addnew=

Add New tooltip.addnewticket=

Add New Ticket tooltip.attributes=

Attributes tooltip.barcodetype=Default is EAN Barcodes. Check to switch to UPC format barcodes -tooltip.btn.closecash=

Close Cash (otherwise known as Z Reading)
closes off transactions up to this point in time -tooltip.btn.closecashpreview=

Print Close Cash Report
without Closing Cash +tooltip.btn.closecash=

Fecho de caixa (otherwise known as Z Reading)
closes off transactions up to this point in time +tooltip.btn.closecashpreview=

Print Fecho de caixa Report
without Closing Cash tooltip.btn.partialcash=

Print Partial Cash report
(otherwise known as X Reading) -tooltip.closecashactions=

Preview Close Cash for this session
Reprint a previous Close Cash report +tooltip.closecashactions=

Prev. fecho de caixa Cash for this session
Reprint a previous Fecho de caixa report tooltip.config.general.compip=
Your Operating System's Computer Name/IP Address tooltip.config.general.dept=
The name of the Department where this terminal is located tooltip.config.general.footer=
Hiding the footer gives you more screen space
un-Check if you need to monitor
database connection information @@ -1114,7 +1114,7 @@ Menu.CategorySales_1=Category Sales Menu.DailyScheduleReport=Daily Schedule Label.Tickets=Tickets Menu.MissingData=Missing Data -button.NewTicket=New Ticket +button.newticket=Novo tal\u00e3o Ticket Button.DeleteTicket=Delete Ticket Menu.DailyPresenceReport=Daily Presence Menu.StockQtyUpdate=Stock Qty Update