CRM-16524 - fix batch entry total amount validation.
authorDave Greenberg <dave@civicrm.org>
Tue, 19 May 2015 18:42:25 +0000 (11:42 -0700)
committerDave Greenberg <dave@civicrm.org>
Tue, 19 May 2015 18:42:25 +0000 (11:42 -0700)
----------------------------------------
* CRM-16524: Batch Entry form Validation failed, even total_amount reach the expected total_amount
  https://issues.civicrm.org/jira/browse/CRM-16524

CRM/Batch/Form/Entry.php

index 2d763348afda42ec86ebf8c029ea67a48d542ff3..13d0534301355c935e42ae7b5ca9b7e39724aa16 100755 (executable)
@@ -327,7 +327,7 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form {
         }
       }
     }
-    if ($batchTotal != $self->_batchInfo['total']) {
+    if ((string) $batchTotal != $self->_batchInfo['total']) {
       $self->assign('batchAmountMismatch', TRUE);
       $errors['_qf_defaults'] = ts('Total for amounts entered below does not match the expected batch total.');
     }