Payslip items

How can we deduct salary advance in payslip ? I want to deduct salary advance taken by employee at the time when we create payslip by making payslip items.