1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

Working on invoice item tax calculations

This commit is contained in:
David Bomba 2019-09-04 15:15:42 +10:00
parent bc7e09b924
commit 0051145d2e
2 changed files with 3 additions and 16 deletions

View File

@ -123,7 +123,7 @@ class InvoiceItemCalc
$key = str_replace(" ", "", $tax_name.$tax_rate);
$group_tax = [$key => ['total' => $tax_total, 'tax_name' => $tax_name . ' ' . $tax_rate.'%']];
$group_tax = ['key' => $key, 'total' => $tax_total, 'tax_name' => $tax_name . ' ' . $tax_rate.'%'];
$this->tax_collection->push(collect($group_tax));

View File

@ -74,22 +74,9 @@ class MakesInvoiceValuesTest extends TestCase
}
$this->assertEquals("GST10.00", print_r($tax_array));
// $this->assertEquals("GST10.00", $keys->keys());
//$this->assertEquals("GST10.00", print_r($tax_array));
$this->assertEquals(100, $tax_array[0]['total']);
foreach($keys as $key)
{
$this->assertEquals("GST10.00", $key);
$tax_group = $taxes->groupBy($key);
$this->assertEquals('hi', $tax_group);
$tax_group->sum('total');
$this->assertEquals(100, $tax_group->sum('total'));
}