Jump to content

monthly orders report not showing units sold and income


twister

Recommended Posts

On 8/17/2020 at 4:22 PM, brian! said:

looking at the report code (either v5 or v7), it's only going to return results for new active services/addons for the given month - with that condition applied, are the results you're seeing still wrong ?

I have a variable $data with a select query where i extract datepaid, total and amount and i get 18 records.

now i need to extract total amount of total and amount from previous query . how can i have another variable like $data2 where i could include smth like this

 

$data2 = Capsule::table($data1) 
->select(
            [
                Capsule::raw('COUNT(tblhosting.id) as total'),
                Capsule::raw('SUM(tblhosting.amount) as amount'),
                Capsule::raw('COUNT(tblinvoices.datepaid) as oncepaid'),
                Capsule::raw('tblinvoices.datepaid')
            ]
        )
->first();

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated