From 57fc79f081737edd8c912a18840759899b0d3dbb Mon Sep 17 00:00:00 2001 From: "Redhuan D. Oon" Date: Sat, 6 Dec 2008 12:44:39 +0000 Subject: [PATCH] JAVA POS small enhancements ORGANIZE IMPORTS --- client/src/org/compiere/pos/PosSubPanel.java | 20 +++++++------ client/src/org/compiere/pos/SubCheckout.java | 28 +++++++++++-------- .../src/org/compiere/pos/SubCurrentLine.java | 3 +- .../src/org/compiere/pos/SubFunctionKeys.java | 22 ++++++++++----- 4 files changed, 45 insertions(+), 28 deletions(-) diff --git a/client/src/org/compiere/pos/PosSubPanel.java b/client/src/org/compiere/pos/PosSubPanel.java index 60584aa35d..a5cf85bbc6 100644 --- a/client/src/org/compiere/pos/PosSubPanel.java +++ b/client/src/org/compiere/pos/PosSubPanel.java @@ -14,16 +14,20 @@ package org.compiere.pos; -import java.awt.*; -import java.awt.event.*; -import java.util.*; +import java.awt.Dimension; +import java.awt.GridBagConstraints; +import java.awt.Insets; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.util.Properties; -import javax.swing.*; +import javax.swing.KeyStroke; -import org.compiere.swing.*; -import org.compiere.apps.*; -import org.compiere.model.*; -import org.compiere.util.*; +import org.compiere.apps.AppsAction; +import org.compiere.model.MPOS; +import org.compiere.swing.CButton; +import org.compiere.swing.CPanel; +import org.compiere.util.Env; /** * POS Sub Panel Base Class. diff --git a/client/src/org/compiere/pos/SubCheckout.java b/client/src/org/compiere/pos/SubCheckout.java index a84409794e..9d902be8c9 100644 --- a/client/src/org/compiere/pos/SubCheckout.java +++ b/client/src/org/compiere/pos/SubCheckout.java @@ -14,19 +14,28 @@ package org.compiere.pos; -import java.awt.*; -import java.awt.event.*; -import java.math.*; +import java.awt.Cursor; +import java.awt.Dimension; +import java.awt.GridBagConstraints; +import java.awt.GridBagLayout; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.math.BigDecimal; import javax.swing.border.TitledBorder; -import org.compiere.swing.*; import org.compiere.grid.ed.VNumber; import org.compiere.model.MOrder; import org.compiere.print.ReportCtl; import org.compiere.print.ReportEngine; -import org.compiere.process.*; -import org.compiere.util.*; +import org.compiere.process.DocAction; +import org.compiere.swing.CButton; +import org.compiere.swing.CLabel; +import org.compiere.swing.CPanel; +import org.compiere.util.CLogger; +import org.compiere.util.DisplayType; +import org.compiere.util.Env; +import org.compiere.util.Msg; /** * Checkout Sub Panel @@ -76,10 +85,6 @@ public class SubCheckout extends PosSubPanel implements ActionListener */ public void init() { - // Title - TitledBorder border = new TitledBorder(Msg.getMsg(Env.getCtx(), "Checkout")); - setBorder(border); - // Content setLayout(new GridBagLayout()); GridBagConstraints gbc = new GridBagConstraints(); @@ -91,7 +96,8 @@ public class SubCheckout extends PosSubPanel implements ActionListener gbc.fill = GridBagConstraints.BOTH; gbc.weightx = .1; CPanel cash = new CPanel(new GridBagLayout()); - cash.setBorder(new TitledBorder(Msg.getMsg(Env.getCtx(), "Cash"))); + cash.setBackground(java.awt.Color.lightGray); + cash.setBorder(new TitledBorder(Msg.getMsg(Env.getCtx(), "Checkout"))); gbc.gridy = 0; add (cash, gbc); GridBagConstraints gbc0 = new GridBagConstraints(); diff --git a/client/src/org/compiere/pos/SubCurrentLine.java b/client/src/org/compiere/pos/SubCurrentLine.java index 54c33b40c6..9d489a4f08 100644 --- a/client/src/org/compiere/pos/SubCurrentLine.java +++ b/client/src/org/compiere/pos/SubCurrentLine.java @@ -294,8 +294,7 @@ public class SubCurrentLine extends PosSubPanel implements ActionListener { int numLineas = lineas.length; if (numLineas > row) { - //delete line from order -//illegal! lineas[row].setQtyReserved(Env.ZERO); //red1 - [2093355 ] Small bugs in OpenXpertya POS + //delete line from order - true only when DRAFT is not PREPARE-IT() lineas[row].delete(true); for (int i = row; i < (numLineas - 1); i++) lineas[i] = lineas[i + 1]; diff --git a/client/src/org/compiere/pos/SubFunctionKeys.java b/client/src/org/compiere/pos/SubFunctionKeys.java index 2f0dfe4644..8566974ec0 100644 --- a/client/src/org/compiere/pos/SubFunctionKeys.java +++ b/client/src/org/compiere/pos/SubFunctionKeys.java @@ -14,15 +14,23 @@ package org.compiere.pos; -import java.awt.*; -import java.awt.event.*; +import java.awt.Color; +import java.awt.Dimension; +import java.awt.GridBagConstraints; +import java.awt.GridLayout; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; -import javax.swing.border.*; +import javax.swing.border.TitledBorder; -import org.compiere.swing.*; -import org.compiere.model.*; -import org.compiere.print.*; -import org.compiere.util.*; +import org.compiere.model.MPOSKey; +import org.compiere.model.MPOSKeyLayout; +import org.compiere.print.MPrintColor; +import org.compiere.swing.CButton; +import org.compiere.swing.CPanel; +import org.compiere.util.CLogger; +import org.compiere.util.Env; +import org.compiere.util.Msg; /**