#183 closed Bug/Fehler (fixed)
preisberechung rundungsfehler
| Reported by: | Owned by: | Ronald Parcinski | |
|---|---|---|---|
| Priority: | hoch | Milestone: | modified-shop-2.0.0.0 |
| Component: | Admin | Version: | 2.0.0.0 |
| Keywords: | Cc: | ||
| Blocked By: | Blocking: |
Description
im aktuellen download release gibt es scheinbar einen bug in ./admin/orders_edit.php | ca. zeile: 500
$products_old_price = $xtPrice->xtcGetPrice($products['products_id'], $format = false, $products['products_quantity'], '', '', '', $order->customer['ID']);
reproduktion des fehlers:
ich gebe einem produkt welches über attribute ohne aufpreis verfügt einen bruttopreis von 135 (netto: 113.4454 )
wenn ich für einen normalen privatkunden aus D eine rechnug im adminbereich erstelle und dieses produkt zuweise,
steht im preisfeld "135.0000" -> wenn ich dann ein attribut (ohne aufpreis) hinzufüge ändert sich der preis auf "135.0100"
ursache ist, dass die variable $products_old_price den wert "113.45" (also einen gerundeten netto-wert) anstatt "113.4454" liefert, auf welchen dann anschliessend noch die steuern gerechnet werden.
Attachments (0)
Change History (9)
comment:1 by , 12 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → accepted |
comment:2 by , 12 years ago
| Priority: | normal → hoch |
|---|---|
| Version: | 1.06 → 2.0 |
comment:3 by , 12 years ago
comment:4 by , 12 years ago
| Milestone: | → modified-shop-2.00 |
|---|
follow-up: 6 comment:5 by , 12 years ago
| Resolution: | → fixed |
|---|---|
| Status: | accepted → closed |
gefixt in r6186
comment:6 by , 12 years ago
comment:7 by , 12 years ago
Änderungen sind nur in der xtcPrice.php, bitte Rückmeldung
Index: /tags/modified-shop-1.06/includes/classes/xtcPrice.php
===================================================================
--- /tags/modified-shop-1.06/includes/classes/xtcPrice.php (revision 6185)
+++ /tags/modified-shop-1.06/includes/classes/xtcPrice.php (revision 6186)
@@ -118,4 +118,6 @@
}
+ $this->show_price_tax = ($tax_class == '') ? 0 : $_SESSION['customers_status']['customers_status_show_price_tax'];
+
// get Tax rate
if ($cedit_id != 0) {
@@ -195,5 +197,5 @@
$price += $price / 100 * $tax;
$price = $this->xtcCalculateCurr($price);
- return round($price, $this->currencies[$this->actualCurr]['decimal_places']);
+ return $this->show_price_tax ? round($price, $this->currencies[$this->actualCurr]['decimal_places']) : $price;
}
@@ -541,5 +543,5 @@
}
} else {
- return round($price, $decimal_places);
+ return $this->show_price_tax ? round($price, $decimal_places) : $price;
}
}
@@ -584,5 +586,5 @@
}
} else {
- return round($sPrice, $this->currencies[$this->actualCurr]['decimal_places']);
+ return $this->show_price_tax ? round($sPrice, $this->currencies[$this->actualCurr]['decimal_places']) : $price;
}
}
@@ -626,5 +628,5 @@
}
} else {
- return round($sPrice, $this->currencies[$this->actualCurr]['decimal_places']);
+ return $this->show_price_tax ? round($sPrice, $this->currencies[$this->actualCurr]['decimal_places']) : $price;
}
}
@@ -686,5 +688,5 @@
}
} else {
- return round($sPrice, $this->currencies[$this->actualCurr]['decimal_places']);
+ return $this->show_price_tax ? round($sPrice, $this->currencies[$this->actualCurr]['decimal_places']) : $price;
}
}
comment:8 by , 12 years ago
hab ich gesehen,
danke - hab mir ne copy gemacht und werf es später mal ein mein git.
das diff kann also aus den kommentaren wenn notwendig wieder entfernt werden.

Der Rundungsfehler tritt auch im Frontend auf bei den Einstellungen:
Preise inkl. MwSt.: Nein
UST in Rechnung ausweisen: Ja