Customer discount message, part 2: using an "indicator" column |
Top Previous Next |
This example demonstrates: •Using an "indicator column" to control calculations •Using text functions to include a discount amount and deadline date in a customer message •Referencing a header field (Invoice date) in formulas •Using trigger Items to control where calculations occur
Limiting the Discount to Specific ItemsOverviewcontinued from Part 1... We've learned that Jerry, the manager at Skyview Farm Service, now wants the available discount to apply only to specific Item lines on the Invoice—only to Items representing fertilizer products. Adding that capability will require a few simple steps. You will need to: •Add a custom field to the Items list to indicate which Items are discountable, and include that field on Skyview's Invoices. We'll call that field an "indicator column", because of the job it does. •Add another column to Skyview's Invoices for holding the dollar amount of discountable Items. It will contain the results of a formula which multiplies the indicator column by the Amount column. •Take a new snapshot of the Invoice with FormCalc SST, because the Invoice layout has changed. •Add formulas to the snapshot. They will be only slightly different from those in Part 1. The result will be a customer message at the bottom of invoices, which displays an available discount amount and the discount deadline date, like this: *** DISCOUNT of $123.45 if paid by 11/14/2013 *** QuickBooks SetupAdding a custom field in the Items list, and storing data in it
1.Define a new a custom field in the Items list, and name it Discountable. 2.Edit each of the fertilizer Items in the Items list, and enter a "1" in the Discountable field (in the Custom Fields window).
Adding columns to the Invoice1.Click on the command to customize the Invoice form's layout.
2.On the Columns tab of the Additional Customization window, checkmark boxes in the Screen column for the Discountable field, and the Other 1 field. •Discountable is the custom field added in the steps above. •Other 1 and Other 2 are spare fields you may use for any purpose. In this case you will use one of them (either will do) to hold calculated results from a FormCalc SST formula. 3.You can also change the fields' display names if you want, in the Title column, and change their order by renumbering the Order column.
FormCalc SST Setup1.Take a new snapshot of the Invoice.
2.Assign column types on the Column types row and column labels on the next row.
3.Add the following formula in the Dscnt$ cell on the Formulas row. =H20*J20
4.Enter the following formula in the Description column on the Item-triggered formulas 1 row: ="*** DISCOUNT of "&DOLLAR(SUM(I26:I28)*0.02,2)&" if paid by: "&TEXTD(B6)&" ***"
Processing an InvoiceHere's the result of processing an Invoice in QuickBooks using this new FormCalc SST setup: Do you see the problem?The old customer message (from Part 1) wasn't fully erased before FormCalc SST wrote the new one to the Invoice, with this being the result: *** DISCOUNT of $108.29 if paid by: This won't do! It's alerting us to the fact that if an Invoice gets processed a second time, the customer message won't be displayed properly. A simple fixFormatting the Description column's results differently in FormCalc SST will fix the problem 1.Right-click on the Description column's cell on the Item-triggered formulas 1 row, and select the Format item from the pop-up menu.
2.In the right pane of the window, checkmark the Results replace Description option.
3.Click OK to close the window. Processing an Invoice Again...Success!And here's the result of processing the Invoice again. As you can see, the customer message now correctly replaces the prior one. Related topics: |