[SOLVED] Need help for a query integration

10 years 11 months ago - 10 years 11 months ago #226716 by myann
Hi team,
I use the Query integration of CB to create my own invoices for my users.

But I have a little problem, when I have discount, the amount of the invoice is the whole price.

How can I reach neither the discount value, nor the price less the value of the discount please ?
Is there a way to know that I use a discount (a field, a variable????)

Thank you by advance

Myann

Please Log in to join the conversation.

10 years 11 months ago #226772 by krileon
Replied by krileon on topic Need help for a query integration
I assume you're using CB Query Field? I've no idea what query you're using but if you're querying _cbsubs_payment_baskets then "mc_gross" should be the correct calculated amount. If you're querying _cbsubs_payment_items then you need to do the math between "rate" and "discount_amount" as needed. If you're querying _cbsubs_payments then "mc_gross" should also be correctly calculated. Note for "mc_gross" fee usually isn't applied to it so you'll need to subtract "mc_fee" if being used.


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.

10 years 11 months ago #226983 by myann
Replied by myann on topic Need help for a query integration
No I am not. I talk about queries integration <hen I create a plan. When the user subscribe or when the plan is expired, it's possible to use queries.
I use this to create an entry in my database and create an invoice.

So, in the liste of subsctitution possibilities, I can't see nothing about promotion. How to get the value for example.
Is it the same thing?

Please Log in to join the conversation.

10 years 11 months ago #227028 by krileon
Replied by krileon on topic Need help for a query integration
I don't know what you're asking, sorry. You do not insert rows into CBSubs database, it handles the entire workflows and calculations. Please see my previous reply if you're trying to query the database for the calculated value.


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.

10 years 11 months ago #227265 by myann
Replied by myann on topic Need help for a query integration
I tried the it's displayed "[mc_gross]" or "[mc_fee]" instead of the value.
to be more precise, the query featured I am using is in the "Integration" tab of the plan, then tab "Actions SQL".

Regards
Myann

Please Log in to join the conversation.

10 years 11 months ago #227274 by krileon
Replied by krileon on topic Need help for a query integration
I have no idea what you're querying and why. The CBSubs SQL Action doesn't output anything. Are you wanting to insert the price they paid into a CB Field? Please better describe what you're trying to do as I don't know what more to suggest at this point, 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.

Moderators: beatnantkrileon
Time to create page: 0.216 seconds

Facebook Twitter LinkedIn