Adjusting invoices for out of stocks, substitutions and random weight