[FIX][T5591] Errors in purchase data; revamped code

Merged Hermes requested to merge T5591 into 12.0-preprod-integracion

Merge request reports