Fix visualizzazione maggiorazioni

This commit is contained in:
Thomas Zilio 2019-07-11 17:34:06 +02:00
parent 86f2a10040
commit 3f3d16e0f2
6 changed files with 6 additions and 6 deletions

View File

@ -64,7 +64,7 @@ foreach ($rs as $r) {
echo '
'.moneyFormat($r['subtotale'] / $r['qta']);
if ($r['sconto_unitario'] > 0) {
if (abs($r['sconto_unitario']) > 0) {
echo '
<br><small class="label label-danger">'.tr('sconto _TOT_ _TYPE_', [
'_TOT_' => Translator::numberToLocale($r['sconto_unitario']),

View File

@ -101,7 +101,7 @@ if (!empty($rs)) {
echo '
'.moneyFormat($r['subtotale'] / $r['qta']);
if ($r['sconto_unitario'] > 0) {
if (abs($r['sconto_unitario']) > 0) {
echo '
<br><small class="label label-danger">'.tr('sconto _TOT_ _TYPE_', [
'_TOT_' => Translator::numberToLocale($r['sconto_unitario']),

View File

@ -195,7 +195,7 @@ foreach ($righe as $row) {
</small>';
}
if ($row->sconto_unitario > 0) {
if (abs($row->sconto_unitario) > 0) {
echo '
<br><small class="label label-danger">'.tr('sconto _TOT_ _TYPE_', [
'_TOT_' => Translator::numberToLocale($row->sconto_unitario),

View File

@ -61,7 +61,7 @@ if (count($rs2) > 0) {
<td class="text-right">
'.moneyFormat($r['prezzo_vendita']);
if ($r['sconto_unitario'] > 0) {
if (abs($r['sconto_unitario']) > 0) {
echo '
<br><span class="label label-danger">
- '.tr('sconto _TOT_ _TYPE_', [

View File

@ -103,7 +103,7 @@ if (!empty($rs)) {
echo '
'.moneyFormat($r['subtotale'] / $r['qta']);
if ($r['sconto_unitario'] > 0) {
if (abs($r['sconto_unitario']) > 0) {
echo '
<br><small class="label label-danger">'.tr('sconto _TOT_ _TYPE_', [
'_TOT_' => Translator::numberToLocale($r['sconto_unitario']),

View File

@ -65,7 +65,7 @@ foreach ($rs as $r) {
echo '
'.moneyFormat($r['subtotale'] / $r['qta']);
if ($r['sconto_unitario'] > 0) {
if (abs($r['sconto_unitario']) > 0) {
echo '
<br><small class="label label-danger">'.tr('sconto _TOT_ _TYPE_', [
'_TOT_' => Translator::numberToLocale($r['sconto_unitario']),