Forum

Ask, reply and learn. Join the community of Akaunting.

New Discussion

Fresh install error in reconcile

Brian Lakstins   ( User )

Commented 4 years ago

I have a fresh install, added some transactions, and try to create a reconciliation. I get a 500 error that is because of this SQL error:

SQLSTATE[HY000]: General error: 1525 Incorrect DATE value: '0000-00-00' (SQL: select * from `atq_transactions` where `atq_transactions`.`account_id` = 1 and `atq_transactions`.`account_id` is not null and `type` = income and date(`paid_at`) < 0000-00-00 and `atq_transactions`.`deleted_at` is null and `atq_transactions`.`company_id` = 1 and `atq_transactions`.`deleted_at` is null)

I'm using MySQL 8.0.20.

Any ideas?

Brian Lakstins   ( User )

Commented 4 years ago

Query works if I put single quotes around "income".

select * from `atq_transactions` where `atq_transactions`.`account_id` = 1 and `atq_transactions`.`account_id` is not null and `type` = 'income' and date(`paid_at`) < 0000-00-00 and `atq_transactions`.`deleted_at` is null and `atq_transactions`.`company_id` = 1 and `atq_transactions`.`deleted_at` is null

I'll see if I can find where that is in the code.

Brian Lakstins   ( User )

Commented 4 years ago

It also works if I change the date to 0000-01-01. I submitted at pull request with the code change to the github repository.

Denis Dulici   ( Admin )

Commented 4 years ago

Hello,

This has been implemented here: https://github.com/akaunting/akaunting/pull/1435

Regards

Please login or register to leave a response.

Showing 1 to 4 of 4 discussions