Hi Ratana,
I think system is trying to post cash discount while MIRO posting and the transaction variant does not have the discount item category, due to this it is throwing error. You cannot add the item category for the standard variants. However, you can change the item category for the cash discount GL account as expense in the classify GL accounts for item category configuration, after that do the posting.
Regards,
Mukthar