• Resolved ENHAdmin

    (@enhadmin)


    I’ve been using Sprout Invoices as a test and replacement for my PHP written application. So far, I like it. But the one thing I’m having issues with is finding the correlation in the DB between the sa_invoice post_type and the client/user.

    I’m attempting to write a custom page that get’s the user_id and checks it against the sa_invoices, showing only those invoices associated with the client/user. I have found the sa_client post_type, but again, I see nothing that would relate to the invoices.

    I know there is a paid version that has the client’s dashboard and that’s fine and all. But I’m putting more information than their current or past invoices on this page. My clients would rather have one page to view everything rather than having multiple.

    https://wordpress.org/plugins/sprout-invoices/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Dan Cameron

    (@dancameron)

    Hello,

    Regardless of this falling under the “priority” tag of support I will try to help as much as I can.

    You can get the user’s client id with the method SI_Client::get_clients_by_user( $user_id );

    Have the client ids you can init the client object, e.g. $client = SI_Client::get_instance( $client_id );

    With that client object you can use these methods to get the info you need:
    $client->get_invoices()
    $client->get_estimates()

    Hope that helps and I hope someday you see the benefit of the pro version (with the client dashboard bundled).

    Thread Starter ENHAdmin

    (@enhadmin)

    Dan,

    Thank you so much for the reply.

    I see what’s happening now, I think I have all the information to start manipulating the information I need to share.

    I do see the benefit of the Pro Version, in fact, I have a potential new client who is going to utilize the Pro Version on their site, the summer sale helped with that decision immensely!

    There are functions that I’m needing that just aren’t apart of the Pro Version.

    Again, thank you so much Dan.

    Plugin Author Dan Cameron

    (@dancameron)

    You’re welcome.

    PS: please consider writing a review.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Correlation between: sa_invoice and client/user’ is closed to new replies.