Neuigkeiten
  • Die modified eCommerce Shopsoftware ist kostenlos, aber nicht umsonst.
    Spenden
  • Damit wir die modified eCommerce Shopsoftware auch zukünftig kostenlos anbieten können:
    Spenden
  • Thema: MwSt. der Versandkosten bei Brutto Rechnungen

    Da Sandro

    • Fördermitglied
    • Beiträge: 832
    • Geschlecht:
    Re: MwSt. der Versandkosten bei Brutto Rechnungen
    Antwort #15 am: 23. Januar 2013, 09:25:10
    ok jetzt hab ichs. Man muss ja wirklich ALLE Aus-Kommata setzen aus dem obigen Post.

    Hier mal die funktionierende ot_shipping.php zum einfachen Austausch eines unberührten 1.06.

    Code: PHP  [Auswählen]
    <?php
    /* -----------------------------------------------------------------------------------------
       $Id: ot_shipping.php 1002 2005-07-10 16:11:37Z mz $  

       XT-Commerce - community made shopping
       http://www.(( Wir dulden keine kommerziellen Werbelinks - Bitte <a href="index.php?topic=3013.0">Forenregeln</a> beachten! ))

       Copyright (c) 2003 XT-Commerce
       -----------------------------------------------------------------------------------------
       based on:
       (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
       (c) 2002-2003 osCommerce(ot_shipping.php,v 1.15 2003/02/07); www.oscommerce.com
       (c) 2003      nextcommerce (ot_shipping.php,v 1.13 2003/08/24); www.nextcommerce.org

       Released under the GNU General Public License
       ---------------------------------------------------------------------------------------*/

       
      class ot_shipping {
        var $title, $output;

        function ot_shipping() {
            global $xtPrice;
          $this->code = 'ot_shipping';
          $this->title = MODULE_ORDER_TOTAL_SHIPPING_TITLE;
          $this->description = MODULE_ORDER_TOTAL_SHIPPING_DESCRIPTION;
          $this->enabled = ((MODULE_ORDER_TOTAL_SHIPPING_STATUS == 'true') ? true : false);
          $this->sort_order = MODULE_ORDER_TOTAL_SHIPPING_SORT_ORDER;


          $this->output = array();
        }

        function process() {
          global $order, $xtPrice;

          if (MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING == 'true') {
            switch (MODULE_ORDER_TOTAL_SHIPPING_DESTINATION) {
              case 'national':
                if ($order->delivery['country_id'] == STORE_COUNTRY) $pass = true; break;
              case 'international':
                if ($order->delivery['country_id'] != STORE_COUNTRY) $pass = true; break;
              case 'both':
                $pass = true; break;
              default:
                $pass = false; break;
            }

            if ( ($pass == true) && ( ($order->info['total'] - $order->info['shipping_cost']) >= $xtPrice->xtcFormat(MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER,false,0,true)) ) {
              $order->info['shipping_method'] = $this->title;
              $order->info['total'] -= $order->info['shipping_cost'];
              $order->info['shipping_cost'] = 0;
            }
          }

          $module = substr($_SESSION['shipping']['id'], 0, strpos($_SESSION['shipping']['id'], '_'));

          if (xtc_not_null($order->info['shipping_method'])) {
            if ($_SESSION['customers_status']['customers_status_show_price_tax'] == 1) {
              // price with tax
              //$shipping_tax = 0;
              //$shipping_tax_description = '';
              //if (array_key_exists($module, $GLOBALS) && is_object($module)) {
                $shipping_tax = xtc_get_tax_rate($GLOBALS[$module]->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
                $shipping_tax_description = xtc_get_tax_description($GLOBALS[$module]->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
              //}
              $tax = $xtPrice->xtcFormat(xtc_add_tax($order->info['shipping_cost'], $shipping_tax),false,0,false)-$order->info['shipping_cost'];
              $tax = $xtPrice->xtcFormat($tax,false,0,true);
              $order->info['shipping_cost'] = xtc_add_tax($order->info['shipping_cost'], $shipping_tax);
              $order->info['tax'] += $tax;
              //if (isset($order->info['tax_groups'][TAX_ADD_TAX . "$shipping_tax_description"])) {
                $order->info['tax_groups'][TAX_ADD_TAX . "$shipping_tax_description"] += $tax;
              //}
              $order->info['total'] += $tax;

            } else {

            if ($_SESSION['customers_status']['customers_status_show_price_tax'] == 0 && $_SESSION['customers_status']['customers_status_add_tax_ot'] == 1) {

              $shipping_tax = xtc_get_tax_rate($GLOBALS[$module]->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
              $shipping_tax_description = xtc_get_tax_description($GLOBALS[$module]->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
              $tax = $xtPrice->xtcFormat(xtc_add_tax($order->info['shipping_cost'], $shipping_tax),false,0,false)-$order->info['shipping_cost'];
                     $tax = $xtPrice->xtcFormat($tax,false,0,true);

              $order->info['tax'] = $order->info['tax'] += $tax;
              $order->info['tax_groups'][TAX_NO_TAX . "$shipping_tax_description"] = $order->info['tax_groups'][TAX_NO_TAX . "$shipping_tax_description"] += $tax;
            }
            }
            $this->output[] = array('title' => $order->info['shipping_method'] . ':',
                                    'text' => $xtPrice->xtcFormat($order->info['shipping_cost'], true,0,true),
                                    'value' => $xtPrice->xtcFormat($order->info['shipping_cost'], false,0,true));
          }
        }

        function check() {
          if (!isset($this->_check)) {
            $check_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_ORDER_TOTAL_SHIPPING_STATUS'");
            $this->_check = xtc_db_num_rows($check_query);
          }

          return $this->_check;
        }

        function keys() {
          return array('MODULE_ORDER_TOTAL_SHIPPING_STATUS', 'MODULE_ORDER_TOTAL_SHIPPING_SORT_ORDER', 'MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING', 'MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER', 'MODULE_ORDER_TOTAL_SHIPPING_DESTINATION', 'MODULE_ORDER_TOTAL_SHIPPING_TAX_CLASS');
        }

        function install() {
          xtc_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_key, configuration_value, configuration_group_id, sort_order, set_function, date_added) values ('MODULE_ORDER_TOTAL_SHIPPING_STATUS', 'true','6', '1','xtc_cfg_select_option(array(\'true\', \'false\'), ', now())");
          xtc_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_key, configuration_value, configuration_group_id, sort_order, date_added) values ('MODULE_ORDER_TOTAL_SHIPPING_SORT_ORDER', '3','6', '2', now())");
          xtc_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_key, configuration_value, configuration_group_id, sort_order, set_function, date_added) values ('MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING', 'false','6', '3', 'xtc_cfg_select_option(array(\'true\', \'false\'), ', now())");
          xtc_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_key, configuration_value, configuration_group_id, sort_order, use_function, date_added) values ('MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER', '50', '6', '4', 'currencies->format', now())");
          xtc_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_key, configuration_value, configuration_group_id, sort_order, set_function, date_added) values ('MODULE_ORDER_TOTAL_SHIPPING_DESTINATION', 'national','6', '5', 'xtc_cfg_select_option(array(\'national\', \'international\', \'both\'), ', now())");
          xtc_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_key, configuration_value, configuration_group_id, sort_order, use_function, set_function, date_added) values ('MODULE_ORDER_TOTAL_SHIPPING_TAX_CLASS', '0','6', '7', 'xtc_get_tax_class_title', 'xtc_cfg_pull_down_tax_classes(', now())");      
        }

        function remove() {
          xtc_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
        }
      }
    ?>

    web28

    • modified Team
    • Beiträge: 9.404
    Re: MwSt. der Versandkosten bei Brutto Rechnungen
    Antwort #16 am: 23. Januar 2013, 11:49:59
    Leider bin ich erst jetzt dazu gekommen, die Bugfixes für 1.06 zu aktualisieren.

    BUGFIXES modified 1.06

    Gruss Web28

    Modulfux

    • Experte
    • Beiträge: 3.590
    • Geschlecht:
    Re: MwSt. der Versandkosten bei Brutto Rechnungen
    Antwort #17 am: 23. Januar 2013, 12:25:17
    Was mich nur gerade wundert, dass die neue ot_shipping.php jetzt exakt der ot_shipping aus dem 1.05 SP1d entspricht?

    Was ging denn bei der ursprünglichen Version für 1.06 schief?

    Gruß
    Ronny

    web28

    • modified Team
    • Beiträge: 9.404
    Re: MwSt. der Versandkosten bei Brutto Rechnungen
    Antwort #18 am: 23. Januar 2013, 12:59:45
    Es wurde versucht Notices Meldungen zu fixen, die waren dann zwar weg, die Steuerberechnung aber auch.  :’-(

    Modulfux

    • Experte
    • Beiträge: 3.590
    • Geschlecht:
    Re: MwSt. der Versandkosten bei Brutto Rechnungen
    Antwort #19 am: 23. Januar 2013, 13:20:14
    Huch, das ist ja wie bei mir. Ein Fehler beseitig, neuen Fehler erzeugt.  :-D

    Gruß
    Ronny

    nighthawk.84

    • Neu im Forum
    • Beiträge: 16
    Re: MwSt. der Versandkosten bei Brutto Rechnungen
    Antwort #20 am: 14. Mai 2013, 15:19:51

    Wenn ich das auskommentiere:
    Code: PHP  [Auswählen]
    //if (array_key_exists($module, $GLOBALS) && is_object($module)) {

    bleibt die checkout_payment weiß und nix geht mehr!

    Schau dir nochmal genau die Auskommentierung an. Den weißen Bildschirm hatte ich auch, was aber nur daran lag, dass ich vergaß, die Abschlussklammern auszukommentieren. Beispiel:

    Code: PHP  [Auswählen]
    //if (array_key_exists($module, $GLOBALS) && is_object($module)) {
                $shipping_tax = xtc_get_tax_rate($GLOBALS[$module]->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
                $shipping_tax_description = xtc_get_tax_description($GLOBALS[$module]->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
              //}

    UNBEDINGT die geschweifte Klammer am Ende der if-Abfrage mit // auskommentieren, dann klappt's ;).

    menthol

    • Frisch an Board
    • Beiträge: 63
    • Geschlecht:
    Re: MwSt. der Versandkosten bei Brutto Rechnungen
    Antwort #21 am: 10. April 2015, 16:57:50
    Ist zwar schon ein altes Thema, wobei zu der Lösung noch folgendes anzumerken wäre:
    Anscheinend muss die Angabe der Versandkosten nach Korrektur der ot_shipping.php dann in Netto erfolgen!

    Erst so klappt bei mir die Berechnung einwandfrei.

    Alex

    Achja, ist das eigentlich schon in der aktuellen Version korrigiert? Will ja nicht rumkriteln, aber
    hier: https://www.modified-shop.org/funktionen steht ja:
    "Die "gesetzlichen Mindestanforderungen" werden erfüllt..." :-)

    b_eiter

    • Neu im Forum
    • Beiträge: 3
    Re: MwSt. der Versandkosten bei Brutto Rechnungen
    Antwort #22 am: 07. Februar 2016, 03:44:11
    Habe im Shop Brutto Preise eingestellt.

    am Schluss soll die Zusammenfassung wie folgt aussehen, leider bekomme ich es nicht hin.

    Zwischensumme Netto: 8,00 EUR
    Österreichische Post AG (Versand nach AT : 0.62 kg (1 x 0.62 kg)): 4,00 EUR
    Summe, netto: 12.00
    zzgl. 20 % MwSt.:  2,4 EUR
    Summe: 14,40 EUR

    Momentan sieht es so aus:

    Zwischensumme:    9,60 EUR
    Österreichische Post AG (Versand nach AT : 0.62 kg (1 x 0.62 kg)):    4,80 EUR
    Summe:    14,40 EUR

    Habe die neueste Version installiert
    1 Antworten
    2053 Aufrufe
    23. November 2010, 15:41:45 von angelo
    0 Antworten
    1686 Aufrufe
    01. Juni 2015, 15:59:41 von Lottemann
    4 Antworten
    3216 Aufrufe
    30. Juni 2013, 18:47:42 von Security
               
    anything