Line-item discounts, taxes, and special charges |
Top Previous Next |
This example demonstrates:
Application notes:
Calculating Discounts, Taxes, and Special Charges Sometimes you may need to calculate discounts, a special tax, or separate charges on an invoice, based on just part of the items on the invoice; maybe on a group of lines, or maybe on just a single line. Some examples:
Setting up a FullSpeed macro for applying a discount or special charge is fairly simple. Basically, you use a text-triggered formula to subtotal the group of items on which the calculation is to be based, then use another text-triggered formula immediately below the first one to calculate the discount or charge and apply it to the invoice (or bill, or other form). And if the discount or charge applies to a single row of the target form you don't need a subtotal: just add the discount calculation's trigger text on the row immediately below the item's row in the invoice.
Getting Ready Set up Products and Services items If you will need to subtotal several rows of items before calculating the discount or charge, set up a SubtDisc item: Notes:
Also set up a Discount item, and assign an account appropriate for recording discounts: Use the items on the invoice or other form Here is the detail section of a QuickBooks Online invoice, with the items in place for calculating a discount on the first three invoice lines. Set up the macro worksheet formulas, trigger text, etc. The screenshot below illustrates the formulas, trigger text, Begin field, Match column, and other appropriate worksheet settings.
Notes:
Right-click the formula cell on the SubtDisc row of the worksheet, then select Format cell from the popup menu. Then select currency formatting with two decimal places, and checkmark the Append results to field contents box, to add the subtotal amount to the item's Description. Also format the Discount row's formula, but this time select Number format and 2 decimal places, not Currency format. (Currency format would add a dollar sign ($) which QuickBooks Online would reject/ignore.) Running the Macro In QuickBooks Online:
In this example the Qty cell was selected as the Begin field (shown in bright green in the macro worksheet).
Here is the invoice after the macro has finished. Notice the subtotal and the discount—which is a negative amount, as it should be.
Discount and Subtotal All on One Line Here's an alternate approach, similar to the one above but using only a single Discount line on the invoice. Set up the Discount item...with a different Description This time the Discount item will trigger two formulas. One will append the subtotaled Amount to the Description field, so the Discount item needs a different Description: Use the item on the invoice or other form This step is the same as before except that you only need the Discount item on the invoice, below the lines to be discounted. Set up the macro worksheet formulas, trigger text, etc. Everything—including the formulas—is the same as before except that both formulas are now on the Discount line, and the SubtDisc line is gone. Format the formula cells This step is the same as before except that now both formulas are on the same row of the worksheet. Running the Macro In QuickBooks Online:
Now the subtotal and the discount are on the same line—the same result as before, presented more compactly. Discounting the Prior Line (no Subtotal) Here's how to calculate a discount for just one line—the immediately prior line on a sales form. Set up a Discount item The same Discount item created for the example above will work for this example. Use the item on the invoice or other form As before, select the Discount item on the invoice below the line to be discounted. Set up the macro worksheet formulas, trigger text, etc. This time you cannot subtotal the Amount column to get an amount for calculating the discount. Why? Because a subtotal would include all prior lines on the invoice, and you only want the Amount from the immediately prior line. The solution is to use FullSpeed's mini-spreadsheet feature. First, show the anchor rows for text-triggered formula row #1 by clicking the [ A ] button in the editing toolbar, then selecting the Text-triggered #1 item. Then enter formulas and sample data as shown below. These are essentially the same formulas as before, but instead of summing a range of cells in the Sandbox they now refer to a single anchor row in the Amount column, cell G15.
Format the formula cells Both cells should be formatted as before. Running the Macro In QuickBooks Online:
The amount and the discount are shown on the same line, and the discount only applies to the item on the immediately prior row. |