From 4f1070663ab8107ec93661a25c8d6ac6feba7a51 Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Sun, 25 Feb 2007 19:03:11 +0000 Subject: [PATCH] * [ 1639249 ] Complete the POS implementation - complete cash drawer movement functions - fixed integration to cash book --- client/src/org/compiere/pos/CashSubFunctions.java | 10 ++++------ client/src/org/compiere/pos/SubCurrentLine.java | 8 +------- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/client/src/org/compiere/pos/CashSubFunctions.java b/client/src/org/compiere/pos/CashSubFunctions.java index c1eaed355e..84070bf61b 100644 --- a/client/src/org/compiere/pos/CashSubFunctions.java +++ b/client/src/org/compiere/pos/CashSubFunctions.java @@ -353,8 +353,7 @@ public class CashSubFunctions extends PosSubPanel implements ActionListener, Inp MQuery query = new MQuery(MCash.Table_Name); query.addRestriction("C_Cash_ID", MQuery.EQUAL, cash.getC_Cash_ID()); - //TODO - //AEnv.openWindow(MCash.Table_ID, query, false); + AEnv.zoom(query); } // to open window with inputs and outputs of cash else if (action.equals("InputsOutputs")) @@ -363,15 +362,13 @@ public class CashSubFunctions extends PosSubPanel implements ActionListener, Inp MCash cash = MCash.get(p_pos.getCtx(), /*p_pos.getAD_Org_ID(),*/ p_pos.getC_CashBook_ID(), today, null); - //TODO: new method added by openxpertya - //AEnv.detailedZoom(MCash.Table_ID, cash.getC_Cash_ID(), false); + AEnv.zoom(MCash.Table_ID, cash.getC_Cash_ID()); } else if (action.equals("Tickets")) { MQuery query = new MQuery(MOrder.Table_Name); query.addRestriction("C_DocTypeTarget_ID", MQuery.EQUAL, p_pos.getC_DocType_ID()); - //TODO: openxpertya added ad_window_id to c_pos - //AEnv.openWindow(p_pos.getAD_Window_ID(), query, true); + AEnv.zoom(query); } // Cash (Payment) else if (action.equals("displayCashScrutiny")) @@ -547,4 +544,5 @@ public class CashSubFunctions extends PosSubPanel implements ActionListener, Inp { cmd_calculateDifference(); } + } // CashSubFunctions diff --git a/client/src/org/compiere/pos/SubCurrentLine.java b/client/src/org/compiere/pos/SubCurrentLine.java index a6bce897eb..4715f138ed 100644 --- a/client/src/org/compiere/pos/SubCurrentLine.java +++ b/client/src/org/compiere/pos/SubCurrentLine.java @@ -281,13 +281,6 @@ public class SubCurrentLine extends PosSubPanel implements ActionListener { int numLineas = lineas.length; if (numLineas > row) { - //to unreserve - lineas[row].setQty(Env.ZERO); - lineas[row].setLineNetAmt(Env.ZERO); - lineas[row].save(); - //TODO: openxpertya using private method from MOrder - //m_order.reserveStock(null, lineas); - //delete line from order lineas[row].delete(true); for (int i = row; i < (numLineas - 1); i++) @@ -388,6 +381,7 @@ public class SubCurrentLine extends PosSubPanel implements ActionListener { m_order.setM_PriceList_ID(p_pos.getM_PriceList_ID()); m_order.setM_Warehouse_ID(p_pos.getM_Warehouse_ID()); m_order.setSalesRep_ID(p_pos.getSalesRep_ID()); + m_order.setPaymentRule(MOrder.PAYMENTRULE_Cash); if (!m_order.save()) { m_order = null;