diff --git a/modules/movimenti/actions.php b/modules/movimenti/actions.php index a4b69a518..0ca024854 100644 --- a/modules/movimenti/actions.php +++ b/modules/movimenti/actions.php @@ -12,7 +12,7 @@ switch (post('op')) { $qta = ( post('direzione') == 'Carico manuale' ) ? post('qta') : -post('qta'); if( post('direzione') == 'Carico manuale' ){ - if( $idsede_partenza == 0){ + if( $idsede_partenza == 0 && $idsede_destinazione != 0){ $qta = -post('qta'); } elseif( $idsede_partenza != 0 && $idsede_destinazione == 0){ $qta = post('qta'); @@ -20,7 +20,7 @@ switch (post('op')) { $idsede_destinazione = post('idsede_partenza'); } } else { - if( $idsede_destinazione == 0){ + if( $idsede_partenza != 0 && $idsede_destinazione == 0){ $qta = -post('qta'); $idsede_partenza = post('idsede_destinazione'); $idsede_destinazione = post('idsede_partenza'); diff --git a/modules/movimenti/add.php b/modules/movimenti/add.php index 4f2daae47..06f56ccdf 100644 --- a/modules/movimenti/add.php +++ b/modules/movimenti/add.php @@ -13,7 +13,7 @@ $_SESSION['superselect']['idsede_destinazione'] = 0; ?> -