FIX: bad margin and buy_price calculation when total_ht = 0 (discount 100%) on a line