You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by nm...@apache.org on 2018/01/06 14:58:39 UTC

svn commit: r1820404 - in /ofbiz/ofbiz-framework/branches/release17.12/applications/order/template: entry/order/OrderItems.ftl order/EditOrderItems.ftl order/OrderItems.ftl

Author: nmalin
Date: Sat Jan  6 14:58:39 2018
New Revision: 1820404

URL: http://svn.apache.org/viewvc?rev=1820404&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/ofbiz-framework/branches/release17.12/applications/order/template/entry/order/OrderItems.ftl
    ofbiz/ofbiz-framework/branches/release17.12/applications/order/template/order/EditOrderItems.ftl
    ofbiz/ofbiz-framework/branches/release17.12/applications/order/template/order/OrderItems.ftl

Modified: ofbiz/ofbiz-framework/branches/release17.12/applications/order/template/entry/order/OrderItems.ftl
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/branches/release17.12/applications/order/template/entry/order/OrderItems.ftl?rev=1820404&r1=1820403&r2=1820404&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/branches/release17.12/applications/order/template/entry/order/OrderItems.ftl (original)
+++ ofbiz/ofbiz-framework/branches/release17.12/applications/order/template/entry/order/OrderItems.ftl Sat Jan  6 14:58:39 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/ofbiz-framework/branches/release17.12/applications/order/template/order/EditOrderItems.ftl
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/branches/release17.12/applications/order/template/order/EditOrderItems.ftl?rev=1820404&r1=1820403&r2=1820404&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/branches/release17.12/applications/order/template/order/EditOrderItems.ftl (original)
+++ ofbiz/ofbiz-framework/branches/release17.12/applications/order/template/order/EditOrderItems.ftl Sat Jan  6 14:58:39 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/ofbiz-framework/branches/release17.12/applications/order/template/order/OrderItems.ftl
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/branches/release17.12/applications/order/template/order/OrderItems.ftl?rev=1820404&r1=1820403&r2=1820404&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/branches/release17.12/applications/order/template/order/OrderItems.ftl (original)
+++ ofbiz/ofbiz-framework/branches/release17.12/applications/order/template/order/OrderItems.ftl Sat Jan  6 14:58:39 2018
@@ -455,7 +455,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>