Author: jleroux
Date: Wed Jul 9 11:06:14 2008 New Revision: 675275 URL: http://svn.apache.org/viewvc?rev=675275&view=rev Log: . Small change in English Labels . Makes "PosUiLabels" public and static in PosTransaction class as suggested by Adrian (a best intra-component code practice IMHO) . Enhance display of the dynamic item discount line on POS receipt (continue to appear only when needed but now on a new line with a description of the amount discounted) . Add a static sale discount line in POS receipt This closes "POS : Show discounts (item and sale) on receipt" (https://issues.apache.org/jira/browse/OFBIZ-1656) - OFBIZ-1656 Modified: ofbiz/trunk/specialpurpose/pos/config/PosUiLabels.properties ofbiz/trunk/specialpurpose/pos/config/custreceipt.txt ofbiz/trunk/specialpurpose/pos/lib/ (props changed) ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/component/Journal.java ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/component/Operator.java ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/component/Output.java ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/device/impl/Receipt.java ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/event/ManagerEvents.java ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/event/PaymentEvents.java ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/event/PromoEvents.java ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/event/SecurityEvents.java ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/ConfigureItem.java ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/LoadSale.java ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/PaidInOut.java ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/PosScreen.java ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/SaveSale.java ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/SelectProduct.java Modified: ofbiz/trunk/specialpurpose/pos/config/PosUiLabels.properties URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pos/config/PosUiLabels.properties?rev=675275&r1=675274&r2=675275&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/pos/config/PosUiLabels.properties (original) +++ ofbiz/trunk/specialpurpose/pos/config/PosUiLabels.properties Wed Jul 9 11:06:14 2008 @@ -18,7 +18,7 @@ ############################################################################### ### This file contains labels translated by the POS component (ie not by XUI framework) (ItemDiscount)=(Item discount) -(SalesDiscount)=(Sales discount) +(SalesDiscount)=(Sale discount) (adjustment)=(adjustment) AMT=AMT AUTHCD=Enter Auth Code: Modified: ofbiz/trunk/specialpurpose/pos/config/custreceipt.txt URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pos/config/custreceipt.txt?rev=675275&r1=675274&r2=675275&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/pos/config/custreceipt.txt (original) +++ ofbiz/trunk/specialpurpose/pos/config/custreceipt.txt Wed Jul 9 11:06:14 2008 @@ -31,15 +31,17 @@ ${CENTER}Sale: ${orderId} Tx: ${transactionId} Dr: ${drawerNo} Clerk: ${userId} ${CENTER}${dateStamp} -DESC PRICE QTY +DESCRIPTION PRICE QTY ============================================== [BEGIN ITEM LOOP] ${productId} ${isTaxable}${basePrice} ${quantity} -${description} ${adjustments} +${description} +${itemDiscount} ${adjustments} ${configDescription} ${configBasePrice} ${configQuantity} [END ITEM LOOP] SALES TAX: ${taxTotal} + SALE DISCOUNT: ${saleDiscount} TOTAL: ${grandTotal} [BEGIN PAY LOOP] Propchange: ofbiz/trunk/specialpurpose/pos/lib/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Wed Jul 9 11:06:14 2008 @@ -1,2 +1,4 @@ epsonJposService180.jar epsonJposServiceCommon.jar +jpos 1.91 +jpos 1.80 Modified: ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java?rev=675275&r1=675274&r2=675275&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java (original) +++ ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java Wed Jul 9 11:06:14 2008 @@ -56,6 +56,7 @@ import org.ofbiz.pos.component.Journal; import org.ofbiz.pos.component.Output; import org.ofbiz.pos.device.DeviceLoader; +import org.ofbiz.pos.device.impl.Receipt; import org.ofbiz.pos.screen.LoadSale; import org.ofbiz.pos.screen.PosScreen; import org.ofbiz.pos.screen.SaveSale; @@ -68,7 +69,7 @@ public class PosTransaction implements Serializable { - private static final String resource = "PosUiLabels"; + public static final String resource = "PosUiLabels"; public static final String module = PosTransaction.class.getName(); public static final int NO_PAYMENT = 0; public static final int INTERNAL_PAYMENT = 1; @@ -235,8 +236,15 @@ itemInfo.put("quantity", UtilFormatOut.formatQuantity(item.getQuantity())); itemInfo.put("subtotal", UtilFormatOut.formatPrice(item.getItemSubTotal())); itemInfo.put("isTaxable", item.taxApplies() ? "T" : " "); - itemInfo.put("adjustments", item.getOtherAdjustments() != 0 ? - UtilFormatOut.formatPrice(item.getOtherAdjustments()) : ""); + + itemInfo.put("discount", ""); + itemInfo.put("adjustments", ""); + if (item.getOtherAdjustments() != 0) { + itemInfo.put("itemDiscount", UtilFormatOut.padString( + UtilProperties.getMessage(PosTransaction.resource,"(ItemDiscount)",defaultLocale), Receipt.pridLength[0] + 1, true, ' ')); + itemInfo.put("adjustments", UtilFormatOut.formatPrice(item.getOtherAdjustments())); + } + if (isAggregatedItem(item.getProductId())){ ProductConfigWrapper pcw = null; pcw = item.getConfigWrapper(); @@ -585,6 +593,10 @@ } } + public double GetTotalDiscount() { + return cart.getOrderOtherAdjustmentTotal(); + } + public void voidItem(String productId) throws CartItemModifyException { trace("void item", productId); ShoppingCartItem item = cart.findCartItem(productId, null, null, null, 0.00); @@ -777,14 +789,14 @@ cart.setOrderPartyId(partyId); // validate payment methods - output.print(UtilProperties.getMessage(resource,"Validating",defaultLocale)); + output.print(UtilProperties.getMessage(PosTransaction.resource,"Validating",defaultLocale)); Map valRes = ch.validatePaymentMethods(); if (valRes != null && ServiceUtil.isError(valRes)) { throw new GeneralException(ServiceUtil.getErrorMessage(valRes)); } // store the "order" - output.print(UtilProperties.getMessage(resource,"Saving",defaultLocale)); + output.print(UtilProperties.getMessage(PosTransaction.resource,"Saving",defaultLocale)); Map orderRes = ch.createOrder(session.getUserLogin()); //Debug.log("Create Order Resp : " + orderRes, module); @@ -795,7 +807,7 @@ } // process the payment(s) - output.print(UtilProperties.getMessage(resource,"Processing",defaultLocale)); + output.print(UtilProperties.getMessage(PosTransaction.resource,"Processing",defaultLocale)); Map payRes = null; try { payRes = ch.processPayment(ProductStoreWorker.getProductStore(productStoreId, session.getDelegator()), session.getUserLogin(), true); @@ -812,7 +824,7 @@ double change = (grandTotal - paymentAmt); // notify the change due - output.print(UtilProperties.getMessage(resource,"CHANGE",defaultLocale) + " " + UtilFormatOut.formatPrice(this.getTotalDue() * -1)); + output.print(UtilProperties.getMessage(PosTransaction.resource,"CHANGE",defaultLocale) + " " + UtilFormatOut.formatPrice(this.getTotalDue() * -1)); // threaded drawer/receipt printing final PosTransaction currentTrans = this; @@ -922,7 +934,7 @@ // append the promo info XModel promo = Journal.appendNode(model, "tr", "itemadjustment", ""); Journal.appendNode(promo, "td", "sku", ""); - Journal.appendNode(promo, "td", "desc", UtilProperties.getMessage(resource,"(ItemDiscount)",defaultLocale)); + Journal.appendNode(promo, "td", "desc", UtilProperties.getMessage(PosTransaction.resource,"(ItemDiscount)",defaultLocale)); Journal.appendNode(promo, "td", "qty", ""); Journal.appendNode(promo, "td", "price", UtilFormatOut.formatPrice(adjustment)); } @@ -961,7 +973,7 @@ XModel adjustmentLine = Journal.appendNode(model, "tr", "adjustment", ""); Journal.appendNode(adjustmentLine, "td", "sku", ""); Journal.appendNode(adjustmentLine, "td", "desc", - UtilProperties.getMessage(resource, "(SalesDiscount)",defaultLocale)); + UtilProperties.getMessage(PosTransaction.resource, "(SalesDiscount)",defaultLocale)); if (UtilValidate.isNotEmpty(amount)) { Journal.appendNode(adjustmentLine, "td", "qty", ""); Journal.appendNode(adjustmentLine, "td", "price", UtilFormatOut.formatPrice(amount)); @@ -978,14 +990,14 @@ XModel taxLine = Journal.appendNode(model, "tr", "tax", ""); Journal.appendNode(taxLine, "td", "sku", ""); - Journal.appendNode(taxLine, "td", "desc", UtilProperties.getMessage(resource,"Sales_Tax",defaultLocale)); + Journal.appendNode(taxLine, "td", "desc", UtilProperties.getMessage(PosTransaction.resource,"Sales_Tax",defaultLocale)); Journal.appendNode(taxLine, "td", "qty", ""); Journal.appendNode(taxLine, "td", "price", UtilFormatOut.formatPrice(taxAmount)); Journal.appendNode(taxLine, "td", "index", "-1"); XModel totalLine = Journal.appendNode(model, "tr", "total", ""); Journal.appendNode(totalLine, "td", "sku", ""); - Journal.appendNode(totalLine, "td", "desc", UtilProperties.getMessage(resource,"Grand_Total",defaultLocale)); + Journal.appendNode(totalLine, "td", "desc", UtilProperties.getMessage(PosTransaction.resource,"Grand_Total",defaultLocale)); Journal.appendNode(totalLine, "td", "qty", ""); Journal.appendNode(totalLine, "td", "price", UtilFormatOut.formatPrice(total)); Journal.appendNode(totalLine, "td", "index", "-1"); Modified: ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/component/Journal.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/component/Journal.java?rev=675275&r1=675274&r2=675275&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/component/Journal.java (original) +++ ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/component/Journal.java Wed Jul 9 11:06:14 2008 @@ -40,7 +40,6 @@ public class Journal { - private static final String resource = "PosUiLabels"; public static final String module = Journal.class.getName(); protected XProject currentProject = (XProject)XProjectManager.getCurrentProject(); @@ -177,7 +176,7 @@ // create the header XModel headerNode = appendNode(jmodel, "th", "header", ""); for (int i = 0 ; i < field.length; i++) { - appendNode(headerNode, "td", field[i],UtilProperties.getMessage(resource,name[i],defaultLocale)); + appendNode(headerNode, "td", field[i],UtilProperties.getMessage(PosTransaction.resource,name[i],defaultLocale)); } return jmodel; Modified: ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/component/Operator.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/component/Operator.java?rev=675275&r1=675274&r2=675275&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/component/Operator.java (original) +++ ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/component/Operator.java Wed Jul 9 11:06:14 2008 @@ -40,7 +40,6 @@ public class Operator { - private static final String resource = "PosUiLabels"; public static final String module = Operator.class.getName(); public static final String style = "operTitle"; @@ -50,7 +49,7 @@ public static final String[] OPER_TXID = { "oper_txid", "TXID" }; public static final String[] OPER_DRWR = { "oper_drwr", "DRAWER" }; - public static SimpleDateFormat sdf = new SimpleDateFormat(UtilProperties.getMessage(resource,"DateFormat",Locale.getDefault())); + public static SimpleDateFormat sdf = new SimpleDateFormat(UtilProperties.getMessage(PosTransaction.resource,"DateFormat",Locale.getDefault())); protected Component[] operatorField = null; protected XStyle titleStyle = null; protected XPanel operPanel = null; @@ -132,15 +131,15 @@ protected String getFieldTitle(String fieldName) { if (OPER_TOTAL[0].equals(fieldName)) { - return UtilProperties.getMessage(resource,"TOTAL",defaultLocale); + return UtilProperties.getMessage(PosTransaction.resource,"TOTAL",defaultLocale); } else if (OPER_DATE[0].equals(fieldName)) { - return UtilProperties.getMessage(resource,"DATE",defaultLocale); + return UtilProperties.getMessage(PosTransaction.resource,"DATE",defaultLocale); } else if (OPER_EMPL[0].equals(fieldName)) { - return UtilProperties.getMessage(resource,"EMPL",defaultLocale); + return UtilProperties.getMessage(PosTransaction.resource,"EMPL",defaultLocale); } else if (OPER_TXID[0].equals(fieldName)) { - return UtilProperties.getMessage(resource,"TXID",defaultLocale); + return UtilProperties.getMessage(PosTransaction.resource,"TXID",defaultLocale); } else if (OPER_DRWR[0].equals(fieldName)) { - return UtilProperties.getMessage(resource,"DRWR",defaultLocale); + return UtilProperties.getMessage(PosTransaction.resource,"DRWR",defaultLocale); } return ""; } Modified: ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/component/Output.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/component/Output.java?rev=675275&r1=675274&r2=675275&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/component/Output.java (original) +++ ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/component/Output.java Wed Jul 9 11:06:14 2008 @@ -28,7 +28,6 @@ public class Output { - private static final String resource = "PosUiLabels"; public static final String module = Output.class.getName(); // login labels @@ -46,12 +45,12 @@ public void setLock(boolean lock) { if (lock) { - this.print(UtilProperties.getMessage(resource,"ULOGIN",defaultLocale)); + this.print(UtilProperties.getMessage(PosTransaction.resource,"ULOGIN",defaultLocale)); } else { if (PosTransaction.getCurrentTx(session).isOpen()) { - this.print(UtilProperties.getMessage(resource,"ISOPEN",defaultLocale)); + this.print(UtilProperties.getMessage(PosTransaction.resource,"ISOPEN",defaultLocale)); } else { - this.print(UtilProperties.getMessage(resource,"ISCLOSED",defaultLocale)); + this.print(UtilProperties.getMessage(PosTransaction.resource,"ISCLOSED",defaultLocale)); } } } Modified: ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/device/impl/Receipt.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/device/impl/Receipt.java?rev=675275&r1=675274&r2=675275&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/device/impl/Receipt.java (original) +++ ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/device/impl/Receipt.java Wed Jul 9 11:06:14 2008 @@ -26,6 +26,7 @@ import java.text.SimpleDateFormat; import java.util.Date; import java.util.HashMap; +import java.util.Locale; import java.util.Map; import java.util.List; @@ -35,6 +36,7 @@ import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilFormatOut; +import org.ofbiz.base.util.UtilProperties; import org.ofbiz.base.util.UtilURL; import org.ofbiz.base.util.UtilValidate; import org.ofbiz.base.util.string.FlexibleStringExpander; @@ -65,14 +67,14 @@ protected String[] custReceiptTmpl = null; protected Map reportTmpl = new HashMap(); - protected String[] dateFmtStr = { "EEE, d MMM yyyy HH:mm:ss z", "EEE, d MMM yyyy HH:mm:ss z", "EEE, d MMM yyyy HH:mm:ss z" }; - protected int[] priceLength = { 7, 7, 7 }; - protected int[] qtyLength = { 5, 5, 5 }; - protected int[] descLength = { 25, 25, 0 }; - protected int[] pridLength = { 25, 25, 0 }; - protected int[] infoLength = { 34, 34, 0 }; - protected int[] configPaddingLength = { 2, 2, 2 }; - protected String[] configPadding = { " ", " ", " "}; + protected static final String[] dateFmtStr = { "EEE, d MMM yyyy HH:mm:ss z", "EEE, d MMM yyyy HH:mm:ss z", "EEE, d MMM yyyy HH:mm:ss z" }; + protected static final int[] priceLength = { 7, 7, 7 }; + protected static final int[] qtyLength = { 5, 5, 5 }; + protected static final int[] descLength = { 25, 25, 0 }; + public static final int[] pridLength = { 25, 25, 0 }; + protected static final int[] infoLength = { 34, 34, 0 }; + protected static final int[] configPaddingLength = { 2, 2, 2 }; + protected static final String[] configPadding = { " ", " ", " "}; protected PosTransaction lastTransaction = null; public Receipt(String deviceName, int timeout) { @@ -436,6 +438,7 @@ expandMap.put("nameOnCard", UtilFormatOut.padString((String) expandMap.get("nameOnCard"), infoLength[type], false, ' ')); expandMap.put("payInfo", UtilFormatOut.padString((String) expandMap.get("payInfo"), infoLength[type], false, ' ')); expandMap.put("amount", UtilFormatOut.padString((String) expandMap.get("amount"), priceLength[type], false, ' ')); + String toPrint = FlexibleStringExpander.expandString(template, expandMap); if (toPrint.indexOf("\n") > -1) { String[] lines = toPrint.split("\\n"); @@ -468,6 +471,8 @@ expandMap.put("totalPayments", UtilFormatOut.padString(UtilFormatOut.formatPrice(trans.getPaymentTotal()), priceLength[type], false, ' ')); expandMap.put("change", UtilFormatOut.padString((trans.getTotalDue() < 0 ? UtilFormatOut.formatPrice(trans.getTotalDue() * -1) : "0.00"), priceLength[type], false, ' ')); + expandMap.put("saleDiscount", UtilFormatOut.padString((trans.GetTotalDiscount() != 0 ? + UtilFormatOut.formatPrice(trans.GetTotalDiscount()) : "0.00"), priceLength[type], false, ' ')); return expandMap; } Modified: ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/event/ManagerEvents.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/event/ManagerEvents.java?rev=675275&r1=675274&r2=675275&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/event/ManagerEvents.java (original) +++ ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/event/ManagerEvents.java Wed Jul 9 11:06:14 2008 @@ -57,7 +57,7 @@ public class ManagerEvents { - private static final String resource = "PosUiLabels"; + public static final String module = ManagerEvents.class.getName(); public static boolean mgrLoggedIn = false; static DecimalFormat priceDecimalFormat = new DecimalFormat("#,##0.00"); @@ -71,7 +71,7 @@ } if (sku == null) { - pos.getOutput().print(UtilProperties.getMessage(resource,"Invalid_Selection",Locale.getDefault())); + pos.getOutput().print(UtilProperties.getMessage(PosTransaction.resource,"Invalid_Selection",Locale.getDefault())); pos.getJournal().refresh(pos); pos.getInput().clear(); } @@ -145,7 +145,7 @@ } else { input.clear(); input.setFunction("OPEN"); - pos.getOutput().print(UtilProperties.getMessage(resource,"OPDRAM",Locale.getDefault())); + pos.getOutput().print(UtilProperties.getMessage(PosTransaction.resource,"OPDRAM",Locale.getDefault())); return; } } else { @@ -191,19 +191,19 @@ } switch (closeInfo.length) { case 0: - output.print(UtilProperties.getMessage(resource,"ENTCAS",Locale.getDefault())); + output.print(UtilProperties.getMessage(PosTransaction.resource,"ENTCAS",Locale.getDefault())); break; case 1: - output.print(UtilProperties.getMessage(resource,"ENTCHK",Locale.getDefault())); + output.print(UtilProperties.getMessage(PosTransaction.resource,"ENTCHK",Locale.getDefault())); break; case 2: - output.print(UtilProperties.getMessage(resource,"ENTCRC",Locale.getDefault())); + output.print(UtilProperties.getMessage(PosTransaction.resource,"ENTCRC",Locale.getDefault())); break; case 3: - output.print(UtilProperties.getMessage(resource,"ENTGFC",Locale.getDefault())); + output.print(UtilProperties.getMessage(PosTransaction.resource,"ENTGFC",Locale.getDefault())); break; case 4: - output.print(UtilProperties.getMessage(resource,"ENTOTH",Locale.getDefault())); + output.print(UtilProperties.getMessage(PosTransaction.resource,"ENTOTH",Locale.getDefault())); break; case 5: GenericValue state = trans.getTerminalState(); @@ -232,7 +232,7 @@ } // print the totals report - output.print(UtilProperties.getMessage(resource,"WaitingFinalSales",Locale.getDefault())); + output.print(UtilProperties.getMessage(PosTransaction.resource,"WaitingFinalSales",Locale.getDefault())); //pos.showDialog("dialog/error/terminalclosed"); JLR 14/11/06 : Pb with that don't know why, useless => commented out printTotals(pos, state, true); @@ -267,7 +267,7 @@ trans.popDrawer(); input.clear(); input.setFunction("CLOSE"); - output.print(UtilProperties.getMessage(resource,"ENTCAS",Locale.getDefault())); + output.print(UtilProperties.getMessage(PosTransaction.resource,"ENTCAS",Locale.getDefault())); } } @@ -343,7 +343,7 @@ } } else { input.setFunction("VOID"); - output.print(UtilProperties.getMessage(resource,"VOID",Locale.getDefault())); + output.print(UtilProperties.getMessage(PosTransaction.resource,"VOID",Locale.getDefault())); } } @@ -388,7 +388,7 @@ if (!mgrLoggedIn) { pos.showDialog("dialog/error/mgrnotloggedin"); } else { - pos.getOutput().print(UtilProperties.getMessage(resource,"Shutting_down",Locale.getDefault())); + pos.getOutput().print(UtilProperties.getMessage(PosTransaction.resource,"Shutting_down",Locale.getDefault())); PosTransaction.getCurrentTx(pos.getSession()).closeTx(); System.exit(0); } @@ -526,18 +526,18 @@ String reportTemplate = "totals.txt"; // miscellaneous - reportMap.put("term", UtilFormatOut.padString(UtilProperties.getMessage(resource,"term",Locale.getDefault()), 20, false, ' ')); - reportMap.put("draw", UtilFormatOut.padString(UtilProperties.getMessage(resource,"draw",Locale.getDefault()), 20, false, ' ')); - reportMap.put("clerk", UtilFormatOut.padString(UtilProperties.getMessage(resource,"clerk",Locale.getDefault()), 20, false, ' ')); - reportMap.put("total_report", UtilFormatOut.padString(UtilProperties.getMessage(resource,"total_report",Locale.getDefault()), 20, false, ' ')); + reportMap.put("term", UtilFormatOut.padString(UtilProperties.getMessage(PosTransaction.resource,"term",Locale.getDefault()), 20, false, ' ')); + reportMap.put("draw", UtilFormatOut.padString(UtilProperties.getMessage(PosTransaction.resource,"draw",Locale.getDefault()), 20, false, ' ')); + reportMap.put("clerk", UtilFormatOut.padString(UtilProperties.getMessage(PosTransaction.resource,"clerk",Locale.getDefault()), 20, false, ' ')); + reportMap.put("total_report", UtilFormatOut.padString(UtilProperties.getMessage(PosTransaction.resource,"total_report",Locale.getDefault()), 20, false, ' ')); // titles - reportMap.put("cashTitle", UtilFormatOut.padString(UtilProperties.getMessage(resource,"CASH",Locale.getDefault()), 20, false, ' ')); - reportMap.put("checkTitle", UtilFormatOut.padString(UtilProperties.getMessage(resource,"CHECK",Locale.getDefault()), 20, false, ' ')); - reportMap.put("giftCardTitle", UtilFormatOut.padString(UtilProperties.getMessage(resource,"GIFT_CARD",Locale.getDefault()), 20, false, ' ')); - reportMap.put("creditCardTitle", UtilFormatOut.padString(UtilProperties.getMessage(resource,"CREDIT_CARD",Locale.getDefault()), 20, false, ' ')); - reportMap.put("otherTitle", UtilFormatOut.padString(UtilProperties.getMessage(resource,"OTHER",Locale.getDefault()), 20, false, ' ')); - reportMap.put("grossSalesTitle", UtilFormatOut.padString(UtilProperties.getMessage(resource,"GROSS_SALES",Locale.getDefault()), 20, false, ' ')); + reportMap.put("cashTitle", UtilFormatOut.padString(UtilProperties.getMessage(PosTransaction.resource,"CASH",Locale.getDefault()), 20, false, ' ')); + reportMap.put("checkTitle", UtilFormatOut.padString(UtilProperties.getMessage(PosTransaction.resource,"CHECK",Locale.getDefault()), 20, false, ' ')); + reportMap.put("giftCardTitle", UtilFormatOut.padString(UtilProperties.getMessage(PosTransaction.resource,"GIFT_CARD",Locale.getDefault()), 20, false, ' ')); + reportMap.put("creditCardTitle", UtilFormatOut.padString(UtilProperties.getMessage(PosTransaction.resource,"CREDIT_CARD",Locale.getDefault()), 20, false, ' ')); + reportMap.put("otherTitle", UtilFormatOut.padString(UtilProperties.getMessage(PosTransaction.resource,"OTHER",Locale.getDefault()), 20, false, ' ')); + reportMap.put("grossSalesTitle", UtilFormatOut.padString(UtilProperties.getMessage(PosTransaction.resource,"GROSS_SALES",Locale.getDefault()), 20, false, ' ')); reportMap.put("+/-", UtilFormatOut.padString("+/-", 20, false, ' ')); reportMap.put("spacer", UtilFormatOut.padString("", 20, false, ' ')); Modified: ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/event/PaymentEvents.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/event/PaymentEvents.java?rev=675275&r1=675274&r2=675275&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/event/PaymentEvents.java (original) +++ ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/event/PaymentEvents.java Wed Jul 9 11:06:14 2008 @@ -31,7 +31,7 @@ public class PaymentEvents { - private static final String resource = "PosUiLabels"; + public static final String module = PaymentEvents.class.getName(); public static synchronized void payCash(PosScreen pos) { @@ -66,7 +66,7 @@ } else if (paymentCheck == PosTransaction.EXTERNAL_PAYMENT) { if (ckInfo == null) { input.setFunction("CHECK"); - pos.getOutput().print(UtilProperties.getMessage(resource,"REFNUM",Locale.getDefault())); + pos.getOutput().print(UtilProperties.getMessage(PosTransaction.resource,"REFNUM",Locale.getDefault())); return; } else { processExternalPayment(pos, "PERSONAL_CHECK", ckInfo[1]); @@ -91,7 +91,7 @@ } else if (paymentCheck == PosTransaction.EXTERNAL_PAYMENT) { if (gcInfo == null) { input.setFunction("GIFTCARD"); - pos.getOutput().print(UtilProperties.getMessage(resource,"REFNUM",Locale.getDefault())); + pos.getOutput().print(UtilProperties.getMessage(PosTransaction.resource,"REFNUM",Locale.getDefault())); clearInputPaymentFunctions(pos); return; } else { @@ -123,7 +123,7 @@ } else if (paymentCheck == PosTransaction.EXTERNAL_PAYMENT) { if (crtInfo == null) { input.setFunction("CREDIT"); - pos.getOutput().print(UtilProperties.getMessage(resource,"REFNUM",Locale.getDefault())); + pos.getOutput().print(UtilProperties.getMessage(PosTransaction.resource,"REFNUM",Locale.getDefault())); return; } else { processExternalPayment(pos, "CREDIT_CARD", crtInfo[1]); @@ -137,7 +137,7 @@ input.clearLastFunction(); input.setFunction("TOTAL"); input.setFunction("CREDIT"); - pos.getOutput().print(UtilProperties.getMessage(resource,"CREDNO",Locale.getDefault())); + pos.getOutput().print(UtilProperties.getMessage(PosTransaction.resource,"CREDNO",Locale.getDefault())); } else { Debug.log("Credit Func Info : " + crtInfo[1], module); if (msrInfo == null && (creditExpirationInfo == null)) { @@ -146,7 +146,7 @@ input.clearLastFunction(); input.setFunction("CREDIT"); input.setFunction("CREDITEXP"); - pos.getOutput().print(UtilProperties.getMessage(resource,"CREDEX",Locale.getDefault())); + pos.getOutput().print(UtilProperties.getMessage(PosTransaction.resource,"CREDEX",Locale.getDefault())); } else { Debug.log("Invalid card number - " + input.value(), module); clearInputPaymentFunctions(pos); @@ -160,7 +160,7 @@ input.clearLastFunction(); input.setFunction("CREDITEXP"); input.setFunction("SECURITYCODE"); - pos.getOutput().print(UtilProperties.getMessage(resource,"SECURITYCODE",Locale.getDefault())); + pos.getOutput().print(UtilProperties.getMessage(PosTransaction.resource,"SECURITYCODE",Locale.getDefault())); } else { Debug.log("Invalid expiration date", module); clearInputPaymentFunctions(pos); @@ -175,7 +175,7 @@ input.clearLastFunction(); input.setFunction("SECURITYCODE"); input.setFunction("POSTALCODE"); - pos.getOutput().print(UtilProperties.getMessage(resource,"POSTALCODE",Locale.getDefault())); + pos.getOutput().print(UtilProperties.getMessage(PosTransaction.resource,"POSTALCODE",Locale.getDefault())); } else { clearInputPaymentFunctions(pos); input.clearInput(); @@ -243,12 +243,12 @@ pos.refresh(); break; case 1: // card number only found - pos.getOutput().print(UtilProperties.getMessage(resource,"CREDEX",Locale.getDefault())); + pos.getOutput().print(UtilProperties.getMessage(PosTransaction.resource,"CREDEX",Locale.getDefault())); break; default: Debug.log("Hit the default switch case [" + allInfo + "] refreshing.", module); input.clearFunction("MSRINFO"); - pos.getOutput().print(UtilProperties.getMessage(resource,"CREDNO",Locale.getDefault())); + pos.getOutput().print(UtilProperties.getMessage(PosTransaction.resource,"CREDNO",Locale.getDefault())); break; } } @@ -276,7 +276,7 @@ Input input = pos.getInput(); String refNum = input.value(); if (refNum == null) { - pos.getOutput().print(UtilProperties.getMessage(resource,"REFNUM",Locale.getDefault())); + pos.getOutput().print(UtilProperties.getMessage(PosTransaction.resource,"REFNUM",Locale.getDefault())); return; } input.clearInput(); @@ -329,7 +329,7 @@ if (UtilValidate.isNotEmpty(idx) && UtilValidate.isEmpty(sku)) { String refNum = pos.getInput().value(); if (UtilValidate.isEmpty(refNum)) { - pos.getOutput().print(UtilProperties.getMessage(resource,"REFNUM",Locale.getDefault())); + pos.getOutput().print(UtilProperties.getMessage(PosTransaction.resource,"REFNUM",Locale.getDefault())); pos.getInput().setFunction("REFNUM"); } else { int index = -1; @@ -351,7 +351,7 @@ public static synchronized void processSale(PosScreen pos) { pos.setWaitCursor(); PosTransaction trans = PosTransaction.getCurrentTx(pos.getSession()); - PosScreen.currentScreen.getOutput().print(UtilProperties.getMessage(resource,"Processing",Locale.getDefault())); + PosScreen.currentScreen.getOutput().print(UtilProperties.getMessage(PosTransaction.resource,"Processing",Locale.getDefault())); if (trans.isEmpty()) { PosScreen newPos = pos.showPage("pospanel"); Modified: ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/event/PromoEvents.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/event/PromoEvents.java?rev=675275&r1=675274&r2=675275&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/event/PromoEvents.java (original) +++ ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/event/PromoEvents.java Wed Jul 9 11:06:14 2008 @@ -29,7 +29,7 @@ public class PromoEvents { - private static final String resource = "PosUiLabels"; + public static final String module = PromoEvents.class.getName(); public static synchronized void addPromoCode(PosScreen pos) { @@ -43,7 +43,7 @@ if (lastFunc == null || !"PROMOCODE".equals(lastFunc[0])) { Output output = pos.getOutput(); input.setFunction("PROMOCODE"); - output.print(UtilProperties.getMessage(resource,"ENTPROMOCODE",Locale.getDefault())); + output.print(UtilProperties.getMessage(PosTransaction.resource,"ENTPROMOCODE",Locale.getDefault())); } else if ("PROMOCODE".equals(lastFunc[0])) { String promoCode = input.value(); if (UtilValidate.isNotEmpty(promoCode)) { Modified: ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/event/SecurityEvents.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/event/SecurityEvents.java?rev=675275&r1=675274&r2=675275&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/event/SecurityEvents.java (original) +++ ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/event/SecurityEvents.java Wed Jul 9 11:06:14 2008 @@ -32,7 +32,7 @@ public class SecurityEvents { - private static final String resource = "PosUiLabels"; + public static final String module = SecurityEvents.class.getName(); public static synchronized void login(PosScreen pos) { @@ -87,11 +87,11 @@ String text = input.value(); if (func != null && func[0].equals(loginFunc)) { if (UtilValidate.isEmpty(func[1]) && UtilValidate.isEmpty(text)) { - output.print(UtilProperties.getMessage(resource,"ULOGIN",Locale.getDefault())); + output.print(UtilProperties.getMessage(PosTransaction.resource,"ULOGIN",Locale.getDefault())); input.setFunction(loginFunc); input.setPasswordInput( false); } else if (UtilValidate.isEmpty(func[1])) { - output.print(UtilProperties.getMessage(resource,"UPASSW",Locale.getDefault())); + output.print(UtilProperties.getMessage(PosTransaction.resource,"UPASSW",Locale.getDefault())); input.setFunction(loginFunc); input.setPasswordInput( true); } else { @@ -106,7 +106,7 @@ } catch (XuiSession.UserLoginFailure e) { input.clear(); input.setFunction(loginFunc); - output.print(e.getMessage() + " " + UtilProperties.getMessage(resource,"ULOGIN",Locale.getDefault())); + output.print(e.getMessage() + " " + UtilProperties.getMessage(PosTransaction.resource,"ULOGIN",Locale.getDefault())); } if (passed) { input.clear(); @@ -125,7 +125,7 @@ if (mgrUl != null) { boolean isMgr = session.hasRole(mgrUl, "MANAGER"); if (!isMgr) { - output.print(UtilProperties.getMessage(resource,"UserNotmanager",Locale.getDefault())); + output.print(UtilProperties.getMessage(PosTransaction.resource,"UserNotmanager",Locale.getDefault())); input.clear(); } else { ManagerEvents.mgrLoggedIn = true; Modified: ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/ConfigureItem.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/ConfigureItem.java?rev=675275&r1=675274&r2=675275&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/ConfigureItem.java (original) +++ ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/ConfigureItem.java Wed Jul 9 11:06:14 2008 @@ -51,7 +51,7 @@ /** * To create or configure a configurable item */ - private static final String resource = "PosUiLabels"; + public static final String module = ConfigureItem.class.getName(); protected PosScreen m_pos = null; protected ConfigureItem m_configureItem = null; @@ -83,7 +83,7 @@ // cache must be set to false because there's no method to remove actionhandlers m_dialog = (XDialog) pageMgr.loadPage( m_pos.getScreenLocation() + "/dialog/ConfigureItem", false); - m_dialog.setCaption(UtilProperties.getMessage(resource, "ConfigureItem", Locale.getDefault())); + m_dialog.setCaption(UtilProperties.getMessage(PosTransaction.resource, "ConfigureItem", Locale.getDefault())); m_optionListPane = (XScrollPane) m_dialog.findComponent("optionListPane"); m_configList = (XList) m_dialog.findComponent("configList"); Modified: ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/LoadSale.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/LoadSale.java?rev=675275&r1=675274&r2=675275&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/LoadSale.java (original) +++ ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/LoadSale.java Wed Jul 9 11:06:14 2008 @@ -42,7 +42,7 @@ /** * To load a sale from a shopping list. 2 modes : add to or replace the current sale. Also a button to delete a sale (aka shopping list) */ - private static final String resource = "PosUiLabels"; + public static final String module = LoadSale.class.getName(); protected static PosScreen m_pos = null; protected XDialog m_dialog = null; @@ -66,7 +66,7 @@ public void openDlg() { m_dialog = (XDialog) pageMgr.loadPage(m_pos.getScreenLocation() + "/dialog/loadsale"); - m_dialog.setCaption(UtilProperties.getMessage(resource, "LoadASale", Locale.getDefault())); + m_dialog.setCaption(UtilProperties.getMessage(PosTransaction.resource, "LoadASale", Locale.getDefault())); m_salesList = (XList) m_dialog.findComponent("salesList"); XEventHelper.addMouseHandler(this, m_salesList, "saleDoubleClick"); @@ -92,7 +92,7 @@ m_salesList.setVisibleRowCount(-1); m_salesList.ensureIndexIsVisible(m_salesList.getItemCount()); m_salesList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); - m_salesList.setToolTipText(UtilProperties.getMessage(resource, "LoadSaleListDblClickTip", Locale.getDefault())); + m_salesList.setToolTipText(UtilProperties.getMessage(PosTransaction.resource, "LoadSaleListDblClickTip", Locale.getDefault())); m_dialog.pack(); m_salesList.requestFocusInWindow(); Modified: ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/PaidInOut.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/PaidInOut.java?rev=675275&r1=675274&r2=675275&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/PaidInOut.java (original) +++ ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/PaidInOut.java Wed Jul 9 11:06:14 2008 @@ -46,7 +46,7 @@ /** * To allow creating or choising a reason for a PAID IN or OUT */ - private static final String resource = "PosUiLabels"; + public static final String module = PaidInOut.class.getName(); protected static PosScreen m_pos = null; protected XDialog m_dialog = null; @@ -90,12 +90,12 @@ Enumeration reasonsKeys = null; if (m_type.equals("IN")) { - m_dialog.setCaption(UtilProperties.getMessage(resource, "PaidInTitle", Locale.getDefault())); + m_dialog.setCaption(UtilProperties.getMessage(PosTransaction.resource, "PaidInTitle", Locale.getDefault())); reasons = ResourceBundle.getBundle(m_pos.getScreenLocation() + "/dialog/PaidIn", Locale.getDefault()); reasonsKeys = reasons.getKeys(); } else { // OUT - m_dialog.setCaption(UtilProperties.getMessage(resource, "PaidOutTitle", Locale.getDefault())); + m_dialog.setCaption(UtilProperties.getMessage(PosTransaction.resource, "PaidOutTitle", Locale.getDefault())); reasons = ResourceBundle.getBundle(m_pos.getScreenLocation() + "/dialog/PaidOut", Locale.getDefault()); reasonsKeys = reasons.getKeys(); } @@ -106,7 +106,7 @@ m_comboModel.addElement(val); } m_reasonsCombo.setModel(m_comboModel); - m_reasonsCombo.setToolTipText(UtilProperties.getMessage(resource, "CreateOrChooseReasonInOut", Locale.getDefault())); + m_reasonsCombo.setToolTipText(UtilProperties.getMessage(PosTransaction.resource, "CreateOrChooseReasonInOut", Locale.getDefault())); m_dialog.pack(); m_reasonsCombo.requestFocusInWindow(); Modified: ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/PosScreen.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/PosScreen.java?rev=675275&r1=675274&r2=675275&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/PosScreen.java (original) +++ ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/PosScreen.java Wed Jul 9 11:06:14 2008 @@ -48,7 +48,7 @@ public class PosScreen extends XPage implements Runnable, DialogCallback, FocusListener { - private static final String resource = "PosUiLabels"; + public static final String module = PosScreen.class.getName(); public static final Frame appFrame = XProjectManager.getCurrentProject().getAppFrame(); public static final Window appWin = XProjectManager.getCurrentProject().getAppWindow(); @@ -215,25 +215,25 @@ operator.refresh(); if (updateOutput) { if (input.isFunctionSet("PAID")) { - output.print(UtilProperties.getMessage(resource,"CHANGE",defaultLocale) + output.print(UtilProperties.getMessage(PosTransaction.resource,"CHANGE",defaultLocale) + UtilFormatOut.formatPrice(trans.getTotalDue() * -1)); } else if (input.isFunctionSet("TOTAL")) { if (trans.getTotalDue() > 0) { - output.print(UtilProperties.getMessage(resource,"TOTALD",defaultLocale) + " " + UtilFormatOut.formatPrice(trans.getTotalDue())); + output.print(UtilProperties.getMessage(PosTransaction.resource,"TOTALD",defaultLocale) + " " + UtilFormatOut.formatPrice(trans.getTotalDue())); } else { - output.print(UtilProperties.getMessage(resource,"PAYFIN",defaultLocale)); + output.print(UtilProperties.getMessage(PosTransaction.resource,"PAYFIN",defaultLocale)); } } else { if (PosTransaction.getCurrentTx(session).isOpen()) { - output.print(UtilProperties.getMessage(resource,"ISOPEN",defaultLocale)); + output.print(UtilProperties.getMessage(PosTransaction.resource,"ISOPEN",defaultLocale)); } else { - output.print(UtilProperties.getMessage(resource,"ISCLOSED",defaultLocale)); + output.print(UtilProperties.getMessage(PosTransaction.resource,"ISCLOSED",defaultLocale)); } } } //journal.focus(); } else { - output.print(UtilProperties.getMessage(resource,"ULOGIN",defaultLocale)); + output.print(UtilProperties.getMessage(PosTransaction.resource,"ULOGIN",defaultLocale)); //input.focus(); } Modified: ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/SaveSale.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/SaveSale.java?rev=675275&r1=675274&r2=675275&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/SaveSale.java (original) +++ ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/SaveSale.java Wed Jul 9 11:06:14 2008 @@ -41,7 +41,7 @@ /** * To save a sale. 2 modes : save and keep the current sale or save and clear the current sale. */ - private static final String resource = "PosUiLabels"; + public static final String module = SaveSale.class.getName(); protected static PosScreen m_pos = null; protected XDialog m_dialog = null; @@ -52,7 +52,7 @@ // New button for Save and Print funtion protected XButton m_saveAndPrint = null; protected static PosTransaction m_trans = null; - public static SimpleDateFormat sdf = new SimpleDateFormat(UtilProperties.getMessage(resource,"DateTimeFormat",Locale.getDefault())); + public static SimpleDateFormat sdf = new SimpleDateFormat(UtilProperties.getMessage(PosTransaction.resource,"DateTimeFormat",Locale.getDefault())); private static boolean ShowKeyboardInSaveSale = UtilProperties.propertyValueEqualsIgnoreCase("parameters", "ShowKeyboardInSaveSale", "Y"); //TODO : make getter and setter for members (ie m_*) if needed (extern calls). For that in Eclipse use Source/Generate Getters and setters @@ -67,7 +67,7 @@ m_saleName = (XEdit) m_dialog.findComponent("saleName"); //m_dialog.setM_focused(m_saleName); m_saleName.setText(m_pos.session.getUserId() + " " + sdf.format(new Date())); - m_dialog.setCaption(UtilProperties.getMessage(resource, "SaveASale", Locale.getDefault())); + m_dialog.setCaption(UtilProperties.getMessage(PosTransaction.resource, "SaveASale", Locale.getDefault())); m_cancel = (XButton) m_dialog.findComponent("BtnCancel"); m_save = (XButton) m_dialog.findComponent("BtnSave"); Modified: ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/SelectProduct.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/SelectProduct.java?rev=675275&r1=675274&r2=675275&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/SelectProduct.java (original) +++ ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/SelectProduct.java Wed Jul 9 11:06:14 2008 @@ -41,7 +41,7 @@ /** * To choose a product in a list of products whith the same bar code */ - private static final String resource = "PosUiLabels"; + public static final String module = SelectProduct.class.getName(); protected static PosScreen m_pos = null; protected XDialog m_dialog = null; @@ -64,7 +64,7 @@ public String openDlg() { XDialog dlg = (XDialog) pageMgr.loadPage(m_pos.getScreenLocation() + "/dialog/SelectProduct"); m_dialog = dlg; - dlg.setCaption(UtilProperties.getMessage(resource, "SelectAProduct", Locale.getDefault())); + dlg.setCaption(UtilProperties.getMessage(PosTransaction.resource, "SelectAProduct", Locale.getDefault())); //dlg.setModal(true); m_productsList = (XList) dlg.findComponent("productsList"); XEventHelper.addMouseHandler(this, m_productsList, "DoubleClick"); @@ -86,7 +86,7 @@ m_productsList.setVisibleRowCount(-1); m_productsList.ensureIndexIsVisible(m_productsList.getItemCount()); m_productsList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); - m_productsList.setToolTipText(UtilProperties.getMessage(resource, "SelectProductListDblClickTip", Locale.getDefault())); + m_productsList.setToolTipText(UtilProperties.getMessage(PosTransaction.resource, "SelectProductListDblClickTip", Locale.getDefault())); dlg.pack(); dlg.showDialog(this); |
Free forum by Nabble | Edit this page |