mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-06-05 22:09:38 +02:00
Aggiunto filtro di ricerca nel Piano dei conti
This commit is contained in:
@@ -31,10 +31,16 @@ if ($bilancio_gia_aperto) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
echo '
|
echo '
|
||||||
<div class="text-right">
|
<div class="row">
|
||||||
|
<div class="col-md-offset-4 col-md-4">
|
||||||
|
<input type="text" class="form-control input-lg text-center" id="input-cerca" placeholder="'.tr('Cerca').'...">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-4 text-right">
|
||||||
<button type="button" class="btn btn-lg '.$btn_class.'" data-op="apri-bilancio" data-title="'.tr('Apertura bilancio').'" data-backto="record-list" data-msg="'.$msg.'" data-button="'.tr('Riprendi saldi').'" data-class="btn btn-lg btn-warning" onclick="message( this );">
|
<button type="button" class="btn btn-lg '.$btn_class.'" data-op="apri-bilancio" data-title="'.tr('Apertura bilancio').'" data-backto="record-list" data-msg="'.$msg.'" data-button="'.tr('Riprendi saldi').'" data-class="btn btn-lg btn-warning" onclick="message( this );">
|
||||||
<i class="fa fa-folder-open"></i> '.tr('Apertura bilancio').'
|
<i class="fa fa-folder-open"></i> '.tr('Apertura bilancio').'
|
||||||
</button>
|
</button>
|
||||||
|
</div>
|
||||||
</div>';
|
</div>';
|
||||||
|
|
||||||
// Livello 1
|
// Livello 1
|
||||||
@@ -51,7 +57,7 @@ foreach ($primo_livello as $conto_primo) {
|
|||||||
|
|
||||||
echo '
|
echo '
|
||||||
<hr>
|
<hr>
|
||||||
<div class="box">
|
<div class="box conto1">
|
||||||
<div class="box-header">
|
<div class="box-header">
|
||||||
<h3 class="box-title">
|
<h3 class="box-title">
|
||||||
'.$titolo.'
|
'.$titolo.'
|
||||||
@@ -70,6 +76,7 @@ foreach ($primo_livello as $conto_primo) {
|
|||||||
foreach ($secondo_livello as $conto_secondo) {
|
foreach ($secondo_livello as $conto_secondo) {
|
||||||
// Livello 2
|
// Livello 2
|
||||||
echo '
|
echo '
|
||||||
|
<div class="conto2">
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
'.Prints::getLink('Mastrino', $conto_secondo['id'], 'btn-info btn-xs', '', null, 'lev=2').'
|
'.Prints::getLink('Mastrino', $conto_secondo['id'], 'btn-info btn-xs', '', null, 'lev=2').'
|
||||||
|
|
||||||
@@ -136,7 +143,7 @@ foreach ($primo_livello as $conto_primo) {
|
|||||||
$totale_reddito2 += $totale_reddito;
|
$totale_reddito2 += $totale_reddito;
|
||||||
|
|
||||||
echo '
|
echo '
|
||||||
<tr style="'.(!empty($numero_movimenti) ? '' : 'opacity: 0.5;').'">
|
<tr class="conto3" style="'.(!empty($numero_movimenti) ? '' : 'opacity: 0.5;').'">
|
||||||
<td>';
|
<td>';
|
||||||
|
|
||||||
// Possibilità di esplodere i movimenti del conto
|
// Possibilità di esplodere i movimenti del conto
|
||||||
@@ -210,7 +217,7 @@ foreach ($primo_livello as $conto_primo) {
|
|||||||
</tbody>
|
</tbody>
|
||||||
|
|
||||||
<tfoot>
|
<tfoot>
|
||||||
<tr>
|
<tr class="totali">
|
||||||
<th class="text-right">'.tr('Totale').'</th>
|
<th class="text-right">'.tr('Totale').'</th>
|
||||||
<th class="text-right">'.moneyFormat($totale_conto2).'</th>';
|
<th class="text-right">'.moneyFormat($totale_conto2).'</th>';
|
||||||
if ($conto_primo['descrizione'] == 'Economico') {
|
if ($conto_primo['descrizione'] == 'Economico') {
|
||||||
@@ -222,6 +229,7 @@ foreach ($primo_livello as $conto_primo) {
|
|||||||
</table>
|
</table>
|
||||||
|
|
||||||
<br><br>
|
<br><br>
|
||||||
|
</div>
|
||||||
</div>';
|
</div>';
|
||||||
// Somma dei totali
|
// Somma dei totali
|
||||||
if ($conto_primo['descrizione'] == 'Patrimoniale') {
|
if ($conto_primo['descrizione'] == 'Patrimoniale') {
|
||||||
@@ -245,7 +253,7 @@ foreach ($primo_livello as $conto_primo) {
|
|||||||
echo '
|
echo '
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<table class="table table-condensed table-hover">';
|
<table class="table table-condensed table-hover totali">';
|
||||||
|
|
||||||
// Riepiloghi
|
// Riepiloghi
|
||||||
if ($conto_primo['descrizione'] == 'Patrimoniale') {
|
if ($conto_primo['descrizione'] == 'Patrimoniale') {
|
||||||
@@ -348,7 +356,7 @@ foreach ($primo_livello as $conto_primo) {
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr class="totali">
|
||||||
<th class="text-right">
|
<th class="text-right">
|
||||||
<big>'.tr('Utile/perdita').':</big>
|
<big>'.tr('Utile/perdita').':</big>
|
||||||
</th>
|
</th>
|
||||||
@@ -460,4 +468,29 @@ echo '
|
|||||||
function aggiornaReddito(id_conto){
|
function aggiornaReddito(id_conto){
|
||||||
openModal("'.tr('Ricalcola importo deducibile').'", "'.$structure->fileurl('aggiorna_reddito.php').'?id=" + id_conto)
|
openModal("'.tr('Ricalcola importo deducibile').'", "'.$structure->fileurl('aggiorna_reddito.php').'?id=" + id_conto)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$("#input-cerca").keyup(function(){
|
||||||
|
var text = $(this).val();
|
||||||
|
|
||||||
|
if( text == "" ){
|
||||||
|
$(".conto1").show();
|
||||||
|
$(".conto2").show();
|
||||||
|
$(".conto3").show();
|
||||||
|
$(".totali").show();
|
||||||
|
} else {
|
||||||
|
$(".conto1").hide();
|
||||||
|
$(".conto2").hide();
|
||||||
|
$(".conto3").hide();
|
||||||
|
$(".totali").hide();
|
||||||
|
$(".conto1:contains(" + text + ")").show();
|
||||||
|
$(".conto2:contains(" + text + ")").show();
|
||||||
|
$(".conto3:contains(" + text + ")").show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$.expr[":"].contains = $.expr.createPseudo(function(arg) {
|
||||||
|
return function( elem ) {
|
||||||
|
return $(elem).text().toUpperCase().indexOf(arg.toUpperCase()) >= 0;
|
||||||
|
};
|
||||||
|
});
|
||||||
</script>';
|
</script>';
|
||||||
|
Reference in New Issue
Block a user