Added name to ENUM for compatibility with postgresql
Discount is an int, use a SpinBox not a DoubleSpinBox
Fix total calculations and adapt view

It is still not quite right. It has to be done all over again paying
attention to the difference between total/subtotal, with/out taxes,
cost/sell price, taxes included/not included, etc.