1 Reply Latest reply on Sep 24, 2012 5:12 AM by comment

    Looking for a 'work-around' technique...

    PeterWindle

      Hello all...

       

      I am working on someone else's database and there is a problem:

       

      There are Invoices and Invoice Items, simple enough. However, there is a "discount" applied to the Invoice, not the Invoice Items.

       

      Reports are obviously based on Invoice Items, when running reports, there are totals, but they need to indicate how much the discount is.

       

      The logic is flawed, because there is no way of knowing which item the discount applies to. If you run the report on a specific item and there are multiple items on the one invoice, then displaying the discount amount may not be accurate.

       

      So, how could the discount be displayed...? It has to be there. The only thing I can think of is displaying the discount amout over the report period as a total, if the report is showing ALL items during the period... but then how would I be able to grab the total. I was thinking that getsummary may help in this regard.

       

      Any other suggestions are MOST welcomed!

        • 1. Re: Looking for a 'work-around' technique...
          comment

          If you want the total of discounts applied to multiple invoices, you need to start by dividing each discount among the line items, e.g. =

           

          Invoices::Discount / GetSummary ( sCount ; InvoiceID )

           

          then summarize this field. This is of course assuming the report includes all line items of the reported invoice - otherwise it's rather meaningless.