Author: nmalin
Date: Sat Jan  6 14:58:52 2018
New Revision: 1820405

URL: http://svn.apache.org/viewvc?rev=1820405&view=rev
Log:
Fixed: Display the included vat amount on order item detail instead of 0 
(OFBIZ-10148)
When you use a product price with included vat tax, the orderAdjustment created 
have an amount to 0 but amount already included with the vat.

When we display the order adjustment detail for an order item we use only 
amount (so 0).

Now if the orderAdjustment have an amountAlreadyIncluded not empty, we display 
it instead.

Modified:
    
ofbiz/branches/release16.11/applications/order/template/entry/order/OrderItems.ftl
    
ofbiz/branches/release16.11/applications/order/template/order/EditOrderItems.ftl
    ofbiz/branches/release16.11/applications/order/template/order/OrderItems.ftl
    ofbiz/branches/release16.11/framework/base/config/debug.properties

Modified: 
ofbiz/branches/release16.11/applications/order/template/entry/order/OrderItems.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/release16.11/applications/order/template/entry/order/OrderItems.ftl?rev=1820405&r1=1820404&r2=1820405&view=diff
==============================================================================
--- 
ofbiz/branches/release16.11/applications/order/template/entry/order/OrderItems.ftl
 (original)
+++ 
ofbiz/branches/release16.11/applications/order/template/entry/order/OrderItems.ftl
 Sat Jan  6 14:58:52 2018
@@ -115,7 +115,13 @@ under the License.
                 <td>&nbsp;</td>
                 <td>&nbsp;</td>
                 <td align="right">
-                  <div style="font-size: xx-small;"><@ofbizCurrency 
amount=localOrderReadHelper.getOrderItemAdjustmentTotal(orderItem, 
orderItemAdjustment) isoCode=currencyUomId/></div>
+                  <div style="font-size: xx-small;">
+                    <#if orderItemAdjustment.amountAlreadyIncluded?has_content>
+                      <@ofbizCurrency 
amount=orderItemAdjustment.amountAlreadyIncluded isoCode=currencyUomId/>
+                    <#else>
+                      <@ofbizCurrency 
amount=localOrderReadHelper.getOrderItemAdjustmentTotal(orderItem, 
orderItemAdjustment) isoCode=currencyUomId/>
+                    </#if>
+                  </div>
                 </td>
                 <td>&nbsp;</td>
                 <td>&nbsp;</td>

Modified: 
ofbiz/branches/release16.11/applications/order/template/order/EditOrderItems.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/release16.11/applications/order/template/order/EditOrderItems.ftl?rev=1820405&r1=1820404&r2=1820405&view=diff
==============================================================================
--- 
ofbiz/branches/release16.11/applications/order/template/order/EditOrderItems.ftl
 (original)
+++ 
ofbiz/branches/release16.11/applications/order/template/order/EditOrderItems.ftl
 Sat Jan  6 14:58:52 2018
@@ -230,7 +230,11 @@ under the License.
                                   <td>&nbsp;</td>
                                   <td>&nbsp;</td>
                                   <td class="align-text">
-                                      <@ofbizCurrency 
amount=Static["org.apache.ofbiz.order.order.OrderReadHelper"].calcItemAdjustment(orderItemAdjustment,
 orderItem) isoCode=currencyUomId/>
+                                      <#if 
orderItemAdjustment.amountAlreadyIncluded?has_content>
+                                            <@ofbizCurrency 
amount=orderItemAdjustment.amountAlreadyIncluded isoCode=currencyUomId/>
+                                        <#else>
+                                          <@ofbizCurrency 
amount=Static["org.apache.ofbiz.order.order.OrderReadHelper"].calcItemAdjustment(orderItemAdjustment,
 orderItem) isoCode=currencyUomId/>
+                                      </#if>
                                   </td>
                                   <td colspan="3">&nbsp;</td>
                               </tr>

Modified: 
ofbiz/branches/release16.11/applications/order/template/order/OrderItems.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/release16.11/applications/order/template/order/OrderItems.ftl?rev=1820405&r1=1820404&r2=1820405&view=diff
==============================================================================
--- 
ofbiz/branches/release16.11/applications/order/template/order/OrderItems.ftl 
(original)
+++ 
ofbiz/branches/release16.11/applications/order/template/order/OrderItems.ftl 
Sat Jan  6 14:58:52 2018
@@ -461,7 +461,11 @@ under the License.
                                     <td>&nbsp;</td>
                                     <td>&nbsp;</td>
                                     <td align="right">
-                                        <@ofbizCurrency 
amount=Static["org.apache.ofbiz.order.order.OrderReadHelper"].calcItemAdjustment(orderItemAdjustment,
 orderItem) isoCode=currencyUomId/>
+                                        <#if 
orderItemAdjustment.amountAlreadyIncluded?has_content>
+                                            <@ofbizCurrency 
amount=orderItemAdjustment.amountAlreadyIncluded isoCode=currencyUomId/>
+                                        <#else>
+                                            <@ofbizCurrency 
amount=Static["org.apache.ofbiz.order.order.OrderReadHelper"].calcItemAdjustment(orderItemAdjustment,
 orderItem) isoCode=currencyUomId/>
+                                        </#if>
                                     </td>
                                     <td colspan="2">&nbsp;</td>
                                 </tr>

Modified: ofbiz/branches/release16.11/framework/base/config/debug.properties
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/release16.11/framework/base/config/debug.properties?rev=1820405&r1=1820404&r2=1820405&view=diff
==============================================================================
--- ofbiz/branches/release16.11/framework/base/config/debug.properties 
(original)
+++ ofbiz/branches/release16.11/framework/base/config/debug.properties Sat Jan  
6 14:58:52 2018
@@ -23,7 +23,7 @@
 
 # These top level switches are used before calling Log4J, or if Log4J is not 
used
 print.verbose=false
-print.timing=true
+print.timing=ftrue
 print.info=true
 print.important=true
 print.warning=true


Reply via email to