Balance for Account .... must always be debit error in online POS

hello,
when using online pos today, it does not even have any sales invoice yet,
i selected the product , included the discount 35% discount on the item so total is 390 000 LBP,
Customer paid 400 000 LBP, change amount is 10 000 LBP and it was paid Cash.
However when i click on pay and submit, i get the following error though this account in chart of accounts is selected as Debit.


i know it can be solved by selecting blank for 'balance must be in chart of accounts for this account but this does not answer the main question of why it’s saying that.
what might be the cause of the issue and how to fix it ??
thank you in advance