Zen Cart Logo
Forums / All Other Contributions/Addons / VAT-mod for European companies

VAT-mod for European companies

Views: 114,578

Results 141 to 160 of 362
10 Jan 2008, 2:54 PM
#141
beez avatar

beez

Zen Follower

Join Date:
Sep 2005
Location:
Malmö, Sweden
Posts:
117
Plugin Contributions:
4

VAT-mod for European companies

joachimp:

Also wondering about version 1.3.8

I found that there is a duplicated function called zen_address_format()
on functions_customers.php
and general.php

functions_customers.php is from the catalog files and the and the is from admin. Are you sure you got the right files in the right directory? or has there been changes in 1.3.8?

We have not tested with Zen Cart 1.3.8, yet, but we will do it as soon as we got the time. If anyone does install it on 1.3.8, please report your finding.

10 Jan 2008, 3:05 PM
#142
joachimp avatar

joachimp

New Zenner

Join Date:
Dec 2007
Posts:
5
Plugin Contributions:
0

Re: VAT-mod for European companies

Hi,
I'm doing a full restore, maybe I did made a mistake... I will let you know...

Joachim

10 Jan 2008, 3:28 PM
#143
joachimp avatar

joachimp

New Zenner

Join Date:
Dec 2007
Posts:
5
Plugin Contributions:
0

Re: VAT-mod for European companies

Same deal, when trying to log in on the admin part I get the following:

Fatal error: Cannot redeclare zen_address_format() (previously declared in /www/zencart/admin/includes/functions/general.php:470) in /www/zencart/admin/includes/functions/functions_customers.php on line 35

zencart2 is before installing the mod, zencart is with the mod.

shrek:/www/zencart2/admin/includes/functions# regrep zen_address_format
./functions_customers.php:35: function zen_address_format($address_format_id, $address, $html, $boln, $eoln) {
./functions_customers.php:134: return zen_address_format($format_id, $address->fields, $html, $boln, $eoln);
./general.php:465: function zen_address_format($address_format_id, $address, $html, $boln, $eoln) {

shrek:/www/zencart2/admin/includes/functions#
shrek:/www/zencart2/admin/includes/functions#
shrek:/www/zencart2/admin/includes/functions#
shrek:/www/zencart2/admin/includes/functions# cd /www/zencart/admin/includes/functions/

shrek:/www/zencart/admin/includes/functions# regrep zen_address_format
./functions_customers.php:35: function zen_address_format($address_format_id, $address, $html, $boln, $eoln) {
./functions_customers.php:134: return zen_address_format($format_id, $address->fields, $html, $boln, $eoln);
./general.php:470: function zen_address_format($address_format_id, $address, $html, $boln, $eoln) {
shrek:/www/zencart/admin/includes/functions#

I will do some further digging...

13 Jan 2008, 2:10 PM
#144
martyndw2005 avatar

martyndw2005

Zen Follower

Join Date:
Aug 2005
Posts:
70
Plugin Contributions:
0

Re: VAT-mod for European companies

Extra figures appearing on invoice page in admin

On the attachment we have circled two areas - we need to get rid of these but cannot work out what they are called so cannot find similar problems on zencart. They only started appearing after we recently installed the European VAT Module - do you have any ideas how we could delete/remove these from invoices?

other conversation about this
http://www.zen-cart.com/forum/showthread.php?t=84718&highlight=invoice

We have compared files and everything seems fine.

Please help is anyone else getting this problem?

13 Jan 2008, 2:13 PM
#145
martyndw2005 avatar

martyndw2005

Zen Follower

Join Date:
Aug 2005
Posts:
70
Plugin Contributions:
0

Re: VAT-mod for European companies

This is the code for invoice.php in our admin folder.

<?php // // +----------------------------------------------------------------------+ // |zen-cart Open Source E-commerce | // +----------------------------------------------------------------------+ // | Copyright (c) 2006 The zen-cart developers | // | | // | <http://www.zen-cart.com/index.php> | // | | // | Portions Copyright (c) 2003 osCommerce | // +----------------------------------------------------------------------+ // | This source file is subject to version 2.0 of the GPL license, | // | that is bundled with this package in the file LICENSE, and is | // | available through the world-wide-web at the following url: | // | <http://www.zen-cart.com/license/2_0.txt>. | // | If you did not receive a copy of the zen-cart license and are unable | // | to obtain it through the world-wide-web, please send a note to | // | [email protected] so we can mail you a copy immediately. | // +----------------------------------------------------------------------+ // $Id: invoice.php 6524 2007-06-25 21:27:46Z drbyte $ // require('includes/application_top.php'); require(DIR_WS_CLASSES . 'currencies.php'); $currencies = new currencies(); $oID = zen_db_prepare_input($_GET['oID']); include(DIR_WS_CLASSES . 'order.php'); $order = new order($oID); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo TITLE; ?></title> <link rel="stylesheet" type="text/css" href="includes/stylesheet.css"> <script language="javascript" src="includes/menu.js"></script> <script language="javascript" type="text/javascript"><!-- function couponpopupWindow(url) { window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=450,height=280,screenX=150,screenY=150,top=150,left=150') } //--></script> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF"> <!-- body_text //--> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"></td> <td class="pageHeading" align="right"></td> </tr> </table></td> </tr> <tr> <td><table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td colspan="2"><?php echo zen_draw_separator(); ?></td> </tr> <?php $order_check = $db->Execute("select cc_cvv, customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_tva_intracom, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, currency, currency_value, date_purchased, orders_status, last_modified from " . TABLE_ORDERS . " where orders_id = '" . (int)$oID . "'"); // TVA_INTRACOM $show_customer = 'false'; if ($order_check->fields['billing_name'] != $order_check->fields['delivery_name']) { $show_customer = 'true'; } if ($order_check->fields['billing_street_address'] != $order_check->fields['delivery_street_address']) { $show_customer = 'true'; } if ($show_customer == 'true') { ?>
  <tr>
    <td class="main"><b><?php echo ENTRY_CUSTOMER; ?></b></td>
  </tr>
  <tr>
    <td class="main"><?php echo zen_address_format($order->customer['format_id'], $order->customer, 1, '', '<br>'); ?></td>
  </tr>
<?php } ?>
  <tr>
    <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2">
      <tr>
        <td class="main"><?php echo ENTRY_SOLD_TO; ?></td>
      </tr>
      <tr>
<!-- BEEZ_VIKE_GENERAL_FIX REPLACE BEGIN --> <td class="main"><?php echo zen_address_format($order->billing['format_id'], $order->billing, 1, '', '<br>'); ?></td> <!-- BEEZ_VIKE_GENERAL_FIX REPLACE END --> </tr> <tr> <td><?php echo zen_draw_separator('pixel_trans.gif', '1', '5'); ?></td> </tr> <!-- BEEZ_VIKE_GENERAL_FIX REPLACE BEGIN --> <tr> <td class="main"><?php echo ENTRY_TELEPHONE_NUMBER; ?> <?php echo $order->customer['telephone']; ?></td> </tr> <tr> <td class="main"><?php echo ENTRY_EMAIL_ADDRESS; ?> <?php echo '<a href="mailto:' . $order->customer['email_address'] . '">' . $order->customer['email_address'] . '</a>'; ?></td> </tr> <!-- BEEZ_VIKE_GENERAL_FIX REPLACE END --> <!-- TVA_INTRACOM BEGIN --> <?php if (zen_not_null($order_check->fields['billing_tva_intracom'])) { ?> <tr> <td class="main"><b><?php echo ENTRY_TVA_INTRACOM; ?></b> <?php echo $order_check->fields['billing_tva_intracom']; ?></td> </tr> <?php } ?> <!-- TVA_INTRACOM END --> </table></td> <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main"><?php echo ENTRY_SHIP_TO; ?></td> </tr> <tr> <td class="main"><?php echo zen_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br>'); ?></td> </tr> </table></td> </tr> </table></td> </tr> <!-- TVA_INTRACOM BEGIN --> <tr> <td><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td><table border="0" cellspacing="0" cellpadding="2"> <tr> <tr> <td class="main"><b></b></td> <td class="main"><?php echo TVA_SHOP_INTRACOM; ?></td> </tr> </table></td> </tr> <!-- TVA_INTRACOM END --> <tr> <td><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td class="main"><?php echo ENTRY_ORDER_ID . $oID; ?></td> </tr> <tr> <td><table border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main"><?php echo ENTRY_DATE_PURCHASED; ?></td> <td class="main"><?php echo zen_date_long($order->info['date_purchased']); ?></td> </tr> <tr> <td class="main"><?php echo ENTRY_PAYMENT_METHOD; ?></td> <td class="main"><?php echo $order->info['payment_method']; ?></td> </tr> </table></td> </tr> <tr> <td><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="dataTableHeadingContent" colspan="2"><?php echo TABLE_HEADING_PRODUCTS; ?></td> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_PRODUCTS_MODEL; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_TAX; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_PRICE_EXCLUDING_TAX; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_PRICE_INCLUDING_TAX; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_TOTAL_EXCLUDING_TAX; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_TOTAL_INCLUDING_TAX; ?></td> </tr> <?php for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) { echo ' <tr class="dataTableRow">' . "\n" . ' <td class="dataTableContent" valign="top" align="right">' . $order->products[$i]['qty'] . ' x</td>' . "\n" . ' <td class="dataTableContent" valign="top">' . $order->products[$i]['name'];
  if (isset($order->products[$i]['attributes']) && (($k = sizeof($order->products[$i]['attributes'])) > 0)) {
    for ($j = 0; $j < $k; $j++) {
      echo '<br><nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . nl2br($order->products[$i]['attributes'][$j]['value']);
      if ($order->products[$i]['attributes'][$j]['price'] != '0') echo ' (' . $order->products[$i]['attributes'][$j]['prefix'] . $currencies->format($order->products[$i]['attributes'][$j]['price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . ')';
      if ($order->products[$i]['attributes'][$j]['product_attribute_is_free'] == '1' and $order->products[$i]['product_is_free'] == '1') echo TEXT_INFO_ATTRIBUTE_FREE;
      echo '</i></small></nobr>';
    }
  }

  echo '        </td>' . "\n" .
       '        <td class="dataTableContent" valign="top">' . $order->products[$i]['model'] . '</td>' . "\n";
  echo '        <td class="dataTableContent" align="right" valign="top">' . zen_display_tax_value($order->products[$i]['tax']) . '%</td>' . "\n" .
       '        <td class="dataTableContent" align="right" valign="top"><b>' .
                  $currencies->format($order->products[$i]['final_price'], true, $order->info['currency'], $order->info['currency_value']) .
                  ($order->products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->format($order->products[$i]['onetime_charges'], true, $order->info['currency'], $order->info['currency_value']) : '') .
                '</b></td>' . "\n" .

// TVA_INTRACOM you may replace 'zen_add_tax' with 'zen_add_tax_invoice' below to unconditionally add tax to a products price.
$currencies->format(zen_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']) .
// TVA_INTRACOM you may replace 'zen_add_tax' with 'zen_add_tax_invoice' below to unconditionally add tax to a products price.
($order->products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->format(zen_add_tax($order->products[$i]['onetime_charges'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']) : '') .
'</b></td>' . "\n" .
' <td class="dataTableContent" align="right" valign="top"><b>' .
$currencies->format($order->products[$i]['final_price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) .
($order->products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->format($order->products[$i]['onetime_charges'], true, $order->info['currency'], $order->info['currency_value']) : '') .
'</b></td>' . "\n" .
' <td class="dataTableContent" align="right" valign="top"><b>' .
// TVA_INTRACOM you may replace 'zen_add_tax' with 'zen_add_tax_invoice' below to unconditionally add tax to a products price.
$currencies->format(zen_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) .
// TVA_INTRACOM you may replace 'zen_add_tax' with 'zen_add_tax_invoice' below to unconditionally add tax to a products price.
($order->products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->format(zen_add_tax($order->products[$i]['onetime_charges'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']) : '') .
'</b></td>' . "\n";
echo ' </tr>' . "\n";
}
?>
<tr>
<td align="right" colspan="8"><table border="0" cellspacing="0" cellpadding="2">

<?php 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"; } ?>
    </table></td>
  </tr>
</table></td>
</tr> </table> <?php //--Add comments starts-- $orders_history = $db->Execute("select orders_status_id, date_added, customer_notified, comments from " . TABLE_ORDERS_STATUS_HISTORY . " where orders_id = '" . zen_db_input($oID) . "' order by date_added limit 1"); //--Add comments ends-- ?> <?php <!--add comment starts--> <tr><td class="main"><?php echo '<b>Customer comments: </b>' . $orders_history->fields['comments']; ?></td> </tr> <!--add comment ends--> ?> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
19 Jan 2008, 9:18 PM
#146
marksu avatar

marksu

Zen Follower

Join Date:
Nov 2007
Posts:
260
Plugin Contributions:
0

Re: VAT-mod for European companies

I found a small bug in VAT-Mod 1.2.5.

File vatmod.php was place in false directory.

admin/includes/languages/extra_definitions/vatmod.php

BUT SHOULD HAVE BEEN IN

admin/includes/languages/english/extra_definitions/vatmod.php

marksu

6 Feb 2008, 11:07 AM
#147
pe7er avatar

pe7er

New Zenner

Join Date:
Apr 2007
Location:
Nijmegen, Netherlands
Posts:
44
Plugin Contributions:
0

Re: VAT-mod for European companies

martyndw2005:

Extra figures appearing on invoice page in admin
On the attachment we have circled two areas - we need to get rid of these but cannot work out what they are called so cannot find similar problems on zencart. They only started appearing after we recently installed the European VAT Module - do you have any ideas how we could delete/remove these from invoices?
Please help is anyone else getting this problem?

I had the same problem. First it seemed that the total column appeared above the list.
But if you look at the figures you will see that it's not the total column that is out of place, but the unit price (look at the row where you've ordered multiple items).
In my case there was a missing <tr> or <td> tag somewhere...

8 Feb 2008, 1:43 AM
#148
keon avatar

keon

New Zenner

Join Date:
Feb 2008
Posts:
3
Plugin Contributions:
0

Re: VAT-mod for European companies

:oops: I get this funny message at the top of the page, when trying to register as a new customer, with a valid VAT number:

Warning: file_get_contents() expects at most 2 parameters, 3 given in /var/www/html/cart/includes/functions/extra_functions/functions_vatmod.php on line 77

I have PHP 4.3.9, ZC 1.3.7.1 and the latest VAT-mod.

Also, I can't seem to find where to manually validate users VAT numbers in the admin section?

Any idea?

16 Feb 2008, 1:06 PM
#149
dimjoula avatar

dimjoula

New Zenner

Join Date:
Feb 2008
Posts:
23
Plugin Contributions:
0

Re: VAT-mod for European companies

VAT-Mod 1.2.7beta for Zen Cart v. 1.3.8
For Companies inside European Union dealing with european sales tax.

**IMPORTANT NOTE: THIS IS NOTE THE OFFICIAL RELEASE FROM Beez & Vike.
IT IS A BETA VERSION. **

I did a simple Cut and Paste from the previous code VAT-Mod 1.2.6 for Zen Cart v. 1.3.7) and paste it to Zen Cart v. 1.3.8 files.

It works for me, but you should take it with cautious.

What's new:

  • Compatibility with Zen Cart v. 1.3.8
  • adding Bulgaria and Romania to the list
  • french translation
  • update of the VIES link to check the validity of the number

I hope that Beez & Vike will offer an official release soon. :smile: And thanks guys for your great help !!

16 Feb 2008, 4:17 PM
#150
neonsun avatar

neonsun

New Zenner

Join Date:
Feb 2008
Posts:
1
Plugin Contributions:
0

Re: VAT-mod for European companies

Dimjoula: thank you very much
All seems to be working ok, except a PHP4 problem with VAT verification process in function zen_verif_tva, where is used file_get_contents with $context parametr, which is supported from PHP5.
I know it's weird to use PHP4 in the age of PHP6 coming :-)

17 Feb 2008, 11:19 AM
#151
francocauter avatar

francocauter

Zen Follower

Join Date:
Jun 2007
Location:
Milton Keynes UK
Posts:
153
Plugin Contributions:
0

Re: VAT-mod for European companies

Hi there everyone
Every time I install or update this Mod in my outputted Invoice, instead of "Company VAT No. XXXX......" I get TVA_SHOP_INTRACOM.
Is there a way to correct that? and how?
Thanks for your help in advance.

17 Feb 2008, 5:14 PM
#152
ryk avatar

ryk

Totally Zenned

Join Date:
Oct 2004
Location:
Southport, UK
Posts:
3,644
Plugin Contributions:
6

Re: VAT-mod for European companies

@francocouter - See post 146; that may help

18 Feb 2008, 10:02 AM
#153
francocauter avatar

francocauter

Zen Follower

Join Date:
Jun 2007
Location:
Milton Keynes UK
Posts:
153
Plugin Contributions:
0

Re: VAT-mod for European companies

Ryk:

@francocouter - See post 146; that may help

Thanks Ryk that helped
Kind Regards

20 Feb 2008, 3:01 PM
#154
pasher avatar

pasher

New Zenner

Join Date:
Dec 2005
Posts:
64
Plugin Contributions:
0

Re: VAT-mod for European companies

Hi
Should users get the option to add/change/correct their VAT number?
It doesn't seem to be there in any of the 'My Account' options.

[sorry if this has been raised before, but this is a very long thread to wade through]

Thanks
Pa

22 Feb 2008, 1:58 AM
#155
dimjoula avatar

dimjoula

New Zenner

Join Date:
Feb 2008
Posts:
23
Plugin Contributions:
0

Re: VAT-mod for European companies

Look carefully, it's working in My Account -> View or change entries in my address book.

22 Feb 2008, 8:34 AM
#156
pasher avatar

pasher

New Zenner

Join Date:
Dec 2005
Posts:
64
Plugin Contributions:
0

Re: VAT-mod for European companies

Duh - So it is.
Sorry - these senior moments seem to be happening more and more ;-)
Thanks Mate
Pa

1 Mar 2008, 1:13 PM
#157
greatness_183 avatar

greatness_183

New Zenner

Join Date:
May 2007
Location:
Wales
Posts:
28
Plugin Contributions:
0

Re: VAT-mod for European companies

Extra figures appearing on invoice page in admin

On the attachment we have circled two areas - we need to get rid of these but cannot work out what they are called so cannot find similar problems on zencart. They only started appearing after we recently installed the European VAT Module - do you have any ideas how we could delete/remove these from invoices?

other conversation about this
http://www.zen-cart.com/forum/showth...hlight=invoice

We have compared files and everything seems fine.

Please help is anyone else getting this problem?

I have had same problem .. it turned out to be line 202 on admin/ invoice.php .. took out </td>

more detail on other topic

http://www.zen-cart.com/forum/showth...hlight=invoice

hope this helps

24 Apr 2008, 9:05 PM
#158
dimjoula avatar

dimjoula

New Zenner

Join Date:
Feb 2008
Posts:
23
Plugin Contributions:
0

Re: VAT-mod for European companies

For those who did not go to the previous page, there is an unofficial upgrade version of this plugin for ZenCart 1.3.8 at this address:
http://www.zen-cart.com/forum/showpost.php?p=509374

26 May 2008, 6:16 PM
#159
aurelius99 avatar

aurelius99

New Zenner

Join Date:
May 2005
Posts:
4
Plugin Contributions:
0

Re: VAT-mod for European companies

francocauter:

Hi there everyone
Every time I install or update this Mod in my outputted Invoice, instead of "Company VAT No. XXXX......" I get TVA_SHOP_INTRACOM.
Is there a way to correct that? and how?
Thanks for your help in advance.

For me the same problem. I put al the files in the wright places, see reply 146.
but ive nowhere in the admin a possibility to put in my own shop VATnr.
also are my vatnr of customers empty.
i updated my site till 1.3.6 with database patchlevel 1.3.7

29 May 2008, 12:59 PM
#160
dave_g_1 avatar

dave_g_1

New Zenner

Join Date:
Mar 2007
Posts:
83
Plugin Contributions:
0

Re: VAT-mod for European companies

Good Day All

Not sure if this is the correct place to post this question, but I need to start somewhere.

I have a UK based ZenCart and need to exclude the Channel Islands from being charged VAT can this be done using VAT-mod? If not I'm open for suggestions.

Thank You
Dave G