A coupon code is generated
programmatically on a particular day.
The coupon code when applied shows the correct discount amount and even the checkout shows the correct discount amount, but when the order is seen in admin, the discount seems to be only applying for the first product and
sales_order table have the
coupon_code field as NULL for that order.