From ec613b1d90f81a11776d46705d15ef24eb4a6623 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Sun, 26 Mar 2017 12:55:47 +0300 Subject: [PATCH] Working on tests --- app/Ninja/Transformers/InvoiceItemTransformer.php | 2 +- tests/acceptance/GatewayFeesCest.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Ninja/Transformers/InvoiceItemTransformer.php b/app/Ninja/Transformers/InvoiceItemTransformer.php index da3f036dbdbb..a23ba7843ee8 100644 --- a/app/Ninja/Transformers/InvoiceItemTransformer.php +++ b/app/Ninja/Transformers/InvoiceItemTransformer.php @@ -20,7 +20,7 @@ class InvoiceItemTransformer extends EntityTransformer 'tax_rate1' => (float) $item->tax_rate1, 'tax_name2' => $item->tax_name2 ? $item->tax_name2 : '', 'tax_rate2' => (float) $item->tax_rate2, - 'invoice_item_type_id' => (int) $this->invoice_item_type_id, + 'invoice_item_type_id' => (int) $item->invoice_item_type_id, ]); } } diff --git a/tests/acceptance/GatewayFeesCest.php b/tests/acceptance/GatewayFeesCest.php index 96edac60bb4d..e875981ea869 100644 --- a/tests/acceptance/GatewayFeesCest.php +++ b/tests/acceptance/GatewayFeesCest.php @@ -82,6 +82,7 @@ class GatewayFeesCest private function configureLineItemTaxRates($I, $taxName, $taxRate) { $taxOption = $taxName . ': ' . number_format($taxRate, 3) . '%'; + $I->createTaxRate($I, $taxName, $taxRate); // set the gateway fee to use line items $I->amOnPage('/settings/online_payments#fees');