Forums / Currencies & Sales Taxes, VAT, GST, etc. / Price inc VAT not working on orders in admin

Price inc VAT not working on orders in admin

Views: 1,850

Results 1 to 8 of 8
22 May 2014, 8:34 AM
#1
kitcorsa avatar

kitcorsa

Totally Zenned

Join Date:
Feb 2007
Posts:
1,724
Plugin Contributions:
0

Price inc VAT not working on orders in admin

when i go to admin > orders > (click an order) > order summery the item list and prices are not showing correctly.

As you will see for the screen shot i have taken the price (inc) is not showing the VAT price.

how can i fix this?? rest of the site shows and works out vat correctly etc.

Attachment 14098


22 May 2014, 12:47 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Price inc VAT not working on orders in admin

What is your setting in the Configuration ... My Store ...

Display Prices with Tax in Admin
Display prices with tax included (true) or add the tax at the end (false) in Admin(Invoices)

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

29 May 2014, 8:55 AM
#3
kitcorsa avatar

kitcorsa

Totally Zenned

Join Date:
Feb 2007
Posts:
1,724
Plugin Contributions:
0

Re: Price inc VAT not working on orders in admin

display price with tax = true
display price with tax admin = false (as we all work on net in the office)


29 May 2014, 2:25 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Price inc VAT not working on orders in admin

If you change that to True ... what is messed up? This should show the both the Price (ex) and Price (inc) for you on the Orders ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

1 Jun 2014, 9:27 AM
#5
kitcorsa avatar

kitcorsa

Totally Zenned

Join Date:
Feb 2007
Posts:
1,724
Plugin Contributions:
0

Re: Price inc VAT not working on orders in admin

yeah but then the prices of the items in the items list also inc TAX?? we need then net price for ease really


1 Jun 2014, 2:17 PM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Price inc VAT not working on orders in admin

What you could try is to edit the function:
/your_secret_admin/includes/functions/general.php

and around line 1638 change the function to include the code in RED:

////
// Add tax to a products price
  function zen_add_tax($price, $tax) {
    global $currencies;

[B]// bof: force display of tax on orders.php only
//[/B][B]    if (DISPLAY_PRICE_WITH_TAX_ADMIN == 'true') {[/B][B]
    global $PHP_SELF;
    if (strstr($PHP_SELF, FILENAME_ORDERS) || DISPLAY_PRICE_WITH_TAX_ADMIN == 'true') {
// eof: force display of tax on orders.php only
[/B]      return zen_round($price, $currencies->currencies[DEFAULT_CURRENCY]['decimal_places']) + zen_calculate_tax($price, $tax);
    } else {
      return zen_round($price, $currencies->currencies[DEFAULT_CURRENCY]['decimal_places']);
    }
  }

See if that accomplishes what you are needing ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

24 Jul 2014, 8:09 PM
#7
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Price inc VAT not working on orders in admin

Ajeh:

What you could try is to edit the function:
/your_secret_admin/includes/functions/general.php

and around line 1638 change the function to include the code in RED:

////
// Add tax to a products price
function zen_add_tax($price, $tax) {
global $currencies;

[B]// bof: force display of tax on orders.php only
//[/B]
[B] if (DISPLAY_PRICE_WITH_TAX_ADMIN == 'true') {[/B][B]
global $PHP_SELF;
if (strstr($PHP_SELF, FILENAME_ORDERS) || DISPLAY_PRICE_WITH_TAX_ADMIN == 'true') {
// eof: force display of tax on orders.php only
[/B]
return zen_round($price, $currencies->currencies[DEFAULT_CURRENCY]['decimal_places']) + zen_calculate_tax($price, $tax);
} else {
return zen_round($price, $currencies->currencies[DEFAULT_CURRENCY]['decimal_places']);
}
}

> 
> See if that accomplishes what you are needing ...

Didn't see if the above fixed the problem or not, but was just working with someone that observed this same condition, but identified that it happens when a valid VAT# is entered (both the includes and excludes tax values were the same) when an incorrect or no VAT# was entered then the orders.php display showed a difference between the two values. I am told that this is happening when the admin include tax is set to true and am wondering how the above fix will affect prices when the admin flag is true instead of false as the above OP had this set.  Guess off to some testing. :)

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

5 Aug 2014, 3:34 PM
#8
kitcorsa avatar

kitcorsa

Totally Zenned

Join Date:
Feb 2007
Posts:
1,724
Plugin Contributions:
0

Re: Price inc VAT not working on orders in admin

we just now work with the vat prices on the lists now... retail price. easy enough now we all got head round it