From: Anneli <an...@us...> - 2005-01-17 10:24:01
|
Update of /cvsroot/redpos/RedPOS/src/org/redpos/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17783/src/org/redpos/client Modified Files: POSEngine.java Log Message: New type of payment SimpleCurrencyExchange, enter rate on one currency in properties.xml, when using this payment type the amount will be shown in the currency entered, this is just for the gui part, no info about rate or will be saved in the database. Index: POSEngine.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/POSEngine.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** POSEngine.java 11 Jan 2005 17:11:35 -0000 1.6 --- POSEngine.java 17 Jan 2005 10:23:20 -0000 1.7 *************** *** 85,88 **** --- 85,90 ---- private boolean loginPerReceipt; + + private double currencyRate; /** *************** *** 125,128 **** --- 127,141 ---- return loginPerReceipt; } + + /** + * Returns loginPerReciept attribute + * + * @jmx.managed-attribute + * @return + */ + public double getCurrencyRate() + { + return currencyRate; + } /** *************** *** 148,151 **** --- 161,165 ---- defaultPricelistId = (String)po.getProperty("pos", "defaultpricelist"); loginPerReceipt = ((Boolean) po.getProperty("pos", "loginperreceipt")).booleanValue(); + currencyRate = (((Double)po.getProperty("exchange", "CurrencyRate")).doubleValue()); getLog().info("RegisterId = " + registerId); *************** *** 724,728 **** e3.printStackTrace(); } ! // if the receipt is of type COMPLAINT, RETURN OR CORRECTION // the changeRow will be of choosen paymenttype --- 738,742 ---- e3.printStackTrace(); } ! // if the receipt is of type COMPLAINT, RETURN OR CORRECTION // the changeRow will be of choosen paymenttype *************** *** 745,748 **** --- 759,773 ---- storeId, cashier, defaultPricelistId); } + else if (payment.code.equals("SICUEX")) + { + PaymentReceiptRow changeRow = new PaymentReceiptRow(payment); + changeRow.setText(text); + changeRow.setObject(payment.code); + changeRow.setQuantity(1); + changeRow.setAmount(totalPayable); + // add row to receipt + receiptSessionUtility.addReceiptRow(changeRow, registerId, + storeId, cashier, defaultPricelistId); + } else { |