The discount will be calculated automatically if there is a check mark  in the Izracunaj popust na racunu field  in the Sales &amp; Receivables Setup window and you do one of the following  on the sales document:
Popust se izračuna samodejno, če je potrjeno polje Izračunaj popust računu v oknu »Nastavitev prodaje in terjatev«, in če v prodajnem dokumentu naredite nekaj od tega: