mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-26 16:27:47 +01:00
Aggiunto filtro di ricerca nel Piano dei conti
This commit is contained in:
parent
244630dd7a
commit
739a4c8b25
@ -31,10 +31,16 @@ if ($bilancio_gia_aperto) {
|
||||
}
|
||||
|
||||
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 );">
|
||||
<i class="fa fa-folder-open"></i> '.tr('Apertura bilancio').'
|
||||
</button>
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
// Livello 1
|
||||
@ -51,7 +57,7 @@ foreach ($primo_livello as $conto_primo) {
|
||||
|
||||
echo '
|
||||
<hr>
|
||||
<div class="box">
|
||||
<div class="box conto1">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">
|
||||
'.$titolo.'
|
||||
@ -70,6 +76,7 @@ foreach ($primo_livello as $conto_primo) {
|
||||
foreach ($secondo_livello as $conto_secondo) {
|
||||
// Livello 2
|
||||
echo '
|
||||
<div class="conto2">
|
||||
<div class="pull-right">
|
||||
'.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;
|
||||
|
||||
echo '
|
||||
<tr style="'.(!empty($numero_movimenti) ? '' : 'opacity: 0.5;').'">
|
||||
<tr class="conto3" style="'.(!empty($numero_movimenti) ? '' : 'opacity: 0.5;').'">
|
||||
<td>';
|
||||
|
||||
// Possibilità di esplodere i movimenti del conto
|
||||
@ -210,7 +217,7 @@ foreach ($primo_livello as $conto_primo) {
|
||||
</tbody>
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<tr class="totali">
|
||||
<th class="text-right">'.tr('Totale').'</th>
|
||||
<th class="text-right">'.moneyFormat($totale_conto2).'</th>';
|
||||
if ($conto_primo['descrizione'] == 'Economico') {
|
||||
@ -222,6 +229,7 @@ foreach ($primo_livello as $conto_primo) {
|
||||
</table>
|
||||
|
||||
<br><br>
|
||||
</div>
|
||||
</div>';
|
||||
// Somma dei totali
|
||||
if ($conto_primo['descrizione'] == 'Patrimoniale') {
|
||||
@ -245,7 +253,7 @@ foreach ($primo_livello as $conto_primo) {
|
||||
echo '
|
||||
</div>
|
||||
|
||||
<table class="table table-condensed table-hover">';
|
||||
<table class="table table-condensed table-hover totali">';
|
||||
|
||||
// Riepiloghi
|
||||
if ($conto_primo['descrizione'] == 'Patrimoniale') {
|
||||
@ -348,7 +356,7 @@ foreach ($primo_livello as $conto_primo) {
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<tr class="totali">
|
||||
<th class="text-right">
|
||||
<big>'.tr('Utile/perdita').':</big>
|
||||
</th>
|
||||
@ -460,4 +468,29 @@ echo '
|
||||
function aggiornaReddito(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>';
|
||||
|
Loading…
x
Reference in New Issue
Block a user