DragonflyCMS Projects > Treasury and Supporters > [solved] Treasury 9.3.3 - Block > Community Forums > Phoenix Netology
Forum Index > eCommerce > Treasury and Supporters

[solved] Treasury 9.3.3 - Block Reply to topic


i am unable to get this block working correctly.
it just does not add up for me Sad

tried to find the problem but being no expert in this field i have failed. FIIK

here is what i mean :-
Attachment: treasury_block1.4.jpg
Description
Filesize 17.11 KiB
Viewed 8 Time(s)
You are not allowed to view/download this attachment

Please enter your server specs in your user profile! 😢


Looks very much like they are all manual entries - did you follow the guide for manual entries?

Donations & Audit for DragonflyCMS

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


Phoenix wrote
Looks very much like they are all manual entries - did you follow the guide for manual entries?


only 2 listed are manual entries.
i have removed some paypal sandbox entries and other manual entries prior to this but the data looks sound to me.

this pic doesn't show email addresses but i can confirm they are all same.

it's as if it only counts the first two donations FIIK
Attachment: treasury_block1.4_donations.jpg
Description
Filesize 33.18 KiB
Viewed 5 Time(s)
You are not allowed to view/download this attachment

Please enter your server specs in your user profile! 😢


Okay - perhaps you have changed the PayPal email address being used.

Is it the same for all payments? This is the "business" field in the cms_treas_trans db table - the summary data is grouped on this field.

Donations & Audit for DragonflyCMS

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


the problem is a strange one.

when entering funds manual through treasury admin , because there is no field name "item_name" this remains blank !

when entering funds through paypal the field name "item_name" is entered as "Donation"

The block somehow only adds the funds where "item_name" is blank !

then i used php-myadmin to fill in all "item_name" as "Donation" and guess what ? all Donations were added together ! Yes


so does the code need changing or another field adding to treasury admin ?

Please enter your server specs in your user profile! 😢


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?

Donations & Audit for DragonflyCMS

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


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! 😢


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.

Donations & Audit for DragonflyCMS

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


sorted Very Happy
  • cleared PayPal Item Name in paypal config
  • cleared contents of all previous 'Item Name' within sql database

now it works 😉 cheers Pheonix


one more question: How do i go about applying a minimum donation?
( paypal fees are quite high when paying small donations )

Please enter your server specs in your user profile! 😢


In DonationsPro it is configurable, along with several other features.

For Treasury, simply edit themes/default/template/treasury/index.html and remove lines 16 to 18 <input type="radio" name="amount" value="" /> Other  <input type="text" name="amount" value="0.00" size="6" /> <br />

Donations & Audit for DragonflyCMS

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):

All times are Australia/Adelaide


Jump to: