POS Closing voucher showing wrong difference

Using v12.17 here

Say I make ₹1000 sales
out of which ₹800 in cash
and ₹200 in credit card
with ₹100 expenses

When creating a POS Closing voucher at the end of the day, if I have ₹690 in custody as cash in the drawer, then the difference should be ₹10.

But the closing voucher shows the difference as ₹210 (I think it expects the amount collected through the credit card also to reflect)

If i correct the Total Collected Amount field to reflect the value collected only through cash, the difference is shown correctly. So in effect I think only the value being auto-filled is wrong.

Could someone explain if I’m doing something wrong?