Hallo, ich habe festgestellt, das wenn ich mit ClickDirectpay im Testmodus bezahlen will, die Umsatzsteuer für die Versandkosten nicht mit berechnet werden. Also bei einem Warenwert von 20,00 Euro inkl. MwSt. und 3,95 Euro Versandkosten inkl. MwSt. werden anstatt 23,95 Euro nur 23,32 Euro als Zahlsumme übernommen. Der fehlende Betrag ist genau der MwSt.-Betrag von den 3,95 Euro Versandkosten. Kann das jemand bestätigen oder habe ich einen Denk- / Einstellungsfehler?
Standardmodul "Pauschale Versandkosten (flat)" Einstellungen siehe Screenshot Shop-Version: 3.2.0.0 (Beta2) Template: Honeygrid
Ja. Ich hatte ursprünglich den Aufschlag der Steuer drin, ClickDirectPay wollte den 'raushaben.... Ersetze mal "cdp/cdp_start_payment.php" mit dem folgenden code.... Code: <?php /* * @version cdp_start_payment.php version 1.0 - $Date: 2016-06-01 $ * @author Avenger * Copyright (c) 2016 Avenger, apprentice@gmx.de * @link http://www.xt-commerce.com * @license http://opensource.org/licenses/gpl-license.php GNU Public License * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 2 of the License * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * *********************************************************************************** * this file contains code based on: * (c) 2000 - 2001 The Exchange Project * (c) 2001 - 2003 osCommerce, Open Source E-Commerce Solutions * (c) 2003 nextcommerce (account_history_info.php,v 1.17 2003/08/17); www.nextcommerce.org * (c) 2003 - 2006 XT-Commerce * (c) 2016 - ClickDirectPay * Released under the GNU General Public License *********************************************************************************** * */ chdir('../'); include('includes/application_top.php'); require('cdp/cdp.config.inc.php'); include('lang/'.$_SESSION['language'].'/modules/payment/clickdirectpay.php'); require (DIR_WS_CLASSES . 'payment.php'); require (DIR_WS_CLASSES . 'order.php'); require (DIR_WS_CLASSES . 'order_total.php'); $order=new order(); $order_id=$_SESSION['tmp_oID']; $description=sprintf(MODULE_PAYMENT_CLICKDIRECTPAY_REASON_1_TEXT,$order_id).date('d.m.Y, H:i:s'); $order_total=new order_total(); $cdp=$GLOBALS['ot_clickdirectpay']; if (is_object($cdp) && $cdp->enabled) { $cdp->process(); } $total = $order->info['total']; if ($_SESSION['customers_status']['customers_status_show_price_tax'] == 1 || $_SESSION['customers_status']['customers_status_add_tax_ot'] == 1) { $total += $order->info['tax']; } $result=PaymentCDPRequest(number_format($total,2),$description);
Der Ansatz ist nicht schlecht, aber leider der falsche Weg. Nach der Änderung ergibt sich jetzt eine zu hohe Summe. Um bei dem Beispiel zu bleiben, werden jetzt anstatt der fälligen 23,95 Euro 26,51 Euro abgebucht. Die überschüssige Summe ergibt sich aus dem Überschuss der Umsatzsteuer. In "$order->info['total']" ist die Umsatzsteuer für den Artikel enthalten, aber nicht die Umsatzsteuer für die Versandkosten. in "$order->info['tax']" ist wohl die gesamte Umsatzsteuer (Artikel und Versandkosten) enthalten. Entweder muss nun auf Zeile 55 die Variable "$total" mit dem Nettowerten gefüllt werden (was aus meiner Sicht logisch erscheint) oder die Erhöhung der Variblen "$total" in der Zeile 59 darf nur um den Umsatzsteuerbetrag der Versandkosten erhöht werden, was mir durch die Vermischung von Brutto und Nettobeträgen unlogisch erscheint.
OK, ich habe das jetzt komplett geändert, und hole mir den Gesamtwert aus der "order_totals"-Tabelle, da steht immer der richtiger Wert drinnen. Ersetze mal "cdp/cdp_start_payment.php" mit dem folgenden code.... Code: <?php /* * @version cdp_start_payment.php version 1.0 - $Date: 2016-06-01 $ * @author Avenger * Copyright (c) 2016 Avenger, apprentice@gmx.de * @link http://www.xt-commerce.com * @license http://opensource.org/licenses/gpl-license.php GNU Public License * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 2 of the License * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * *********************************************************************************** * this file contains code based on: * (c) 2000 - 2001 The Exchange Project * (c) 2001 - 2003 osCommerce, Open Source E-Commerce Solutions * (c) 2003 nextcommerce (account_history_info.php,v 1.17 2003/08/17); www.nextcommerce.org * (c) 2003 - 2006 XT-Commerce * (c) 2016 - ClickDirectPay * Released under the GNU General Public License *********************************************************************************** * */ chdir('../'); include('includes/application_top.php'); require('cdp/cdp.config.inc.php'); include('lang/'.$_SESSION['language'].'/modules/payment/clickdirectpay.php'); $order_id=$_SESSION['tmp_oID']; $description=sprintf(MODULE_PAYMENT_CLICKDIRECTPAY_REASON_1_TEXT,$order_id).date('d.m.Y, H:i:s'); $total = 0; $sql="SELECT value FROM ".TABLE_ORDERS_TOTAL." WHERE orders_id='$order_id' AND class='ot_total'"; $res=xtc_db_query($sql); if (xtc_db_num_rows($res)) { $order_total=xtc_db_fetch_array($res); $total=$order_total['value']; } $result=PaymentCDPRequest(number_format($total,2),$description); Für diese Bestellung wird dann der richtige Wert an ClickDirectPay übermittelt.