26

(9 replies, posted in Setup)

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.

27

(9 replies, posted in Setup)

Thanks tclim!
I think your explanation related with my other issue here: http://mantis.frontaccounting.com/view.php?id=709.

28

(9 replies, posted in Setup)

Thanks for the response.

So, as long as the result is 1, I can ignore the error message?

29

(9 replies, posted in Setup)

Hi all,

I activated SQL trail option ($sql_trail = 1), and found that some (or maybe all) of error messages are inaccurate.
For instance, I added a new customer. The new customer data was successfully saved. But in the sql_trail table I found these rows:

=================
sql | result |msg

BEGIN | 1 | could not start a transaction

INSERT INTO debtors_master (name, debtor_ref, address, tax_id, dimension_id, dimension2_id, curr_code, credit_status, payment_terms, discount, pymt_discount,credit_limit, sales_type, notes) VALUES ('Dummy Customer', 'Dummy Customer', 'Jakarta', '','0', '0', 'IDR', '1', '2', 0, 0, 1000, '1', '') | 1 | The customer could not be added

COMMIT | 1 | could not commit a transaction
=================

I saw that the new customer data existed in debtors_master table.
So why did the SQL trail tell me that the query was failed?

Was it because the debtors_master table is MyISAM?

Then I tried to do another transaction with InnoDB tables. I added a new item tax type (the item_tax_types table is of InnoDB type). The new data was saved correctly (I think so). But still, I got similar error message in sql_trail table:

=================
BEGIN     1     could not start a transaction
INSERT INTO item_tax_types (name, exempt) VALUES ('No tax','1')     1     could not add item tax type
COMMIT     1     could not commit a transaction
=================

Is there any body can help me to explain this?
Thanks in advance.

Albert