Withholding Tax Calculated on the unallocated amount

hi. erpnext community i have problem regarding calculating withholding tax at the payment entry. Withholding tax is being calculated on the basis of unallocated amount while it should have to be calculated on the allocated amount. Please guide me is there anything missing with configuration.