Converting PSA Vendor Invoices to Accounting Payable Invoices

Problem

You have vendor invoices in PSA and you want to convert these into payable invoices in Accounting.

Solution

In this solution, Accounting and PSA are installed on the same org. To use this solution, in Accounting you must create an account, set the Default Expense Account and create some credit terms for that account.

To set up ClickLink rules to convert PSA vendor invoices to Accounting payable invoices:

  1. Add the following fields to the Vendor Invoice object in PSA:
    • Passed to Accounting (checkbox)
  2. Add the following fields to the Payable Invoice object in Accounting:
    • PSA_Vendor_Invoice (Lookup to Vendor Invoice)
    • Project (Lookup to Project in PSA)
  3. Add the following fields to the Payable Invoice Expense Line Item:
    • Project (Lookup to Project in PSA)
    • Milestone (Lookup to Milestone in PSA)
    • Expense (Lookup to Milestone in PSA)
    • Timecard Split (Lookup to Timecard Split in PSA)
  4. Create a new ClickLink rule to convert PSA Vendor Invoices to Accounting Payable Invoices:
    Recommended Values for the PSA Vendor Invoice to Payable Invoice ClickLink Rule
    ItemValue
    ClickLink Rule NamePSA Vendor Invoice to Payable Invoice
    Source Objectpse__Vendor_Invoice__c
    Source Object Name FieldName
    Source Object Processed FieldPassed_to_Accounting__c
    Target Objectc2g__codaPurchaseInvoice__c
    Target Object Name FieldName
  5. In the ClickLink mappings:
    Recommended Mappings for the PSA Vendor Invoice to Payable Invoice ClickLink Rule
    Target Record Created FromMapping TypeSource FieldTarget Field
    Source RecordSource Fieldpse__Account__cc2g__Account__c
    Source RecordSource Fieldpse__Date__cc2g__InvoiceDate__c
    Source RecordSource Field pse__Description__cc2g__InvoiceDescription__c
    Source RecordSource Fieldpse__PO_WO_Number__cc2g__Reference1__c
    Source RecordSource Field pse__Invoice_Number__cc2g__AccountInvoiceNumber__c
    Source RecordSource FieldNamePSA_Vendor_Invoice__c
  6. Create a new ClickLink rule to convert PSA Vendor Invoice Line Items to Accounting Payable Invoice Line Items:
    Recommended Values for the PSA Vendor Invoice Item to Payable Expense Line ClickLink Rule
    ItemValue
    ClickLink Rule NamePSA Vendor Invoice Item to Payable Expense Line
    Source Objectpse__Vendor_Invoice_Item__c
    Source Object Name FieldName
    Target Objectc2g__codaPurchaseInvoiceExpenseLineItem__c
    Target Object Name FieldName
  7. In the ClickLink rule you created in the previous step, create these ClickLink mappings:
    Recommended Mappings for the PSA Vendor Invoice Item to Payable Expense Line ClickLink Rule
    Target Record Created FromMapping TypeSource FieldTarget Field
    Source RecordSource Fieldpse__Project__cProject__c
    Source RecordSource Fieldpse__Milestone__c Milestone__c
    Source RecordSource Fieldpse__Expense__cExpense__c
    Source RecordSource Field pse__Amount__cc2g__NetValue__c
    Source RecordSource Fieldpse__Description__cc2g__LineDescription__c
    Source RecordSource Fieldpse__Timecard__cTimecard_Split__c
  8. Create a ClickLink relationship in the PSA Vendor Invoice to Payable Invoice rule:
    Recommended Relationship for the PSA Vendor Invoice to Payable Invoice ClickLink Rule
    ClickLink Relationship NameRelationship ClickLink Rule Relationship Target Field
    pse__Vendor_Invoice_Items__r PSA Vendor Invoice Item to Payable Expense Linec2g__PurchaseInvoice__c
  9. Create a Visualforce page to convert a single vendor invoice to a payable invoice. You can use this Visualforce markup:

    <apex:page standardController="pse__Vendor_Invoice__c" extensions="ffirule.IntegrationRuleEngine" action="{!convert}">

    <ffirule:IntegrationRule engine="{!engine}"/></apex:page>
  10. In the PSA Vendor Invoice to Payable Invoice ClickLink rule, create a button that calls the Visualforce page that you created in the previous step.
  11. Create a Visualforce page to convert a multiple vendor invoices to payable invoices. You can use this Visualforce markup:

    <apex:page standardController="pse__Vendor_Invoice__c" extensions="ffirule.IntegrationRuleEngine" action="{!convert}" recordSetVar="records">

    <ffirule:IntegrationRule engine="{!engine}"/></apex:page>
  12. In the PSA Vendor Invoice to Payable Invoice rule, create a button that calls the Visualforce page that you created in the previous step.
  13. In the Vendor Invoice object, create custom buttons for the buttons you created in the previous steps.
  14. Add the Create Payable Invoice custom button to the Vendor Invoice page layout.
  15. Add the Create Payable Invoices custom button to the Vendor Invoices List View Search Layout.

To test the ClickLink rule, open a vendor invoice in PSA and click Create Payable Invoice. A payable invoice should be generated with at least one payable invoice expense line item.