industry taxes testing
This commit is contained in:
@@ -35,8 +35,7 @@ class StructureController extends Controller
|
|||||||
$corpId = 98287666;
|
$corpId = 98287666;
|
||||||
$months = 3;
|
$months = 3;
|
||||||
$name = array();
|
$name = array();
|
||||||
$totalTaxes = array();
|
$taxes = array();
|
||||||
$tempTaxes = array();
|
|
||||||
|
|
||||||
//Declare the structure tax helper class
|
//Declare the structure tax helper class
|
||||||
$sHelper = new StructureTaxHelper();
|
$sHelper = new StructureTaxHelper();
|
||||||
@@ -46,15 +45,14 @@ class StructureController extends Controller
|
|||||||
|
|
||||||
//Get a list of structures - context_id is not structure id, it's job id.
|
//Get a list of structures - context_id is not structure id, it's job id.
|
||||||
dd($dates);
|
dd($dates);
|
||||||
$taxes = StructureIndustryTaxJournal::select('amount')
|
foreach($dates as $date) {
|
||||||
->whereBetween('date', [$dates[0]['start'], $dates[0]['end']])
|
$tax = StructureIndustryTaxJournal::select('amount')
|
||||||
|
->whereBetween('date', [$date['start'], $date['end']])
|
||||||
->sum('amount');
|
->sum('amount');
|
||||||
|
$taxes = array_push($taxes, ['date' => $date['start'], 'tax' => $tax]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return view('structures.taxhistory')->with('taxes', $taxes);
|
||||||
|
|
||||||
|
|
||||||
//return view('structures.taxhistory')->with('totalTaxes', $totalTaxes)->with('months', $months);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function chooseCorpTaxes() {
|
public function chooseCorpTaxes() {
|
||||||
|
|||||||
@@ -14,14 +14,12 @@
|
|||||||
<th>Industry Taxes</th>
|
<th>Industry Taxes</th>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php var_dump($totalTaxes); ?>
|
@foreach($taxes as $tax)
|
||||||
@for($i = 0; $i < $months; $i++)
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ $totalTaxes[$i]['MonthStart'] }}</td>
|
<td>{{ $tax['date'] }}</td>
|
||||||
<td>{{ $totalTaxes[$i]['Structure'] }}</td>
|
<td>{{ $tax['tax'] }}</td>
|
||||||
<td>{{ $totalTaxes[$i]['IndustryTaxes'] }}</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
@endfor
|
@endforeach
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user