Merging Service Taxes project
authorAdrián Romero <adrianromero@openbravo.com>
Wed, 30 Jan 2019 11:21:49 +0100
changeset 8158 a22de3a32243
parent 8125 ae12ce12dd11 (current diff)
parent 8157 745da8e8eddb (diff)
child 8159 f38f70bad416
Merging Service Taxes project
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/sales/taxes/ModifyTaxAndDelete.java	Wed Jan 30 11:21:49 2019 +0100
@@ -0,0 +1,110 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo Public License
+ * Version 1.0 (the "License"), being the Mozilla Public License
+ * Version 1.1 with a permitted attribution clause; you may not use this
+ * file except in compliance with the License. You may obtain a copy of
+ * the License at http://www.openbravo.com/legal/license.html
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo S.L.U.
+ * All portions are Copyright (C) 2018 Openbravo S.L.U.
+ * All Rights Reserved.
+ * Contributor(s):
+ ************************************************************************
+ */
+
+package org.openbravo.test.mobile.retail.pack.selenium.tests.sales.taxes;
+
+import org.junit.Test;
+import org.openbravo.test.mobile.retail.extmodules.selenium.TestIdExtModules;
+import org.openbravo.test.mobile.retail.mobilecore.annotations.TestClassAnnotations;
+import org.openbravo.test.mobile.retail.mobilecore.javascript.BackboneHelper;
+import org.openbravo.test.mobile.retail.pack.selenium.TestIdPack;
+import org.openbravo.test.mobile.retail.pack.selenium.terminals.WebPOSTerminalHelper;
+import org.openbravo.test.mobile.retail.pack.selenium.tests.salestaxesutils.OrderVerify;
+
+@TestClassAnnotations(isHighVolumeCompatible = true)
+public class ModifyTaxAndDelete extends WebPOSTerminalHelper {
+  // This test verifies a service with modification taxes configuration
+  // modifies the taxes of a configured product and if the product is deleted, the taxes
+  // modification is reverted.
+
+  @Test
+  public void testWithInstallationPack() {
+    // create sale
+    verify(TestIdPack.LABEL_TOTALTOPAY, "0.00");
+
+    tap(TestIdPack.BUTTON_SEARCH);
+    write(TestIdPack.FIELD_SEARCH_TEXT, "GPS handheld");
+    tap(TestIdPack.BUTTON_SEARCH_EXECUTE);
+    tap(TestIdPack.BUTTON_SEARCHPRODUCT_FIRSTROW);
+    tap(TestIdPack.BUTTON_SEARCH);
+    write(TestIdPack.FIELD_SEARCH_TEXT, "Expedition tent 4 season 2 person");
+    tap(TestIdPack.BUTTON_SEARCH_EXECUTE);
+    tap(TestIdPack.BUTTON_SEARCHPRODUCT_FIRSTROW);
+    verify(TestIdPack.LABEL_TOTALTOPAY, "612.31");
+
+    tap(TestIdPack.BUTTON_RECEIPT_ROW1);
+    tap(TestIdPack.BUTTON_MULTISELECTION_BTN_MULTISELECTION);
+    tap(TestIdPack.BUTTON_MULTISELECTION_BTN_SELECTALL);
+    tap(TestIdPack.BUTTON_EDIT_Services);
+
+    write(TestIdPack.FIELD_SEARCH_TEXT, "Installation pack");
+    tap(TestIdPack.BUTTON_SEARCH_EXECUTE);
+    tap(TestIdExtModules.BUTTON_SIMPLE_SEARCHRESULTS_PRODUCT);
+    verify(TestIdPack.LABEL_TOTALTOPAY, "595.45");
+
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_TOTAL, "290.90");
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_QTY, "1");
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_AMOUNT, "290.90");
+    verify(TestIdPack.LABEL_RECEIPT_ROW2_TOTAL, "318.64");
+    verify(TestIdPack.LABEL_RECEIPT_ROW2_QTY, "1");
+    verify(TestIdPack.LABEL_RECEIPT_ROW2_AMOUNT, "318.64");
+    verify(TestIdPack.LABEL_RECEIPT_ROW3_TOTAL, "15.00");
+    verify(TestIdPack.LABEL_RECEIPT_ROW3_QTY, "1");
+    verify(TestIdPack.LABEL_RECEIPT_ROW3_AMOUNT, "15.00");
+
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_TITLE, "Entregas IVA 10%");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_TOTALTAX, "28.97");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_NET, "289.67");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW2_TITLE, "Entregas IVA 21%");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW2_TOTALTAX, "45.44");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW2_NET, "216.37");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW3_TITLE, "Servicios prestados nacional 21%");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW3_TOTALTAX, "2.60");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW3_NET, "12.40");
+
+    // Now delete the service
+    tap(TestIdPack.BUTTON_RECEIPT_ROW3);
+    tap(TestIdPack.BUTTON_EDIT_DELETELINE);
+
+    // Verify the tax modification is reverted.
+    verify(TestIdPack.LABEL_TOTALTOPAY, "612.31");
+
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_TOTAL, "290.90");
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_QTY, "1");
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_AMOUNT, "290.90");
+    verify(TestIdPack.LABEL_RECEIPT_ROW2_TOTAL, "350.50");
+    verify(TestIdPack.LABEL_RECEIPT_ROW2_QTY, "1");
+    verify(TestIdPack.LABEL_RECEIPT_ROW2_AMOUNT, "350.50");
+
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_TITLE, "Entregas IVA 21%");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_TOTALTAX, "106.27");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_NET, "506.04");
+
+    final String documentNo = BackboneHelper.getDocumentNo();
+    tap(TestIdPack.BUTTON_PAY);
+    tap(TestIdPack.BUTTON_CARD);
+    tap(TestIdPack.BUTTON_PAY_EXACT);
+    tap(TestIdPack.BUTTON_PAY_DONE);
+    verify(TestIdPack.LABEL_TOTALTOPAY, "0.00");
+
+    OrderVerify.totals(documentNo, 506.04D, 612.31D);
+    OrderVerify.lines(documentNo, 2, 506.04D, 612.31D);
+    OrderVerify.taxes(documentNo, 1, 506.04D, 612.31D);
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/sales/taxes/ModifyTaxDeferred.java	Wed Jan 30 11:21:49 2019 +0100
@@ -0,0 +1,117 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo Public License
+ * Version 1.0 (the "License"), being the Mozilla Public License
+ * Version 1.1 with a permitted attribution clause; you may not use this
+ * file except in compliance with the License. You may obtain a copy of
+ * the License at http://www.openbravo.com/legal/license.html
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo S.L.U.
+ * All portions are Copyright (C) 2018 Openbravo S.L.U.
+ * All Rights Reserved.
+ * Contributor(s):
+ ************************************************************************
+ */
+
+package org.openbravo.test.mobile.retail.pack.selenium.tests.sales.taxes;
+
+import org.junit.Test;
+import org.openbravo.test.mobile.retail.mobilecore.annotations.TestClassAnnotations;
+import org.openbravo.test.mobile.retail.mobilecore.javascript.BackboneHelper;
+import org.openbravo.test.mobile.retail.pack.selenium.TestIdPack;
+import org.openbravo.test.mobile.retail.pack.selenium.terminals.WebPOSTerminalHelper;
+import org.openbravo.test.mobile.retail.pack.selenium.tests.salestaxesutils.OrderVerify;
+
+@TestClassAnnotations(isHighVolumeCompatible = true)
+public class ModifyTaxDeferred extends WebPOSTerminalHelper {
+  // This test verifies a service with modification taxes configuration
+  // modify taxes if products related belongs to the configured product category.
+  // This test has two variants one with service configured as per product and the other configured
+  // unique quantity
+
+  @Test
+  public void testWithInstall() {
+    // create sale
+    verify(TestIdPack.LABEL_TOTALTOPAY, "0.00");
+
+    tap(TestIdPack.BUTTON_SEARCH);
+    write(TestIdPack.FIELD_SEARCH_TEXT, "Expedition tent 4 season 2 person");
+    tap(TestIdPack.BUTTON_SEARCH_EXECUTE);
+    tap(TestIdPack.BUTTON_SEARCHPRODUCT_FIRSTROW);
+    verify(TestIdPack.LABEL_TOTALTOPAY, "350.50");
+
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_TOTAL, "350.50");
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_QTY, "1");
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_AMOUNT, "350.50");
+
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_TITLE, "Entregas IVA 21%");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_TOTALTAX, "60.83");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_NET, "289.67");
+
+    final String documentNo = BackboneHelper.getDocumentNo();
+    tap(TestIdPack.BUTTON_PAY);
+    tap(TestIdPack.BUTTON_CARD);
+    tap(TestIdPack.BUTTON_PAY_EXACT);
+    tap(TestIdPack.BUTTON_PAY_DONE);
+    verify(TestIdPack.LABEL_TOTALTOPAY, "0.00");
+
+    OrderVerify.totals(documentNo, 289.67D, 350.50D);
+    OrderVerify.lines(documentNo, 1, 289.67D, 350.50D);
+    OrderVerify.taxes(documentNo, 1, 289.67D, 350.50D);
+
+    // Open the document
+    tap(TestIdPack.BUTTON_MENU);
+    tap(TestIdPack.BUTTON_MENU_OPENRECEIPT);
+    write(TestIdPack.FIELD_OPEN_RECEIPT_FILTER_TXT, documentNo);
+    tap(TestIdPack.BUTTON_OPEN_RECEIPT_SEARCH);
+    tap(TestIdPack.TABLE_OPEN_RECEIPT, documentNo);
+
+    // Add Service
+    tap(TestIdPack.BUTTON_RECEIPT_ROW1_SHOWRELATEDSERVICES);
+    write(TestIdPack.FIELD_SEARCH_TEXT, "Installation unit");
+    tap(TestIdPack.BUTTON_SEARCH_EXECUTE);
+    tap(TestIdPack.BUTTON_SEARCHPRODUCT_FIRSTROW);
+
+    verify(TestIdPack.LABEL_POPUP_OPENEDRECEIPT_TITLE, "Not Editable Receipt");
+    isDisabled(TestIdPack.BUTTON_POPUP_OPENEDRECEIPT_APPLY, true);
+
+    tap(TestIdPack.BUTTON_POPUP_OPENEDRECEIPT_CREATE_NEW_RECEIPT);
+    isDisabled(TestIdPack.BUTTON_POPUP_OPENEDRECEIPT_APPLY, false);
+    tap(TestIdPack.BUTTON_POPUP_OPENEDRECEIPT_APPLY);
+
+    // Verify pop-up
+    verify(TestIdPack.LABEL_POPUP_DINAMIC_CONFIRMATION_TITLE,
+        "The taxes of the related product will not change because the original receipt cannot be modified.");
+    tap(TestIdPack.BUTTON_POPUP_OK);
+
+    // Verify receipt created
+    verify(TestIdPack.LABEL_TOTALTOPAY, "10.00");
+
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_TOTAL, "10.00");
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_QTY, "1");
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_AMOUNT, "10.00");
+
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_TITLE, "Servicios prestados nacional 21%");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_TOTALTAX, "1.74");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_NET, "8.26");
+
+    final String documentNo2 = BackboneHelper.getDocumentNo();
+    tap(TestIdPack.BUTTON_PAY);
+    tap(TestIdPack.BUTTON_CARD);
+    tap(TestIdPack.BUTTON_PAY_EXACT);
+    tap(TestIdPack.BUTTON_PAY_DONE);
+
+    tap(TestIdPack.BUTTON_DELETERECEIPT); // To close the opened receipt
+
+    verify(TestIdPack.LABEL_TOTALTOPAY, "0.00");
+
+    OrderVerify.totals(documentNo2, 8.26D, 10.00D);
+
+    OrderVerify.lines(documentNo2, 1, 8.26D, 10.00D);
+    OrderVerify.taxes(documentNo2, 1, 8.26D, 10.00D);
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/sales/taxes/ModifyTaxInReturns.java	Wed Jan 30 11:21:49 2019 +0100
@@ -0,0 +1,338 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo Public License
+ * Version 1.0 (the "License"), being the Mozilla Public License
+ * Version 1.1 with a permitted attribution clause; you may not use this
+ * file except in compliance with the License. You may obtain a copy of
+ * the License at http://www.openbravo.com/legal/license.html
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo S.L.U.
+ * All portions are Copyright (C) 2018 Openbravo S.L.U.
+ * All Rights Reserved.
+ * Contributor(s):
+ ************************************************************************
+ */
+
+package org.openbravo.test.mobile.retail.pack.selenium.tests.sales.taxes;
+
+import org.junit.Test;
+import org.openbravo.test.mobile.retail.extmodules.selenium.TestIdExtModules;
+import org.openbravo.test.mobile.retail.mobilecore.annotations.TestClassAnnotations;
+import org.openbravo.test.mobile.retail.mobilecore.javascript.BackboneHelper;
+import org.openbravo.test.mobile.retail.pack.selenium.TestIdPack;
+import org.openbravo.test.mobile.retail.pack.selenium.terminals.WebPOSTerminalHelper;
+import org.openbravo.test.mobile.retail.pack.selenium.tests.salestaxesutils.OrderVerify;
+
+@TestClassAnnotations(isHighVolumeCompatible = true)
+public class ModifyTaxInReturns extends WebPOSTerminalHelper {
+  // This test verifies that returns keep the taxes calculated in the original receipt
+  // This test has two variants, one that checks if the service modifies taxes then the return has
+  // the taxes modified
+  // And two that if the service does not modifies the taxes the return does not have the taxes
+  // modified.
+
+  @Test
+  public void testWithModification() {
+    // create sale
+    verify(TestIdPack.LABEL_TOTALTOPAY, "0.00");
+
+    tap(TestIdPack.BUTTON_SEARCH);
+    write(TestIdPack.FIELD_SEARCH_TEXT, "Expedition tent 4 season 2 person");
+    tap(TestIdPack.BUTTON_SEARCH_EXECUTE);
+    tap(TestIdPack.BUTTON_SEARCHPRODUCT_FIRSTROW);
+    verify(TestIdPack.LABEL_TOTALTOPAY, "350.50");
+
+    tap(TestIdPack.BUTTON_RECEIPT_ROW1_SHOWRELATEDSERVICES);
+    write(TestIdPack.FIELD_SEARCH_TEXT, "Installation unit");
+    tap(TestIdPack.BUTTON_SEARCH_EXECUTE);
+    verify(TestIdPack.LABEL_PRODUCT_ROW1, "Installation unit");
+    tap(TestIdExtModules.BUTTON_SIMPLE_SEARCHRESULTS_PRODUCT);
+    verify(TestIdPack.LABEL_TOTALTOPAY, "328.64");
+
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_TOTAL, "318.64");
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_QTY, "1");
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_AMOUNT, "318.64");
+    verify(TestIdPack.LABEL_RECEIPT_ROW2_TOTAL, "10.00");
+    verify(TestIdPack.LABEL_RECEIPT_ROW2_QTY, "1");
+    verify(TestIdPack.LABEL_RECEIPT_ROW2_AMOUNT, "10.00");
+
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_TITLE, "Entregas IVA 10%");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_TOTALTAX, "28.97");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_NET, "289.67");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW2_TITLE, "Servicios prestados nacional 21%");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW2_TOTALTAX, "1.74");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW2_NET, "8.26");
+
+    final String documentNo = BackboneHelper.getDocumentNo();
+    tap(TestIdPack.BUTTON_PAY);
+    tap(TestIdPack.BUTTON_CARD);
+    tap(TestIdPack.BUTTON_PAY_EXACT);
+    tap(TestIdPack.BUTTON_PAY_DONE);
+    verify(TestIdPack.LABEL_TOTALTOPAY, "0.00");
+
+    OrderVerify.line(documentNo, 10, 289.67D, 318.64D);
+    OrderVerify.line(documentNo, 20, 8.26D, 10.00D);
+    OrderVerify.totals(documentNo, 297.93D, 328.64D);
+    OrderVerify.lines(documentNo, 2, 297.93D, 328.64D);
+    OrderVerify.taxes(documentNo, 2, 297.93D, 328.64D);
+
+    // Now Verify return
+    tap(TestIdPack.BUTTON_MENU);
+    tap(TestIdPack.BUTTON_MENU_VERIFIEDRETURN);
+    write(TestIdPack.FIELD_VERIFIED_RETURNS_FILTER_TXT, documentNo);
+    tap(TestIdPack.BUTTON_VERIFIEDRETURNS_SEARCH);
+    tap(TestIdPack.BUTTON_VERIFIEDRETURNS_ROW1);
+    verify(TestIdPack.LABEL_POPUP_DOCUMENTNO, "Verified Return: " + documentNo);
+    tap(TestIdPack.BUTTON_VERIFIEDRETURNS_LINES_CHECKALL);
+    tap(TestIdPack.BUTTON_POPUP_APPLY);
+
+    verify(TestIdPack.LABEL_TOTALTOPAY, "-328.64");
+
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_TOTAL, "-318.64");
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_QTY, "-1");
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_AMOUNT, "318.64");
+    verify(TestIdPack.LABEL_RECEIPT_ROW2_TOTAL, "-10.00");
+    verify(TestIdPack.LABEL_RECEIPT_ROW2_QTY, "-1");
+    verify(TestIdPack.LABEL_RECEIPT_ROW2_AMOUNT, "10.00");
+
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_TITLE, "Entregas IVA 10%");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_TOTALTAX, "-28.97");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_NET, "-289.67");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW2_TITLE, "Servicios prestados nacional 21%");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW2_TOTALTAX, "-1.74");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW2_NET, "-8.26");
+
+    final String documentReturnNo = BackboneHelper.getDocumentNo();
+    tap(TestIdPack.BUTTON_PAY);
+    tap(TestIdPack.BUTTON_CARD);
+    tap(TestIdPack.BUTTON_PAY_EXACT);
+    tap(TestIdPack.BUTTON_PAY_DONE);
+    verify(TestIdPack.LABEL_TOTALTOPAY, "0.00");
+
+    OrderVerify.totals(documentReturnNo, -297.93D, -328.64D);
+    OrderVerify.lines(documentReturnNo, 2, -297.93D, -328.64D);
+    OrderVerify.taxes(documentReturnNo, 2, -297.93D, -328.64D);
+  }
+
+  @Test
+  public void testWithModificationOnlyProduct() {
+    // create sale
+    verify(TestIdPack.LABEL_TOTALTOPAY, "0.00");
+
+    tap(TestIdPack.BUTTON_SEARCH);
+    write(TestIdPack.FIELD_SEARCH_TEXT, "Expedition tent 4 season 2 person");
+    tap(TestIdPack.BUTTON_SEARCH_EXECUTE);
+    tap(TestIdPack.BUTTON_SEARCHPRODUCT_FIRSTROW);
+    verify(TestIdPack.LABEL_TOTALTOPAY, "350.50");
+
+    tap(TestIdPack.BUTTON_RECEIPT_ROW1_SHOWRELATEDSERVICES);
+    write(TestIdPack.FIELD_SEARCH_TEXT, "Installation unit");
+    tap(TestIdPack.BUTTON_SEARCH_EXECUTE);
+    verify(TestIdPack.LABEL_PRODUCT_ROW1, "Installation unit");
+    tap(TestIdExtModules.BUTTON_SIMPLE_SEARCHRESULTS_PRODUCT);
+    verify(TestIdPack.LABEL_TOTALTOPAY, "328.64");
+
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_TOTAL, "318.64");
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_QTY, "1");
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_AMOUNT, "318.64");
+    verify(TestIdPack.LABEL_RECEIPT_ROW2_TOTAL, "10.00");
+    verify(TestIdPack.LABEL_RECEIPT_ROW2_QTY, "1");
+    verify(TestIdPack.LABEL_RECEIPT_ROW2_AMOUNT, "10.00");
+
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_TITLE, "Entregas IVA 10%");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_TOTALTAX, "28.97");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_NET, "289.67");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW2_TITLE, "Servicios prestados nacional 21%");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW2_TOTALTAX, "1.74");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW2_NET, "8.26");
+
+    final String documentNo = BackboneHelper.getDocumentNo();
+    tap(TestIdPack.BUTTON_PAY);
+    tap(TestIdPack.BUTTON_CARD);
+    tap(TestIdPack.BUTTON_PAY_EXACT);
+    tap(TestIdPack.BUTTON_PAY_DONE);
+    verify(TestIdPack.LABEL_TOTALTOPAY, "0.00");
+
+    OrderVerify.totals(documentNo, 297.93D, 328.64D);
+    OrderVerify.lines(documentNo, 2, 297.93D, 328.64D);
+    OrderVerify.taxes(documentNo, 2, 297.93D, 328.64D);
+
+    // Now Verify return
+    tap(TestIdPack.BUTTON_MENU);
+    tap(TestIdPack.BUTTON_MENU_VERIFIEDRETURN);
+    write(TestIdPack.FIELD_VERIFIED_RETURNS_FILTER_TXT, documentNo);
+    tap(TestIdPack.BUTTON_VERIFIEDRETURNS_SEARCH);
+    tap(TestIdPack.BUTTON_VERIFIEDRETURNS_ROW1);
+    verify(TestIdPack.LABEL_POPUP_DOCUMENTNO, "Verified Return: " + documentNo);
+    tap(TestIdPack.BUTTON_VERIFIEDRETURNS_LINES_CHECKROW1);
+    tap(TestIdPack.BUTTON_POPUP_APPLY);
+
+    verify(TestIdPack.LABEL_TOTALTOPAY, "-318.64");
+
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_TOTAL, "-318.64");
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_QTY, "-1");
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_AMOUNT, "318.64");
+
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_TITLE, "Entregas IVA 10%");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_TOTALTAX, "-28.97");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_NET, "-289.67");
+
+    final String documentReturnNo = BackboneHelper.getDocumentNo();
+    tap(TestIdPack.BUTTON_PAY);
+    tap(TestIdPack.BUTTON_CARD);
+    tap(TestIdPack.BUTTON_PAY_EXACT);
+    tap(TestIdPack.BUTTON_PAY_DONE);
+    verify(TestIdPack.LABEL_TOTALTOPAY, "0.00");
+
+    OrderVerify.totals(documentReturnNo, -289.67D, -318.64D);
+    OrderVerify.lines(documentReturnNo, 1, -289.67D, -318.64D);
+    OrderVerify.taxes(documentReturnNo, 1, -289.67D, -318.64D);
+  }
+
+  @Test
+  public void testWithModificationOneProduct() {
+    // create sale
+    verify(TestIdPack.LABEL_TOTALTOPAY, "0.00");
+
+    tap(TestIdPack.BUTTON_SEARCH);
+    write(TestIdPack.FIELD_SEARCH_TEXT, "Expedition tent 4 season 2 person");
+    tap(TestIdPack.BUTTON_SEARCH_EXECUTE);
+    tap(TestIdPack.BUTTON_SEARCHPRODUCT_FIRSTROW);
+    verify(TestIdPack.LABEL_TOTALTOPAY, "350.50");
+
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_TOTAL, "350.50");
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_QTY, "1");
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_AMOUNT, "350.50");
+
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_TITLE, "Entregas IVA 21%");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_TOTALTAX, "60.83");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_NET, "289.67");
+
+    final String documentNo = BackboneHelper.getDocumentNo();
+    tap(TestIdPack.BUTTON_PAY);
+    tap(TestIdPack.BUTTON_CARD);
+    tap(TestIdPack.BUTTON_PAY_EXACT);
+    tap(TestIdPack.BUTTON_PAY_DONE);
+    verify(TestIdPack.LABEL_TOTALTOPAY, "0.00");
+
+    OrderVerify.totals(documentNo, 289.67D, 350.50D);
+    OrderVerify.lines(documentNo, 1, 289.67D, 350.50D);
+    OrderVerify.taxes(documentNo, 1, 289.67D, 350.50D);
+
+    // Now Verify return
+    tap(TestIdPack.BUTTON_MENU);
+    tap(TestIdPack.BUTTON_MENU_VERIFIEDRETURN);
+    write(TestIdPack.FIELD_VERIFIED_RETURNS_FILTER_TXT, documentNo);
+    tap(TestIdPack.BUTTON_VERIFIEDRETURNS_SEARCH);
+    tap(TestIdPack.BUTTON_VERIFIEDRETURNS_ROW1);
+    verify(TestIdPack.LABEL_POPUP_DOCUMENTNO, "Verified Return: " + documentNo);
+    tap(TestIdPack.BUTTON_VERIFIEDRETURNS_LINES_CHECKROW1);
+    tap(TestIdPack.BUTTON_POPUP_APPLY);
+
+    verify(TestIdPack.LABEL_TOTALTOPAY, "-350.50");
+
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_TOTAL, "-350.50");
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_QTY, "-1");
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_AMOUNT, "350.50");
+
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_TITLE, "Entregas IVA 21%");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_TOTALTAX, "-60.83");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_NET, "-289.67");
+
+    final String documentReturnNo = BackboneHelper.getDocumentNo();
+    tap(TestIdPack.BUTTON_PAY);
+    tap(TestIdPack.BUTTON_CARD);
+    tap(TestIdPack.BUTTON_PAY_EXACT);
+    tap(TestIdPack.BUTTON_PAY_DONE);
+    verify(TestIdPack.LABEL_TOTALTOPAY, "0.00");
+
+    OrderVerify.totals(documentReturnNo, -289.67D, -350.50D);
+    OrderVerify.lines(documentReturnNo, 1, -289.67D, -350.50D);
+    OrderVerify.taxes(documentReturnNo, 1, -289.67D, -350.50D);
+  }
+
+  @Test
+  public void testWithoutModification() {
+    // create sale
+    verify(TestIdPack.LABEL_TOTALTOPAY, "0.00");
+
+    tap(TestIdPack.BUTTON_SEARCH);
+    write(TestIdPack.FIELD_SEARCH_TEXT, "GPS handheld");
+    tap(TestIdPack.BUTTON_SEARCH_EXECUTE);
+    tap(TestIdPack.BUTTON_SEARCHPRODUCT_FIRSTROW);
+    verify(TestIdPack.LABEL_TOTALTOPAY, "261.81");
+
+    tap(TestIdPack.BUTTON_RECEIPT_ROW1_SHOWRELATEDSERVICES);
+    write(TestIdPack.FIELD_SEARCH_TEXT, "Installation unit");
+    tap(TestIdPack.BUTTON_SEARCH_EXECUTE);
+    verify(TestIdPack.LABEL_PRODUCT_ROW1, "Installation unit");
+    tap(TestIdExtModules.BUTTON_SIMPLE_SEARCHRESULTS_PRODUCT);
+    verify(TestIdPack.LABEL_TOTALTOPAY, "271.81");
+
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_TOTAL, "290.90");
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_QTY, "1");
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_AMOUNT, "290.90");
+    verify(TestIdPack.LABEL_RECEIPT_ROW2_TOTAL, "10.00");
+    verify(TestIdPack.LABEL_RECEIPT_ROW2_QTY, "1");
+    verify(TestIdPack.LABEL_RECEIPT_ROW2_AMOUNT, "10.00");
+
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_TITLE, "Entregas IVA 21%");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_TOTALTAX, "45.44");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_NET, "216.37");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW2_TITLE, "Servicios prestados nacional 21%");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW2_TOTALTAX, "1.74");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW2_NET, "8.26");
+
+    final String documentNo = BackboneHelper.getDocumentNo();
+    tap(TestIdPack.BUTTON_PAY);
+    tap(TestIdPack.BUTTON_CARD);
+    tap(TestIdPack.BUTTON_PAY_EXACT);
+    tap(TestIdPack.BUTTON_PAY_DONE);
+    verify(TestIdPack.LABEL_TOTALTOPAY, "0.00");
+
+    OrderVerify.totals(documentNo, 224.63D, 271.81D);
+    OrderVerify.lines(documentNo, 2, 224.63D, 271.81D);
+    OrderVerify.taxes(documentNo, 2, 224.63D, 271.81D);
+
+    // Now Verify return
+    tap(TestIdPack.BUTTON_MENU);
+    tap(TestIdPack.BUTTON_MENU_VERIFIEDRETURN);
+    write(TestIdPack.FIELD_VERIFIED_RETURNS_FILTER_TXT, documentNo);
+    tap(TestIdPack.BUTTON_VERIFIEDRETURNS_SEARCH);
+    tap(TestIdPack.BUTTON_VERIFIEDRETURNS_ROW1);
+    verify(TestIdPack.LABEL_POPUP_DOCUMENTNO, "Verified Return: " + documentNo);
+    tap(TestIdPack.BUTTON_VERIFIEDRETURNS_LINES_CHECKALL);
+    tap(TestIdPack.BUTTON_POPUP_APPLY);
+
+    verify(TestIdPack.LABEL_TOTALTOPAY, "-271.81");
+
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_TOTAL, "-290.90");
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_QTY, "-1");
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_AMOUNT, "290.90");
+    verify(TestIdPack.LABEL_RECEIPT_ROW2_TOTAL, "-10.00");
+    verify(TestIdPack.LABEL_RECEIPT_ROW2_QTY, "-1");
+    verify(TestIdPack.LABEL_RECEIPT_ROW2_AMOUNT, "10.00");
+
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_TITLE, "Entregas IVA 21%");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_TOTALTAX, "-45.44");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_NET, "-216.37");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW2_TITLE, "Servicios prestados nacional 21%");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW2_TOTALTAX, "-1.74");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW2_NET, "-8.26");
+
+    final String returnDocumentNo = BackboneHelper.getDocumentNo();
+    tap(TestIdPack.BUTTON_PAY);
+    tap(TestIdPack.BUTTON_CARD);
+    tap(TestIdPack.BUTTON_PAY_EXACT);
+    tap(TestIdPack.BUTTON_PAY_DONE);
+    verify(TestIdPack.LABEL_TOTALTOPAY, "0.00");
+
+    OrderVerify.totals(returnDocumentNo, -224.63D, -271.81D);
+    OrderVerify.lines(returnDocumentNo, 2, -224.63D, -271.81D);
+    OrderVerify.taxes(returnDocumentNo, 2, -224.63D, -271.81D);
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/sales/taxes/ModifyTaxNo.java	Wed Jan 30 11:21:49 2019 +0100
@@ -0,0 +1,133 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo Public License
+ * Version 1.0 (the "License"), being the Mozilla Public License
+ * Version 1.1 with a permitted attribution clause; you may not use this
+ * file except in compliance with the License. You may obtain a copy of
+ * the License at http://www.openbravo.com/legal/license.html
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo S.L.U.
+ * All portions are Copyright (C) 2018 Openbravo S.L.U.
+ * All Rights Reserved.
+ * Contributor(s):
+ ************************************************************************
+ */
+
+package org.openbravo.test.mobile.retail.pack.selenium.tests.sales.taxes;
+
+import org.junit.Test;
+import org.openbravo.test.mobile.retail.extmodules.selenium.TestIdExtModules;
+import org.openbravo.test.mobile.retail.mobilecore.annotations.TestClassAnnotations;
+import org.openbravo.test.mobile.retail.mobilecore.javascript.BackboneHelper;
+import org.openbravo.test.mobile.retail.pack.selenium.TestIdPack;
+import org.openbravo.test.mobile.retail.pack.selenium.terminals.WebPOSTerminalHelper;
+import org.openbravo.test.mobile.retail.pack.selenium.tests.salestaxesutils.OrderVerify;
+
+@TestClassAnnotations(isHighVolumeCompatible = true)
+public class ModifyTaxNo extends WebPOSTerminalHelper {
+  // This test verifies a service with modification taxes configuration
+  // do not modify taxes if product related do not belong to the configured product category.
+  // This test has two variants one with service configured as per product and the other configured
+  // unique quantity
+
+  @Test
+  public void testWithInstallationUnit() {
+    // create sale
+    verify(TestIdPack.LABEL_TOTALTOPAY, "0.00");
+
+    tap(TestIdPack.BUTTON_SEARCH);
+    write(TestIdPack.FIELD_SEARCH_TEXT, "GPS handheld");
+    tap(TestIdPack.BUTTON_SEARCH_EXECUTE);
+    tap(TestIdPack.BUTTON_SEARCHPRODUCT_FIRSTROW);
+    verify(TestIdPack.LABEL_TOTALTOPAY, "261.81");
+
+    tap(TestIdPack.BUTTON_RECEIPT_ROW1_SHOWRELATEDSERVICES);
+    write(TestIdPack.FIELD_SEARCH_TEXT, "Installation unit");
+    tap(TestIdPack.BUTTON_SEARCH_EXECUTE);
+    tap(TestIdExtModules.BUTTON_SIMPLE_SEARCHRESULTS_PRODUCT);
+    verify(TestIdPack.LABEL_TOTALTOPAY, "271.81");
+
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_TOTAL, "290.90");
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_QTY, "1");
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_AMOUNT, "290.90");
+    verify(TestIdPack.LABEL_RECEIPT_ROW2_TOTAL, "10.00");
+    verify(TestIdPack.LABEL_RECEIPT_ROW2_QTY, "1");
+    verify(TestIdPack.LABEL_RECEIPT_ROW2_AMOUNT, "10.00");
+
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_TITLE, "Entregas IVA 21%");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_TOTALTAX, "45.44");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_NET, "216.37");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW2_TITLE, "Servicios prestados nacional 21%");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW2_TOTALTAX, "1.74");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW2_NET, "8.26");
+
+    final String documentNo = BackboneHelper.getDocumentNo();
+    tap(TestIdPack.BUTTON_PAY);
+    tap(TestIdPack.BUTTON_CARD);
+    tap(TestIdPack.BUTTON_PAY_EXACT);
+    tap(TestIdPack.BUTTON_PAY_DONE);
+    verify(TestIdPack.LABEL_TOTALTOPAY, "0.00");
+
+    OrderVerify.totals(documentNo, 224.63D, 271.81D);
+    OrderVerify.lines(documentNo, 2, 224.63D, 271.81D);
+    OrderVerify.taxes(documentNo, 2, 224.63D, 271.81D);
+  }
+
+  @Test
+  public void testWithInstallationPack() {
+    // create sale
+    verify(TestIdPack.LABEL_TOTALTOPAY, "0.00");
+
+    tap(TestIdPack.BUTTON_SEARCH);
+    write(TestIdPack.FIELD_SEARCH_TEXT, "GPS handheld");
+    tap(TestIdPack.BUTTON_SEARCH_EXECUTE);
+    tap(TestIdPack.BUTTON_SEARCHPRODUCT_FIRSTROW);
+    tap(TestIdPack.BUTTON_SEARCH);
+    write(TestIdPack.FIELD_SEARCH_TEXT, "GPS touch screen");
+    tap(TestIdPack.BUTTON_SEARCH_EXECUTE);
+    tap(TestIdPack.BUTTON_SEARCHPRODUCT_FIRSTROW);
+    verify(TestIdPack.LABEL_TOTALTOPAY, "423.72");
+
+    tap(TestIdPack.BUTTON_RECEIPT_ROW1);
+    tap(TestIdPack.BUTTON_MULTISELECTION_BTN_MULTISELECTION);
+    tap(TestIdPack.BUTTON_MULTISELECTION_BTN_SELECTALL);
+    tap(TestIdPack.BUTTON_EDIT_Services);
+
+    write(TestIdPack.FIELD_SEARCH_TEXT, "Installation pack");
+    tap(TestIdPack.BUTTON_SEARCH_EXECUTE);
+    tap(TestIdExtModules.BUTTON_SIMPLE_SEARCHRESULTS_PRODUCT);
+    verify(TestIdPack.LABEL_TOTALTOPAY, "438.72");
+
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_TOTAL, "290.90");
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_QTY, "1");
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_AMOUNT, "290.90");
+    verify(TestIdPack.LABEL_RECEIPT_ROW2_TOTAL, "179.90");
+    verify(TestIdPack.LABEL_RECEIPT_ROW2_QTY, "1");
+    verify(TestIdPack.LABEL_RECEIPT_ROW2_AMOUNT, "179.90");
+    verify(TestIdPack.LABEL_RECEIPT_ROW3_TOTAL, "15.00");
+    verify(TestIdPack.LABEL_RECEIPT_ROW3_QTY, "1");
+    verify(TestIdPack.LABEL_RECEIPT_ROW3_AMOUNT, "15.00");
+
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_TITLE, "Entregas IVA 21%");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_TOTALTAX, "73.54");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_NET, "350.18");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW2_TITLE, "Servicios prestados nacional 21%");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW2_TOTALTAX, "2.60");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW2_NET, "12.40");
+
+    final String documentNo = BackboneHelper.getDocumentNo();
+    tap(TestIdPack.BUTTON_PAY);
+    tap(TestIdPack.BUTTON_CARD);
+    tap(TestIdPack.BUTTON_PAY_EXACT);
+    tap(TestIdPack.BUTTON_PAY_DONE);
+    verify(TestIdPack.LABEL_TOTALTOPAY, "0.00");
+
+    OrderVerify.totals(documentNo, 362.58D, 438.72D);
+    OrderVerify.lines(documentNo, 3, 362.58D, 438.72D);
+    OrderVerify.taxes(documentNo, 2, 362.58D, 438.72D);
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/sales/taxes/ModifyTaxOnlyForConfigured.java	Wed Jan 30 11:21:49 2019 +0100
@@ -0,0 +1,92 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo Public License
+ * Version 1.0 (the "License"), being the Mozilla Public License
+ * Version 1.1 with a permitted attribution clause; you may not use this
+ * file except in compliance with the License. You may obtain a copy of
+ * the License at http://www.openbravo.com/legal/license.html
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo S.L.U.
+ * All portions are Copyright (C) 2018 Openbravo S.L.U.
+ * All Rights Reserved.
+ * Contributor(s):
+ ************************************************************************
+ */
+
+package org.openbravo.test.mobile.retail.pack.selenium.tests.sales.taxes;
+
+import org.junit.Test;
+import org.openbravo.test.mobile.retail.extmodules.selenium.TestIdExtModules;
+import org.openbravo.test.mobile.retail.mobilecore.annotations.TestClassAnnotations;
+import org.openbravo.test.mobile.retail.mobilecore.javascript.BackboneHelper;
+import org.openbravo.test.mobile.retail.pack.selenium.TestIdPack;
+import org.openbravo.test.mobile.retail.pack.selenium.terminals.WebPOSTerminalHelper;
+import org.openbravo.test.mobile.retail.pack.selenium.tests.salestaxesutils.OrderVerify;
+
+@TestClassAnnotations(isHighVolumeCompatible = true)
+public class ModifyTaxOnlyForConfigured extends WebPOSTerminalHelper {
+  // This test verifies a service with modification taxes configuration
+  // and related to two products, it only modify the taxes of the product that belong to the
+  // configured product category.
+
+  @Test
+  public void testWithInstallationPack() {
+    // create sale
+    verify(TestIdPack.LABEL_TOTALTOPAY, "0.00");
+
+    tap(TestIdPack.BUTTON_SEARCH);
+    write(TestIdPack.FIELD_SEARCH_TEXT, "GPS handheld");
+    tap(TestIdPack.BUTTON_SEARCH_EXECUTE);
+    tap(TestIdPack.BUTTON_SEARCHPRODUCT_FIRSTROW);
+    tap(TestIdPack.BUTTON_SEARCH);
+    write(TestIdPack.FIELD_SEARCH_TEXT, "Expedition tent 4 season 2 person");
+    tap(TestIdPack.BUTTON_SEARCH_EXECUTE);
+    tap(TestIdPack.BUTTON_SEARCHPRODUCT_FIRSTROW);
+    verify(TestIdPack.LABEL_TOTALTOPAY, "612.31");
+
+    tap(TestIdPack.BUTTON_RECEIPT_ROW1);
+    tap(TestIdPack.BUTTON_MULTISELECTION_BTN_MULTISELECTION);
+    tap(TestIdPack.BUTTON_MULTISELECTION_BTN_SELECTALL);
+    tap(TestIdPack.BUTTON_EDIT_Services);
+
+    write(TestIdPack.FIELD_SEARCH_TEXT, "Installation pack");
+    tap(TestIdPack.BUTTON_SEARCH_EXECUTE);
+    tap(TestIdExtModules.BUTTON_SIMPLE_SEARCHRESULTS_PRODUCT);
+    verify(TestIdPack.LABEL_TOTALTOPAY, "595.45");
+
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_TOTAL, "290.90");
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_QTY, "1");
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_AMOUNT, "290.90");
+    verify(TestIdPack.LABEL_RECEIPT_ROW2_TOTAL, "318.64");
+    verify(TestIdPack.LABEL_RECEIPT_ROW2_QTY, "1");
+    verify(TestIdPack.LABEL_RECEIPT_ROW2_AMOUNT, "318.64");
+    verify(TestIdPack.LABEL_RECEIPT_ROW3_TOTAL, "15.00");
+    verify(TestIdPack.LABEL_RECEIPT_ROW3_QTY, "1");
+    verify(TestIdPack.LABEL_RECEIPT_ROW3_AMOUNT, "15.00");
+
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_TITLE, "Entregas IVA 10%");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_TOTALTAX, "28.97");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_NET, "289.67");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW2_TITLE, "Entregas IVA 21%");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW2_TOTALTAX, "45.44");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW2_NET, "216.37");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW3_TITLE, "Servicios prestados nacional 21%");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW3_TOTALTAX, "2.60");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW3_NET, "12.40");
+
+    final String documentNo = BackboneHelper.getDocumentNo();
+    tap(TestIdPack.BUTTON_PAY);
+    tap(TestIdPack.BUTTON_CARD);
+    tap(TestIdPack.BUTTON_PAY_EXACT);
+    tap(TestIdPack.BUTTON_PAY_DONE);
+    verify(TestIdPack.LABEL_TOTALTOPAY, "0.00");
+
+    OrderVerify.totals(documentNo, 518.44D, 595.45D);
+    OrderVerify.lines(documentNo, 3, 518.44D, 595.45D);
+    OrderVerify.taxes(documentNo, 3, 518.44D, 595.45D);
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/sales/taxes/ModifyTaxSimple.java	Wed Jan 30 11:21:49 2019 +0100
@@ -0,0 +1,126 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo Public License
+ * Version 1.0 (the "License"), being the Mozilla Public License
+ * Version 1.1 with a permitted attribution clause; you may not use this
+ * file except in compliance with the License. You may obtain a copy of
+ * the License at http://www.openbravo.com/legal/license.html
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo S.L.U.
+ * All portions are Copyright (C) 2018 Openbravo S.L.U.
+ * All Rights Reserved.
+ * Contributor(s):
+ ************************************************************************
+ */
+
+package org.openbravo.test.mobile.retail.pack.selenium.tests.sales.taxes;
+
+import org.junit.Test;
+import org.openbravo.test.mobile.retail.extmodules.selenium.TestIdExtModules;
+import org.openbravo.test.mobile.retail.mobilecore.annotations.TestClassAnnotations;
+import org.openbravo.test.mobile.retail.mobilecore.javascript.BackboneHelper;
+import org.openbravo.test.mobile.retail.pack.selenium.TestIdPack;
+import org.openbravo.test.mobile.retail.pack.selenium.terminals.WebPOSTerminalHelper;
+import org.openbravo.test.mobile.retail.pack.selenium.tests.salestaxesutils.OrderVerify;
+
+@TestClassAnnotations(isHighVolumeCompatible = true)
+public class ModifyTaxSimple extends WebPOSTerminalHelper {
+  // This test verifies a service with modification taxes configuration
+  // modify taxes if products related belongs to the configured product category.
+  // This test has two variants one with service configured as per product and the other configured
+  // unique quantity
+
+  @Test
+  public void testWithInstall() {
+    // create sale
+    verify(TestIdPack.LABEL_TOTALTOPAY, "0.00");
+
+    tap(TestIdPack.BUTTON_SEARCH);
+    write(TestIdPack.FIELD_SEARCH_TEXT, "Expedition tent 4 season 2 person");
+    tap(TestIdPack.BUTTON_SEARCH_EXECUTE);
+    tap(TestIdPack.BUTTON_SEARCHPRODUCT_FIRSTROW);
+    verify(TestIdPack.LABEL_TOTALTOPAY, "350.50");
+
+    tap(TestIdPack.BUTTON_RECEIPT_ROW1_SHOWRELATEDSERVICES);
+    write(TestIdPack.FIELD_SEARCH_TEXT, "Installation unit");
+    tap(TestIdPack.BUTTON_SEARCH_EXECUTE);
+    tap(TestIdExtModules.BUTTON_SIMPLE_SEARCHRESULTS_PRODUCT);
+    verify(TestIdPack.LABEL_TOTALTOPAY, "328.64");
+
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_TOTAL, "318.64");
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_QTY, "1");
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_AMOUNT, "318.64");
+    verify(TestIdPack.LABEL_RECEIPT_ROW2_TOTAL, "10.00");
+    verify(TestIdPack.LABEL_RECEIPT_ROW2_QTY, "1");
+    verify(TestIdPack.LABEL_RECEIPT_ROW2_AMOUNT, "10.00");
+
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_TITLE, "Entregas IVA 10%");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_TOTALTAX, "28.97");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_NET, "289.67");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW2_TITLE, "Servicios prestados nacional 21%");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW2_TOTALTAX, "1.74");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW2_NET, "8.26");
+
+    final String documentNo = BackboneHelper.getDocumentNo();
+    tap(TestIdPack.BUTTON_PAY);
+    tap(TestIdPack.BUTTON_CARD);
+    tap(TestIdPack.BUTTON_PAY_EXACT);
+    tap(TestIdPack.BUTTON_PAY_DONE);
+    verify(TestIdPack.LABEL_TOTALTOPAY, "0.00");
+
+    OrderVerify.totals(documentNo, 297.93D, 328.64D);
+    OrderVerify.lines(documentNo, 2, 297.93D, 328.64D);
+    OrderVerify.taxes(documentNo, 2, 297.93D, 328.64D);
+  }
+
+  @Test
+  public void testWithInstallPack() {
+    // create sale
+    verify(TestIdPack.LABEL_TOTALTOPAY, "0.00");
+
+    tap(TestIdPack.BUTTON_SEARCH);
+    write(TestIdPack.FIELD_SEARCH_TEXT, "Expedition tent 4 season 2 person");
+    tap(TestIdPack.BUTTON_SEARCH_EXECUTE);
+    tap(TestIdPack.BUTTON_SEARCHPRODUCT_FIRSTROW);
+    tap(TestIdPack.BUTTON_RECEIPT_ROW1);
+    tap(TestIdPack.BUTTON_KEYPAD_QUANTITY);
+    tap(TestIdPack.BUTTON_KEYPAD_2);
+    tap(TestIdPack.BUTTON_KEYPAD_ENTER);
+    verify(TestIdPack.LABEL_TOTALTOPAY, "701.00");
+
+    tap(TestIdPack.BUTTON_RECEIPT_ROW1_SHOWRELATEDSERVICES);
+    write(TestIdPack.FIELD_SEARCH_TEXT, "Installation pack");
+    tap(TestIdPack.BUTTON_SEARCH_EXECUTE);
+    tap(TestIdExtModules.BUTTON_SIMPLE_SEARCHRESULTS_PRODUCT);
+    verify(TestIdPack.LABEL_TOTALTOPAY, "652.28");
+
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_TOTAL, "637.28");
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_QTY, "2");
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_AMOUNT, "318.64");
+    verify(TestIdPack.LABEL_RECEIPT_ROW2_TOTAL, "15.00");
+    verify(TestIdPack.LABEL_RECEIPT_ROW2_QTY, "1");
+    verify(TestIdPack.LABEL_RECEIPT_ROW2_AMOUNT, "15.00");
+
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_TITLE, "Entregas IVA 10%");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_TOTALTAX, "57.93");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_NET, "579.35");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW2_TITLE, "Servicios prestados nacional 21%");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW2_TOTALTAX, "2.60");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW2_NET, "12.40");
+
+    final String documentNo = BackboneHelper.getDocumentNo();
+    tap(TestIdPack.BUTTON_PAY);
+    tap(TestIdPack.BUTTON_CARD);
+    tap(TestIdPack.BUTTON_PAY_EXACT);
+    tap(TestIdPack.BUTTON_PAY_DONE);
+    verify(TestIdPack.LABEL_TOTALTOPAY, "0.00");
+
+    OrderVerify.totals(documentNo, 591.75D, 652.28D);
+    OrderVerify.lines(documentNo, 2, 591.75D, 652.28D);
+    OrderVerify.taxes(documentNo, 2, 591.75D, 652.28D);
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/sales/taxes/ModifyTaxWithoutIncludingTaxes.java	Wed Jan 30 11:21:49 2019 +0100
@@ -0,0 +1,127 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo Public License
+ * Version 1.0 (the "License"), being the Mozilla Public License
+ * Version 1.1 with a permitted attribution clause; you may not use this
+ * file except in compliance with the License. You may obtain a copy of
+ * the License at http://www.openbravo.com/legal/license.html
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo S.L.U.
+ * All portions are Copyright (C) 2018 Openbravo S.L.U.
+ * All Rights Reserved.
+ * Contributor(s):
+ ************************************************************************
+ */
+
+package org.openbravo.test.mobile.retail.pack.selenium.tests.sales.taxes;
+
+import org.junit.Test;
+import org.openbravo.test.mobile.retail.extmodules.selenium.TestIdExtModules;
+import org.openbravo.test.mobile.retail.mobilecore.annotations.TestClassAnnotations;
+import org.openbravo.test.mobile.retail.mobilecore.javascript.BackboneHelper;
+import org.openbravo.test.mobile.retail.pack.selenium.TestIdPack;
+import org.openbravo.test.mobile.retail.pack.selenium.terminals.WebPOSTerminalHelper;
+import org.openbravo.test.mobile.retail.pack.selenium.tests.salestaxesutils.OrderVerify;
+
+@TestClassAnnotations(isHighVolumeCompatible = true)
+public class ModifyTaxWithoutIncludingTaxes extends WebPOSTerminalHelper {
+
+  public ModifyTaxWithoutIncludingTaxes() {
+    super("PS-1", "demouser", "openbravo");
+  }
+
+  @Test
+  public void testWithInstall() {
+    // create sale
+    verify(TestIdPack.LABEL_TOTALTOPAY, "0.00");
+
+    tap(TestIdPack.BUTTON_SEARCH);
+    write(TestIdPack.FIELD_SEARCH_TEXT, "Expedition tent 4 season 2 person");
+    tap(TestIdPack.BUTTON_SEARCH_EXECUTE);
+    tap(TestIdPack.BUTTON_SEARCHPRODUCT_FIRSTROW);
+    verify(TestIdPack.LABEL_TOTALTOPAY, "424.11");
+
+    tap(TestIdPack.BUTTON_RECEIPT_ROW1_SHOWRELATEDSERVICES);
+    write(TestIdPack.FIELD_SEARCH_TEXT, "Installation unit");
+    tap(TestIdPack.BUTTON_SEARCH_EXECUTE);
+    tap(TestIdExtModules.BUTTON_SIMPLE_SEARCHRESULTS_PRODUCT);
+    verify(TestIdPack.LABEL_TOTALTOPAY, "397.65");
+
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_TOTAL, "350.50");
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_QTY, "1");
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_AMOUNT, "350.50");
+    verify(TestIdPack.LABEL_RECEIPT_ROW2_TOTAL, "10.00");
+    verify(TestIdPack.LABEL_RECEIPT_ROW2_QTY, "1");
+    verify(TestIdPack.LABEL_RECEIPT_ROW2_AMOUNT, "10.00");
+
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_TITLE, "Entregas IVA 10%");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_TOTALTAX, "35.05");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_NET, "350.50");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW2_TITLE, "Servicios prestados nacional 21%");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW2_TOTALTAX, "2.10");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW2_NET, "10.00");
+
+    final String documentNo = BackboneHelper.getDocumentNo();
+    tap(TestIdPack.BUTTON_PAY);
+    tap(TestIdPack.BUTTON_CARD);
+    tap(TestIdPack.BUTTON_PAY_EXACT);
+    tap(TestIdPack.BUTTON_PAY_DONE);
+    verify(TestIdPack.LABEL_TOTALTOPAY, "0.00");
+
+    OrderVerify.totals(documentNo, 360.50D, 397.65D);
+    OrderVerify.lines(documentNo, 2, 360.50D, 0.00D); // Gross is not stored in lines when price
+                                                      // does not includes taxes
+    OrderVerify.taxes(documentNo, 2, 360.50D, 397.65D);
+  }
+
+  @Test
+  public void testWithInstallPack() {
+    // create sale
+    verify(TestIdPack.LABEL_TOTALTOPAY, "0.00");
+
+    tap(TestIdPack.BUTTON_SEARCH);
+    write(TestIdPack.FIELD_SEARCH_TEXT, "Expedition tent 4 season 2 person");
+    tap(TestIdPack.BUTTON_SEARCH_EXECUTE);
+    tap(TestIdPack.BUTTON_SEARCHPRODUCT_FIRSTROW);
+    tap(TestIdPack.BUTTON_RECEIPT_ROW1);
+    tap(TestIdPack.BUTTON_KEYPAD_QUANTITY);
+    tap(TestIdPack.BUTTON_KEYPAD_2);
+    tap(TestIdPack.BUTTON_KEYPAD_ENTER);
+    verify(TestIdPack.LABEL_TOTALTOPAY, "848.21");
+
+    tap(TestIdPack.BUTTON_RECEIPT_ROW1_SHOWRELATEDSERVICES);
+    write(TestIdPack.FIELD_SEARCH_TEXT, "Installation pack");
+    tap(TestIdPack.BUTTON_SEARCH_EXECUTE);
+    tap(TestIdExtModules.BUTTON_SIMPLE_SEARCHRESULTS_PRODUCT);
+    verify(TestIdPack.LABEL_TOTALTOPAY, "789.25");
+
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_TOTAL, "701.00");
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_QTY, "2");
+    verify(TestIdPack.LABEL_RECEIPT_ROW1_AMOUNT, "350.50");
+    verify(TestIdPack.LABEL_RECEIPT_ROW2_TOTAL, "15.00");
+    verify(TestIdPack.LABEL_RECEIPT_ROW2_QTY, "1");
+    verify(TestIdPack.LABEL_RECEIPT_ROW2_AMOUNT, "15.00");
+
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_TITLE, "Entregas IVA 10%");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_TOTALTAX, "70.10");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW1_NET, "701.00");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW2_TITLE, "Servicios prestados nacional 21%");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW2_TOTALTAX, "3.15");
+    verify(TestIdPack.LABEL_RECEIPT_TAX_ROW2_NET, "15.00");
+
+    final String documentNo = BackboneHelper.getDocumentNo();
+    tap(TestIdPack.BUTTON_PAY);
+    tap(TestIdPack.BUTTON_CARD);
+    tap(TestIdPack.BUTTON_PAY_EXACT);
+    tap(TestIdPack.BUTTON_PAY_DONE);
+    verify(TestIdPack.LABEL_TOTALTOPAY, "0.00");
+
+    OrderVerify.totals(documentNo, 716.00D, 789.25D);
+    OrderVerify.lines(documentNo, 2, 716.00D, 0.00D);
+    OrderVerify.taxes(documentNo, 2, 716.00D, 789.25D);
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/salestaxesutils/OrderVerify.java	Wed Jan 30 11:21:49 2019 +0100
@@ -0,0 +1,105 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo Public License
+ * Version 1.0 (the "License"), being the Mozilla Public License
+ * Version 1.1 with a permitted attribution clause; you may not use this
+ * file except in compliance with the License. You may obtain a copy of
+ * the License at http://www.openbravo.com/legal/license.html
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo S.L.U.
+ * All portions are Copyright (C) 2018 Openbravo S.L.U.
+ * All Rights Reserved.
+ * Contributor(s):
+ ************************************************************************
+ */
+
+package org.openbravo.test.mobile.retail.pack.selenium.tests.salestaxesutils;
+
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+import java.sql.ResultSet;
+import java.sql.SQLException;
+
+import org.openbravo.test.mobile.core.utils.TestLogger;
+import org.openbravo.test.mobile.retail.mobilecore.database.DatabaseHelperSelect;
+
+public class OrderVerify {
+
+  public final static void totals(final String docno, final double totallines,
+      final double grandtotal) {
+    final String sql = String.format(
+        "select totallines, grandtotal from c_order where c_order.documentno = '%s'", docno);
+    TestLogger.getLogger().info("query: " + sql);
+    new DatabaseHelperSelect() {
+      @Override
+      protected void yieldResultSet(final ResultSet rs) throws SQLException {
+        assertThat("Total lines is not the expected for " + docno, rs.getDouble("totallines"),
+            equalTo(totallines));
+        assertThat("Grand total is not the expected for " + docno, rs.getDouble("grandtotal"),
+            equalTo(grandtotal));
+      }
+    }.execute(sql, 1);
+  }
+
+  public final static void taxes(final String docno, final int lines, final double taxbaseamt,
+      final double taxbaseamttaxamt) {
+    final String sql = String
+        .format(
+            "select count (c_ordertax.c_ordertax_id) as lines, sum(taxbaseamt) as taxbaseamt, sum(taxbaseamt + taxamt) as taxbaseamttaxamt from c_ordertax, c_order where c_order.c_order_id = c_ordertax.c_order_id and c_order.documentno = '%s'",
+            docno);
+    TestLogger.getLogger().info("query: " + sql);
+    new DatabaseHelperSelect() {
+      @Override
+      protected void yieldResultSet(final ResultSet rs) throws SQLException {
+        assertThat("Tax lines are not the expected for " + docno, rs.getInt("lines"),
+            equalTo(lines));
+        assertThat("Tax base amount is not the expected for " + docno, rs.getDouble("taxbaseamt"),
+            equalTo(taxbaseamt));
+        assertThat("Tax base amount plus tax amount is not the expected for " + docno,
+            rs.getDouble("taxbaseamttaxamt"), equalTo(taxbaseamttaxamt));
+      }
+    }.execute(sql, 1);
+  }
+
+  public final static void lines(final String docno, final int lines, final double linenetamt,
+      final double linegrossamt) {
+    final String sql = String
+        .format(
+            "select count(c_orderline.c_orderline_id) as lines, sum(c_orderline.linenetamt) as linenetamt, sum(c_orderline.line_gross_amount) as linegrossamt from c_orderline, c_order where c_order.c_order_id = c_orderline.c_order_id and c_order.documentno = '%s'",
+            docno);
+    TestLogger.getLogger().info("query: " + sql);
+    new DatabaseHelperSelect() {
+      @Override
+      protected void yieldResultSet(final ResultSet rs) throws SQLException {
+        assertThat("Lines are not the expected for " + docno, rs.getInt("lines"), equalTo(lines));
+        assertThat("Line net amount amount is not the expected for " + docno,
+            rs.getDouble("linenetamt"), equalTo(linenetamt));
+        assertThat("Line gross amount is not the expected for " + docno,
+            rs.getDouble("linegrossamt"), equalTo(linegrossamt));
+      }
+    }.execute(sql, 1);
+  }
+
+  public final static void line(final String docno, final int line, final double linenetamt,
+      final double linegrossamt) {
+    final String sql = String
+        .format(
+            "select c_orderline.linenetamt as linenetamt, c_orderline.line_gross_amount as linegrossamt from c_orderline, c_order where c_order.c_order_id = c_orderline.c_order_id and c_order.documentno = '%s' and c_orderline.line = '%s'",
+            docno, line);
+    TestLogger.getLogger().info("query: " + sql);
+    new DatabaseHelperSelect() {
+      @Override
+      protected void yieldResultSet(final ResultSet rs) throws SQLException {
+        assertThat("Line net amount amount is not the expected for " + docno + " and line " + line,
+            rs.getDouble("linenetamt"), equalTo(linenetamt));
+        assertThat("Line gross amount is not the expected for " + docno + " and line " + line,
+            rs.getDouble("linegrossamt"), equalTo(linegrossamt));
+      }
+    }.execute(sql, 1);
+  }
+}