xTuple.com xTupleU Blog & News Customer Support

Expense Request Processing do not create PO


I have downloaded the Expense Request Extension and hve created Non Inventory Requests.
My problem is that when I Transfer the Request to PO, using Expense Processing. No PO is created.
How can it go to PO?

I’ve been exploring postgresql and found out that some sort of scripts are not enabled. I enabled it using a wizard then it works.

Hi jstranding,

Can’t download the sql file. I also noticed the PO# sequence.

Could you explain where you found and changed postgresql so this works. I have the same issue but I do not know where to go in postgresql to enable scripts as you mention above.

Hi jstranding,
I can’t download the sql file either. Tried several ways but it always come back as forbidden from the server.

Tried attaching a zip instead, see if that works

The attached script should slove the problem if it is the same that we had. After 3.3.0 the pohead table changed which breaks the script.

We also notice that the PO# sequence skips number if the PO screen view straight after “Transfer to PO” disable the dialog question or always answer no.

To update use the pgadmin III program which comes with postgresql. Click on you database, select menu item Tools > Query Tool. Then open the script and run it.

Try removing the following line at the end of the script

GRANT EXECUTE ON FUNCTION poreq.newpohead(integer, integer, text) TO public;

Check that the role “xtrole” is present in the roles branch.

If this does not work you may have check for non standard characters in the text window. This file was generated on window xp.

Other than that I am not sure what could cause the fault.

On the Database, Right click then you can see Grant Access Wizard

On the Database, Right click then you can see Grant Access Wizard

I am not having any luck with Jeff’s solution above (although I appreciate the input). I am simply not familiar enough with Postgresql to accomplish what Jeff is suggesting.

Does anyone have some other method of fixing this?


Hi jstandring,

I got this downloaded and tried to run it in pgadmin but I got the following error message:

ERROR: syntax error at or near “OR”

********** Error **********

ERROR: syntax error at or near “OR”
SQL state: 42601
Character: 32


Since the formal definition of this foreign key : pohead_pohead_taxzone_id_fkey

the following code in poreq.newpohead()

–Get Vendor Info
SELECT addr., cntct., vendinfo.*,
COALESCE(vend_taxzone_id, -1) AS vendtaxzoneid,

should become

–Get Vendor Info
SELECT addr., cntct., vendinfo.*,
vend_taxzone_id AS vendtaxzoneid,

for those vendors that have none as a tax zone.

i had similar problem where the menu under Purchase > Custom > … has been greyed off. I fixed this by granting the access to the role. Click on System > Maintain Roles… Then edit the role. Select the Module Custom. Grant the privileges of the customer Expense Request, PO Progressing, etc

Thanks for pointing this out. Looks like a number of updates are required to the packages

Expense Processing didn’t create a new PO even I have tell it to create a new PO.

Steps for reconstruction.

  1. Create Expense Request
  2. Release Expense Request
  3. Acknowledge Expense Request via Expense Processing.
  4. Transfer To PO
  5. Select the line item to Transfer to PO
  6. Click Create

For this step, I want to create a new PO. so I click on NO button.
7. A pop up “An Open Purchase Order already exists for this Vendor. Would you like to use this Purchase Order? Click “OK” to use existing Purchase Order otherwise a new one will be created”

I would expect a NEW PO to be created. It did not create a new PO. Instead, it added new items to the existing PO
8. A pop up “A Purchase Order has been created with 1 item Added. Would you like to open it?”