COGS with Banking

COGS with Banking

Hi there,

I'm not sure if I captured the COGS correctly but the issue now my banking balance is mismatched.

Here is my scenario:
My bank balance was $100 and sale made & customer payment received with $50 The COGS is $10 so I recorded an expense (COGS) of $10 my bank balance should be $140 but my issue now the balance is $130 (as the COGS value is become duplicate since the system shows that bill has been generated for vendor to be paid so I recorded the vendor payment and my balance become less than $10)

If the above not clear here is the issue step-by-step:
1) Bank Account Bal = $100
2) Sales payment received with $50
3) I record the COGS under expense and chose the appropriate vendor with $10
4) Expense recorded and bank balance effected immediately with $10, however the system automatically shows that there is a vendor bill to be paid with $10
5) Payment recorded with $10 so Balance now is $130

I'm expecting the bank balance to be $140 instead of $130

Any idea why such thing happening

Thanks
Abdulrahman