In A/R Invoice,
Add First row with Qty-300 & linetotal-1000
Add Second row with Qty-30 & Price-0
In 'Discount' Field At row level Add 20% Discount
Note:-
Adding qty with Zero price will affect your inventory cost dependin upon your valuation method.
regards,
Raviraj