Sage Pay Link

SUGGESTED

Hello,

We use Sage 50 and I have amended our invoice template to include a payment link which is connected to our SagePay account

However, I would also like to put this option on our Proforma Invoices - does anyone know if this is possible?

I can copy the same link over from the invoice template however when I try to generate the SO, Sage wont create it, just seems to time out.

Any ideas?

  • 0

    The conditional formatting on the button excludes pro forma invoices for any of the built in layouts, so if you simply copy the button from one of these you would get the same rules applying to it. Technically speaking there is nothing stopping you from editing the conditional formatting so pro-forma invoices aren't excluded, but I do not know if it is deliberate or there is a good reason why the button is currently excluded for the pro-forma type so whilst technically feasible I could not say if it would definitely work or if it would be a problem to do so.

  • 0 in reply to Darron Cockram

    Hi Darron,

    This was my first thought too however I have tried this and although the button appears on the template layout, when I attempt to print the Proforma Sage does not generate anything, or I get the error message "The field 'INVOICE.INVOICE_PAYMENT_ID' does not exist"

    The button copied over from the Invoice template is obviously linking to a Invoice field which does not yet exist as there is no invoice.

    When I go onto Report Editor, the only option I have is changing the image, I cant seem to update what the link is actually connected to

    Any further advice?

  • 0 in reply to GHolmes
    I get the error message "The field 'INVOICE.INVOICE_PAYMENT_ID' does not exist"

    That simply means that the INVOICE table is not part of the joins. Something I've only just spotted in your original post is that although you talk about wanting the button on your pro-forma invoice you do then also say "when I try to generate the SO", by which I surmise that you mean a pro-forma sales order, so not an invoice. I suspect this is the cause of this particular error and you have copied the button from an invoice and pasted it on to a sales order layout. Obviously a sales order layout has no reference to the INVOICE table and this would cause this exact error.

    When I go onto Report Editor, the only option I have is changing the image, I cant seem to update what the link is actually connected to

    Yes, that is expected as there is specific logic and rules to building the URL to ensure it is valid and signed to ensure it cannot be tampered with, so this is encapsulated and all you provide is the key info such as your vendor Id, the invoice number amount and date, etc. You can see this in the DrillDown property. Incidentally this will also be referencing INVOICE fields which will not exist if you are using a pro-forma sales order layout. Again it would be technically possible to replace these with the equivalent fields from SALES_ORDER, but again I could not say if this would definitely work or not.

  • 0 in reply to Darron Cockram

    Had a check and there is no reason why the pay now button cannot be added to a pro-forma invoice and we have a knowledgebase article on the tweak you need to make:

    gb-kb.sage.com/.../viewsolution.jsp

    However adding it to a pro-forma sales order isn't covered by that and would be significantly more involved I'm afraid.

  • 0 in reply to Darron Cockram

    Hi Darron,

    Thanks for investigating.

    Yes I should have been more clear, I am looking to add the button to a Proforma Sales Order. At the moment, we have certain customers who do not have a credit account so we look for payment up front. 

    In our business, we also use Sage Manufacturing so we only invoice once the product is made and been dispatched through the Manufacturing software.

    We currently send the customer a Proforma Sales Order along with a 'Pay It Now' link in the email - I am wanting to automate this not all our sales staff have the ability to raise a payment link.

    Many thanks,

  • 0 in reply to GHolmes

    It should be technically possible to get it to work on a sales order but it is not something that is documented anywhere, or tested. In general the process would be to change all of the references to fields in the INVOICE table in the conditional formatting and drill down properties to the equivalent fields in SALES_ORDER and to update the conditional formatting rule so it includes the SO and pro-forma values in the ORDER_TYPE_CODE check.

  • 0

    GHOLMES

    Did you ever get the pay now button to work on a sales order please?

  • 0 in reply to Warren Hynd

    Unfortunately not. We are still sending Proforma Sales Orders with a 'Pay It Now' link in the body of the email

    If you find a way to add it to the SO, please let me know!

  • 0 in reply to GHolmes

    As per my above note this is not something that we have tested but it should be a case of adjusting the drill down expression to reference SALES_ORDER fields rather than INVOICE fields. Something like this should work:

    CreateSagePayButton(COMPANY.PROTX_VENDOR, SALES_ORDER.ACCOUNT_REF, SALES_ORDER.ORDER_NUMBER, SALES_ORDER.INVOICE_GROSS, SALES_ORDER.ORDER_DATE, "GBP", "invoice", COMPANY.COMPANYID)

    Note that the 2nd to last parameter still says invoice as if you change it some something else such as "order" it will result in an error, but this should still work to generate a PayNow link on a sales order layout.

    Hope that helps

  • 0 in reply to Darron Cockram
    SUGGESTED

    Yes thanks, Rajeev Arora help me too, but this works for me. You might need to delete the conditional formatting on the button too:

    1. Copy the PayNow button from one of the standard Invoice layouts, and paste it into a Sales Order layout.
    2. Edit the button properties and go to Behaviour > Drill Down and click the 3 dots at the end.
    3. Click the Edit button next to "go to a web address taken from the report data" option.
    4. Add the following code: 
    5. CreateSagePayButton( COMPANY.PROTX_VENDOR, SALES_ORDER.ACCOUNT_REF, SALES_ORDER.ORDER_NUMBER, SALES_ORDER.FOREIGN_INVOICE_GROSS, SALES_ORDER.ORDER_DATE, "GBP", "invoice", COMPANY.COMPANYID)