mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-17 03:51:06 +01:00
Merge branch 'master' of https://github.com/devcode-it/openstamanager
This commit is contained in:
commit
9e32a0826b
@ -138,7 +138,7 @@ function discountInfo(Accounting $riga, $mostra_maggiorazione = true)
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
$text = ($riga->prezzo_unitario > 0 && $riga->sconto_unitario > 0) || ($riga->prezzo_unitario < 0 && $riga->sconto_unitario < 0) ? tr('sconto _TOT_ _TYPE_') : tr('maggiorazione _TOT__TYPE_');
|
$text = ($riga->prezzo_unitario >= 0 && $riga->sconto_unitario > 0) || ($riga->prezzo_unitario < 0 && $riga->sconto_unitario < 0) ? tr('sconto _TOT_ _TYPE_') : tr('maggiorazione _TOT__TYPE_');
|
||||||
$totale = !empty($riga->sconto_percentuale) ? $riga->sconto_percentuale : $riga->sconto_unitario_corrente;
|
$totale = !empty($riga->sconto_percentuale) ? $riga->sconto_percentuale : $riga->sconto_unitario_corrente;
|
||||||
|
|
||||||
return replace($text, [
|
return replace($text, [
|
||||||
|
@ -268,7 +268,7 @@ echo '
|
|||||||
|
|
||||||
// Individuazione dei totali
|
// Individuazione dei totali
|
||||||
$imponibile = $fattura->imponibile;
|
$imponibile = $fattura->imponibile;
|
||||||
$sconto = $fattura->sconto;
|
$sconto = -$fattura->sconto;
|
||||||
$totale_imponibile = $fattura->totale_imponibile;
|
$totale_imponibile = $fattura->totale_imponibile;
|
||||||
$iva = $fattura->iva;
|
$iva = $fattura->iva;
|
||||||
$totale = $fattura->totale;
|
$totale = $fattura->totale;
|
||||||
|
@ -331,9 +331,14 @@ class FatturaOrdinaria extends FatturaElettronica
|
|||||||
$fattura->refresh();
|
$fattura->refresh();
|
||||||
|
|
||||||
// Arrotondamenti differenti nella fattura XML
|
// Arrotondamenti differenti nella fattura XML
|
||||||
|
$totale_righe = 0;
|
||||||
$dati_riepilogo = $this->getBody()['DatiBeniServizi']['DatiRiepilogo'];
|
$dati_riepilogo = $this->getBody()['DatiBeniServizi']['DatiRiepilogo'];
|
||||||
if (!empty($dati_riepilogo['ImponibileImporto'])) {
|
if (!empty($dati_riepilogo['ImponibileImporto'])) {
|
||||||
$totale_righe = $dati_riepilogo['ImponibileImporto'];
|
$totale_righe = $dati_riepilogo['ImponibileImporto'];
|
||||||
|
} elseif (is_array($dati_riepilogo)) {
|
||||||
|
foreach ($dati_riepilogo as $dato) {
|
||||||
|
$totale_righe += $dato['ImponibileImporto'];
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$totali_righe = array_column($righe, 'PrezzoTotale');
|
$totali_righe = array_column($righe, 'PrezzoTotale');
|
||||||
$totale_righe = sum($totali_righe, null, 2);
|
$totale_righe = sum($totali_righe, null, 2);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user