﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking
1890	Fehler in Umsatzstatistik für Versand und Sonstiges	Torsten Riemer	somebody	"Stellt ein Händler beispielsweise 4,22€ netto bei den Versandkosten ein, so wird dem Kunden 4,90€ angezeigt und berechnet. Gerundet aus 4,8952€.

In der Umsatzstatistik wird aber nicht mit den gerundeten Werten gerechnet, die der Kunde angezeigt bekommt, sondern mit den tatsächlichen Werten (ot.value vs ot.text) und erst zum Schluss gerundet, was zu Abweichungen einiger Cent führen kann.

Ich schlage daher vor bereits die Einzelwerte zu runden in ""/admin/includes/classes/sales_report.php"".

Suche:
{{{
      // query for shipping
      $this->queryShipping = ""SELECT sum(ot.value/o.currency_value) as shipping 
                                FROM "" . TABLE_ORDERS . "" o
                                JOIN "" . TABLE_ORDERS_TOTAL . "" ot 
                                     ON (ot.orders_id = o.orders_id AND  ot.class = 'ot_shipping')"";

      // query for additional
      $this->queryAdditional = ""SELECT sum(ot.value/o.currency_value) as additional 
                                  FROM "" . TABLE_ORDERS . "" o
                                  JOIN "" . TABLE_ORDERS_TOTAL . "" ot 
                                       ON (ot.orders_id = o.orders_id AND  ot.class NOT IN ('ot_subtotal', 'ot_shipping', 'ot_subtotal_no_tax', 'ot_tax', 'ot_total', 'ot_z_bpytc_total', 'ot_z_paylater_total', 'ot_easycredit_fee', 'ot_paypalinstallment_fee'))"";
}}}
Ersetze mit:
{{{
      // query for shipping
      $this->queryShipping = ""SELECT sum(round(ot.value, 2)/o.currency_value) as shipping 
                                FROM "" . TABLE_ORDERS . "" o
                                JOIN "" . TABLE_ORDERS_TOTAL . "" ot 
                                     ON (ot.orders_id = o.orders_id AND  ot.class = 'ot_shipping')"";

      // query for additional
      $this->queryAdditional = ""SELECT sum(round(ot.value, 2)/o.currency_value) as additional 
                                  FROM "" . TABLE_ORDERS . "" o
                                  JOIN "" . TABLE_ORDERS_TOTAL . "" ot 
                                       ON (ot.orders_id = o.orders_id AND  ot.class NOT IN ('ot_subtotal', 'ot_shipping', 'ot_subtotal_no_tax', 'ot_tax', 'ot_total', 'ot_z_bpytc_total', 'ot_z_paylater_total', 'ot_easycredit_fee', 'ot_paypalinstallment_fee'))"";
}}}
Ich denke die anderen Werte in der Umsatzstatistik passen, aber vielleicht kann da auch nochmal jemand rüber schauen?

Irgendwelche Einwände?"	Bug/Fehler	closed	normal	modified-shop-2.0.6.0	Admin	trunk	fixed				
