If the employee bought something for himself, as a customer. And this should be deducted from his salary on account of the goods.
Then you need to mark the Customer in the employee’s card and make a sale to him as a customer.

Create Sales Invoice to sale the company’s items.
Create Deduction type with 12000 Accounts Receivable.
Payroll document will do
- Dr 22000 Payroll Liabilities
- Cr 12000 Accounts Receivable

It will close Sales Invoice Dr 12000 Accounts Receivable account for employee and it will reduce the amount of salary to be paid (22000 Payroll Liabilities)..
You must specify the deduction amount for the product manually. Since the employee can pay immediately upon receipt of the goods or pay after receiving the salary.
To verify the amount owed by an employee as a customer, customer debt reports are used before payroll is calculated.