mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-17 12:00:46 +01:00
Compare commits
5 Commits
709f919ccb
...
7d749494cd
Author | SHA1 | Date | |
---|---|---|---|
|
7d749494cd | ||
|
276310b13f | ||
|
6c238052a9 | ||
|
a93947e60a | ||
|
85b29b489e |
@ -538,11 +538,7 @@ function getTable(selector) {
|
||||
getSelectedRowsFooter: function () {
|
||||
let ids = this.getSelectedRows();
|
||||
|
||||
let summable_results = [];
|
||||
let avg_results = [];
|
||||
let results = [];
|
||||
|
||||
summable_results = $.ajax({
|
||||
return $.ajax({
|
||||
url: globals.rootdir + "/ajax.php",
|
||||
type: "POST",
|
||||
dataType: "json",
|
||||
@ -553,25 +549,10 @@ function getTable(selector) {
|
||||
ids: ids,
|
||||
}
|
||||
});
|
||||
|
||||
avg_results = $.ajax({
|
||||
url: globals.rootdir + "/ajax.php",
|
||||
type: "POST",
|
||||
dataType: "json",
|
||||
data: {
|
||||
id_module: this.id_module,
|
||||
id_plugin: this.id_plugin,
|
||||
op: "avg-results",
|
||||
ids: ids,
|
||||
}
|
||||
});
|
||||
|
||||
results = $.when(summable_results, avg_results);
|
||||
return results;
|
||||
},
|
||||
|
||||
/**
|
||||
* Aggiornamento dei campi summable e avg
|
||||
* Aggiornamento dei campi summable
|
||||
*/
|
||||
updateFooterForSelectedRows: function () {
|
||||
let datatable = this.datatable;
|
||||
@ -583,9 +564,6 @@ function getTable(selector) {
|
||||
$(sel).css("text-align", "right")
|
||||
.attr("id", "summable")
|
||||
.html(value);
|
||||
$(sel).css("text-align", "right")
|
||||
.attr("id", "avg")
|
||||
.html(value);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -78,7 +78,7 @@ switch (post('op')) {
|
||||
$new_prezzo_vendita = $new_prezzo_vendita + ($new_prezzo_vendita * $aliquota_iva / 100);
|
||||
}
|
||||
|
||||
$new_prezzo_vendita = ceil($new_prezzo_vendita / $arrotondamento) * $arrotondamento;
|
||||
$new_prezzo_vendita = ceil($new_prezzo_vendita / ($arrotondamento?:1)) * $arrotondamento;
|
||||
}
|
||||
|
||||
if (in_array($tipologia, ['ivato', '']) && !$prezzi_ivati) {
|
||||
|
@ -149,7 +149,7 @@ foreach ($righe as $riga) {
|
||||
foreach ($evasione_bar as $table => $color) {
|
||||
$righe_ev = $dbo->table($table)->where('original_id', $riga->id)->where('original_type', $riga::class)->get();
|
||||
if ($righe_ev->count() > 0) {
|
||||
$perc_ev = $righe_ev->sum('qta') * 100 / $riga->qta;
|
||||
$perc_ev = $righe_ev->sum('qta') * 100 / ($riga->qta?:1);
|
||||
echo '
|
||||
<div class="progress-bar progress-bar-'.$color.'" style="width:'.$perc_ev.'%"></div>';
|
||||
}
|
||||
|
@ -170,7 +170,7 @@ foreach ($righe as $riga) {
|
||||
foreach ($evasione_bar as $table => $color) {
|
||||
$righe_ev = $dbo->table($table)->where('original_id', $riga->id)->where('original_type', $riga::class)->get();
|
||||
if ($righe_ev->count() > 0) {
|
||||
$perc_ev = $righe_ev->sum('qta') * 100 / $riga->qta;
|
||||
$perc_ev = $righe_ev->sum('qta') * 100 / ($riga->qta?:1);
|
||||
if ($perc_ev > 0) {
|
||||
echo '
|
||||
<div class="progress-bar progress-bar-'.$color.'" style="width:'.$perc_ev.'%"></div>';
|
||||
|
@ -563,13 +563,13 @@ if ($dir == 'entrata') {
|
||||
echo '
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
{[ "type": "checkbox", "label": "'.tr('Marca da bollo automatica').'", "name": "bollo_automatico", "value": "'.intval(!isset($record['bollo'])).'", "help": "'.tr("Seleziona per impostare automaticamente l'importo della marca da bollo").'. '.tr('Applicata solo se il totale della fattura è maggiore di _MONEY_', [
|
||||
{[ "type": "checkbox", "label": "'.tr('Marca da bollo automatica').'", "name": "bollo_automatico", "value": "'.intval(!isset($record['bollo'])).'", "help": "'.tr('Se abilitata, questa impostazione addebita automaticamente l\'importo della marca da bollo quando la fattura soddisfa i requisiti per la sua applicazione. In particolare, la marca da bollo si applica se la fattura contiene righe con aliquote IVA con natura N2.1, N2.2, N3.5, N3.6, N4, e se il totale della fattura supera i _MONEY_', [
|
||||
'_MONEY_' => moneyFormat(setting("Soglia minima per l'applicazione della marca da bollo")),
|
||||
]).'.", "placeholder": "'.tr('Bollo automatico').'" ]}
|
||||
]).'.<br> Se disabilitata questa impostazione permette di impostare manualmente la marca da bollo.", "placeholder": "'.tr('Bollo automatico').'" ]}
|
||||
</div>
|
||||
|
||||
<div class="col-md-3 bollo">
|
||||
{[ "type": "checkbox", "label": "'.tr('Addebita marca da bollo').'", "name": "addebita_bollo", "value": "$addebita_bollo$" ]}
|
||||
{[ "type": "checkbox", "label": "'.tr('Addebita marca da bollo').'", "name": "addebita_bollo", "value": "$addebita_bollo$", "help":"Se abilitata addebita l\'importo della marca da bollo definito nell\'impostazione in fattura.<br>Se disabilitato, non imposta alcuna marca da bollo in fattura." ]}
|
||||
</div>
|
||||
|
||||
<div class="col-md-3 bollo">
|
||||
|
@ -56,7 +56,7 @@ if ($intervento->id_contratto) {
|
||||
$contratto = Contratto::find($intervento->id_contratto);
|
||||
$ore_erogate = $contratto->interventi->sum('ore_totali');
|
||||
$ore_previste = $contratto->getRighe()->where('um', 'ore')->sum('qta');
|
||||
$perc_ore = $ore_previste != 0 ? ($ore_erogate * 100) / $ore_previste : 0;
|
||||
$perc_ore = $ore_previste != 0 ? ($ore_erogate * 100) / ($ore_previste?:1) : 0;
|
||||
if ($perc_ore < 75) {
|
||||
$color = 'success';
|
||||
} elseif ($perc_ore <= 100) {
|
||||
|
@ -403,7 +403,7 @@ class Sessione extends Model
|
||||
*/
|
||||
public function getMarginePercentualeAttribute()
|
||||
{
|
||||
return (1 - ($this->spesa / $this->totale_imponibile)) * 100;
|
||||
return (1 - ($this->spesa / ($this->totale_imponibile?:1))) * 100;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -413,7 +413,7 @@ class Sessione extends Model
|
||||
*/
|
||||
public function getRicaricoPercentualeAttribute()
|
||||
{
|
||||
return $this->imponibile ? (($this->imponibile / $this->spesa) - 1) * 100 : 0;
|
||||
return $this->imponibile ? (($this->imponibile / ($this->spesa?:1)) - 1) * 100 : 0;
|
||||
}
|
||||
|
||||
public function getIvaIndetraibileAttribute()
|
||||
|
@ -223,7 +223,7 @@ foreach ($righe as $riga) {
|
||||
foreach ($evasione_bar as $table => $color) {
|
||||
$righe_ev = $dbo->table($table)->where('original_id', $riga->id)->where('original_type', $riga::class)->get();
|
||||
if ($righe_ev->count() > 0) {
|
||||
$perc_ev = $righe_ev->sum('qta') * 100 / $riga->qta;
|
||||
$perc_ev = $righe_ev->sum('qta') * 100 / ($riga->qta?:1);
|
||||
if ($perc_ev > 0) {
|
||||
echo '
|
||||
<div class="progress-bar progress-bar-'.$color.'" style="width:'.$perc_ev.'%"></div>';
|
||||
|
@ -179,7 +179,7 @@ foreach ($righe as $key => $riga) {
|
||||
foreach ($evasione_bar as $table => $color) {
|
||||
$righe_ev = $dbo->table($table)->where('original_id', $riga->id)->where('original_type', $riga::class)->get();
|
||||
if ($righe_ev->count() > 0) {
|
||||
$perc_ev = $righe_ev->sum('qta') * 100 / $riga->qta;
|
||||
$perc_ev = $righe_ev->sum('qta') * 100 / ($riga->qta?:1);
|
||||
if ($perc_ev > 0) {
|
||||
echo '
|
||||
<div class="progress-bar progress-bar-'.$color.'" style="width:'.$perc_ev.'%"></div>';
|
||||
|
@ -103,9 +103,10 @@ if (!empty($options) && $options != 'custom' && $options != 'menu') {
|
||||
echo '
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs nav-justified">
|
||||
<li class="active nav-item active"><a class="nav-link" data-card-widget="tab" href="#fields">'.tr('Campi').' <span class="badge">'.View::where('id_module', $record->id)->count().'</a></li>
|
||||
<li class="nav-item"><a class="nav-link" data-card-widget="tab" href="#filters">'.tr('Filtri').' <span class="badge">'.Clause::where('idmodule', $record->id)->count().' </span></a></li>
|
||||
<li class="active nav-item clicked"><a class="nav-link" data-card-widget="tab" href="#fields">'.tr('Campi').' <span class="badge badge-info">'.View::where('id_module', $record->id)->count().'</a></li>
|
||||
<li class="nav-item"><a class="nav-link" data-card-widget="tab" href="#filters">'.tr('Filtri').' <span class="badge badge-info">'.Clause::where('idmodule', $record->id)->count().' </span></a></li>
|
||||
</ul>
|
||||
<br>
|
||||
|
||||
<div class="tab-content">
|
||||
|
||||
|
@ -36,7 +36,7 @@ foreach ($fields as $key => $field) {
|
||||
$editable = !($field->default && $enable_readonly);
|
||||
|
||||
echo '
|
||||
<div class="card collapsed-card card-'.($field->visible ? 'success' : 'danger').'">
|
||||
<div class="card collapsed-card card-outline card-'.($field->visible ? 'success' : 'danger').'">
|
||||
<div class="card-header with-border">
|
||||
<h3 class="card-title">'.
|
||||
$field->getTranslation('title').' <small class="text-muted tip" title="'.(new Carbon\Carbon($field->updated_at))->format('d/m/Y H:i').'">('.tr('modificato').' '.(new Carbon\Carbon($field->updated_at))->diffForHumans().')</small>
|
||||
|
@ -34,7 +34,7 @@ if (!empty($additionals)) {
|
||||
$editable = !($additional['default'] && $enable_readonly);
|
||||
|
||||
echo '
|
||||
<div class="card collapsed-card card-'.($additional['enabled'] ? 'success' : 'danger').'">
|
||||
<div class="card collapsed-card card-outline card-'.($additional['enabled'] ? 'success' : 'danger').'">
|
||||
<div class="card-header with-border">
|
||||
<h3 class="card-title">'.
|
||||
tr('Filtro: _NAME_', [
|
||||
|
@ -57,9 +57,9 @@ foreach ($impianti_collegati as $impianto) {
|
||||
}
|
||||
}
|
||||
|
||||
$percentuale_completati = $n_impianti ? round(($impianti_completati * 100) / $n_impianti) : 0;
|
||||
$percentuale_non_completati = $n_impianti ? round(($impianti_non_completati * 100) / $n_impianti) : 0;
|
||||
$percentuale_non_previsti = $n_impianti ? round(($impianti_non_previsti * 100) / $n_impianti) : 0;
|
||||
$percentuale_completati = $n_impianti ? round(($impianti_completati * 100) / ($n_impianti?:1)) : 0;
|
||||
$percentuale_non_completati = $n_impianti ? round(($impianti_non_completati * 100) / ($n_impianti?:1)) : 0;
|
||||
$percentuale_non_previsti = $n_impianti ? round(($impianti_non_previsti * 100) / ($n_impianti?:1)) : 0;
|
||||
|
||||
echo '
|
||||
<div class="row">
|
||||
|
@ -484,7 +484,7 @@ if (!empty($righe)) {
|
||||
if ($tipo_sconto == '%') {
|
||||
$sconto_calcolato = calcola_sconto([
|
||||
'sconto' => $sconto_riga,
|
||||
'prezzo' => $sconto_unitario ? $prezzo_unitario - ($tot_sconto_calcolato / $qta) : $prezzo_unitario,
|
||||
'prezzo' => $sconto_unitario ? $prezzo_unitario - ($tot_sconto_calcolato / ($qta?:1)) : $prezzo_unitario,
|
||||
'tipo' => 'PRC',
|
||||
'qta' => $qta,
|
||||
]);
|
||||
|
@ -155,7 +155,7 @@ class FatturaOrdinaria extends FatturaElettronica
|
||||
$differenza_iva = round((float) $riepilogo['Imposta'] - $totale_imposta[$riepilogo['AliquotaIVA']], 2);
|
||||
|
||||
if ($differenza_iva) {
|
||||
$valore = $differenza_iva * 100 / $riepilogo['AliquotaIVA'];
|
||||
$valore = $differenza_iva * 100 / ($riepilogo['AliquotaIVA']?:1);
|
||||
}
|
||||
|
||||
if ($valore != 0) {
|
||||
@ -353,8 +353,8 @@ class FatturaOrdinaria extends FatturaElettronica
|
||||
// Nel caso il prezzo sia negativo viene gestito attraverso l'inversione della quantità (come per le note di credito)
|
||||
// TODO: per migliorare la visualizzazione, sarebbe da lasciare negativo il prezzo e invertire gli sconti.
|
||||
if (!empty($articolo->um) && !empty($articolo->um_secondaria) && !empty((float) $articolo->fattore_um_secondaria) && $riga['UnitaMisura'] == $articolo->um_secondaria) {
|
||||
$qta = (($riga['Quantita'] ?: 1) / $articolo->fattore_um_secondaria);
|
||||
$prezzo = $totale_righe_riepilogo > 0 ? $totale_righe_riepilogo / $qta : -($totale_righe_riepilogo / $qta);
|
||||
$qta = (($riga['Quantita'] ?: 1) / ($articolo->fattore_um_secondaria?:1));
|
||||
$prezzo = $totale_righe_riepilogo > 0 ? $totale_righe_riepilogo / ($qta?:1) : -($totale_righe_riepilogo / ($qta?:1));
|
||||
} else {
|
||||
$qta = ($riga['Quantita'] ?: 1);
|
||||
$prezzo = $totale_righe_riepilogo > 0 ? $riga['PrezzoUnitario'] : -$riga['PrezzoUnitario'];
|
||||
@ -399,13 +399,13 @@ class FatturaOrdinaria extends FatturaElettronica
|
||||
if ($tipo_sconto == 'PRC') {
|
||||
$sconto_calcolato = calcola_sconto([
|
||||
'sconto' => $sconto_riga,
|
||||
'prezzo' => $sconto_unitario ? $obj->prezzo_unitario - ($tot_sconto_calcolato / $obj->qta) : $obj->prezzo_unitario,
|
||||
'prezzo' => $sconto_unitario ? $obj->prezzo_unitario - ($tot_sconto_calcolato / ($obj->qta?:1)) : $obj->prezzo_unitario,
|
||||
'tipo' => 'PRC',
|
||||
'qta' => $obj->qta,
|
||||
]);
|
||||
|
||||
if ($tipo == 'PRC') {
|
||||
$tot_sconto = $sconto_calcolato * 100 / $obj->imponibile;
|
||||
$tot_sconto = $sconto_calcolato * 100 / ($obj->imponibile?:1);
|
||||
} else {
|
||||
$tot_sconto = $sconto_calcolato;
|
||||
}
|
||||
@ -532,7 +532,7 @@ class FatturaOrdinaria extends FatturaElettronica
|
||||
$nome = ucwords(strtolower($m[2]));
|
||||
$percentuale = $m[3];
|
||||
|
||||
$totale_previsto = round($importo / $percentuale * 100, 2);
|
||||
$totale_previsto = round($importo / ($percentuale?:1) * 100, 2);
|
||||
$percentuale_importo = round($totale_previsto / ($totale ?: 1) * 100, 2);
|
||||
|
||||
$ritenuta_contributi = $database->fetchOne('SELECT * FROM`co_ritenuta_contributi` WHERE `percentuale` = '.prepare($percentuale).' AND `percentuale_imponibile` = '.prepare($percentuale_importo));
|
||||
@ -633,7 +633,7 @@ class FatturaOrdinaria extends FatturaElettronica
|
||||
$totale = sum($totali);
|
||||
}
|
||||
|
||||
$totale_previsto = round($importo * 100 / $percentuale, 2);
|
||||
$totale_previsto = round($importo * 100 / ($percentuale?:1), 2);
|
||||
$percentuale_importo = round($totale_previsto / ($totale ?: 1) * 100, 2);
|
||||
$percentuale_importo = min($percentuale_importo, 100); // Nota: Fix per la percentuale che superava il 100% nel caso di importi con Rivalsa compresa
|
||||
|
||||
|
@ -86,7 +86,7 @@ class FatturaSemplificata extends FatturaElettronica
|
||||
|
||||
$prezzo = $importo - $imposta;
|
||||
|
||||
$aliquota = !empty($prezzo) ? $imposta / $prezzo * 100 : 0;
|
||||
$aliquota = !empty($prezzo) ? $imposta / ($prezzo?:1) * 100 : 0;
|
||||
$result[$index]['AliquotaIVA'] = $aliquota;
|
||||
}
|
||||
}
|
||||
|
@ -118,7 +118,7 @@ switch ($operazione) {
|
||||
if ($cadenza_fatturazione == 'Fine') {
|
||||
$fine = Carbon\Carbon::parse($fine)->endOfMonth()->format('Y-m-d');
|
||||
}
|
||||
$prezzo_unitario = setting('Utilizza prezzi di vendita comprensivi di IVA') ? ((($r->subtotale - $r->sconto) + $r->iva) / $r->qta) : (($r->subtotale - $r->sconto) / $r->qta);
|
||||
$prezzo_unitario = setting('Utilizza prezzi di vendita comprensivi di IVA') ? ((($r->subtotale - $r->sconto) + $r->iva) / ($r->qta?:1)) : (($r->subtotale - $r->sconto) / ($r->qta?:1));
|
||||
|
||||
if (!empty($r->idarticolo)) {
|
||||
$articolo = ArticoloOriginale::find($r->idarticolo);
|
||||
|
@ -93,7 +93,7 @@ class Pianificazione extends Document
|
||||
{
|
||||
$righe = $this->contratto->getRighe();
|
||||
$pianificazioni = $this->contratto->pianificazioni;
|
||||
$numero_righe = $righe->count() / $pianificazioni->count();
|
||||
$numero_righe = $righe->count() / ($pianificazioni->count()?:1);
|
||||
|
||||
$p = $this;
|
||||
$index = $pianificazioni->search(fn ($item) => $item->id == $p->id);
|
||||
|
@ -32,7 +32,7 @@ $prezzo_max = $prezzi['max'];
|
||||
$prezzo_medio = $prezzi['media'];
|
||||
|
||||
$oscillazione = $prezzo_max['prezzo'] - $prezzo_min['prezzo'];
|
||||
$oscillazione_percentuale = $prezzo_medio ? $oscillazione * 100 / $prezzo_medio : 0;
|
||||
$oscillazione_percentuale = $prezzo_medio ? $oscillazione * 100 / ($prezzo_medio?:1) : 0;
|
||||
|
||||
$data_min = $prezzo_min['data'] ? strtotime((string) $prezzo_min['data']) : '';
|
||||
$data_max = $prezzo_max['data'] ? strtotime((string) $prezzo_max['data']) : '';
|
||||
|
@ -338,7 +338,7 @@ abstract class Accounting extends Component
|
||||
*/
|
||||
public function getMarginePercentualeAttribute()
|
||||
{
|
||||
return (1 - (($this->spesa + $this->provvigione) / $this->totale_imponibile)) * 100;
|
||||
return (1 - (($this->spesa + $this->provvigione) / ($this->totale_imponibile?:1))) * 100;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -221,7 +221,7 @@ abstract class Document extends Model implements ReferenceInterface, DocumentInt
|
||||
*/
|
||||
public function getMarginePercentualeAttribute()
|
||||
{
|
||||
return ($this->totale_imponibile && $this->spesa) ? (1 - ($this->spesa / $this->totale_imponibile)) * 100 : 100;
|
||||
return ($this->totale_imponibile && $this->spesa) ? (1 - ($this->spesa / ($this->totale_imponibile?:1))) * 100 : 100;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -44,8 +44,8 @@ $totale_iva_periodo_precedente = $totale_iva_vendite_periodo_precedente - $total
|
||||
|
||||
$totale_iva = $totale_iva_esigibile - $totale_iva_detraibile;
|
||||
|
||||
if ($periodo['valore'] == 'Trimestrale' && $totale_iva > 25.82) {
|
||||
if ($totale_iva_periodo_precedente < 25.82 && $totale_iva_periodo_precedente > 0) {
|
||||
if ($periodo == 'Trimestrale') {
|
||||
if ($totale_iva_periodo_precedente > 0) {
|
||||
$totale_iva += $totale_iva_periodo_precedente;
|
||||
}
|
||||
$maggiorazione = $totale_iva * 0.01;
|
||||
@ -328,15 +328,10 @@ echo ' <td class=text-right>'.moneyFormat(abs($totale_iva_periodo_precedente), 2
|
||||
<td class=text-right>'.moneyFormat($totale_iva_nondetraibile, 2).'</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>VARIAZIONE DI IMPOSTA RELATIVE A PERIODI PRECEDENTI</td>';
|
||||
if ($totale_iva_periodo_precedente < 25.82 && $totale_iva_periodo_precedente > 0) {
|
||||
echo '
|
||||
<td class=text-right>'.moneyFormat(abs($totale_iva_periodo_precedente), 2).'</td>';
|
||||
} else {
|
||||
echo '
|
||||
<td class=text-right></td>';
|
||||
}
|
||||
echo '
|
||||
<td>VARIAZIONE DI IMPOSTA RELATIVE A PERIODI PRECEDENTI</td>
|
||||
<td class=text-right>'.($totale_iva_periodo_precedente > 0 ? moneyFormat(abs($totale_iva_periodo_precedente), 2):'').'</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td>DI CUI INTERESSI PER RAVVEDIMENTO</td>
|
||||
@ -350,13 +345,9 @@ echo '
|
||||
<td>CREDITO IVA COMPENSABILE</td>
|
||||
<td class=text-right></td>
|
||||
</tr>
|
||||
<tr>';
|
||||
if ($totale_iva >= 0) {
|
||||
echo ' <td>IVA A DEBITO</td>';
|
||||
} else {
|
||||
echo ' <td>IVA A CREDITO</td>';
|
||||
}
|
||||
echo ' <td class=text-right>'.moneyFormat(abs($totale_iva), 2).'</td>
|
||||
<tr>
|
||||
<td>'.($totale_iva >= 0 ? 'IVA A DEBITO' : 'IVA A CREDITO') .'</td>
|
||||
<td class=text-right>'.moneyFormat(abs($totale_iva), 2).'</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CREDITO SPECIALE DI IMPOSTA</td>
|
||||
@ -364,34 +355,20 @@ echo ' <td class=text-right>'.moneyFormat(abs($totale_iva), 2).'</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>MAGGIORAZIONE 1,00%</td>
|
||||
<td class=text-right>'.($periodo['valore'] == 'Trimestrale' && $totale_iva > 25.82 ? moneyFormat($maggiorazione, 2) : '').'</td>
|
||||
<td class=text-right>'.($periodo == 'Trimestrale' ? moneyFormat($maggiorazione, 2) : '').'</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>IVA A DEBITO CON MAGGIORAZIONE</td>';
|
||||
if ($totale_iva > 25.82 && $periodo['valore'] == 'Trimestrale') {
|
||||
echo '
|
||||
<td class=text-right>'.moneyFormat($totale_iva_maggiorata, 2).'</td>';
|
||||
} else {
|
||||
echo '
|
||||
<td class=text-right></td>';
|
||||
}
|
||||
echo '
|
||||
<td>IVA A DEBITO CON MAGGIORAZIONE</td>
|
||||
<td class=text-right>'.($periodo == 'Trimestrale' ?moneyFormat($totale_iva_maggiorata, 2): '').'</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td>IMPORTO DA VERSARE</td>';
|
||||
if ($totale_iva > 25.82) {
|
||||
if ($periodo['valore'] == 'Mensile') {
|
||||
echo '
|
||||
<td class=text-right>'.moneyFormat($totale_iva, 2).'</td>';
|
||||
} else {
|
||||
echo '
|
||||
<td class=text-right>'.moneyFormat($totale_iva_maggiorata, 2).'</td>';
|
||||
}
|
||||
} else {
|
||||
echo '
|
||||
<td class=text-right></td>';
|
||||
}
|
||||
echo '
|
||||
<td>IMPORTO DA VERSARE</td>
|
||||
<td class=text-right>'.($periodo == 'Mensile' ?moneyFormat($totale_iva, 2) : moneyFormat($totale_iva_maggiorata, 2)).'</td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CREDITO INFRANNUALE DI IMPOSTA CHIESTO A RIMBORSO</td>
|
||||
|
@ -26,8 +26,9 @@ $date_end = filter('date_end');
|
||||
|
||||
$anno_precedente_start = (new Carbon($date_start))->subYears(1)->format('Y-m-d');
|
||||
$anno_precedente_end = (new Carbon($date_end))->subYears(1)->format('Y-m-d');
|
||||
$periodo = setting('Liquidazione IVA');
|
||||
|
||||
if (setting('Liquidazione IVA') == 'Mensile') {
|
||||
if ($periodo == 'Mensile') {
|
||||
$periodo_precedente_start = (new Carbon($date_start))->subMonth()->format('Y-m-d');
|
||||
$periodo_precedente_end = (new Carbon($date_end))->subMonth()->format('Y-m-d');
|
||||
} else {
|
||||
|
@ -135,3 +135,5 @@ INSERT INTO `zz_views` (`id_module`, `name`, `query`, `order`, `search`, `slow`,
|
||||
|
||||
INSERT INTO `zz_views_lang` (`id_lang`, `id_record`, `title`) VALUES
|
||||
(1, (SELECT `id` FROM `zz_views` WHERE `id_module` = (SELECT `id` FROM `zz_modules` WHERE `name`='Giacenze sedi') AND `name` = 'Valore'), 'Valore');
|
||||
|
||||
DELETE FROM `zz_settings` WHERE `zz_settings`.`nome` = "Addebita marca da bollo al cliente"
|
Loading…
x
Reference in New Issue
Block a user