frappe / erpnext

Free and Open Source Enterprise Resource Planning (ERP)
https://erpnext.com
GNU General Public License v3.0
21.85k stars 7.33k forks source link

[Improvement] Supplier Scorecard - Calculate only with active transactions on period #31597

Open xickomesquita opened 2 years ago

xickomesquita commented 2 years ago

There isn't a way to evaluate suppliers only when it have active transactions.

when we use this calculation:

({total_accepted_items} / {total_received_items})*100 if {total_received_items} > 0 else 100

the 'else' its a poor workaround.

The supplier X had some transactions with my company only in months 1,2,4 and 7. The system is actually generating these scores:

image

Instead of test only the months that really exist some purchase:

image

I believe that is necessary to change the .py file, to include a criteria to don't create a new scorecard, if it doen't have active transactions to the supplier.

bosue commented 1 year ago

You‘re completely right. These scorecards could be such a powerful tool, but need quite some work, because the details need be done right. I‘ll be working on this the next months.