Forums / Currencies & Sales Taxes, VAT, GST, etc. / invoice total exculding VAT

invoice total exculding VAT

Locked

Views: 2,836

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
5 Apr 2010, 3:53 PM
#1
m_digregorio avatar

m_digregorio

New Zenner

Join Date:
Jan 2010
Posts:
18
Plugin Contributions:
0

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.

6 Apr 2010, 7:11 AM
#2
absolute avatar

absolute

Totally Zenned

Join Date:
May 2005
Location:
Bath, Somerset
Posts:
1,054
Plugin Contributions:
2

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

Back, after a 4 year absence! Did you miss me?
Absolute Web Solutions Ltd
Interested in our work? Take a look at one of our sites - The Tech Store

7 Apr 2010, 6:34 PM
#3
m_digregorio avatar

m_digregorio

New Zenner

Join Date:
Jan 2010
Posts:
18
Plugin Contributions:
0

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"; ?>
8 Apr 2010, 10:49 AM
#4
absolute avatar

absolute

Totally Zenned

Join Date:
May 2005
Location:
Bath, Somerset
Posts:
1,054
Plugin Contributions:
2

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

Back, after a 4 year absence! Did you miss me?
Absolute Web Solutions Ltd
Interested in our work? Take a look at one of our sites - The Tech Store

8 Apr 2010, 2:04 PM
#5
m_digregorio avatar

m_digregorio

New Zenner

Join Date:
Jan 2010
Posts:
18
Plugin Contributions:
0

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