Is this a Credit Memo or an Invoice?

Well if the total amount is negative than it’s an credit memo, otherwise it’s an Invoice….no?  Well of course, but wouldn’t it be nice to have it clearly state whether it’s a credit or invoice on top of the document?

In VISUAL, invoices and credits are printed using the same QRP template files.  With conditional formatting, you can clearly state whether the document is an INVOICE or CREDIT MEMO.  Conditional formatting allows you to dynamically change the appearance of the document based on the result of a formula.  In this case, the formula will look at the GRAND TOTAL.  And if it’s negative it will print CREDIT MEMO otherwise it will print INVOICE.

  1. Using Report Builder, open the invoice QRP (ie: VMINVFM1.QRP)
  2. Add a new field and place it at the top of the form
  3. Right click on the field and select PROPERTIES from the popup menu

    Is this a Credit Memo or an Invoice?

  4. Click on the Edit Field Formula button

    Properties Field

  5. Enter the following formula in the space provided:StrIFF( StrScan( CUR_GRANDTOTAL,'(‘ ) , ‘INVOICE’, ‘CREDIT MEMO’, ‘CREDIT MEMO’ )

    Negative values are displayed with brackets.  So this formula searches the CUR_GRANDTOTAL field for an open bracket ‘(‘.  If it finds one it will print “CREDIT MEMO” otherwise it will print “INVOICE”.

    Formula Editor

  6. Click OK
  7. Change the field’s font style and font size (if desired)
  8. Save the QRP

So the next time you’re printing invoices and you happen to come across a shipment return – you should see something similar to the following:

Report Builder QRP

Copyright 2019 visualnuggets © All Rights Reserved