DragonflyCMS Projects > Treasury and Supporters > Block 9.1.2 version doesn't show values > Community Forums > Phoenix Netology
Forum Index > eCommerce > Treasury and Supporters

Block 9.1.2 version doesn't show values Reply to topic


I've updated to version 9.1.2 today, added the templates to my themes, all goes fine, however the block doesn't show any values (at least: they're all zero) exept the goals.

So it shows:

Due Date:
Mar 31
March Goal:
50.00
Gross Amount:
0.00
PayPal Fees:
0.00
Net Balance:
0.00
Below Goal:
50.00
Site Currency:
GBP


However there are values in our balance

Please enter your server specs in your user profile! 😢


hmm, very odd - what SwingDay do you have set?

Donations & Audit for DragonflyCMS

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


it says 6 by default, as I haven't used this block before (I modded a block to show balance only) I left it that way, so I need to figure out what value it would be. However there's a fair amount of mony on the balance so "Net Balance" should have to show something??

I did a testconnection and the log shows:

2007-03-21 10:43:31 1970-01-01 00:00:00 Debug mode activated
Opening connection and validating request with PayPal...
OK!
Logging events

Date is showing: 1970-01-01 would that be allright??

Please enter your server specs in your user profile! 😢


No, but that explains why you have no transactions being summarized.

I'm not sure of why, but your system is not storing the payment_date field - the 1970 value means it is storing zero. Is that field set with type 'datetime'?

Donations & Audit for DragonflyCMS

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


I will check that in the database, will let you know.

Please enter your server specs in your user profile! 😢


nm, that was stupid of me - of course the test records zero because there can't be a payment_date for the test Embarassed

So, it must be something else.

Have you changed your email address in Treasury PayPal config such that it is now different to the values in the "business" field of the _treas_trans table?

Donations & Audit for DragonflyCMS

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


no, only thing is we changed host last week, could the mysql or php version have to do something with it??

Nothing has been changed, but I will check the fiels, maybe something went wrong when importing the tables.

Please enter your server specs in your user profile! 😢


can't see any differences, only I saw some earlier test-connections in the log the right date is mentioned, like:

007-02-03 09:13:04 2007-02-03 00:00:00 Debug mode activated
Opening connection and validating request with PayPal...
OK!
Logging events

So we changed hosts, our former host was a forwarded domain, the current domain was forwarded to a domain holding our site. This has been changed that way our domain can be used directly and as far as I can see I changed all to the current domain.

I've set debugging on and the block shows this:

LINE 25: SELECT * FROM cms_treas_cfg WHERE subtype = '' LINE 59: 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 cms_treas_trans WHERE ( payment_date >= DATE_FORMAT( NOW( ) , '%Y-%m-6' ) ) GROUP BY business LINE 65: SELECT '' AS business, '0' AS count, '0' AS gross, '0' 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 LINE 73: SELECT * FROM cms_treas_cfg WHERE name='goal' AND subtype='Mar' LINE 78: SELECT code FROM cms_treas_currency WHERE code='GBP' LINE 122: SELECT user_id, custom AS name, option_selection1 as showname, currency_symbol AS currency, DATE_FORMAT( payment_date, '%D' ) AS date, SUM(round(settle_amount, 2)) AS amt, mc_gross as gross FROM cms_treas_trans WHERE ( payment_date >= DATE_FORMAT( NOW( ) , '%Y-%m-6' ) ) GROUP BY txn_id ORDER BY payment_date DESC

Please enter your server specs in your user profile! 😢


Line 65 should not be in your queries - it can only appear if you have an empty result from line 59.

This suggests to me that the "business" field in cms_treas_trans is empty.

What result do you get if you run that query from line 59, through phpmyadmin?

Donations & Audit for DragonflyCMS

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


I threw line 59 into the database, it returned 0

However all "business" fields are filled in the database

I made an export of the structure, maybe that's of some help??

id int(8) unsigned NOT NULL auto_increment,
user_id int(4) NOT NULL default '0',
business varchar(50) NOT NULL default '',
txn_id varchar(20) NOT NULL default '',
item_name varchar(60) NOT NULL default '',
item_number varchar(40) NOT NULL default '',
quantity varchar(6) NOT NULL default '',
invoice varchar(40) NOT NULL default '',
custom varchar(127) NOT NULL default '',
tax varchar(10) NOT NULL default '',
option_name1 varchar(60) NOT NULL default '',
option_selection1 varchar(127) NOT NULL default '',
option_name2 varchar(60) NOT NULL default '',
option_selection2 varchar(127) NOT NULL default '',
memo text NOT NULL,
payment_status varchar(15) NOT NULL default '',
payment_date datetime NOT NULL default '0000-00-00 00:00:00',
txn_type varchar(15) NOT NULL default '',
mc_gross varchar(10) NOT NULL default '',
mc_fee varchar(10) NOT NULL default '',
mc_currency varchar(5) NOT NULL default '',
settle_amount varchar(12) NOT NULL default '',
exchange_rate varchar(10) NOT NULL default '',
first_name varchar(127) NOT NULL default '',
last_name varchar(127) NOT NULL default '',
address_street varchar(127) NOT NULL default '',
address_city varchar(127) NOT NULL default '',
address_state varchar(127) NOT NULL default '',
address_zip varchar(20) NOT NULL default '',
address_country varchar(127) NOT NULL default '',
address_status varchar(15) NOT NULL default '',
payer_email varchar(127) NOT NULL default '',
payer_status varchar(15) NOT NULL default '',
currency_symbol varchar(7) NOT NULL default '$',
PRIMARY KEY (id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=113 ;

Please enter your server specs in your user profile! 😢


It's not a structure problem - the query is simply saying you have no data that meets the requirements of the query.

I presume you do have donations in March after your swingday, the 6th?

Right now, it's telling me you have nothing after the 6th.

Donations & Audit for DragonflyCMS

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


See, that's what I meant, I didn't know the exact meaning of that, but indeed no donations after the sixth, last donation is from 4th of march. But does that mean it won't show the actual balance then??

I changed it to 2 and now figures are showing. I think I messed up some definitions as my former block showed the total balance of our account so members could see how much mony we have in the kitty. I assumed this block showed the same at Net Balance, but am wrong. The block is working perfectly, so sorry if I wasted your time by this.

Think I need to change the block to show the real balance.

Please enter your server specs in your user profile! 😢


Geez, no wonder you don't show anything - that's how it's supposed to work.

Treasury ReadMe wrote
# Treasury is currently only designed to look at the current month. The Swing Date allows you to extend the end of that month to be, for example, the 6th day of the next month. This is so that users who make donations in the last couple of days of the month, are displayed for a few days after the month is over. If you wish the month displayed to change over immediately, then set Swing Date to 1 in your Block Config tab. Setting it to a large number is NOT advised.

Donations & Audit for DragonflyCMS

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


yeah, I know, I feel stupid Embarassed Embarassed Embarassed Embarassed Embarassed

Please enter your server specs in your user profile! 😢


nm, not half as stupid as me - you'd think I would have realized it sooner Doh

Donations & Audit for DragonflyCMS

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

All times are Australia/Adelaide


Jump to: