svn commit: r1820403 - in /ofbiz/ofbiz-framework/trunk/applications/order/template: entry/order/OrderItems.ftl order/EditOrderItems.ftl order/OrderItems.ftl

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

svn commit: r1820403 - in /ofbiz/ofbiz-framework/trunk/applications/order/template: entry/order/OrderItems.ftl order/EditOrderItems.ftl order/OrderItems.ftl

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

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

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