Method Community

 

Previous balance

Last post 12-26-2014 3:13 PM by Marcelo11756. 10 replies.
Page 1 of 1 (11 items)
Sort Posts: Previous Next
  • 12-23-2014 8:57 AM

    Previous balance

    How would I insert the customer's previous balance to the invoice screen so I have a choice to show it or not in the templates?

  • 12-23-2014 9:07 AM In reply to

    Re: Previous balance

    Hi Marcelo,

    What do you mean by previous balance? Do you mean the current customer balance not including the invoice being displayed? Let me know.

    - Justin

    Justin Henderiks
    Technical Sales Specialist
    Method Integration Inc.
    Toll Free: 1.888.925.6238
    Local and overseas: 416.847.0400
    Fax: 416.640.6027
    E-mail: j.henderiks@method.me
  • 12-23-2014 9:33 AM In reply to

    Re: Previous balance

    correct

  • 12-23-2014 11:46 AM In reply to

    Re: Previous balance

    Answer

    Hi Marcelo,

    You can actually do this right in the Report Designer by adding a Calculated Field, there's no need to add it to your screen if you don't need it there.

    First you'll need to add your Customer's Balance as a linked field to the Invoice table via Customer. Then from within Report Designer, add a Calculated Field to your report by right-clicking on the Invoice table in the Field and clicking Add Calculated Field:

    Right-click on your newly-created Calculated Field and select Edit Expression..., here you'll see the Expression Editor:


    You can use your linked Balance field to do some simple math here and come up with the amount you need for your calculated field, then place the field on the report. That should do the trick!

    Hope this helps.

    - Justin

    Justin Henderiks
    Technical Sales Specialist
    Method Integration Inc.
    Toll Free: 1.888.925.6238
    Local and overseas: 416.847.0400
    Fax: 416.640.6027
    E-mail: j.henderiks@method.me
  • 12-23-2014 12:15 PM In reply to

    Re: Previous balance

    That is how I have it now, but I want the choice to show it or not show it without having to change invoice templates

  • 12-23-2014 12:29 PM In reply to

    Re: Previous balance

    Marcelo,

    You'd probably want to use a checkbox. If checked, use the template with the Previous Balance amount. If it's not checked, use whichever template is selected as default.

    - Justin 

    Justin Henderiks
    Technical Sales Specialist
    Method Integration Inc.
    Toll Free: 1.888.925.6238
    Local and overseas: 416.847.0400
    Fax: 416.640.6027
    E-mail: j.henderiks@method.me
  • 12-23-2014 3:45 PM In reply to

    Re: Previous balance

    But will that work for when I print several invoices at once?

    In other words when printing several invoices at once can the actions be created to choose different invoice templates for different customers? 

  • 12-23-2014 4:43 PM In reply to

    Re: Previous balance

    Marcelo,

    There are multiple ways you could go about this. You could have a flag (Yes/No value) on the invoice record that you could check to determine which template to use on a per-invoice basis. You could have a flag on the customer record and link it into the invoice table to do the same on a per-customer basis.

    Here's how the Print Selected function on the Invoice screen's Print... button works:

    These actions print checked invoices by looping through the grid for all checked rows, adding each of the checked rows to a list, then generating reports based off of that list.

    For what you're trying to do, you'd want to do this twice. Once for your checked rows that have your custom flag = YES, generating reports using one template. The second time through for your checked rows that have your custom flag = NO, generating those reports using the other template.

    Hope this helps.

    Need more help with customization? Ask us about Method Professional Services.

    - Justin

    Justin Henderiks
    Technical Sales Specialist
    Method Integration Inc.
    Toll Free: 1.888.925.6238
    Local and overseas: 416.847.0400
    Fax: 416.640.6027
    E-mail: j.henderiks@method.me
  • 12-23-2014 7:44 PM In reply to

    Re: Previous balance

    Thanks

    Are there supposed to show in two separate windows ?


    and


    How do I stop one of the windows to show if there is no records for that flag?

  • 12-24-2014 9:55 AM In reply to

    Re: Previous balance

    Hi Marcelo,

    Since you want to use two different templates, you'll need two separate Generate Report actions. This will result in a separate pop-up for each template, there's no way around that.

    To stop the second pop-up when there are no records to print for that template, you can set up some test flags. You'll want two flags (you can use Action Results), one for each Template / Loop Through Grid pair. Create them as FALSE/NO in the beginning of your action list, then within your Loop Through Grid actions set them to TRUE/YES. If you've set up your Loop Through Grid actions to only find records appropriate to one template (based on your flag from earlier in this thread), then these test flags will only get set to TRUE/YES if there are any invoices to print for them (if there are none, the actions inside your loop will never run and your flag will never get set to TRUE/YES). Do this once for each Loop / Template pair, then place your Generate Report actions inside Conditional Statements that check your test flags and only generate reports if they are set to TRUE/YES.

    Hope this helps.

    - Justin

    Justin Henderiks
    Technical Sales Specialist
    Method Integration Inc.
    Toll Free: 1.888.925.6238
    Local and overseas: 416.847.0400
    Fax: 416.640.6027
    E-mail: j.henderiks@method.me
  • 12-26-2014 3:13 PM In reply to

    Re: Previous balance

    Thank you 

    It worked very well.

Page 1 of 1 (11 items)