This commit is contained in:
MatteoPistorello 2022-02-24 10:48:12 +01:00
commit 45f1a0890b
2 changed files with 25 additions and 2 deletions

View File

@ -265,6 +265,12 @@ echo '
<h3 class="box-title">'.tr('Righe da importare').'</h3>
</div>
<div class="row">
<div class="col-md-12">
{["type":"checkbox", "label":"'.tr('Seleziona/Deseleziona tutto').'", "name":"import_all", "value":"1"]}
</div>
</div>
<table class="box-body table table-striped table-hover table-condensed">
<thead>
<tr>
@ -310,7 +316,7 @@ foreach ($righe as $i => $riga) {
// Checkbox - da evadere?
echo '
<input type="checkbox" '.$attr.' id="checked_'.$i.'" name="evadere['.$riga['id'].']" value="on" onclick="ricalcolaTotaleRiga('.$i.');" />';
<input class="check" type="checkbox" '.$attr.' id="checked_'.$i.'" name="evadere['.$riga['id'].']" value="on" onclick="ricalcolaTotaleRiga('.$i.');" />';
$descrizione = ($riga->isArticolo() ? $riga->articolo->codice.' - ' : '').$riga['descrizione'];
@ -618,4 +624,20 @@ echo '
}
});
});
$("#import_all").click(function(){
if( $(this).is(":checked") ){
$(".check").each(function(){
if( !$(this).is(":checked") ){
$(this).trigger("click");
}
});
}else{
$(".check").each(function(){
if( $(this).is(":checked") ){
$(this).trigger("click");
}
});
}
});
</script>';

View File

@ -33,7 +33,8 @@ $numero_previsto = verifica_numero_ddt($ddt);
if (!empty($numero_previsto)) {
echo '
<div class="alert alert-warning">
<i class="fa fa-warning"></i> '.tr("E' assente una fattura di vendita di numero _NUM_ in data precedente o corrispondente a _DATE_: si potrebbero verificare dei problemi con la numerazione corrente delle fatture", [
<i class="fa fa-warning"></i> '.tr("E' assente un _TYPE_ numero _NUM_ in data precedente o corrispondente a _DATE_: si potrebbero verificare dei problemi con la numerazione corrente delle fatture", [
'_TYPE_' => $module['name'],
'_DATE_' => dateFormat($fattura->data),
'_NUM_' => '"'.$numero_previsto.'"',
]).'.</b>