Apply payments and discounts

How to manually apply payments and discounts to sales and take payments online