From 26fc1dc0f795b9c9985ac57ccdef82c5ab35753e Mon Sep 17 00:00:00 2001 From: Pek5892 Date: Thu, 27 Apr 2023 17:31:55 +0200 Subject: [PATCH] Fix minore confronta prezzi --- modules/contratti/actions.php | 2 +- modules/ddt/actions.php | 2 +- modules/fatture/actions.php | 2 +- modules/interventi/actions.php | 3 ++- modules/ordini/actions.php | 2 +- modules/preventivi/actions.php | 2 +- 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/modules/contratti/actions.php b/modules/contratti/actions.php index 2e39a9b01..e901c1c85 100644 --- a/modules/contratti/actions.php +++ b/modules/contratti/actions.php @@ -671,7 +671,7 @@ switch (post('op')) { foreach ($righe as $riga) { $dbo->query( 'UPDATE co_righe_contratti - SET prezzo_unitario = '.$riga['price'].' + SET subtotale = '.$riga['price'].' AND prezzo_unitario = '.$riga['price'].' WHERE id = '.$riga['id'] ); } diff --git a/modules/ddt/actions.php b/modules/ddt/actions.php index ec384614e..ef7db5773 100755 --- a/modules/ddt/actions.php +++ b/modules/ddt/actions.php @@ -696,7 +696,7 @@ switch (filter('op')) { foreach ($righe as $riga) { $dbo->query( 'UPDATE dt_righe_ddt - SET prezzo_unitario = '.$riga['price'].' + SET subtotale = '.$riga['price'].' AND prezzo_unitario = '.$riga['price'].' WHERE id = '.$riga['id'] ); } diff --git a/modules/fatture/actions.php b/modules/fatture/actions.php index 0cf8f6ba1..04de23da1 100755 --- a/modules/fatture/actions.php +++ b/modules/fatture/actions.php @@ -1070,7 +1070,7 @@ switch (post('op')) { foreach ($righe as $riga) { $dbo->query( 'UPDATE co_righe_documenti - SET prezzo_unitario = '.$riga['price'].' + SET subtotale = '.$riga['price'].' AND prezzo_unitario = '.$riga['price'].' WHERE id = '.$riga['id'] ); } diff --git a/modules/interventi/actions.php b/modules/interventi/actions.php index 7bcebddf9..ec1144b74 100644 --- a/modules/interventi/actions.php +++ b/modules/interventi/actions.php @@ -1164,7 +1164,8 @@ switch (post('op')) { foreach ($righe as $riga) { $dbo->query( 'UPDATE in_righe_interventi - SET prezzo_unitario = '.$riga['price'].' + SET subtotale = '.$riga['price'].' AND prezzo_unitario = '.$riga['price'].' + WHERE id = '.$riga['id'] ); } diff --git a/modules/ordini/actions.php b/modules/ordini/actions.php index 3c9c60a1a..157c3b10f 100755 --- a/modules/ordini/actions.php +++ b/modules/ordini/actions.php @@ -723,7 +723,7 @@ switch (post('op')) { foreach ($righe as $riga) { $dbo->query( 'UPDATE or_righe_ordini - SET prezzo_unitario = '.$riga['price'].' + SET subtotale = '.$riga['price'].' AND prezzo_unitario = '.$riga['price'].' WHERE id = '.$riga['id'] ); } diff --git a/modules/preventivi/actions.php b/modules/preventivi/actions.php index 3bc425228..67e368bd4 100755 --- a/modules/preventivi/actions.php +++ b/modules/preventivi/actions.php @@ -546,7 +546,7 @@ switch (post('op')) { foreach ($righe as $riga) { $dbo->query( 'UPDATE co_righe_preventivi - SET prezzo_unitario = '.$riga['price'].' + SET subtotale = '.$riga['price'].' AND prezzo_unitario = '.$riga['price'].' WHERE id = '.$riga['id'] ); }