CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Error when updating Pending Status
Pages: [1]

Author Topic: Error when updating Pending Status  (Read 3193 times)

BarisArt

  • Guest
Error when updating Pending Status
March 01, 2008, 02:09:40 am
Hi there,

When I try to update a batch of contribution to the Completed status using the Core function, I get an error:

Code: [Select]
=> -2
[message] => DB Error: syntax error
[mode] => 16
[debug_info] => UPDATE  civicrm_contribution  SET domain_id = 1 , contact_id = 1251 , contribution_type_id = 4 , payment_instrument_id = 7 , receive_date = 20080225151457 , total_amount = 162.50 , fee_amount = 0 , net_amount = 162,5 , currency = 'EUR' , receipt_date = 20080229212041 , source = 'Online evenement registratie: Zeilkamp 1 2008' , is_test = 0 , contribution_status_id = 1   WHERE (  civicrm_contribution.id = 10 )   [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '5 , currency = 'EUR' , receipt_date = 20080229212041 , source = 'Online evenemen' at line 1]
[type] => DB_Error
[user_info] => UPDATE  civicrm_contribution  SET domain_id = 1 , contact_id = 1251 , contribution_type_id = 4 , payment_instrument_id = 7 , receive_date = 20080225151457 , total_amount = 162.50 , fee_amount = 0 , net_amount = 162,5 , currency = 'EUR' , receipt_date = 20080229212041 , source = 'Online evenement registratie: Zeilkamp 1 2008' , is_test = 0 , contribution_status_id = 1   WHERE (  civicrm_contribution.id = 10 )   [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '5 , currency = 'EUR' , receipt_date = 20080229212041 , source = 'Online evenemen' at line 1]
[to_string] => [db_error: message="DB Error: syntax error" code=-2 mode=callback callback=CRM_Core_Error::handle prefix="" info="UPDATE  civicrm_contribution  SET domain_id = 1 , contact_id = 1251 , contribution_type_id = 4 , payment_instrument_id = 7 , receive_date = 20080225151457 , total_amount = 162.50 , fee_amount = 0 , net_amount = 162,5 , currency = 'EUR' , receipt_date = 20080229212041 , source = 'Online evenement registratie: Zeilkamp 1 2008' , is_test = 0 , contribution_status_id = 1   WHERE (  civicrm_contribution.id = 10 )   [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '5 , currency = 'EUR' , receipt_date = 20080229212041 , source = 'Online evenemen' at line 1]"]

The value of total_amount is correct (162.50) while the value of net_amount isn't (162,5). This has probably to do with the currency settings (in the Netherlands 162,50 would be correct, but this should be translated back before firing a database query).

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Error when updating Pending Status
March 01, 2008, 11:10:54 am

can you please file an issue. we'll fix this for 2.0

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Error when updating Pending Status
March 01, 2008, 12:36:42 pm
For tracking purpose: http://issues.civicrm.org/jira/browse/CRM-2776

kurund
Found this reply helpful? Support CiviCRM

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Error when updating Pending Status
March 02, 2008, 11:28:53 am
Can you replicate this issue on demo. http://drupal.demo.civicrm.org

thanx,

kurund
Found this reply helpful? Support CiviCRM

BarisArt

  • Guest
Re: Error when updating Pending Status
March 03, 2008, 02:24:22 am
Hi Kurund,

I cannot. I tried to, but on the demo I get the warning:

Update Pending Contribution Status can only be used for pending online contributions (made using the 'Pay Later' option). The Source for these contributions starts with 'Online ...'. Please de-select any offline contributions and try again.


We only work with offline contributions, and debit the amount later on from the participants bank-account.
After the debit, we change the Pending status into Completed. I installed 2.1, which allows to change the pending status, but the demo doesn't. Still I think the error is valid, it doesn't translate the comma in the amount back to a dot, caused by the the Dutch monetary value.

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Error when updating Pending Status
March 03, 2008, 10:23:48 am
Can you give more details about your setup, your localization details etc.

Also i am closing http://issues.civicrm.org/jira/browse/CRM-2776 since you are not able to replicate it.

kurund
Found this reply helpful? Support CiviCRM

Michał Mach

  • Ask me questions
  • ****
  • Posts: 748
  • Karma: 59
    • CiviCRM site
  • CiviCRM version: latest
  • CMS version: Drupal and Joomla latest
  • MySQL version: numerous
  • PHP version: 5.3 and 5.2
Re: Error when updating Pending Status
March 03, 2008, 12:43:18 pm
Hey,

I was able to replicate similar effect on my 2.0 dev sandbox (described in reopen comment).

BarisArt, since the problem I discovered is not exactly the error you're getting (even though it might be related), passing your localisation settings here will be still useful.

Thx,
m
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

My absolute favourite: Wordpress Integration!.

Donate Now!

BarisArt

  • Guest
Re: Error when updating Pending Status
March 05, 2008, 07:57:50 am
Hi m,

no problem.

User Language: nl_NL
Default Currency: EUR
Monetary Locale: nl_NL
Monetary Display: %c %a
Legacy Encoding: Windows-1252

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Error when updating Pending Status

This forum was archived on 2017-11-26.