Skip to Content Skip to Menu

[SOLVED] CBSubs invoices for single payments using the offline engine

  • D1on
  • D1on
  • OFFLINE
  • Posts: 68
  • Thanks: 3
  • Karma: 0
8 years 2 months ago #286155 by D1on
Hi Kyle,

I deleted all the lists and recreated them again and now there all working with, e.g.

( ( SELECT COUNT(*) FROM `#__cbsubs_subscriptions` AS sub WHERE sub.`user_id` = u.`id` AND sub.`status` = 'X' ) >= 1 ) AND ue.`cb_branch_code` = 'NSW'

( ( SELECT COUNT(*) FROM `#__cbsubs_subscriptions` AS sub WHERE sub.`user_id` = u.`id` AND sub.`status` = 'X' ) >= 1 ) AND ue.`cb_branch_code` = 'ACT'

Not sure what was causing this issue, but it's all good now.

Thank you,

Dion.
The following user(s) said Thank You: krileon

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

  • D1on
  • D1on
  • OFFLINE
  • Posts: 68
  • Thanks: 3
  • Karma: 0
8 years 1 month ago - 8 years 1 month ago #286322 by D1on
Hi Kyle,

I'm still struggling with the Advanced Filters in the CB lists...

I am using your suggestion "It's typically more reliable to just check for not active, which is done with the below"

( ( SELECT COUNT(*) FROM `#__cbsubs_subscriptions` AS sub WHERE sub.`user_id` = u.`id` AND sub.`status` != 'A' ) >= 1 )

But this still shows members that have upgraded to another plan, but are still being listed in the Expired lists.

Can you please help configure the display of members who are only expired and have not upgraded to other plans?

I had sent you a PM with admin login details with this request on the 22 September 2016, can you please help resolve this issue?

We need to be able to display Expired members on frontend lists and backend CB User Management lists who have not upgraded to another plan.

Thank you for your assistance.

Dion
Last edit: 8 years 1 month ago by D1on. Reason: changed subject title

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
8 years 1 month ago #286357 by krileon
Upgrade subscriptions have a status of U so != 'A' is going to match them. If you strictly want active then use = 'A'. For strictly expired use = 'X'. Use whichever best fits your needs.


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 or Create an account to join the conversation.

  • D1on
  • D1on
  • OFFLINE
  • Posts: 68
  • Thanks: 3
  • Karma: 0
8 years 1 month ago #286385 by D1on
Kyle,

`status` = 'X' ) >= 1 does not filter out members that also have an "Active" subscription.

How can users with 2 subscriptions, one Active, and the other Expired, not be listed in the Expired listings?

How can we also filter out users with 2 subscriptions, one Active, and the other Expired, from the Expired listings in the backend CB User Managment searches?

When searching CB Paid Subscriptions, it clearly shows that users who have upgraded to another plan have two subscriptions, one Active (new subscription) and one Expired (previous subscription).

If a user has upgraded to a new plan and is Active we need to be able to filter out these users (who still have an Expired sunscription associated to them) as they are not currently Expired.

Hope you can help sort this out.

Thanks,

Dion.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
8 years 1 month ago #286414 by krileon

How can users with 2 subscriptions, one Active, and the other Expired, not be listed in the Expired listings?

Add 2 checks to the query. One to see if they have an expired subscription and one to see if they don't have an active one. Again, you've fully access to SQL for the Advanced filtering. Example as follows.

Code:
( ( SELECT COUNT(*) FROM `#__cbsubs_subscriptions` AS sub WHERE sub.`user_id` = u.`id` AND sub.`status` = 'X' ) >= 1 ) AND ( ( SELECT COUNT(*) FROM `#__cbsubs_subscriptions` AS sub WHERE sub.`user_id` = u.`id` AND sub.`status` = 'A' ) = 0 )


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.
The following user(s) said Thank You: D1on

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

  • D1on
  • D1on
  • OFFLINE
  • Posts: 68
  • Thanks: 3
  • Karma: 0
8 years 1 month ago #286431 by D1on
Thanks Kyle.

That resolves the front end lists issue, but what about the CB backend?

How can we also filter out users with 2 subscriptions, one Active, and the other Expired, from the Expired listings in the backend CB User Managment searches?

Hope you can help resolve this issue as well.

Thanks,

Dion.

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

Moderators: beatnantkrileon
Powered by Kunena Forum