mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-23 06:47:40 +01:00
Aggiunti prezzi ivati nella stampa documenti
This commit is contained in:
parent
1c94f22ecb
commit
df888e84ec
@ -21,6 +21,8 @@ use Carbon\CarbonInterval;
|
|||||||
|
|
||||||
include_once __DIR__.'/../../core.php';
|
include_once __DIR__.'/../../core.php';
|
||||||
|
|
||||||
|
$prezzi_ivati = setting('Utilizza prezzi di vendita comprensivi di IVA');
|
||||||
|
|
||||||
// Creazione righe fantasma
|
// Creazione righe fantasma
|
||||||
$autofill = new \Util\Autofill($options['pricing'] ? 4 : 2);
|
$autofill = new \Util\Autofill($options['pricing'] ? 4 : 2);
|
||||||
$autofill->setRows(20, 10);
|
$autofill->setRows(20, 10);
|
||||||
@ -159,7 +161,7 @@ foreach ($righe as $riga) {
|
|||||||
// Prezzo unitario
|
// Prezzo unitario
|
||||||
echo '
|
echo '
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
'.moneyFormat($riga->prezzo_unitario);
|
'.moneyFormat($prezzi_ivati ? $riga->prezzo_unitario_ivato : $riga->prezzo_unitario);
|
||||||
|
|
||||||
if ($riga->sconto > 0) {
|
if ($riga->sconto > 0) {
|
||||||
$text = discountInfo($riga, false);
|
$text = discountInfo($riga, false);
|
||||||
@ -176,7 +178,7 @@ foreach ($righe as $riga) {
|
|||||||
// Imponibile
|
// Imponibile
|
||||||
echo '
|
echo '
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
'.moneyFormat($riga->totale_imponibile).'
|
'.moneyFormat($prezzi_ivati ? $riga->totale : $riga->totale_imponibile).'
|
||||||
</td>';
|
</td>';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -19,6 +19,8 @@
|
|||||||
|
|
||||||
include_once __DIR__.'/../../core.php';
|
include_once __DIR__.'/../../core.php';
|
||||||
|
|
||||||
|
$prezzi_ivati = setting('Utilizza prezzi di vendita comprensivi di IVA');
|
||||||
|
|
||||||
// Creazione righe fantasma
|
// Creazione righe fantasma
|
||||||
$autofill = new \Util\Autofill($options['pricing'] ? 7 : 4);
|
$autofill = new \Util\Autofill($options['pricing'] ? 7 : 4);
|
||||||
$rows_per_page = 16;
|
$rows_per_page = 16;
|
||||||
@ -142,7 +144,7 @@ foreach ($righe as $riga) {
|
|||||||
// Prezzo unitario
|
// Prezzo unitario
|
||||||
echo '
|
echo '
|
||||||
<td class="text-right" nowrap="nowrap">
|
<td class="text-right" nowrap="nowrap">
|
||||||
'.moneyFormat($riga->prezzo_unitario);
|
'.moneyFormat($prezzi_ivati ? $riga->prezzo_unitario_ivato : $riga->prezzo_unitario);
|
||||||
|
|
||||||
if ($riga->sconto > 0) {
|
if ($riga->sconto > 0) {
|
||||||
$text = discountInfo($riga, false);
|
$text = discountInfo($riga, false);
|
||||||
@ -159,7 +161,7 @@ foreach ($righe as $riga) {
|
|||||||
// Imponibile
|
// Imponibile
|
||||||
echo '
|
echo '
|
||||||
<td class="text-right" nowrap="nowrap">
|
<td class="text-right" nowrap="nowrap">
|
||||||
'.moneyFormat($riga->totale_imponibile).'
|
'.moneyFormat($prezzi_ivati ? $riga->totale : $riga->totale_imponibile).'
|
||||||
</td>';
|
</td>';
|
||||||
|
|
||||||
// Iva
|
// Iva
|
||||||
|
@ -24,6 +24,8 @@ include_once __DIR__.'/../../core.php';
|
|||||||
$v_iva = [];
|
$v_iva = [];
|
||||||
$v_totale = [];
|
$v_totale = [];
|
||||||
|
|
||||||
|
$prezzi_ivati = setting('Utilizza prezzi di vendita comprensivi di IVA');
|
||||||
|
|
||||||
// Creazione righe fantasma
|
// Creazione righe fantasma
|
||||||
$autofill = new \Util\Autofill(6, 40);
|
$autofill = new \Util\Autofill(6, 40);
|
||||||
$rows_per_page = $fattura_accompagnatoria ? 13 : 18;
|
$rows_per_page = $fattura_accompagnatoria ? 13 : 18;
|
||||||
@ -178,7 +180,7 @@ foreach ($righe as $riga) {
|
|||||||
// Prezzo unitario
|
// Prezzo unitario
|
||||||
echo '
|
echo '
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
'.moneyFormat($riga->prezzo_unitario);
|
'.moneyFormat($prezzi_ivati ? $riga->prezzo_unitario_ivato : $riga->prezzo_unitario);
|
||||||
|
|
||||||
if ($riga->sconto > 0) {
|
if ($riga->sconto > 0) {
|
||||||
$text = discountInfo($riga, false);
|
$text = discountInfo($riga, false);
|
||||||
@ -195,7 +197,7 @@ foreach ($righe as $riga) {
|
|||||||
// Imponibile
|
// Imponibile
|
||||||
echo '
|
echo '
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
'.moneyFormat($riga->totale_imponibile).'
|
'.moneyFormat($prezzi_ivati ? ($riga->totale_imponibile + $riga->iva) : $riga->totale_imponibile).'
|
||||||
</td>';
|
</td>';
|
||||||
|
|
||||||
// Iva
|
// Iva
|
||||||
|
@ -19,6 +19,8 @@
|
|||||||
|
|
||||||
include_once __DIR__.'/../../core.php';
|
include_once __DIR__.'/../../core.php';
|
||||||
|
|
||||||
|
$prezzi_ivati = setting('Utilizza prezzi di vendita comprensivi di IVA');
|
||||||
|
|
||||||
// Righe documento
|
// Righe documento
|
||||||
$righe = $documento->getRighe();
|
$righe = $documento->getRighe();
|
||||||
|
|
||||||
@ -169,7 +171,7 @@ foreach ($righe as $riga) {
|
|||||||
// Prezzo unitario
|
// Prezzo unitario
|
||||||
echo '
|
echo '
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
'.moneyFormat($riga->prezzo_unitario);
|
'.moneyFormat($prezzi_ivati ? $riga->prezzo_unitario_ivato : $riga->prezzo_unitario);
|
||||||
|
|
||||||
if ($riga->sconto > 0) {
|
if ($riga->sconto > 0) {
|
||||||
$text = discountInfo($riga, false);
|
$text = discountInfo($riga, false);
|
||||||
@ -186,7 +188,7 @@ foreach ($righe as $riga) {
|
|||||||
// Imponibile
|
// Imponibile
|
||||||
echo '
|
echo '
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
'.moneyFormat($riga->totale_imponibile).'
|
'.moneyFormat($prezzi_ivati ? $riga->totale : $riga->totale_imponibile).'
|
||||||
</td>';
|
</td>';
|
||||||
|
|
||||||
// Iva
|
// Iva
|
||||||
|
@ -27,6 +27,7 @@ include_once __DIR__.'/../../core.php';
|
|||||||
|
|
||||||
$anagrafica = Anagrafica::find($documento['idanagrafica']);
|
$anagrafica = Anagrafica::find($documento['idanagrafica']);
|
||||||
$anagrafica_azienda = Anagrafica::find(setting('Azienda predefinita'));
|
$anagrafica_azienda = Anagrafica::find(setting('Azienda predefinita'));
|
||||||
|
$prezzi_ivati = setting('Utilizza prezzi di vendita comprensivi di IVA');
|
||||||
|
|
||||||
$pagamento = Pagamento::find($documento['idpagamento']);
|
$pagamento = Pagamento::find($documento['idpagamento']);
|
||||||
|
|
||||||
@ -235,7 +236,7 @@ foreach ($righe as $riga) {
|
|||||||
// Prezzo unitario
|
// Prezzo unitario
|
||||||
echo '
|
echo '
|
||||||
<td class="text-right" style="vertical-align: middle">
|
<td class="text-right" style="vertical-align: middle">
|
||||||
'.moneyFormat($riga->prezzo_unitario);
|
'.moneyFormat($prezzi_ivati ? $riga->prezzo_unitario_ivato : $riga->prezzo_unitario);
|
||||||
|
|
||||||
if ($riga->sconto > 0) {
|
if ($riga->sconto > 0) {
|
||||||
$text = discountInfo($riga, false);
|
$text = discountInfo($riga, false);
|
||||||
@ -252,7 +253,7 @@ foreach ($righe as $riga) {
|
|||||||
// Imponibile
|
// Imponibile
|
||||||
echo '
|
echo '
|
||||||
<td class="text-right" style="vertical-align: middle" >
|
<td class="text-right" style="vertical-align: middle" >
|
||||||
'.( $options['hide_total'] ? moneyFormat($riga->totale) : moneyFormat($riga->totale_imponibile) ).'
|
'.( ($options['hide_total'] || $prezzi_ivati) ? moneyFormat($riga->totale) : moneyFormat($riga->totale_imponibile) ).'
|
||||||
</td>';
|
</td>';
|
||||||
|
|
||||||
// Iva
|
// Iva
|
||||||
|
Loading…
x
Reference in New Issue
Block a user