|
@@ -69,7 +69,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- <table class="table tablesaw tableHead tablesaw-stack collaptableIN" >
|
|
|
|
|
|
|
+ <table class="table tablesaw tableHead tablesaw-stack collaptableIN" id="collaptableIN" >
|
|
|
<thead>
|
|
<thead>
|
|
|
<tr>
|
|
<tr>
|
|
|
<th scope="col" style="width:20%;text-align:left"></th>
|
|
<th scope="col" style="width:20%;text-align:left"></th>
|
|
@@ -81,39 +81,31 @@
|
|
|
@endfor
|
|
@endfor
|
|
|
</tr>
|
|
</tr>
|
|
|
</thead>
|
|
</thead>
|
|
|
- <tbody id="checkall-target">
|
|
|
|
|
- @php
|
|
|
|
|
- $aScritto = array();
|
|
|
|
|
- @endphp
|
|
|
|
|
|
|
+ <tbody >
|
|
|
@foreach($rows_in as $in)
|
|
@foreach($rows_in as $in)
|
|
|
- @if($filterCausalsIn == null || (sizeof($filterCausalsIn) == 0 || in_array($in["id"], $filterCausalsIn) || in_array($in["parent_id"], $filterCausalsIn) || in_array($in["first_parent_id"], $filterCausalsIn)))
|
|
|
|
|
- @if($in["first_parent_name"] != "" && $filterCausalsIn != null && !in_array($in["first_parent_id"], $filterCausalsIn) && !in_array($in["first_parent_id"] . "_" . $in["parent_id"], $aScritto))
|
|
|
|
|
- @php
|
|
|
|
|
- $aScritto[] = $in["first_parent_id"] . "_" . $in["parent_id"];
|
|
|
|
|
- @endphp
|
|
|
|
|
- <tr>
|
|
|
|
|
- <td>
|
|
|
|
|
- <b>{{$in["first_parent_name"]}} - {{$in["parent_name"]}}</b>
|
|
|
|
|
- </td>
|
|
|
|
|
- @foreach($columns as $column)
|
|
|
|
|
- <td class="cellBorder" style="text-align:right">
|
|
|
|
|
- @if(isset($records_in[$column][$in["parent_id"]]))
|
|
|
|
|
- <span class="tablesaw-cell-content {{$in["level"] == 0 ? 'primary' : ''}}" {{$in["level"] == 0 ? 'style="font-weight:bold;' : ''}}>
|
|
|
|
|
- {{formatPrice($records_in[$column][$in["parent_id"]])}}
|
|
|
|
|
- </span>
|
|
|
|
|
- @else
|
|
|
|
|
-
|
|
|
|
|
- @endif
|
|
|
|
|
- </td>
|
|
|
|
|
- @endforeach
|
|
|
|
|
- </tr>
|
|
|
|
|
|
|
+
|
|
|
|
|
+ @php
|
|
|
|
|
+ $show = false;
|
|
|
|
|
+ if ($filterCausalsIn != null)
|
|
|
|
|
+ {
|
|
|
|
|
+ foreach($filterCausalsIn as $cIn)
|
|
|
|
|
+ {
|
|
|
|
|
+ if (in_array($cIn, $in["all_childs"]))
|
|
|
|
|
+ $show = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ $show = true;
|
|
|
|
|
+ @endphp
|
|
|
|
|
+ @if($show)
|
|
|
|
|
+ @if($in["parent_id"] != null)
|
|
|
|
|
+ <tr data-node="treetable-{{$in["id"]}}" data-pnode="treetable-parent-{{$in["parent_id"]}}">
|
|
|
|
|
+ @else
|
|
|
|
|
+ <tr data-node="treetable-{{$in["id"]}}" >
|
|
|
@endif
|
|
@endif
|
|
|
- <tr data-id="{{$in["id"]}}" data-parent="{{$filterCausalsIn == null || in_array($in["parent_id"], $filterCausalsIn) ? $in["parent_id"] : ''}}">
|
|
|
|
|
- <td>
|
|
|
|
|
- <span class="spaces">{!!str_repeat(" ", $in["level"])!!}</span>
|
|
|
|
|
- @if($filterCausalsIn != null && !in_array($in["first_parent_id"], $filterCausalsIn))
|
|
|
|
|
- <span style="padding-left:20px">{!!str_repeat(" ", 5)!!}</span>
|
|
|
|
|
- @endif
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <td style="padding-left:{{$in["level"] * 20}}px;">
|
|
|
|
|
+
|
|
|
{{$in["name"]}}
|
|
{{$in["name"]}}
|
|
|
</td>
|
|
</td>
|
|
|
@foreach($columns as $column)
|
|
@foreach($columns as $column)
|
|
@@ -128,10 +120,12 @@
|
|
|
</td>
|
|
</td>
|
|
|
@endforeach
|
|
@endforeach
|
|
|
@for($j=sizeof($columns);$j<6;$j++)
|
|
@for($j=sizeof($columns);$j<6;$j++)
|
|
|
- <td class="cellBorder"> </th>
|
|
|
|
|
|
|
+ <td class="cellBorder"> </td>
|
|
|
@endfor
|
|
@endfor
|
|
|
</tr>
|
|
</tr>
|
|
|
@endif
|
|
@endif
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
@endforeach
|
|
@endforeach
|
|
|
<tr>
|
|
<tr>
|
|
|
<td><b>Totale entrate mensili</b></td>
|
|
<td><b>Totale entrate mensili</b></td>
|
|
@@ -195,7 +189,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- <table class="table tablesaw tableHead tablesaw-stack collaptableOUT">
|
|
|
|
|
|
|
+ <table class="table tablesaw tableHead tablesaw-stack collaptableOUT" id="collaptableOUT">
|
|
|
<thead>
|
|
<thead>
|
|
|
<tr>
|
|
<tr>
|
|
|
<th scope="col" style="width:20%;text-align:left"></th>
|
|
<th scope="col" style="width:20%;text-align:left"></th>
|
|
@@ -208,28 +202,37 @@
|
|
|
</tr>
|
|
</tr>
|
|
|
</thead>
|
|
</thead>
|
|
|
<tbody id="checkall-target">
|
|
<tbody id="checkall-target">
|
|
|
- @php
|
|
|
|
|
- $aScrittoX = array();
|
|
|
|
|
- @endphp
|
|
|
|
|
@foreach($rows_out as $out)
|
|
@foreach($rows_out as $out)
|
|
|
- @if($filterCausalsOut == null || (sizeof($filterCausalsOut) == 0 || in_array($out["id"], $filterCausalsOut) || in_array($out["parent_id"], $filterCausalsOut) || in_array($out["first_parent_id"], $filterCausalsOut)))
|
|
|
|
|
- @if($filterCausalsOut != null && !in_array($out["first_parent_id"], $filterCausalsOut) && !in_array($out["first_parent_id"] . "_" . $out["parent_id"], $aScrittoX))
|
|
|
|
|
- @php
|
|
|
|
|
- $aScrittoX[] = $out["first_parent_id"] . "_" . $out["parent_id"];
|
|
|
|
|
- @endphp
|
|
|
|
|
- <tr>
|
|
|
|
|
- <td colspan="20">
|
|
|
|
|
- <b>{{$out["first_parent_name"]}} - {{$out["parent_name"]}}</b>
|
|
|
|
|
- </td>
|
|
|
|
|
- </tr>
|
|
|
|
|
|
|
+
|
|
|
|
|
+ @php
|
|
|
|
|
+ $show = false;
|
|
|
|
|
+ if ($filterCausalsOut != null)
|
|
|
|
|
+ {
|
|
|
|
|
+ foreach($filterCausalsOut as $cOut)
|
|
|
|
|
+ {
|
|
|
|
|
+ if (in_array($cOut, $out["all_childs"]))
|
|
|
|
|
+ $show = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ $show = true;
|
|
|
|
|
+ @endphp
|
|
|
|
|
+ @if($show)
|
|
|
|
|
+ @if($out["parent_id"] != null)
|
|
|
|
|
+ <tr data-node="treetable-{{$out["id"] + 1000}}" data-pnode="treetable-parent-{{$out["parent_id"] + 1000}}">
|
|
|
|
|
+ @else
|
|
|
|
|
+ <tr data-node="treetable-{{$out["id"] + 1000}}" >
|
|
|
@endif
|
|
@endif
|
|
|
- <tr data-id="{{$out["id"] + 1000}}" data-parent="{{$out["parent_id"] != null ? ($out["parent_id"] + 1000) : 0}}">
|
|
|
|
|
- <td>{!!str_repeat(" ", $out["level"])!!}{{$out["name"]}}</td>
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <td style="padding-left:{{$out["level"] * 20}}px;">
|
|
|
|
|
+
|
|
|
|
|
+ {{$out["name"]}}
|
|
|
|
|
+ </td>
|
|
|
@foreach($columns as $column)
|
|
@foreach($columns as $column)
|
|
|
<td class="cellBorder" style="text-align:right">
|
|
<td class="cellBorder" style="text-align:right">
|
|
|
@if(isset($records_out[$column][$out["id"]]))
|
|
@if(isset($records_out[$column][$out["id"]]))
|
|
|
- <span class="tablesaw-cell-content {{$out["level"] == 0 ? 'primary' : ''}}" {{$out["level"] == 0 ? 'style="font-weight:bold;' : ''}}>
|
|
|
|
|
- {{formatPrice($records_out[$column][$out["id"]])}}
|
|
|
|
|
|
|
+ <span class="tablesaw-cell-content {{$out["level"] == 0 ? 'primary' : ''}}" {{$out["level"] == 0 ? 'style="font-weight:bold;' : ''}}>
|
|
|
|
|
+ {{formatPrice($records_out[$column][$out["id"]])}}
|
|
|
</span>
|
|
</span>
|
|
|
@else
|
|
@else
|
|
|
|
|
|
|
@@ -237,10 +240,11 @@
|
|
|
</td>
|
|
</td>
|
|
|
@endforeach
|
|
@endforeach
|
|
|
@for($j=sizeof($columns);$j<6;$j++)
|
|
@for($j=sizeof($columns);$j<6;$j++)
|
|
|
- <td class="cellBorder"> </th>
|
|
|
|
|
|
|
+ <td class="cellBorder"> </td>
|
|
|
@endfor
|
|
@endfor
|
|
|
</tr>
|
|
</tr>
|
|
|
@endif
|
|
@endif
|
|
|
|
|
+
|
|
|
@endforeach
|
|
@endforeach
|
|
|
|
|
|
|
|
<tr>
|
|
<tr>
|
|
@@ -353,7 +357,10 @@
|
|
|
</style>
|
|
</style>
|
|
|
<script src="https://code.jquery.com/jquery-2.2.4.min.js" integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script>
|
|
<script src="https://code.jquery.com/jquery-2.2.4.min.js" integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script>
|
|
|
<script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>
|
|
|
- <script src="/assets/js/aCollapTable.js"></script>
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <script src="/assets/js/bootstrap-treefy.js"></script>
|
|
|
|
|
+ <!--<script src="/assets/js/aCollapTable.js"></script>-->
|
|
|
|
|
+
|
|
|
@endpush
|
|
@endpush
|
|
|
|
|
|
|
|
@push('scripts')
|
|
@push('scripts')
|
|
@@ -363,6 +370,7 @@
|
|
|
load();
|
|
load();
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
+
|
|
|
function load()
|
|
function load()
|
|
|
{
|
|
{
|
|
|
$(document).ready(function(){
|
|
$(document).ready(function(){
|
|
@@ -382,6 +390,8 @@
|
|
|
|
|
|
|
|
$('.filterCausalsIn').on('change', function (e) {
|
|
$('.filterCausalsIn').on('change', function (e) {
|
|
|
var data = $('.filterCausalsIn').select2("val");
|
|
var data = $('.filterCausalsIn').select2("val");
|
|
|
|
|
+ //selectedCausalsIn.push(data);
|
|
|
|
|
+ //showHideNodes();
|
|
|
setTimeout(function() {createCollapse();}, 1000);
|
|
setTimeout(function() {createCollapse();}, 1000);
|
|
|
@this.set('filterCausalsIn', data);
|
|
@this.set('filterCausalsIn', data);
|
|
|
});
|
|
});
|
|
@@ -416,7 +426,17 @@
|
|
|
|
|
|
|
|
//$("#checkall-target > tr").removeAttr("data-level");
|
|
//$("#checkall-target > tr").removeAttr("data-level");
|
|
|
//$("#checkall-target > tr").removeAttr("class");
|
|
//$("#checkall-target > tr").removeAttr("class");
|
|
|
|
|
+ $('#collaptableIN').unbind().removeData();
|
|
|
|
|
+ $("#collaptableIN").treeFy({
|
|
|
|
|
+ treeColumn: 0
|
|
|
|
|
+ });
|
|
|
|
|
|
|
|
|
|
+ $('#collaptableOUT').unbind().removeData();
|
|
|
|
|
+ $("#collaptableOUT").treeFy({
|
|
|
|
|
+ treeColumn: 0
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ /*
|
|
|
$('.collaptableIN').aCollapTable({
|
|
$('.collaptableIN').aCollapTable({
|
|
|
startCollapsed: true,
|
|
startCollapsed: true,
|
|
|
addColumn: false,
|
|
addColumn: false,
|
|
@@ -429,7 +449,7 @@
|
|
|
plusButton: '<span class="i"> + </span>',
|
|
plusButton: '<span class="i"> + </span>',
|
|
|
minusButton: '<span class="i"> - </span>'
|
|
minusButton: '<span class="i"> - </span>'
|
|
|
});
|
|
});
|
|
|
- $("#collapseAll").trigger("click");
|
|
|
|
|
|
|
+ $("#collapseAll").trigger("click");*/
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
Livewire.on('reset-collapse', () => {
|
|
Livewire.on('reset-collapse', () => {
|
|
@@ -456,7 +476,7 @@
|
|
|
$(document).on("click", ".show", function () {
|
|
$(document).on("click", ".show", function () {
|
|
|
var m = $('#month').val();
|
|
var m = $('#month').val();
|
|
|
var y = $('#year').val();
|
|
var y = $('#year').val();
|
|
|
- @this.show(m, y);
|
|
|
|
|
|
|
+ @this.show(m, y);
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
$(document).on("click", ".exportYear", function () {
|
|
$(document).on("click", ".exportYear", function () {
|