Condtional statements with invoice fields

13 years 9 months ago #137240 by amazeika
Hello,

I would like to know if it would be possible to use CB conditional statements ([cb:if] ... [/cb:if]) with invoice fields like [ADDRESS_VAT_NUMBER].

I tried something like this:

[code:1][cb:if [ADDRESS_VAT_NUMBER] <> ""]VAT number **: [ADDRESS_VAT_NUMBER][/cb:if][/code:1]

but it didn't work, I suppose it only works with CB fields. Is there a way to do something similar with invoice fields ?.

Thanks in advance.

Arunas

Arunas Mazeika
WeXtend.com - Professional development for Joomla!.

Please Log in to join the conversation.

13 years 9 months ago #137566 by krileon
Replied by krileon on topic Re:Condtional statements with invoice fields
Sorry, no such fields can not be substituted outside of CBSubs at this time. We've plans to further extension the substitution process to include CBSubs in more locations. Correctly only locations which support CBSubs substitutions are those that state so. I also do not believe such substitutions can be used in complex IF statements either, sorry.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

13 years 9 months ago #137646 by amazeika
Replied by amazeika on topic Re:Condtional statements with invoice fields
krileon,

Thank you for your reply.

Actually I tried that piece of code in an CBSubs invoice HTML field, but I believe that the CB conditional statements only work with CB fields.

I think this is worth expanding since it would make sense to write such statements on invoices using CBSubs [] fields.

In my case it's the VAT number. The problem is purely cosmetic as I have "VAT **:" on invoices even though the customer does not actually have one.

Kind regards,

Arunas

Arunas Mazeika
WeXtend.com - Professional development for Joomla!.

Please Log in to join the conversation.

13 years 9 months ago #137679 by krileon
Replied by krileon on topic Re:Condtional statements with invoice fields

Actually I tried that piece of code in an CBSubs invoice HTML field, but I believe that the CB conditional statements only work with CB fields.

This will be something we're considering for a later release, but believe will require internal work to CB to accomplish this. As is CBSubs substitutions are not actually substitutions in the sense CB substitutions are, they're straight conversion to their values.

I think this is worth expanding since it would make sense to write such statements on invoices using CBSubs [] fields.

Agreed, we'd need an API to extend the functionality of CBs substitution usage.

I've added a feature request for such a thing.

#1850


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.221 seconds

Facebook Twitter LinkedIn