The sales report currently does not allow you to choose a register for the timeframe you are reporting for. It only gives a report (I assume) calculating all registers used. There should be a dropbox similar to the date range asking which register you want to report on, or even have an option to select multiple registers at the same time (ex: All the registers within one location to see a whole "store's" report).

Without this option, that report is not that helpful, despite the fact it works well in it's current state.

Comments

fergy created an issue. See original summary.

shabana.navas’s picture

Excellent point @fergy. I'll check it out.

shabana.navas’s picture

Status: Active » Needs review
StatusFileSize
new2.08 KB
new63.48 KB

Added a filter to select the register so we can view all the sales of a particular store or stores.

shabana.navas’s picture

Assigned: Unassigned » shabana.navas
smccabe’s picture

Status: Needs review » Needs work

Can you move the register option to be beside the date filter, otherwise looks good!

shabana.navas’s picture

Status: Needs work » Needs review
StatusFileSize
new56.59 KB

Done. Moved the register next to the date and the submit button as well.

shabana.navas’s picture

StatusFileSize
new110.13 KB

Would definitely help if I uploaded the patch eh!!! :)

smccabe’s picture

Status: Needs review » Needs work
StatusFileSize
new46.33 KB

2 more formatting things.

The register box is too narrow, even with a short name it is cut off.

Also, if you pick a custom date option it goes a bit wonky, see screenshot

shabana.navas’s picture

Status: Needs work » Needs review
StatusFileSize
new111.49 KB
new62.95 KB
new104.72 KB

Good Catch! Fixed it as best as I could. See attached.

sorabh.v6’s picture

Assigned: shabana.navas » sorabh.v6
sorabh.v6’s picture

Assigned: sorabh.v6 » Unassigned
sorabh.v6’s picture

Assigned: Unassigned » sorabh.v6
sorabh.v6’s picture

Assigned: sorabh.v6 » Unassigned
Status: Needs review » Needs work
StatusFileSize
new28.45 KB
+++ b/modules/report/includes/commerce_pos_report.pages.inc
@@ -1458,6 +1463,40 @@ function commerce_pos_report_sales_report($form, &$form_state) {
+    foreach ($register_options as $location_name => $register_info) {
+      foreach ($register_info as $id => $name) {
+        $register_ids[] = $id;
+      }
+    }
...
+    else {
+      // Fall back to using the first register ID.
+      $register_id = $register_ids[0];
+    }

We are using nested foreach to get all register_ids.

But using only first register id in our code. IMO if we are going to use only first register id then there's no point in looping over to get all register ids. But, If I am wrong then please share the reason so that it would enhance my knowledge.

Other than that, UI wise it is looking good on my test site.

Thanks

shabana.navas’s picture

We have no idea what the register ID is right, so we need the register_ids array.

sorabh.v6’s picture

Status: Needs work » Reviewed & tested by the community

Okay then, patch in #9 is working as expected. Therefore, setting it to RTBC.

Thanks All

  • smccabe committed 218b4db on 7.x-2.x authored by shabana.navas
    Issue #2910621 by shabana.navas, sorabh.v6, smccabe, fergy: Sales Report...
smccabe’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.