mntechnique / jmi_erpnext

Other
5 stars 11 forks source link

Daily Sales Invoice report - Incorrect Customer groups #80

Open bkm888 opened 6 years ago

bkm888 commented 6 years ago

It has been found that running the report for the "Individual" customer group does NOT capture all of the actual sales invoices associated with customers of the group.

We also found that running the report for "All Customer Groups" will list the transactions that were missing from the "Individual" group.

This should not be happening. There are no customers listed as "All Customer Groups" in the Customer records.

Please investigate and advise. This appears to be true for almost any date. We used July 18, 2018 in our testing

BKM

bkm888 commented 6 years ago

Do we have any movement on this issue? BKM

ghost commented 6 years ago

@bkm888 As we went ahead to find out about this issue, In POS profile we have 'Customer groups' where we can set a default customer group for that profile. We observed that for all the profiles the customer group is 'All Customer Group' which is by default

pos_default_cust groups

Steps we followed:

  1. migrated your 'live' database in a local site
  2. created 3 customers of each group (Commercial, Individual, All Customer Groups)
  3. changed the default customer group from pos profile to 'Commercial'
  4. created invoice and that reflects in the report correctly

pos_profile customer group

We have added a column 'Customer group' in the report for you to test it efficiently. Will push this code on test gcp server, for you to test. Once you are happy with the output will push it on the live server, without customer group column.

This is how report works now: You can see the customers id (Commerical, Individual, All customer) and compare here. perf_report

bkm888 commented 6 years ago

Does this mean that I have to change the default customer group in all of the profiles to "Commercial" for the mobile sales reps and maybe "Individual" for the retail stores?

If I do that, what will happen when one of then sells to a customer in the opposite group?

Or, does your code fix take care of ignoring the pos profile customer groups?

BKM

ghost commented 6 years ago

@bkm888 Since default customer group in POS profile is 'All customer group' it created the conflict. We suggest you change the group and test. Also, just checked the query you asked in the above comment. It will take care of it. you can check here: query

unmesh87 commented 6 years ago

@bkm888 code is pushed to GCP test server. Let us know your observations.

bkm888 commented 6 years ago

Unmesh and Dev Team,

Myself and another tech have been working on the Daily Sales Invoice testing with the changes you provided on the 35.196.133.96 test server.

Any new invoices we make seem to be counted properly in the report later. However, we do not really understand what is required of us in order to make all of the changes work "all of the time".

We are rally confused about the root cause of the problem and that makes us unsure exactly what your fix will do and what changes we must make in order for the system to work properly.

Please advise. For the first time in a long time we are more confused now than we were at the beginning. If you are able to answer the above questions for us, then I think we can figure out our best testing path. I apologize for any appearance of delay, but we have just not been able to grasp the source of the original problem and therefor are having trouble understanding how the fix works.

Thank you in advance for taking time to help me understand this. I will copy this to the GitHub as well if that helps.

Bryan Miles JMI Barcodes

bkm888 commented 6 years ago

Testing has been run for a few days now with the recommended changes to the POS Profiles in place.

Unfortunately, the results are the same.

I have created an email to MN Technique with spreadsheets detailing the test results to help you understand what is appearing in the reports. That information will not be posted in this public forum.

Please investigate and advise.

BKM

ghost commented 6 years ago

@bkm888 We are looking into this issue, kindly give us a day or two, We'll get back to you.

gaurav-naik commented 6 years ago

@bkm888

To answer your queries on Aug 15, the customer group on the POS profile only affects the Customer list on the POS page and has no bearing on the Daily Sales Invoice report.

Link to the fix. https://github.com/mntechnique/jmi_erpnext/commit/150ef687eb531743aa6bb8cf78ebfb5605b5b997#diff-0ade2ea72daa3374db76b693161c36a2L126

Trying to set this up on the test server at 209.