That doesn't make any sense - the sql query doesn't make use of the item_name field, so it cannot have any effect. SELECT business, COUNT( settle_amount ) AS count, SUM( mc_gross * exchange_rate ) AS receipts, SUM( settle_amount ) AS net, FROM_UNIXTIME( $tr_period[1] , ' %b %e' ) AS due_by
FROM {$prefix}_treas_trans
WHERE $where
AND (payment_status = 'Completed' OR payment_status = 'Refunded')
GROUP BY business";
Presumably you are using the current block that comes with v9.3.3?
i am using the block provided with treasury v9.3.3.
/*************************************************************************
* NukeTreasury - Financial management for PHP-Nuke *
* Copyright (c) 2004 by Dave Lawrence AKA Thrash *
* thrash @ fragnastika.com *
* thrashn8r @ hotmail.com *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License. *
* *
* $Source: /0cvs/Treasury/blocks/block-Donat_o_Meter.php,v $ *
* $Revision: 1.4 $ *
* $Author: Phoenix $ *
* $Date: 2007/12/27 23:22:46 $ *
* *
* DragonflyCMS Version by Phoenix at nukebiz.com *
*************************************************************************/
$query_Recordset1 = "SELECT business, COUNT( settle_amount ) AS count, SUM( settle_amount ) AS gross, SUM( settle_amount - mc_fee ) AS net, DATE_FORMAT( NOW( ) , '%M' ) AS mon, DATE_FORMAT( SUBDATE( DATE_FORMAT( ADDDATE( NOW( ) , INTERVAL 1 MONTH ) , '%Y-%c-1' ) , INTERVAL 1 DAY ) , ' %b %e' ) AS due_by, DATE_FORMAT( NOW( ) , '%b' ) AS mon_short
FROM ".$prefix."_treas_trans
WHERE ( payment_date >= UNIX_TIMESTAMP(DATE_FORMAT( NOW( ) , '%Y-%m-$swingd' )) )
GROUP BY item_name"; GROUP BY item_name could this be the culprit
Please enter your server specs in your user profile! 😢
PhoenixOffline
Joined: Mar 18, 2004
Posts: 1543
Location: Netosphere
My apologies for misleading you - it's been a very long time and a couple of different CMSes since then - I was looking at the DonationsPro code for the block, where I had long since changed from using the item_name field to using the business field.
Now, back to Treasury - even though item_name is used, when a donation is manually added, Treasury admin collects the current config values for receiver email, item name, item number and currency symbol and adds them to that donation's record.
Therefore, it appears the item name was changed after the first 2 donations.
You need to retain the block code as it stands and be wary of changing the item name in PayPal config section.