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:
parent
bc7e09b924
commit
0051145d2e
@ -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));
|
||||
|
||||
|
@ -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'));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user