diff --git a/modules/contratti/actions.php b/modules/contratti/actions.php index 029c6398e..9f698aeea 100644 --- a/modules/contratti/actions.php +++ b/modules/contratti/actions.php @@ -299,16 +299,40 @@ switch (post('op')) { // Eliminazione riga case 'delete_riga': - $id_riga = post('riga_id'); - $type = post('riga_type'); -$riga = $contratto->getRiga($type, $id_riga); - - if (!empty($riga)) { + $id_righe = (array)post('righe'); + + foreach ($id_righe as $id_riga) { + $riga = Articolo::find($id_riga) ?: Riga::find($id_riga); + $riga = $riga ?: Descrizione::find($id_riga); + $riga = $riga ?: Sconto::find($id_riga); $riga->delete(); - flash()->info(tr('Riga eliminata!')); + $riga = null; } + flash()->info(tr('Righe eliminate!')); + + break; + + // Duplicazione riga + case 'copy_riga': + $id_righe = (array)post('righe'); + + foreach ($id_righe as $id_riga) { + $riga = Articolo::find($id_riga) ?: Riga::find($id_riga); + $riga = $riga ?: Descrizione::find($id_riga); + $riga = $riga ?: Sconto::find($id_riga); + + $new_riga = $riga->replicate(); + $new_riga->setDocument($contratto); + $new_riga->qta_evasa = 0; + $new_riga->save(); + + $riga = null; + } + + flash()->info(tr('Righe duplicate!')); + break; // Scollegamento intervento da contratto diff --git a/modules/contratti/row-list.php b/modules/contratti/row-list.php index 1b1fc178a..50876e832 100755 --- a/modules/contratti/row-list.php +++ b/modules/contratti/row-list.php @@ -19,11 +19,21 @@ include_once __DIR__.'/init.php'; +$block_edit = $record['is_completato']; +$righe = $contratto->getRighe(); + echo '
+ @@ -34,16 +44,23 @@ echo ' - '; + '; // Righe documento -$righe = $contratto->getRighe(); $num = 0; foreach ($righe as $riga) { ++$num; echo ' + + @@ -126,7 +143,7 @@ foreach ($righe as $riga) { - + @@ -156,7 +173,7 @@ $netto_a_pagare = $contratto->netto; // Totale totale imponibile echo ' - - - - - - -
'; + if (!$block_edit && sizeof($righe) > 0) { + echo ' + '; + } + echo ' + '.tr('#').' '.tr('Descrizione').' '.tr('Q.tà').'
'; + if (!$block_edit) { + echo ' + '; + } + echo ' + '.$num.'
+ '.tr('Imponibile', [], ['upper' => true]).': @@ -169,7 +186,7 @@ echo ' if (!empty($sconto)) { echo '
+ '.tr('Sconto/maggiorazione', [], ['upper' => true]).': @@ -181,7 +198,7 @@ if (!empty($sconto)) { // Totale totale imponibile echo '
+ '.tr('Totale imponibile', [], ['upper' => true]).': @@ -194,7 +211,7 @@ if (!empty($sconto)) { // Totale iva echo '
+ '.tr('Iva', [], ['upper' => true]).': @@ -206,7 +223,7 @@ echo ' // Totale contratto echo '
+ '.tr('Totale', [], ['upper' => true]).': @@ -219,7 +236,7 @@ echo ' if (!empty($sconto_finale)) { echo '
+ '.tr('Sconto in fattura', [], ['upper' => true]).': @@ -233,7 +250,7 @@ if (!empty($sconto_finale)) { if ($totale != $netto_a_pagare) { echo '
+ '.tr('Netto a pagare', [], ['upper' => true]).': @@ -244,10 +261,22 @@ if ($totale != $netto_a_pagare) { } echo ' -
-
'; + '; +if (!$block_edit && sizeof($righe) > 0) { + echo ' +
+ + +
'; +} echo ' + + '; diff --git a/modules/ddt/actions.php b/modules/ddt/actions.php index 6c404437c..0b0b815fb 100755 --- a/modules/ddt/actions.php +++ b/modules/ddt/actions.php @@ -386,24 +386,50 @@ switch (filter('op')) { break; - // Scollegamento riga generica da ddt + // Eliminazione riga case 'delete_riga': - $id_riga = post('riga_id'); - $type = post('riga_type'); - - $riga = $ddt->getRiga($type, $id_riga); - - if (!empty($riga)) { + $id_righe = (array)post('righe'); + + foreach ($id_righe as $id_riga) { + $riga = Articolo::find($id_riga) ?: Riga::find($id_riga); + $riga = $riga ?: Descrizione::find($id_riga); + $riga = $riga ?: Sconto::find($id_riga); try { $riga->delete(); - - flash()->info(tr('Riga rimossa!')); } catch (InvalidArgumentException $e) { flash()->error(tr('Alcuni serial number sono già stati utilizzati!')); } + + $riga = null; } ricalcola_costiagg_ddt($id_record); + flash()->info(tr('Righe eliminate!')); + + break; + + // Duplicazione riga + case 'copy_riga': + $id_righe = (array)post('righe'); + + foreach ($id_righe as $id_riga) { + $riga = Articolo::find($id_riga) ?: Riga::find($id_riga); + $riga = $riga ?: Descrizione::find($id_riga); + $riga = $riga ?: Sconto::find($id_riga); + + $new_riga = $riga->replicate(); + $new_riga->setDocument($ddt); + $new_riga->qta_evasa = 0; + $new_riga->save(); + + if ($new_riga->isArticolo()) { + $new_riga->movimenta($new_riga->qta); + } + + $riga = null; + } + + flash()->info(tr('Righe duplicate!')); break; @@ -474,7 +500,9 @@ switch (filter('op')) { $copia_riga->save(); // Movimentazione forzata in direzione del documento - $copia_riga->movimenta($riga->qta); + if ($copia_riga->isArticolo()) { + $copia_riga->movimenta($copia_riga->qta); + } } // Salvataggio riferimento diff --git a/modules/ddt/row-list.php b/modules/ddt/row-list.php index d0b100412..0217cd594 100755 --- a/modules/ddt/row-list.php +++ b/modules/ddt/row-list.php @@ -19,11 +19,21 @@ include_once __DIR__.'/init.php'; +$block_edit = $record['flag_completato']; +$righe = $ddt->getRighe(); + echo '
+ @@ -34,10 +44,9 @@ echo ' - '; + '; // Righe documento -$righe = $ddt->getRighe(); $num = 0; foreach ($righe as $riga) { ++$num; @@ -59,6 +68,14 @@ foreach ($righe as $riga) { echo ' + + @@ -174,7 +191,7 @@ foreach ($righe as $riga) { - + @@ -204,7 +221,7 @@ $netto_a_pagare = $ddt->netto; // IMPONIBILE echo ' - @@ -219,7 +236,7 @@ echo ' if (!empty($sconto)) { echo ' - @@ -233,7 +250,7 @@ if (!empty($sconto)) { // TOTALE IMPONIBILE echo ' - @@ -248,7 +265,7 @@ if (!empty($sconto)) { // IVA echo ' - @@ -262,7 +279,7 @@ echo ' // TOTALE echo ' - @@ -277,7 +294,7 @@ echo ' if (!empty($sconto_finale)) { echo ' - -
'; + if (!$block_edit && sizeof($righe) > 0) { + echo ' + '; + } + echo ' + '.tr('#').' '.tr('Descrizione').' '.tr('Q.tà').'
'; + if (!$block_edit) { + echo ' + '; + } + echo ' + '.$num.'
+ '.tr('Imponibile', [], ['upper' => true]).':
+ '.tr('Sconto/maggiorazione', [], ['upper' => true]).':
+ '.tr('Totale imponibile', [], ['upper' => true]).':
+ '.tr('IVA', [], ['upper' => true]).':
+ '.tr('Totale', [], ['upper' => true]).':
+ '.tr('Sconto in fattura', [], ['upper' => true]).': @@ -291,7 +308,7 @@ if (!empty($sconto_finale)) { if ($totale != $netto_a_pagare) { echo '
+ '.tr('Netto a pagare', [], ['upper' => true]).': @@ -302,10 +319,22 @@ if ($totale != $netto_a_pagare) { } echo ' -
-
'; + '; +if (!$block_edit && sizeof($righe) > 0) { + echo ' +
+ + +
'; +} echo ' + + '; diff --git a/modules/fatture/actions.php b/modules/fatture/actions.php index 85ff4dcf6..df26f8ca0 100755 --- a/modules/fatture/actions.php +++ b/modules/fatture/actions.php @@ -631,22 +631,52 @@ switch (post('op')) { // Scollegamento riga generica da documento case 'delete_riga': - $id_riga = post('riga_id'); - $type = post('riga_type'); - $riga = $fattura->getRiga($type, $id_riga); + $id_righe = (array)post('righe'); + + foreach ($id_righe as $id_riga) { + $riga = Articolo::find($id_riga) ?: Riga::find($id_riga); + $riga = $riga ?: Descrizione::find($id_riga); + $riga = $riga ?: Sconto::find($id_riga); - if (!empty($riga)) { try { $riga->delete(); // Ricalcolo inps, ritenuta e bollo ricalcola_costiagg_fattura($id_record); - - flash()->info(tr('Riga rimossa!')); } catch (InvalidArgumentException $e) { flash()->error(tr('Alcuni serial number sono già stati utilizzati!')); } + + $riga = null; } + + flash()->info(tr('Righe eliminate!')); + + break; + + // Duplicazione riga + case 'copy_riga': + $id_righe = (array)post('righe'); + + foreach ($id_righe as $id_riga) { + $riga = Articolo::find($id_riga) ?: Riga::find($id_riga); + $riga = $riga ?: Descrizione::find($id_riga); + $riga = $riga ?: Sconto::find($id_riga); + + $new_riga = $riga->replicate(); + $new_riga->setDocument($fattura); + $new_riga->qta_evasa = 0; + $new_riga->save(); + + if ($new_riga->isArticolo()) { + $new_riga->movimenta($new_riga->qta); + } + + $riga = null; + } + + flash()->info(tr('Righe duplicate!')); + break; case 'add_serial': diff --git a/modules/fatture/row-list.php b/modules/fatture/row-list.php index 0a7f7d6c8..50ec45d1d 100755 --- a/modules/fatture/row-list.php +++ b/modules/fatture/row-list.php @@ -21,11 +21,21 @@ use Modules\Interventi\Intervento; include_once __DIR__.'/init.php'; +$block_edit = !empty($note_accredito) || in_array($record['stato'], ['Emessa', 'Pagato', 'Parzialmente pagato']) || !$abilita_genera; +$righe = $fattura->getRighe(); + echo '
+ @@ -35,10 +45,9 @@ echo ' - '; + '; // Righe documento -$righe = $fattura->getRighe(); $num = 0; foreach ($righe as $riga) { ++$num; @@ -90,6 +99,14 @@ foreach ($righe as $riga) { echo ' + + @@ -227,7 +244,7 @@ foreach ($righe as $riga) { - + @@ -260,7 +277,7 @@ $ritenuta_contributi = $fattura->totale_ritenuta_contributi; // IMPONIBILE echo ' - - - - - - - - - -
'; + if (!$block_edit && sizeof($righe) > 0) { + echo ' + '; + } + echo ' + '.tr('#').' '.tr('Descrizione').' '.tr('Q.tà').'
'; + if (!$block_edit) { + echo ' + '; + } + echo ' + '.$num.'
+ '.tr('Imponibile', [], ['upper' => true]).': @@ -273,7 +290,7 @@ echo ' if (!empty($sconto)) { echo '
+ '.tr('Sconto/maggiorazione', [], ['upper' => true]).': @@ -285,7 +302,7 @@ if (!empty($sconto)) { // TOTALE IMPONIBILE echo '
+ '.tr('Totale imponibile', [], ['upper' => true]).': @@ -299,7 +316,7 @@ if (!empty($sconto)) { if (!empty($rivalsa_inps)) { echo '
'; + '; if ($dir == 'entrata') { $descrizione_rivalsa = $database->fetchOne('SELECT CONCAT_WS(\' - \', codice, descrizione) AS descrizione FROM fe_tipo_cassa WHERE codice = '.prepare(setting('Tipo Cassa Previdenziale'))); @@ -323,7 +340,7 @@ if (!empty($rivalsa_inps)) { if (!empty($iva)) { echo '
'; + '; if ($records[0]['split_payment']) { echo ''.tr('Iva a carico del destinatario', [], ['upper' => true]).':'; @@ -342,7 +359,7 @@ if (!empty($iva)) { // TOTALE echo '
+ '.tr('Totale', [], ['upper' => true]).': @@ -355,7 +372,7 @@ echo ' if (!empty($ritenuta_acconto)) { echo '
+ '.tr("Ritenuta d'acconto", [], ['upper' => true]).': @@ -369,7 +386,7 @@ if (!empty($ritenuta_acconto)) { if (!empty($ritenuta_contributi)) { echo '
+ '.tr('Ritenuta previdenziale', [], ['upper' => true]).': @@ -383,7 +400,7 @@ if (!empty($ritenuta_contributi)) { if (!empty($sconto_finale)) { echo '
+ '.tr('Sconto in fattura', [], ['upper' => true]).': @@ -397,7 +414,7 @@ if (!empty($sconto_finale)) { if ($totale != $netto_a_pagare) { echo '
+ '.tr('Netto a pagare', [], ['upper' => true]).': @@ -408,10 +425,22 @@ if ($totale != $netto_a_pagare) { } echo ' -
-
'; + '; +if (!$block_edit && sizeof($righe) > 0) { + echo ' +
+ + +
'; +} echo ' + + '; diff --git a/modules/interventi/actions.php b/modules/interventi/actions.php index 8ddfb07ef..89128da67 100644 --- a/modules/interventi/actions.php +++ b/modules/interventi/actions.php @@ -406,20 +406,46 @@ switch (post('op')) { break; case 'delete_riga': - $id_riga = post('riga_id'); - $type = post('riga_type'); - $riga = $intervento->getRiga($type, $id_riga); - - if (!empty($riga)) { + $id_righe = (array)post('righe'); + + foreach ($id_righe as $id_riga) { + $riga = Articolo::find($id_riga) ?: Riga::find($id_riga); + $riga = $riga ?: Sconto::find($id_riga); try { $riga->delete(); - - flash()->info(tr('Riga rimossa!')); } catch (InvalidArgumentException $e) { flash()->error(tr('Alcuni serial number sono già stati utilizzati!')); } + + $riga = null; } + flash()->info(tr('Righe eliminate!')); + + break; + + // Duplicazione riga + case 'copy_riga': + $id_righe = (array)post('righe'); + + foreach ($id_righe as $id_riga) { + $riga = Articolo::find($id_riga) ?: Riga::find($id_riga); + $riga = $riga ?: Sconto::find($id_riga); + + $new_riga = $riga->replicate(); + $new_riga->setDocument($intervento); + $new_riga->qta_evasa = 0; + $new_riga->save(); + + if ($new_riga->isArticolo()) { + $new_riga->movimenta($new_riga->qta); + } + + $riga = null; + } + + flash()->info(tr('Righe duplicate!')); + break; case 'manage_barcode': @@ -773,6 +799,10 @@ switch (post('op')) { $new_riga->qta_evasa = 0; $new_riga->save(); + + if ($new_riga->isArticolo()) { + $new_riga->movimenta($new_riga->qta); + } } } diff --git a/modules/interventi/row-list.php b/modules/interventi/row-list.php index 6775f1278..11380c744 100755 --- a/modules/interventi/row-list.php +++ b/modules/interventi/row-list.php @@ -19,15 +19,23 @@ include_once __DIR__.'/init.php'; -$show_prezzi = Auth::user()['gruppo'] != 'Tecnici' || (Auth::user()['gruppo'] == 'Tecnici' && setting('Mostra i prezzi al tecnico')); - +$block_edit = $record['flag_completato']; $righe = $intervento->getRighe(); - echo ' +$show_prezzi = Auth::user()['gruppo'] != 'Tecnici' || (Auth::user()['gruppo'] == 'Tecnici' && setting('Mostra i prezzi al tecnico')); + +echo '
+ '; @@ -47,7 +55,7 @@ $righe = $intervento->getRighe(); - '; + '; foreach ($righe as $riga) { $extra = ''; @@ -59,6 +67,13 @@ $righe = $intervento->getRighe(); echo ' + - - -
'; + if (!$block_edit && sizeof($righe) > 0) { + echo ' + '; + } + echo ' + '.tr('Descrizione').' '.tr('Q.tà').'
'; + if (!$block_edit) { + echo ' + '; + } + echo ' + '; // Informazioni aggiuntive sulla destra @@ -155,7 +170,7 @@ $righe = $intervento->getRighe(); - + @@ -179,7 +194,7 @@ $righe = $intervento->getRighe(); // IMPONIBILE echo '
+ '.tr('Imponibile', [], ['upper' => true]).': @@ -192,7 +207,7 @@ $righe = $intervento->getRighe(); if (!empty($intervento->sconto)) { echo '
+ '.tr('Sconto/maggiorazione', [], ['upper' => true]).': @@ -204,7 +219,7 @@ $righe = $intervento->getRighe(); // Totale imponibile scontato echo '
+ '.tr('Totale imponibile', [], ['upper' => true]).': @@ -217,10 +232,22 @@ $righe = $intervento->getRighe(); } echo' -
-
'; + '; +if (!$block_edit && sizeof($righe) > 0) { + echo ' +
+ + +
'; +} echo ' + + '; diff --git a/modules/ordini/actions.php b/modules/ordini/actions.php index efe959560..49c81b5ee 100755 --- a/modules/ordini/actions.php +++ b/modules/ordini/actions.php @@ -322,22 +322,47 @@ switch (post('op')) { // Scollegamento riga generica da ordine case 'delete_riga': - $id_riga = post('riga_id'); - $type = post('riga_type'); - $riga = $ordine->getRiga($type, $id_riga); + $id_righe = (array)post('righe'); + + foreach ($id_righe as $id_riga) { + $riga = Articolo::find($id_riga) ?: Riga::find($id_riga); + $riga = $riga ?: Descrizione::find($id_riga); + $riga = $riga ?: Sconto::find($id_riga); - if (!empty($riga)) { try { $riga->delete(); - - flash()->info(tr('Riga rimossa!')); } catch (InvalidArgumentException $e) { flash()->error(tr('Alcuni serial number sono già stati utilizzati!')); } + + $riga = null; } ricalcola_costiagg_ordine($id_record); + flash()->info(tr('Righe eliminate!')); + + break; + + // Duplicazione riga + case 'copy_riga': + $id_righe = (array)post('righe'); + + foreach ($id_righe as $id_riga) { + $riga = Articolo::find($id_riga) ?: Riga::find($id_riga); + $riga = $riga ?: Descrizione::find($id_riga); + $riga = $riga ?: Sconto::find($id_riga); + + $new_riga = $riga->replicate(); + $new_riga->setDocument($ordine); + $new_riga->qta_evasa = 0; + $new_riga->save(); + + $riga = null; + } + + flash()->info(tr('Righe duplicate!')); + break; // Eliminazione ordine diff --git a/modules/ordini/row-list.php b/modules/ordini/row-list.php index abc33ddd4..07808eb1d 100755 --- a/modules/ordini/row-list.php +++ b/modules/ordini/row-list.php @@ -19,11 +19,21 @@ include_once __DIR__.'/init.php'; +$block_edit = $record['flag_completato']; +$righe = $ordine->getRighe(); + echo '
+ @@ -35,12 +45,11 @@ echo ' - '; + '; // Righe documento $today = new Carbon\Carbon(); $today = $today->startOfDay(); -$righe = $ordine->getRighe(); $num = 0; foreach ($righe as $riga) { ++$num; @@ -62,6 +71,14 @@ foreach ($righe as $riga) { echo ' + + @@ -213,7 +230,7 @@ foreach ($righe as $riga) { - + @@ -243,7 +260,7 @@ $netto_a_pagare = $ordine->netto; // IMPONIBILE echo ' - - - - - - -
'; + if (!$block_edit && sizeof($righe) > 0) { + echo ' + '; + } + echo ' + '.tr('#').' '.tr('Descrizione').' '.tr('Prev. evasione').'
'; + if (!$block_edit) { + echo ' + '; + } + echo ' + '.$num.'
+ '.tr('Imponibile', [], ['upper' => true]).': @@ -256,7 +273,7 @@ echo ' if (!empty($sconto)) { echo '
+ '.tr('Sconto/maggiorazione', [], ['upper' => true]).': @@ -268,7 +285,7 @@ if (!empty($sconto)) { // TOTALE IMPONIBILE echo '
+ '.tr('Totale imponibile', [], ['upper' => true]).': @@ -281,7 +298,7 @@ if (!empty($sconto)) { // IVA echo '
+ '.tr('Iva', [], ['upper' => true]).': @@ -293,7 +310,7 @@ echo ' // TOTALE echo '
+ '.tr('Totale', [], ['upper' => true]).': @@ -306,7 +323,7 @@ echo ' if (!empty($sconto_finale)) { echo '
+ '.tr('Sconto in fattura', [], ['upper' => true]).': @@ -320,7 +337,7 @@ if (!empty($sconto_finale)) { if ($totale != $netto_a_pagare) { echo '
+ '.tr('Netto a pagare', [], ['upper' => true]).': @@ -331,10 +348,22 @@ if ($totale != $netto_a_pagare) { } echo ' -
-
'; + '; +if (!$block_edit && sizeof($righe) > 0) { + echo ' +
+ + +
'; +} echo ' + + '; diff --git a/modules/preventivi/actions.php b/modules/preventivi/actions.php index 0ae8bc7fc..665b4a5e4 100755 --- a/modules/preventivi/actions.php +++ b/modules/preventivi/actions.php @@ -354,17 +354,40 @@ switch (post('op')) { // Eliminazione riga case 'delete_riga': - $id_riga = post('riga_id'); - $type = post('riga_type'); - - $riga = $preventivo->getRiga($type, $id_riga); - - if (!empty($riga)) { + $id_righe = (array)post('righe'); + + foreach ($id_righe as $id_riga) { + $riga = Articolo::find($id_riga) ?: Riga::find($id_riga); + $riga = $riga ?: Descrizione::find($id_riga); + $riga = $riga ?: Sconto::find($id_riga); $riga->delete(); - flash()->info(tr('Riga eliminata!')); + $riga = null; } + flash()->info(tr('Righe eliminate!')); + + break; + + // Duplicazione riga + case 'copy_riga': + $id_righe = (array)post('righe'); + + foreach ($id_righe as $id_riga) { + $riga = Articolo::find($id_riga) ?: Riga::find($id_riga); + $riga = $riga ?: Descrizione::find($id_riga); + $riga = $riga ?: Sconto::find($id_riga); + + $new_riga = $riga->replicate(); + $new_riga->setDocument($preventivo); + $new_riga->qta_evasa = 0; + $new_riga->save(); + + $riga = null; + } + + flash()->info(tr('Righe duplicate!')); + break; case 'add_revision': diff --git a/modules/preventivi/row-list.php b/modules/preventivi/row-list.php index 622711d1b..aca454ff8 100755 --- a/modules/preventivi/row-list.php +++ b/modules/preventivi/row-list.php @@ -19,11 +19,21 @@ include_once __DIR__.'/init.php'; +$block_edit = $record['is_completato']; +$righe = $preventivo->getRighe(); + echo '
+ @@ -34,18 +44,25 @@ echo ' - '; + '; // Righe documento $today = new Carbon\Carbon(); $today = $today->startOfDay(); -$righe = $preventivo->getRighe(); $num = 0; foreach ($righe as $riga) { ++$num; echo ' + + @@ -165,7 +182,7 @@ foreach ($righe as $riga) { - + @@ -195,7 +212,7 @@ $netto_a_pagare = $preventivo->netto; // Totale imponibile scontato echo ' - - - - - - - - - '; echo ' -
'; + if (!$block_edit && sizeof($righe) > 0) { + echo ' + '; + } + echo ' + '.tr('#').' '.tr('Descrizione').' '.tr('Prev. evasione').'
'; + if (!$block_edit) { + echo ' + '; + } + echo ' + '.$num.'
+ '.tr('Imponibile', [], ['upper' => true]).': @@ -208,7 +225,7 @@ echo ' if (!empty($sconto)) { echo '
+ '.tr('Sconto/maggiorazione', [], ['upper' => true]).': @@ -220,7 +237,7 @@ if (!empty($sconto)) { // Totale imponibile scontato echo '
+ '.tr('Totale imponibile', [], ['upper' => true]).': @@ -233,7 +250,7 @@ if (!empty($sconto)) { // Totale iva echo '
+ '.tr('Iva', [], ['upper' => true]).': @@ -245,7 +262,7 @@ echo ' // Totale echo '
+ '.tr('Totale', [], ['upper' => true]).': @@ -258,7 +275,7 @@ echo ' if (!empty($sconto_finale)) { echo '
+ '.tr('Sconto in fattura', [], ['upper' => true]).': @@ -272,7 +289,7 @@ if (!empty($sconto_finale)) { if ($totale != $netto_a_pagare) { echo '
+ '.tr('Netto a pagare', [], ['upper' => true]).': @@ -289,7 +306,7 @@ $margine_icon = ($margine <= 0 and $preventivo->totale > 0) ? 'warning' : 'check echo '
+ '.tr('Costi').': @@ -299,7 +316,7 @@ echo '
+ '.tr('Margine (_PRC_%)', [ '_PRC_' => numberFormat($preventivo->margine_percentuale), ]).': @@ -311,10 +328,22 @@ echo '
-
'; + '; +if (!$block_edit && sizeof($righe) > 0) { + echo ' +
+ + +
'; +} echo ' + + ';