Inventory Write Off Issue with accrual versus cash basis

@dalacor See here for Quantity issue you mentioned in your second unrelated point Possible bug when invoicing inventory items?