A must have addon for your ERPNEXT
It already has the following feature: https://github.com/frappe/erpnext/pull/22901