[OFBiz] SVN: r6939 - trunk/applications/accounting/src/org/ofbiz/accounting/invoice

sichen@svn.ofbiz.org sichen at svn.ofbiz.org
Tue Mar 7 12:46:07 CST 2006


Author: sichen
Date: 2006-03-07 12:46:04 -0600 (Tue, 07 Mar 2006)
New Revision: 6939

Modified:
   trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java
Log:
Fixed the return invoice code a little bit--still not right yet, but better

Modified: trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java
===================================================================
--- trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java	2006-03-07 18:36:12 UTC (rev 6938)
+++ trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java	2006-03-07 18:46:04 UTC (rev 6939)
@@ -1008,7 +1008,7 @@
             // ratio of the invoice total to the promised total so far or zero if the amounts were zero
             BigDecimal actualToPromisedRatio = ZERO;
             if (invoiceTotal.signum() != 0) {
-                invoiceTotal = invoiceTotal.divide(promisedTotal, decimals, rounding);
+                actualToPromisedRatio = invoiceTotal.divide(promisedTotal, decimals, rounding);
             }
 
             // loop through return-wide adjustments and create invoice items for each
@@ -1026,7 +1026,7 @@
                 // prorate the adjustment amount by the actual to promised ratio
                 BigDecimal amount = adjustment.getBigDecimal("amount").multiply(actualToPromisedRatio).setScale(decimals, rounding);
                 if (Debug.verboseOn()) {
-                    Debug.logInfo("Creating Invoice Item with amount " + adjustment.getBigDecimal("amount") + " prorated to " + amount 
+                    Debug.logVerbose("Creating Invoice Item with amount " + adjustment.getBigDecimal("amount") + " prorated to " + amount 
                             + " for return adjustment [" + adjustment.getString("returnAdjustmentId") + "]", module);
                 }
 



More information about the Svn mailing list