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. Removing Total (excluding tax) from invoice
    By ivanc in forum Managing Customers and Orders
    Replies: 1
    Last Post: 16 Apr 2009, 08:29 PM
  2. Invoice Total Issues
    By jc8125 in forum General Questions
    Replies: 9
    Last Post: 14 Feb 2009, 01:00 AM
  3. Price(inc) vs. Order Total Tax on invoice
    By susb8383 in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 0
    Last Post: 23 Jan 2009, 09:32 PM
  4. Remove total colums from invoice.php
    By redmonds in forum General Questions
    Replies: 2
    Last Post: 30 Jan 2008, 09:42 AM

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
  •