1
0
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:
MatteoPistorello
2021-10-06 15:03:29 +02:00
parent 1d5e831de3
commit fd47b5d84e
2 changed files with 3 additions and 10 deletions

View File

@@ -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']);