Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2010
    Posts
    18
    Plugin Contributions
    1

    Default invoice total exculding VAT

    Hello,


    I need to add the total ammount exclusive the VAT in the admin invoice.


    Subtotaal incl. BTW: €22.86
    Afhalen winkel (Afhalen): €0.00
    Groepskorting: -€2.28
    BTW hoog 19 %: €3.29
    Totaal excl. BTW: €17.29
    Totaal incl. BTW: €20.58

    any solution?

    thanks.

  2. #2
    Join Date
    May 2005
    Location
    Bath, Somerset
    Posts
    1,058
    Plugin Contributions
    3

    Default Re: invoice total exculding VAT

    You would need to create a new Order Total Module, where you just showed the value for $order->info['total'] - $order->info['tax'].

    Setting the display order of the order module will alter the value it shows, so you must ensure that it is the last but one in the sort order.

    Absolute
    Homeless due to the disappearance of the CHW forum!
    Absolute Web Solutions Ltd
    Interested in our work? Take a look at one of our sites - The Tech Store

  3. #3
    Join Date
    Jan 2010
    Posts
    18
    Plugin Contributions
    1

    Default Re: invoice total exculding VAT

    Hello,


    I have use this code and the result is okay:
    but i need to put de Totaal excl. BTW: above the Totaal incl. BTW: field.



    <?php

    $order_subtotal =("select order_total, order_tax
    from " . TABLE_ORDERS . "
    where orders_id = '" . (int)$oID . "'");
    /**
    $order_subtotal =("select orders.orders_id, orders.order_total, orders.order_tax, orders_total.*
    from 'TABLE_ORDERS, TABLE_ORDERS_TOTAL'
    where orders.orders_id = '" . (int)$oID . "'");
    **/

    $result = mysql_query($order_subtotal);

    while($row = mysql_fetch_array($result)){

    $subtotaal= $row["order_total"] - $row["order_tax"];



    /** echo ' <tr>' . "\n" .
    ' <td align="right">' . '<b>' . "Subtotaal excl. BTW:" . '</b>' . '</td>' . "\n" .
    ' <td align="right">' . '€' . $subtotaal . '</td>' . "\n" .
    ' </tr>' . "\n".
    ' <tr>' . "\n" .
    ' <td align="right">' . '<b>' . "Subtotaal incl. BTW:" . '</b>' . '</td>' . "\n" .
    ' <td align="right">' . '€' . $row['orders_total.orders_id'] . '</td>' . "\n" .
    ' </tr>' . "\n";
    **/
    }



    for ($i = 0, $n = sizeof($order->totals); $i < $n; $i++) {
    echo ' <tr>' . "\n" .
    ' <td align="right" class="'. str_replace('_', '-', $order->totals[$i]['class']) . '-Text">' . $order->totals[$i]['title'] . '</td>' . "\n" .
    ' <td align="right" class="'. str_replace('_', '-', $order->totals[$i]['class']) . '-Amount">' . $order->totals[$i]['text'] . '</td>' . "\n" .
    ' </tr>' . "\n";
    }

    echo ' <tr>' . "\n" .
    ' <td align="right">' . '<b>' . "Totaal excl. BTW:" . '</b>' . '</td>' . "\n" .
    ' <td align="right">' . '€' . $subtotaal . '</td>' . "\n" .
    ' </tr>' . "\n";

    ?>
    Attached Images Attached Images  

  4. #4
    Join Date
    May 2005
    Location
    Bath, Somerset
    Posts
    1,058
    Plugin Contributions
    3

    Default Re: invoice total exculding VAT

    Not sure what you're asking here. Do you simply want to move the INC and EXC total prices so they are the other way around? If so, you would need to move the last ECHO statement within the FOR loop, and place it within an IF statement, so that it only shows if the CLASS is "ot_total".

    Be aware though that this method of hashing the code is only going to show you the total on the pages where you apply this update. If you want to have the total on ALL pages, you are better off actually creating an order totals module, as it then automatically appears in both the store and admin, as well as storing the data in the database.

    Absolute
    Homeless due to the disappearance of the CHW forum!
    Absolute Web Solutions Ltd
    Interested in our work? Take a look at one of our sites - The Tech Store

  5. #5
    Join Date
    Jan 2010
    Posts
    18
    Plugin Contributions
    1

    Default Re: invoice total exculding VAT

    hello,


    thanks for the support. I have tried everythink , but I don't get the right result. please could you help me to solve this issue?

    I want to display the next records:

    Subtotaal excl. BTW: €69.38
    Afhalen winkel (Afhalen): €0.00
    Groepskorting: -€7.53
    Totaal excl. BTW: €61.85
    BTW laag 6 %: €2.67
    BTW hoog 19 %: €3.29
    Totaal incl. BTW: €67.81


    this is the code:

    $order_totaal =("select orders.orders_id, orders.order_total, orders.order_tax, orders_total.orders_id, orders_total.title, orders_total.text, orders_total.value, orders_total.class
    FROM " . TABLE_ORDERS . "
    JOIN " . TABLE_ORDERS_TOTAL . "
    ON orders.orders_id = orders_total.orders_id
    WHERE orders.orders_id = '" . (int)$oID . "'
    ORDER BY orders_total.sort_order ASC ");

    $result = mysql_query($order_totaal);

    while($row = mysql_fetch_array($result)){

    $subtotaalexbtw = $row["order_total"] - $row["order_tax"];

    echo ' <tr>' . "\n" .
    ' <td align="right">' . $row['title'] . '</td>' . "\n" .
    if ($row['class'] == "ot_total") {
    echo ' <td align="right">' . $row['text'] . '</td>' . "\n" ;
    }
    ' <td align="right">' . $row['text'] . '</td>' . "\n" .
    ' </tr>' . "\n";


    }
    please could you tell me how exactly

 

 

Similar Threads

  1. v151 including shipping costs to order total for VAT calculation and incorrect VAT
    By McLovin in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 1
    Last Post: 9 Nov 2014, 12:31 PM
  2. Incorrect Total after tax (VAT) display (exclusive total is the same as inclusive)
    By miggz in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 1
    Last Post: 27 Jan 2013, 11:41 AM
  3. v139h invoice: total (inc) and total (ex) are off by 1 cent
    By makenoiz in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 4
    Last Post: 14 Apr 2012, 06:29 AM
  4. Incorrect VAT total on invoice (line per line is correct)
    By sephiroth in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 1
    Last Post: 29 Jan 2010, 10:39 AM
  5. Replies: 0
    Last Post: 29 Oct 2009, 10:23 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR