svn commit: r628832 - /ofbiz/branches/release4.0/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r628832 - /ofbiz/branches/release4.0/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java

jleroux@apache.org
Author: jleroux
Date: Mon Feb 18 09:31:10 2008
New Revision: 628832

URL: http://svn.apache.org/viewvc?rev=628832&view=rev
Log:
Reverted changes from 628552 : it was not a bug fix (and then I introduced a bug)

Modified:
    ofbiz/branches/release4.0/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java

Modified: ofbiz/branches/release4.0/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java?rev=628832&r1=628831&r2=628832&view=diff
==============================================================================
--- ofbiz/branches/release4.0/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java (original)
+++ ofbiz/branches/release4.0/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java Mon Feb 18 09:31:10 2008
@@ -735,29 +735,6 @@
         if (cart != null) {
             double taxAmount = cart.getTotalSalesTax();
             double total = cart.getGrandTotal();
-            List adjustments = cart.getAdjustments();
-
-            if (adjustments != null && adjustments.size() > 0) {
-                Iterator iter = adjustments.iterator();
-                while(iter.hasNext()){
-                    GenericValue orderAdjustment = (GenericValue) iter.next();
-                    Double amount = orderAdjustment.getDouble("amount");
-                    Double sourcePercentage = orderAdjustment.getDouble("sourcePercentage");
-                    if (UtilValidate.isNotEmpty(sourcePercentage)) {
-                        double percentage = sourcePercentage.doubleValue()/100.0; // sourcePercentage is negative
-                        amount = new Double(total / ((1 + percentage) / percentage));                        
-                    }                    
-                    XModel adjustmentLine = Journal.appendNode(model, "tr", "adjustment", "");
-                    Journal.appendNode(adjustmentLine, "td", "sku", "");
-                    Journal.appendNode(adjustmentLine, "td", "desc",
-                            UtilProperties.getMessage("pos", "(SalesDiscount)",defaultLocale));
-                    Journal.appendNode(adjustmentLine, "td", "qty", "");
-                    if (UtilValidate.isNotEmpty(amount)) {
-                        Journal.appendNode(adjustmentLine, "td", "price", UtilFormatOut.formatPrice(amount));
-                    }
-                    Journal.appendNode(adjustmentLine, "td", "index", "-1");
-                }    
-            }
 
             XModel taxLine = Journal.appendNode(model, "tr", "", "");
             Journal.appendNode(taxLine, "td", "sku", "");