billing address on invoice

More
8 years 4 months ago #72755 by Jaap
billing address on invoice was created by Jaap
Hi,
On the registration form I would like to include the possibility of a billing address, different from the home address of the participant (when a company pays for the participant). I can create custom fields for the billing address but how can I get this billing address on the invoice (pdf)?

Regards,
Jaap

Please Log in or Create an account to join the conversation.

More
8 years 4 months ago #72771 by Dũng Nguyễn Việt
Replied by Dũng Nguyễn Việt on topic billing address on invoice
Hi
Please go to Events Booking => Configuration, look at Invoice Settings tab, use this syntax [NAME_OF_CUSTOM_FIELD_IN_UPPERCASE] to include any fields you want to the invoice layout
For example, if you have a field called eb_billing_address, you can use the syntax [EB_BILLING_ADDRESS] to include the value of that field into the invoice
Regards.

Please Log in or Create an account to join the conversation.

More
8 years 4 months ago #72784 by Jaap
Replied by Jaap on topic billing address on invoice
Thanks Dũng, that works great.

Just one more question. Where is the border of the logo image in the invoice pdf set? I like to remove the grey border and the border is not set in the html of the invoice setting:

<td align="right" valign="middle" width="50%"><img src="images/cvm-logo-groot.jpg" alt="cvm logo groot" width="340" height="109" style="border: 0px none; margin: 5px;" /></td>

Regards,
Jaap
Attachments:

Please Log in or Create an account to join the conversation.

More
8 years 4 months ago #72785 by Jaap
Replied by Jaap on topic billing address on invoice
Problem solved by adding !important:

<td align="right" valign="middle" width="50%"><img src="images/cvm-logo-groot.jpg" alt="cvm logo groot" width="340" height="109" style="border: 0px none !important; margin: 0px;" /></td>

Please Log in or Create an account to join the conversation.

More
8 years 4 months ago #72830 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic billing address on invoice
Great. Thanks for the update Jaap.

Please Log in or Create an account to join the conversation.

More
7 years 5 months ago - 7 years 5 months ago #89068 by Patrick Hawkins
Replied by Patrick Hawkins on topic billing address on invoice
Adding !important to the inline styling has not worked for me, and I've been trying to get rid of this damn border for the past two hours now! lol. My code is currently:
Code:
<p style="background color: #ffffff;"><img style="border: 0px !important; padding: 0px !important; margin: 0px !important;" src="images/WSlogo.png" alt="writers stage" /></p>

And there's still a stupid gray border around it! Where is tcpdf generating this from?

Attachments:
Last edit: 7 years 5 months ago by Patrick Hawkins.

Please Log in or Create an account to join the conversation.

More
7 years 5 months ago #89109 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic billing address on invoice
I really don't know about it. You can submit a support ticket sending us super admin account of the site. We will try to make modification to remove it for you

Tuan

Please Log in or Create an account to join the conversation.

  • Alice Reinbacher-Köstinger
  • Offline
  • New Member
  • New Member
More
7 years 3 months ago #92303 by Alice Reinbacher-Köstinger
Replied by Alice Reinbacher-Köstinger on topic billing address on invoice
Hi,
I also would like to implement a billing address field and I understand the way you suggested. But to make it more comfortable for the participant I would like to give the option "billing address if it differs from personal address", which means that I would need some logic for creating the invoice (if billing address is empty put personal address in).
Is there a possibility to copy a set of fields (personal address) to another one (billing address)?

Thanks,
Alice

Please Log in or Create an account to join the conversation.

More
7 years 3 months ago #92328 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic billing address on invoice
Hi Alice

Unfortunately, at the moment, it is not possible to do that in Events Booking. You would have to use customize the code of registration form, add some javascript to peforming the copy, something not really easy

Regards,

Tuan

Please Log in or Create an account to join the conversation.

  • Alice Reinbacher-Köstinger
  • Offline
  • New Member
  • New Member
More
7 years 3 months ago - 7 years 2 months ago #93008 by Alice Reinbacher-Köstinger
Replied by Alice Reinbacher-Köstinger on topic billing address on invoice
Hi Tuan,
thanks, I implemented a javascript function in the registration override file - works fine.

What I've done:
1) Created a custom field "billingaddress" (type: textarea).
2) Added an event listener in the override in /templates/<TEMPLATE>/html/com_eventbooking/register/default.php I put the following javascript code:
Code:
billingaddress.addEventListener("focus", function() { // do not override if there is already content in field if(billingaddress.value == "") { billingaddress.value = organization.value+"\n"+Department.value+"\n"+first_name.value+" "+last_name.value+"\n"+address.value+"\n"+zip.value+" "+city.value+"\n"+country.value; } });

3) Created another custom field "billingaddressInvoice", because "\n" does not make line breaks on the HTML invoice. Then adapted the default.php again::
Code:
adminForm.addEventListener("submit", function(){ billingaddressInvoice.value = billingaddress.value.replace(new RegExp('\r?\n','g'), '<br />'); });

Greetings,
Alice
Last edit: 7 years 2 months ago by Alice Reinbacher-Köstinger. Reason: detailed solution

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc