D
D
Denis Sepetov2020-01-04 19:25:41
Database
Denis Sepetov, 2020-01-04 19:25:41

What algorithm should be used to distribute goods in the database according to purchase orders, if discrepancies are acceptable?

Previously, all this analytics was performed almost manually. At the moment, I have already automated this in our ERP system, but I want to ask the experts: how would you approach this task if you did it yourself?
The conditions are as follows:
1. As a result of the analysis of xml / dbf invoices sent by suppliers, we have a table of the following structure:
- invoice number ( part of the primary key )
- line number in the invoice ( part of the primary key )
- supplier code (link to his profile in our DB)
- product name
- product quantity
- product series
- expiration
date
- id ( primary key , auto-increment)
- product identifier (link to its card in the catalog with a human name)
- product quantity
- series
- expiration date
- manufacturer / country of origin / a bunch of other secondary characteristics of the product
In the same table, there are two initially empty fields , which you need to fill in now:
- invoice number , according to which this product ended up in the warehouse at all
- line number in the invoice
Actually, these two fields are the primary key in the first table.
There are a lot of complexities that add "sharpness" to the solution. I'll give a few:
- the name of the product from us and from the supplier may not match: "Thermal paste EEE 25 gr. 30 pcs." and "Thermal grease EEE syringe 25 gr. Pack. 30 pcs."
- the supplier may consider the same product manufactured in different countries as one, and we, for example, as two different - the supplier may not indicate the series and expiration date
in the electronic invoice , or may indicate, but incorrect - the same goods can arrive from different suppliers at the same time - the same goods from one order can arrive in parts over several days - some goods may not be delivered at all, or they may bring an extra one.
Strictly speaking, it is impossible to get a 100% reliable result and any algorithm will have an error, but there were errors in the old manual work (human factor).

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Max Sadovin, 2020-01-27
@sepetov

In my opinion, this task belongs to managerial, not IT. There is a good saying: shit in, shit out. And then the task is formulated in a different way: how to build a process so that it produces clean data. The described case clearly requires human participation. And then the only question remains: to whom and how to give this function. The life of the "poor guy" can be made easier if you give him a tool: a recommender system that can be compared with what. It can be built in any suitable way. For example, through the Levenshtein distance.
So my answer is: I would change the process and introduce rules for employees.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question