Let me copy my explanation about the issue here:
0000709: Cannot view GRN transaction detail
Each time I click the link of GRN transaction number (to view the transaction detail) in Inventory Item Movement report or Supplier Transaction Inquiry, the new window open with error message:
======================
DATABASE ERROR : FATAL : duplicate purchase order found
sql that failed was :
======================There is no additional information of failed SQL.
After some search in the PHP code, it seems this is because the content of grn_batch.purch_order_no field doesn't match with the field purch_orders.order_no.
The purch_orders.order_no is auto-increment generated, while grn_batch.purch_order_no contains big numbers (I haven't found where are they taken from).
I tried another new installation, and I got similar issue.
I tested further after I read your post, and found that I got the issue when I turned on the SQL trail. The issue was gone after I turned of the SQL trail.
Hope this helps.