Use total contribution amount instead of net amount for progress bars.
authorDavid Thompson <davet@gnu.org>
Mon, 15 Dec 2014 17:41:26 +0000 (12:41 -0500)
committerDavid Thompson <davet@gnu.org>
Mon, 15 Dec 2014 17:41:26 +0000 (12:41 -0500)
CRM/Wci/BAO/ProgressBar.php

index 58fc5cc5834ecc6511f9f9be21ae0607bb83dcce..182b7d62b2af8e6ca173ad79d959dc1af672b2fc 100644 (file)
@@ -61,7 +61,7 @@ class CRM_Wci_BAO_ProgressBar extends CRM_Wci_DAO_ProgressBar {
    */
   public static function getPBCollectedAmount($pbId) {
     $amount = 0;
-    $query = "SELECT sum((civicontrib.net_amount * wcipb.percentage) / 100) as amount
+    $query = "SELECT sum((civicontrib.total_amount * wcipb.percentage) / 100) as amount
       FROM civicrm_wci_progress_bar_formula wcipb
       JOIN civicrm_contribution civicontrib
       ON wcipb.contribution_page_id = civicontrib.contribution_page_id