Only print one line + extended description on an invoice
  • Pete
    Only print one line + extended description on an invoice

    by Pete » Wed Jun 14, 2006 6:08 pm

    Is there any way I can print an invoice that only shows one product code on an invoice? I want to put other information on the invoice that is visible to me and my staff but I don't want it to print on paper. I understand I can add a rule that will match a particular product code in the body section of the form. However, doing this only prints the first line of the product. I've got lots of description linked to this product code that spans multiple lines and I'd like to include that on the invoice as well. Can this be done?
  • COBS Tech Support
    Posts:683
    Joined:Fri Sep 09, 2005 8:23 am

    by COBS Tech Support » Wed Jun 14, 2006 6:11 pm

    Provided that you have linked your extended description lines to your product code this can be done. By 'linking' we mean that you have pressed the Insert key on the description line of your invoice, and when the text box has appeared, entered your detailed description inside this box. If you have entered your description as separate lines on your transaction then CAPITAL will treat these as separate also and will not be able to group them together.

    Using VB, under Edit|Form Properties, Questions tab, Postscript button add this to the bottom of your invoice:

    Declare cItemNo Type Character
    cItemNo := ""

    Under Body Properties, Rules tab, "All These Rules Must Be True" add this rule:

    If Stock->Name = "TEST123"
    cItemNo := Contents->Lineref
    Endif

    If cItemNo == Contents->Lineref
    Return TRUE
    Endif

    Return FALSE

    Change the product code from "TEST123" to whatever product code you want to use.

    Note that the invoice won't "balance" if users add lines to their invoices that have chargeable items on them. So be careful when creating forms that do such non-standard things.

Who is online

Users browsing this forum: No registered users and 21 guests