Rabatt wird nicht übermittelt.

Vollautomat

Gut bekanntes Mitglied
21. Juli 2010
292
3
Hallo,
benutze eine an den xtc- modified Shop angepasste version eures Connector.
Dieser hat bis jetzt auch ohne Probleme funktioniert bis ich das modul ot-payment eingebaut habe.
Dieses soll eigendlich bei Vorkasse einen Rabatt gewehren und bei einer anderen Zahlungsweise einen aufschlag berechnen.
Dises funktioniert im Shop auch ohne Problem.

Wenn ich nun aber die Daten ins WaWi übertrage macht er aus dem Vorkasse Rabatt einen aufschlag...
Hat vieleicht noch jemand dieses Problem?

Wenn ich das richtig sehe liegt das an der Datei GetBestellungPos.php

PHP:
<?php
/**
 * jtlwawi_connector/dbeS/GetBestellungPos.php
 * Synchronisationsscript
 * 
 * Es gelten die Nutzungs- und Lizenzhinweise unter http://www.jtl-software.de/jtlwawi.php
 * 
 * @author JTL-Software <thomas@jtl-software.de>
 * @copyright 2006, JTL-Software
 * @link http://jtl-software.de/jtlwawi.php
 * @version v1.07 / 06.06.07
*/

require_once("syncinclude.php");

$return=3;
if (auth())
{
    $return=5;
    if (intval($_POST['KeyBestellung']))
    {
        //glob einstellungen
        $cur_query = eS_execute_query("select versandMwst,tax_zone_id from eazysales_einstellungen");
        $einstellungen = mysql_fetch_object($cur_query);
        $allowTax = 1;
        
        $return = 0;        
        //hole orderposes
        $cur_query = eS_execute_query("select * from orders_products where orders_id=".intval($_POST['KeyBestellung'])." order by orders_products_id");
        while ($BestellungPos = mysql_fetch_object($cur_query))
        {
            $allowTax = $BestellungPos->allow_tax;
            if ($BestellungPos->allow_tax==0) //bruttopreis daraus machen
            {
                $BestellungPos->products_price*=((100+$BestellungPos->products_tax)/100);
            }

            //hole etl aufpreise
            $aufpreis=0;
            $aufpreise_query = eS_execute_query("select options_values_price,price_prefix from orders_products_attributes where orders_id=".$BestellungPos->orders_id." and orders_products_id=".$BestellungPos->orders_products_id." and options_values_price!=0");
            while ($aufpreis_arr = mysql_fetch_row($aufpreise_query))
            {
                $aufp=0;
                $aufp=$aufpreis_arr[0];
                if (($aufpreis_arr[1])=="-")
                    $aufp*=-1;
                $aufpreis+=($aufp*(100+$BestellungPos->products_tax))/100;                
            }
            
            //mappe bestellpos
            $kBestellPos = setMappingBestellPos($BestellungPos->orders_products_id);
            echo(CSVkonform($kBestellPos).';');
            echo(CSVkonform(intval($_POST['KeyBestellung'])).';');
            echo(CSVkonform(getEsArtikel($BestellungPos->products_id)).';');
            echo(CSVkonform($BestellungPos->products_name).';');
            echo(CSVkonform($BestellungPos->products_price-$aufpreis).';');
            echo(CSVkonform($BestellungPos->products_tax).';');
            echo(CSVkonform($BestellungPos->products_quantity).';');
            echo("\n");
        }
        
        //letzte Positionen wie Versand, Mindermengenzuschlag, Rabatt, Kupon etc.
        $cur_query = eS_execute_query("select * from orders_total where (class=\"ot_shipping\" OR class=\"ot_cod_fee\" OR class=\"ot_coupon\" OR class=\"ot_discount\" OR class=\"ot_orderdiscount\" OR class=\"ot_gv\" OR class=\"ot_loworderfee\" OR class=\"ot_ps_fee\" OR class=\"ot_payment\") and orders_id=".intval($_POST['KeyBestellung'])." order by sort_order");
        while ($total_pos = mysql_fetch_object($cur_query))
        {
            if ($total_pos->class=="ot_shipping" || $total_pos->value!=0)
            {
                //mappe bestellpos
                $kBestellPos = setMappingBestellPos(0);
    
                $steuersatz = 0;
                switch ($total_pos->class)
                {
                    case 'ot_shipping':
                        //hole versand mwst aus einstellungen 
                        if (!$allowTax)
                        {
                            $total_pos->value*=((100+$einstellungen->versandMwst)/100);
                        }
                        $steuersatz = $einstellungen->versandMwst;
                        break;
                    case 'ot_cod_fee':
                        $tax_query = eS_execute_query("select configuration_value from configuration where configuration_key=\"MODULE_ORDER_TOTAL_COD_FEE_TAX_CLASS\"");
                        $tax_class = mysql_fetch_object($tax_query);
                        $steuersatz = get_tax($tax_class->configuration_value);
                        if (!$allowTax)
                        {
                            $total_pos->value*=((100+$steuersatz)/100);
                        }
                        break;
                    case 'ot_coupon':
                        $tax_query = eS_execute_query("select configuration_value from configuration where configuration_key=\"MODULE_ORDER_TOTAL_COUPON_TAX_CLASS\"");
                        $tax_class = mysql_fetch_object($tax_query);
                        $steuersatz = get_tax($tax_class->configuration_value);
                        $total_pos->value*=-1;
                        if (!$allowTax)
                        {
                            $total_pos->value*=((100+$steuersatz)/100);
                        }
                        break;
                    case 'ot_gv':
                        $tax_query = eS_execute_query("select configuration_value from configuration where configuration_key=\"MODULE_ORDER_TOTAL_GV_TAX_CLASS\"");
                        $tax_class = mysql_fetch_object($tax_query);
                        $steuersatz = get_tax($tax_class->configuration_value);
                        $total_pos->value*=-1;
                        if (!$allowTax)
                        {
                            $total_pos->value*=((100+$steuersatz)/100);
                        }
                        break;
                    case 'ot_loworderfee':
                        $tax_query = eS_execute_query("select configuration_value from configuration where configuration_key=\"MODULE_ORDER_TOTAL_LOWORDERFEE_TAX_CLASS\"");
                        $tax_class = mysql_fetch_object($tax_query);
                        $steuersatz = get_tax($tax_class->configuration_value);
                        if (!$allowTax)
                        {
                            $total_pos->value*=((100+$steuersatz)/100);
                        }
                        break;                
                    case 'ot_ps_fee':
                        $tax_query = eS_execute_query("select configuration_value from configuration where configuration_key=\"MODULE_ORDER_TOTAL_PS_FEE_TAX_CLASS\"");
                        $tax_class = mysql_fetch_object($tax_query);
                        $steuersatz = get_tax($tax_class->configuration_value);
                        if (!$allowTax)
                        {
                            $total_pos->value*=((100+$steuersatz)/100);
                        }
                        break;
                    case 'ot_discount':
                        $total_pos->value*=-1;
                        $steuersatz = $einstellungen->versandMwst;
                        break;
                    case 'ot_orderdiscount':
                        $total_pos->value*=-1;
                        $steuersatz = $einstellungen->versandMwst;
                        break;
                    case 'ot_payment':
                        $steuersatz = $einstellungen->versandMwst;
                        break;                        
                }
                echo(CSVkonform($kBestellPos).';');
                echo(CSVkonform(intval($_POST['KeyBestellung'])).';');
                echo(CSVkonform("0").';');
                echo(CSVkonform(unhtmlentities($total_pos->title)).';');
                echo(CSVkonform(unhtmlentities($total_pos->value)).';');
                echo(CSVkonform($steuersatz).';');
                echo(CSVkonform("1").';');
                echo("\n");
            }
        }
    }
}
mysql_close();
echo($return);
logge($return);
?>

Kann da mal ein Profi drüber schauen was da nicht funktioniert?
 

Thomas Lisson

Administrator
Mitarbeiter
24. März 2006
15.574
300
Köln
AW: Rabatt wird nicht übermittelt.

hi

mach aus
Code:
                    case 'ot_payment':
                        $steuersatz = $einstellungen->versandMwst;
                        break;
das hier:
Code:
                    case 'ot_payment':
                        $total_pos->value*=-1;
                        $steuersatz = $einstellungen->versandMwst;
                        break;
 

Vollautomat

Gut bekanntes Mitglied
21. Juli 2010
292
3
AW: Rabatt wird nicht übermittelt.

Hat doch nicht funktioniert...
Nun ist die Vorkasse zahlung mit Rabatt richtig.
Jedoch ist nun auch der Aufschlag bei PayPal ins minus...

Gibts da eine möglichkeit?
 

Kissenoutlet24.de

Gut bekanntes Mitglied
2. April 2012
170
9
Sonneberg
AW: Rabatt wird nicht übermittelt.

Hallo,
also ich habe das gleiche Problem das Coupons dazu gerechnet werden.

PHP:
<?php
/**
 * jtlwawi_connector/dbeS/GetBestellungPos.php
 * Synchronisationsscript
 * 
 * Es gelten die Nutzungs- und Lizenzhinweise unter http://www.jtl-software.de/jtlwawi.php
 * 
 * @author JTL-Software <thomas@jtl-software.de>
 * @copyright 2006, JTL-Software
 * @link http://jtl-software.de/jtlwawi.php
 * @version v1.07 / 06.06.07
*/

require_once("syncinclude.php");

$return=3;
if (auth())
{
    $return=5;
    if (intval($_POST['KeyBestellung']))
    {
        //glob einstellungen
        $cur_query = eS_execute_query("select versandMwst,tax_zone_id from eazysales_einstellungen");
        $einstellungen = mysql_fetch_object($cur_query);
        $allowTax = 1;
        
        $return = 0;        
        //hole orderposes
        $cur_query = eS_execute_query("select * from orders_products where orders_id=".intval($_POST['KeyBestellung'])." order by orders_products_id");
        while ($BestellungPos = mysql_fetch_object($cur_query))
        {
            $allowTax = $BestellungPos->allow_tax;
            if ($BestellungPos->allow_tax==0) //bruttopreis daraus machen
            {
                $BestellungPos->products_price*=((100+$BestellungPos->products_tax)/100);
            }

            //hole etl aufpreise
            $aufpreis=0;
            $aufpreise_query = eS_execute_query("select options_values_price,price_prefix from orders_products_attributes where orders_id=".$BestellungPos->orders_id." and orders_products_id=".$BestellungPos->orders_products_id." and options_values_price!=0");
            while ($aufpreis_arr = mysql_fetch_row($aufpreise_query))
            {
                $aufp=0;
                $aufp=$aufpreis_arr[0];
                if (($aufpreis_arr[1])=="-")
                    $aufp*=-1;
                $aufpreis+=($aufp*(100+$BestellungPos->products_tax))/100;                
            }
            
            //mappe bestellpos
            $kBestellPos = setMappingBestellPos($BestellungPos->orders_products_id);
            echo(CSVkonform($kBestellPos).';');
            echo(CSVkonform(intval($_POST['KeyBestellung'])).';');
            echo(CSVkonform(getEsArtikel($BestellungPos->products_id)).';');
            echo(CSVkonform($BestellungPos->products_name).';');
            echo(CSVkonform($BestellungPos->products_price-$aufpreis).';');
            echo(CSVkonform($BestellungPos->products_tax).';');
            echo(CSVkonform($BestellungPos->products_quantity).';');
            echo("\n");
        }
        
        //letzte Positionen wie Versand, Mindermengenzuschlag, Rabatt, Kupon etc.
        $cur_query = eS_execute_query("select * from orders_total where (class=\"ot_shipping\" OR class=\"ot_cod_fee\" OR class=\"ot_coupon\" OR class=\"ot_discount\" OR class=\"ot_orderdiscount\" OR class=\"ot_gv\" OR class=\"ot_loworderfee\" OR class=\"ot_ps_fee\" OR class=\"ot_payment\") and orders_id=".intval($_POST['KeyBestellung'])." order by sort_order");
        while ($total_pos = mysql_fetch_object($cur_query))
        {
            if ($total_pos->class=="ot_shipping" || $total_pos->value!=0)
            {
                //mappe bestellpos
                $kBestellPos = setMappingBestellPos(0);
    
                $steuersatz = 0;
                switch ($total_pos->class)
                {
                    case 'ot_shipping':
                        //hole versand mwst aus einstellungen 
                        if (!$allowTax)
                        {
                            $total_pos->value*=((100+$einstellungen->versandMwst)/100);
                        }
                        $steuersatz = $einstellungen->versandMwst;
                        break;
                    case 'ot_cod_fee':
                        $tax_query = eS_execute_query("select configuration_value from configuration where configuration_key=\"MODULE_ORDER_TOTAL_COD_FEE_TAX_CLASS\"");
                        $tax_class = mysql_fetch_object($tax_query);
                        $steuersatz = get_tax($tax_class->configuration_value);
                        if (!$allowTax)
                        {
                            $total_pos->value*=((100+$steuersatz)/100);
                        }
                        break;
                    case 'ot_coupon':
                        $tax_query = eS_execute_query("select configuration_value from configuration where configuration_key=\"MODULE_ORDER_TOTAL_COUPON_TAX_CLASS\"");
                        $tax_class = mysql_fetch_object($tax_query);
                        $steuersatz = get_tax($tax_class->configuration_value);
                        $total_pos->value*=-1;
                        if (!$allowTax)
                        {
                            $total_pos->value*=((100+$steuersatz)/100);
                        }
                        break;
                    case 'ot_gv':
                        $tax_query = eS_execute_query("select configuration_value from configuration where configuration_key=\"MODULE_ORDER_TOTAL_GV_TAX_CLASS\"");
                        $tax_class = mysql_fetch_object($tax_query);
                        $steuersatz = get_tax($tax_class->configuration_value);
                        $total_pos->value*=-1;
                        if (!$allowTax)
                        {
                            $total_pos->value*=((100+$steuersatz)/100);
                        }
                        break;
                    case 'ot_loworderfee':
                        $tax_query = eS_execute_query("select configuration_value from configuration where configuration_key=\"MODULE_ORDER_TOTAL_LOWORDERFEE_TAX_CLASS\"");
                        $tax_class = mysql_fetch_object($tax_query);
                        $steuersatz = get_tax($tax_class->configuration_value);
                        if (!$allowTax)
                        {
                            $total_pos->value*=((100+$steuersatz)/100);
                        }
                        break;                
                    case 'ot_ps_fee':
                        $tax_query = eS_execute_query("select configuration_value from configuration where configuration_key=\"MODULE_ORDER_TOTAL_PS_FEE_TAX_CLASS\"");
                        $tax_class = mysql_fetch_object($tax_query);
                        $steuersatz = get_tax($tax_class->configuration_value);
                        if (!$allowTax)
                        {
                            $total_pos->value*=((100+$steuersatz)/100);
                        }
                        break;
                    case 'ot_discount':
                        $total_pos->value*=-1;
                        $steuersatz = $einstellungen->versandMwst;
                        break;
                    case 'ot_orderdiscount':
                        $total_pos->value*=-1;
                        $steuersatz = $einstellungen->versandMwst;
                        break;
                    case 'ot_payment':
                        $total_pos->value*=-1;
                        $steuersatz = $einstellungen->versandMwst;
                        break;                        
                }
                echo(CSVkonform($kBestellPos).';');
                echo(CSVkonform(intval($_POST['KeyBestellung'])).';');
                echo(CSVkonform("0").';');
                echo(CSVkonform(unhtmlentities($total_pos->title)).';');
                echo(CSVkonform(unhtmlentities($total_pos->value)).';');
                echo(CSVkonform($steuersatz).';');
                echo(CSVkonform("1").';');
                echo("\n");
            }
        }
    }
}
mysql_close();
echo($return);
logge($return);
?>
 
Ähnliche Themen
Titel Forum Antworten Datum
Neu Rabatte aus dem JTL-Shop werden in der Wawi nur als Netto-Preis übernommen, Rabatt % gehen verloren Onlineshop-Anbindung 0
Rabatt Coupons in Verbindung mit Staffelpreisen - JTL 1.11.9, JTL Shop JTL-Wawi 1.11 0
Neu PayPal Rundungsfehler automatischer ungewollter Rabatt in PayPal Zahlung JTL-Shop - Fehler und Bugs 15
Neu Hinweis zum Auftrag wird seit Update auf die 1.11 nicht mehr angezeigt JTL-WMS / JTL-Packtisch+ - Fehler und Bugs 0
Skonto wird bei Zahlung setzen nicht berücksichtigt JTL-Wawi 1.11 0
Neu WMS-APP funktioniert nicht - Fehlermeldung: andere Edition wird benötigt JTL-WMS / JTL-Packtisch+ - Fehler und Bugs 0
Neu ACHTUNG: AB-Preis wird rechtlich falsch ausgegeben Betrieb / Pflege von JTL-Shop 3
Neu DHL Versenden 4.0 Tracking ID wird gekürzt JTL-ShippingLabels - Ideen, Lob und Kritik 0
Neu Rechnungskorrektur/Storno wird auf falsches Buchungskonto gebucht JTL-Wawi - Fehler und Bugs 1
Neu AMAZON Anbindung - Bearbeitungszeit - wird nicht an AMAZON Übermittelt Amazon-Anbindung - Ideen, Lob und Kritik 0
Rechnung speichern - WaWi wird geschlossen JTL-Wawi 2.0 4
Neu Status wird immer wieder überschrieben Shopify-Connector 0
Neu Nach Update in Dez 2025 wird TSE Swissbit nicht mehr erkannt JTL-POS - Fehler und Bugs 1
Neu DHL 4.0 Versandschnittstelle wird nicht aufgeführt? JTL-ShippingLabels - Fehler und Bugs 5
Neu Gini Scan & Pay wird zum 1. Juni 2026 eingestellt. Gibt es Alternativen? Plugins für JTL-Shop 8
Amazon Rechnungslayout geändert, per IDU wird trotzdem die alte Vorlage hochgeladen JTL-Wawi 1.9 2
Neu Nach Umstellung DHL Versenden 4.0 wird Kleinpaket nun auf DHL Paket Labeldrucker ausgegeben statt auf Kleinpaketdrucker JTL-ShippingLabels - Fehler und Bugs 17
Brutto-Gesamtbetrag wird (wieder) falsch berechnet - 2.0.1 JTL-Wawi 2.0 32
Neu Zahlung zugewiesen, aber keine Rechnung wird angezeigt User helfen Usern - Fragen zu JTL-Wawi 2
Neu Sendungsnummer in Versandmail wird nicht korrekt befüllt Arbeitsabläufe in JTL-Wawi 1
Neu Versanderweiterung in EU- Länder - Was wird vergessen? Business Jungle 5
Neu 2.0.0: Workflow Queue wird nicht abgearbeitet via API JTL-Wawi 2.0 1
Neu Überverkäufer aktiviert, es wird aber kein Bestand zu Amazon übertragen Amazon-Anbindung - Fehler und Bugs 0
JTL-Wawi eBay Fahrzeugverwendung (K-Typen) wird nicht aktiviert trotz Ameise-Import JTL-Wawi 1.10 0
Neu Umsatzsteuernummer von Kunden wird nicht in Wawi übertragen Shopify-Connector 4
Neu DHL Versenden 4.0 Firmenname wird nicht gedruckt JTL-ShippingLabels - Fehler und Bugs 6
Neu Anzeigen der Zahlungsart, die bei der Zahlung gesetzt wird Eigene Übersichten in der JTL-Wawi 10
Neu Die verwendete Version von JTL-Wawi wird nicht mehr unterstützt. Bitte nutzen Sie die Version 2.0.0.0 User helfen Usern - Fragen zu JTL-Wawi 1
Neu Pickliste wird auf Packtisch und in Wawi unter Picklisten nicht angezeigt. JTL-WMS / JTL-Packtisch+ - Fehler und Bugs 1
Neu DHL Wunschzustellung wird bescheiden dargstellt - keine Shopzustellung auswählbar Plugins für JTL-Shop 0
Neu GLS WebAPI wird abgeschaltet (31.12.2026) JTL-ShippingLabels - Ideen, Lob und Kritik 4
Neu Zahlungstart nicht anzeigen JTL-Shop - Fehler und Bugs 1
Neu Plugin: JTL Exportformat Google Shopping gibt <g:google_product_category> unter Shop 5.7.1 und Wawi 2.0.4 nicht aus Plugins für JTL-Shop 1
Neu Produktionsdatenblatt erstellen nicht möglich JTL-Plan&Produce - Fehler und Bugs 0
Retourenetikett Internetmarke funktioniert nicht mehr JTL-Wawi 2.0 1
Neu Laut Backend Shop Update für Shop 5.71 - Download nicht zu finden? Betrieb / Pflege von JTL-Shop 3
Neu Fesnter lässt sich unter Vorlage bearbeiten nicht vergrößern oder ändern eBay-Anbindung - Fehler und Bugs 0
Neu OPC - Rich Text Änderungen werden nicht übernommen Allgemeine Fragen zu JTL-Shop 1
Neu Kategorie erscheint nicht im Shop Allgemeine Fragen zu JTL-Shop 0
Eigener Drittshop-Connector (jtl/connector 5.3): valide Variationskombinationen werden mit „besitzt keine Variationen" nicht gesendet JTL-Wawi 1.11 1
Neu Erstellung der Sitemap bei WaWi Abgleich funktioniert nicht Allgemeine Fragen zu JTL-Shop 0
Neu DHL 4.0 mit JTL-ShippingLabels funktioniert nicht JTL-ShippingLabels - Fehler und Bugs 2
Neu JTL Lizensserver ist nicht erreichbar eBay-Anbindung - Fehler und Bugs 0
Wawi 1.11. Rechnungsanhang funktioniert nicht mehr bei Versandmail JTL-Wawi 1.11 6
Neu Konfigurator konfigurieren - ich schaffe es nicht Allgemeine Fragen zu JTL-Shop 1
Neu eBay Vorlage lässt sich nicht mehr öffnen JTL-Wawi - Fehler und Bugs 0
Dashboard Statistik lädt nicht mehr JTL-Wawi 1.11 3
Neu Amazon Bestellungen werden angezeigt aber nicht übernommen User helfen Usern - Fragen zu JTL-Wawi 4
Neu Herstellerbilder werden nicht angezeigt JTL-Shop - Fehler und Bugs 0
Neu Apple Pay über PayPal nicht zu verbinden (Die Domain-Verifizierungsdatei wurde nicht gefunden.) Technische Fragen zu Plugins und Templates 12

Ähnliche Themen