Zen Cart Logo
Forums / All Other Contributions/Addons / print invoice popup + vat-number

print invoice popup + vat-number

Locked

Views: 1,823

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
14 May 2010, 12:42 PM
#1
juza123 avatar

juza123

New Zenner

Join Date:
Jan 2007
Posts:
11
Plugin Contributions:
0

print invoice popup + vat-number

Hi!

Can anybody help me? I need to add customer VAT-number to the printable invoice generated by the print_invoice_popup mod.

I´m using the VAT-mod for European countries which gives me the VAT-number of each customer. I just don´t know how to make it show in the invoice.

Many thanks for the help!

16 May 2010, 2:51 PM
#2
jtheed avatar

jtheed

Zen Follower

Join Date:
Apr 2008
Posts:
356
Plugin Contributions:
2

Re: print invoice popup + vat-number

juza123:

Hi!

Can anybody help me? I need to add customer VAT-number to the printable invoice generated by the print_invoice_popup mod.

I´m using the VAT-mod for European countries which gives me the VAT-number of each customer. I just don´t know how to make it show in the invoice.

Many thanks for the help!

Which invoice, the e-mailed one, or when you check orders history? It's already on the admin orders invoice.

17 May 2010, 12:21 PM
#3
juza123 avatar

juza123

New Zenner

Join Date:
Jan 2007
Posts:
11
Plugin Contributions:
0

Re: print invoice popup + vat-number

I want to add the vat number to the invoice generated by the popup mod. Both the checkout and account sides.

I know that it should show in the e-mail but for some reason it doesn´t. I´ve done all the fixes suggested in the forum but no luck. The database shows the VAT-number but the e-mail not. Well that is not a big problem but it has to be in the invoice or otherwise international customers (companies) can´t make the payment.

This is probably quite easily done but I´m not a programmer.

22 May 2010, 4:09 AM
#4
jtheed avatar

jtheed

Zen Follower

Join Date:
Apr 2008
Posts:
356
Plugin Contributions:
2

Re: print invoice popup + vat-number

juza123:

I want to add the vat number to the invoice generated by the popup mod. Both the checkout and account sides.

I know that it should show in the e-mail but for some reason it doesn´t. I´ve done all the fixes suggested in the forum but no luck. The database shows the VAT-number but the e-mail not. Well that is not a big problem but it has to be in the invoice or otherwise international customers (companies) can´t make the payment.

This is probably quite easily done but I´m not a programmer.

You want the VAT # to show up on the E-mail that is sent to the customer and on the Invoice that the customer can print from the Popup Print Invoice Mod that allows the printing of the customers invoice when checking out and if they view their orders history?

Also, what version of ZenCart are you using?

24 May 2010, 4:01 PM
#5
juza123 avatar

juza123

New Zenner

Join Date:
Jan 2007
Posts:
11
Plugin Contributions:
0

Re: print invoice popup + vat-number

JTheed:

You want the VAT # to show up on the E-mail that is sent to the customer and on the Invoice that the customer can print from the Popup Print Invoice Mod that allows the printing of the customers invoice when checking out and if they view their orders history?

Also, what version of ZenCart are you using?

Thank you for your time!

Exactly, both the order history and checkout invoices. I´m using zen cart 1.3.8.

I couldn´t make the european vat mod work so I created the database field using these instructions starting from #14: http://www.zen-cart.com/forum/showthread.php?t=73181&page=2

When I go to the client account from the admin the VAT-number shows just fine in the invoice, but i cant make it to show to the client when the Popup Mod is used (checkin out and order history).

I used these instructions (#73, same thread) to make the VAT-number to show in the admin side:


So, in admin/invoice.php add this query at line 28

$oID = zen_db_prepare_input($_GET['oID']);
//THESE LINES ADDED TO GET INFO FROM CUSTOMERS TABLE
$sql = "SELECT o.customers_id, c.customers_taxid from " . TABLE_ORDERS . " o, " . TABLE_CUSTOMERS . " c WHERE c.customers_id= o.customers_id and o.orders_id = '" . $oID . "'";
$chk_customers_taxid = $db->Execute($sql);
$customers_taxid = $chk_customers_taxid->fields['customers_taxid'];

so now you can use the $customers_taxid variable where you want, for example in one of the table cells

<?php echo ENTRY_TAXID_NUMBER; ?></b><?php echo ' ' . $customers_taxid; ?>

But since the Popup Invoice Mod doesn´t use admin/invoice.php it doesnt show to the client and I´ve not been able to find the place where to add the code/codes. I suppose it should be in the includes/modules/print_invoice.php file but where?