mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-06-05 22:09:38 +02:00
Fix calcola sconto importFE
This commit is contained in:
@@ -70,10 +70,6 @@ function sum($first, $second = null, $decimals = 4)
|
||||
*/
|
||||
function calcola_sconto($data)
|
||||
{
|
||||
if (!isset($data['cumulativo'])) {
|
||||
$data['cumulativo'] = true;
|
||||
}
|
||||
|
||||
if ($data['tipo'] == 'PRC') {
|
||||
$result = 0;
|
||||
|
||||
@@ -84,9 +80,7 @@ function calcola_sconto($data)
|
||||
$discount = $price / 100 * floatval($percentage);
|
||||
|
||||
$result += $discount;
|
||||
if ($data['cumulativo']) {
|
||||
$price -= $discount;
|
||||
}
|
||||
$price -= $discount;
|
||||
}
|
||||
} else {
|
||||
$result = floatval($data['sconto']);
|
||||
|
||||
Reference in New Issue
Block a user