Store Reports

Posts: 8
Joined: 08/08/2007
Bug FinderGetting busy with the Ubercode.

I just recently put together a basic sales report for one of my clients and thought I could post it up to show. The code isn't 100% yet so I'll be holding off on releasing it for the time be. The report is very similar in layout to the new uc_coupon module's reports (http://www.drupal.org/project/uc_coupon).

Here are some screen shots. One suggestion I've had so far was to make the table of product sales sortable and exportable via csv. One issue I found while figuring out taxes paid, is that you need to count any stored line items and subtract those from the total, then find total product amounts and devise the tax (its the missing variable). I've talked to Ryan about this and we have discussed changing the taxes line item to being stored so that calculations are much easier and guaranteed accurate.

Hope you all enjoy, and I'd love some feedback on what other information you'd like on this 'generic sales report' before I release the code.

AttachmentSize
Picture 4.png73.68 KB
Posts: 5379
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

Hah! Very cool. You're one step ahead of me again, Blake. I was just about to post up about reports today. Eye-wink

After our quick discussion I made a last minute change to the Reports menu for Ubercart Alpha 7c. It will generate a list of links using the theme admin_menu_block now on the /admin/store/reports. So, just make the path for your reports pages /admin/store/reports/_whatever_ and it'll show up in the reports listing. We can work out something more special later on, like a default report or a way for store owners to build a report summary or something.

Posts: 10
Joined: 08/13/2007
Uber Donor

I threw together a different kind of sales report too. It uses Blake's coupon module to separate out discount amounts, as well as uses the tax module to separate out taxes (Also breaks out taxable sales vs non-taxable sales). I'd be happy to post the code, although I probably need to add some checks for the coupon and tax modules before including their respective breakouts.

AttachmentSize
SalesReport.jpg79.55 KB
Posts: 5379
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

I wrote a quick handbook page on report page paths:

http://www.ubercart.org/docs/developer/671/where_put_report_pages_menu

If you guys have any reports modules that are good to go, I'd say adjust the menu paths if you need to and start posting them in the contrib directory. I'm also going to start cross posting my completed modules to Drupal.org so we get better publicity there. Smiling

Posts: 183
Joined: 08/13/2007
Cool profile pic award.Getting busy with the Ubercode.Internationalizationizer

Hi,

I'm very interested in any Reports module, the screenshot looks good.
Please post up if you're ready for it!

Regards,

Kees

Posts: 99
Joined: 08/08/2007
Bug FinderGetting busy with the Ubercode.Not Kulvik

same here, I'd really like to see that code and start crunching on it... much better than starting from scratch (I hope!)

Posts: 1315
Joined: 08/14/2007
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.

That looks awesome! I would love to see the code. If I can see your queries, I'd like to write a function that can export the current report out to a CSV file (as that's something I'll need with Reports).

--

"Pain don't hurt." - Dalton

Mike Nelson's RiffTrax! www.rifftrax.com

Posts: 99
Joined: 08/08/2007
Bug FinderGetting busy with the Ubercode.Not Kulvik

one other thing I noticed about the screen shots is taxes. I'm not sure where this would fit, but I think others can agree we need something like the following:

* Breakdown of sales tax collected per tax 'rule'
* total sales for each tax rule

If you're operating in one state only, then this isn't as necessary, but multi-state operations need to pay taxes to each state. I'm going to put together a screenshot of what I'm thinking for custom reports -- this might be most useful since people may have different needs.