repair calculate stock and hpp

for
- purchase
- purchase_return
- purchase_refund
- purchase_revision
- stock_opname
- production ( not tested )