dimanche 24 mai 2015

Design Pattern: Stock Management System - Changes

A specific warehouse system I am developing using Android and SQLite. Having problems with the design as lots of different possibilities impacting the database transactions.

The stock system has a CSV loaded into the database containing products and order quantities, but there exists multiple orders of the same product. If a product is scanned and packed the order quantity is reduced. And will subtract from the first order quantity, until that reaches 0 and then the next order quantity until that equals 0. The packing is basically taking the order of stock and packing onto a pallet. If users make a mistake they need to reverse the packing, and in turn reverse the ordering quantities, starting with renewing the newest order it has been taken off.

Current issues, reversing insertions into the database, as need to return the order values back to previous in the ordering of adding the order sheets to the DB.

Simply:

A transaction management design pattern, that will enable the reversal of Database changes, easily? Or should changes not be persisted until all stock orders are done to allow easier reversals and manipulations?

A generic stock warehouse, pallet packing solution that others have used before?

This is a complex problem to explain, but any comments or solutions that people have done before would be very helpful.

Thanks

Aucun commentaire:

Enregistrer un commentaire