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:
- Add the following fields to the Vendor Invoice object in PSA:
- Passed to Accounting (checkbox)
- Add the following fields to the Payable Invoice object in Accounting:
- PSA_Vendor_Invoice (Lookup to Vendor Invoice)
- Project (Lookup to Project in PSA)
- 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)
- 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 Item Value ClickLink Rule Name PSA Vendor Invoice to Payable Invoice Source Object pse__Vendor_Invoice__c Source Object Name Field Name Source Object Processed Field Passed_to_Accounting__c Target Object c2g__codaPurchaseInvoice__c Target Object Name Field Name - In the ClickLink mappings:
Recommended Mappings for the PSA Vendor Invoice to Payable Invoice ClickLink Rule Target Record Created From Mapping Type Source Field Target Field Source Record Source Field pse__Account__c c2g__Account__c Source Record Source Field pse__Date__c c2g__InvoiceDate__c Source Record Source Field pse__Description__c c2g__InvoiceDescription__c Source Record Source Field pse__PO_WO_Number__c c2g__Reference1__c Source Record Source Field pse__Invoice_Number__c c2g__AccountInvoiceNumber__c Source Record Source Field Name PSA_Vendor_Invoice__c - 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 Item Value ClickLink Rule Name PSA Vendor Invoice Item to Payable Expense Line Source Object pse__Vendor_Invoice_Item__c Source Object Name Field Name Target Object c2g__codaPurchaseInvoiceExpenseLineItem__c Target Object Name Field Name - 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 From Mapping Type Source Field Target Field Source Record Source Field pse__Project__c Project__c Source Record Source Field pse__Milestone__c Milestone__c Source Record Source Field pse__Expense__c Expense__c Source Record Source Field pse__Amount__c c2g__NetValue__c Source Record Source Field pse__Description__c c2g__LineDescription__c Source Record Source Field pse__Timecard__c Timecard_Split__c - 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 Name Relationship ClickLink Rule Relationship Target Field pse__Vendor_Invoice_Items__r PSA Vendor Invoice Item to Payable Expense Line c2g__PurchaseInvoice__c - 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> - 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.
- 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> - In the PSA Vendor Invoice to Payable Invoice rule, create a button that calls the Visualforce page that you created in the previous step.
- In the Vendor Invoice object, create custom buttons for the buttons you created in the previous steps.
- Add the Create Payable Invoice custom button to the Vendor Invoice page layout.
- 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.