Hi,
Added to my former mail there seems to be a problem with firefox: in this browser the update-button in the CRM does not seem to save the data. We have a workaround (use Chrome), but I’d like to know if this is a known error and if not, report it to you ;).
[ Signature moderated ]
Hello.
You can add custom fields in CRM/Data tab. There is an option – custom invoice attribute.
Regarding address there isn’t there titles in PDF. You can fill them as you need.
In Mozilla browser it trying to fill your password, so if you will clean password filed it will update user.
Regards.
Hi Maria,
Thanks for your answer. It’s somewhat cryptic though. I found the ‘custom fields’ in the CRM for the invoice, but I can only use them in the html file. Is there a document that enlists the codes for address or explains how a call in the PDF is made?
[ Signature moderated ]
Custom attribute will be shown on view invoice page in customer information area. In PDF it won’t show and we do not have docs how to add them there.
Well I guess you could see that as a tip or request.
Ok. Thank you for pointing. You can also add your idea here – http://feedback.usabilitydynamics.com/forums/9692-wp-invoice
Hi there –
Good, I will re-open this issue, because we recently had problems with the workaround we implemented three months ago. Eventually we decided to use the field “Phone Number” in the invoice, which we didn’t use, for the VAT-number, changing te call “Phone” to “VAT” in the PDF-template. Worked fine, however, with the last update it appears that all non-numeric fields are cleaned. So we lost our VAT number. Obviously a new validation? Anyway, this goes for a LOT of clients, and a VAT number on the Invoice is something really important for us (mandatory by law in Belgium where my client resides). So, in order to keep us as clients for your plugin, could you please help me with…
either an option to add a proper field from invoice to the PDF, and help implementing this…
or a rollback for the plugin so our workaround is.
Furthermore the tip: if you want more clients in Europe, i’d suggest you make a VAT field soon in your plugin, for here on this continent in most countries it’s very common to print it alongsite the addresslines – and in some countries it’s even mandatory.
By
“or a rollback for the plugin so our workaround is.”
I meant
“or a rollback for the plugin so our workaround is working again” π
Hello,
so VAT should be one of user meta field right?
Also, we just released WP-Invoice PDF version 2.1.0 which is completely re-written. Templates changed but design kept. There is new way to create custom templates. It’s more easy than before.
So I think there is an easy way to add VAT into templates right now because they support WP functions that can be used to get user meta and so on.
We kept legacy support for customized templates but cannot guarantee they will look well after update so plan fixing them as well.
Let me know you have other questions.
Thank you.
OK, thanks for your answer. That seemed like good news and bad news altogether. Indeed, I had to re-setup my template and that cost me some hours extra work. The bonus however, I did not reach. Could you please help me with the following example, that would be really great.
I have in the CRM now a field called “VAT”. I try to echo the value in this field on the PDF. In the user-meta table, the key is “vat”.
So, I supposed
<?php echo get_user_meta(“150”, “vat”, true); ?>
… would make my day, hardcoding a user-id just for testing purpose. That seemed to work fine.
But now for the real bonus: which is the variable I use for getting the user-id?
Furthermore, is there a sheet available with all the variables that I can use in a PDF-template? That would be really useful to avoid further questions like this. However, getting the user-id from the customer would of course help a lot.
Hope to hear from you soon. Thanks in advance.
Hello,
you are allowed to do the following inside the template:
<?php global $invoice; print_r($invoice); ?>
There you’ll find all the invoice information and it’s user data that you can use the way you need.
Thanks.
Thanks for your answer, but I copied the code and pasted it in my document, and it returns nothing. I hope you made a mistake?
Don’t you really have an overview of the variables you pass on? I think it should be available online…
Sorry, I did a small mistake.
Basically, here is how to get user ID:
$user_id = $invoice->data['user_data']['ID'];
Then you do like:
echo get_user_meta($user_id, "vat", true);
Also, we are planing to add some overview of PDF template functions soon.
Thank you.
Hi Anton,
This works great, thank you. Now I have the full control I wanted and call anything, that’s great. Also I noted that the templates are indeed far more comprehensible, great work.
In general: I had some doubts beginning with this plugin, due to comments of poor support and documentation and the fact that it seemed a bit bunky, but took the gamble for it was just what I needed for functionality. I see you’re getting by on support, the plugins are the more the better programmed, and if you update the documentation I think you have a winner here. I will say that in my rating of the plugin.
Thanks again, I’ll mark the topic as resolved.