wilburlikesmith Posted February 13, 2015 Share Posted February 13, 2015 Hi, I've googled myself crazy. I've also found no results searching for "datepicker" or "client statement" in this forum. I have found this code in the clientstatement.tpl page: <link type="text/css" href="includes/jscript/css/ui.all.css" rel="stylesheet" /> <script type="text/javascript" src="includes/jscript/jquery.js"></script> <script>jQuery.noConflict();</script> <script type="text/javascript" src="includes/jscript/jqueryui.js"></script> <!-- <script type="text/javascript" src="includes/jscript/jquerydp.js"></script> --> <script type="text/javascript"> //Create the date pickers and attach the onChange jQuery(document).ready(function(){ jQuery(".adate").datepicker({ dateFormat: '{/literal}{$dateformat}{literal}' }); jQuery(".adate").change(function(){document.location = "clientstatement.php?fromdate="+jQuery("#fromDate").val()+"&todate="+jQuery("#toDate").val();}); jQuery("#pdfStatement").css({cursor:'pointer'}).click(function(){document.location = "https://www.snowball.co.za/portal/clientstatement.php?output=PDF&fromdate="+jQuery("#fromDate").val()+"&todate="+jQuery("#toDate").val();}); }); </script> <style> .statementinvoiceunpaid { font-style:italic; color:red; } </style> And the HTML: <p style="text-align:right"> <b>From Date: </b><input type="textbox" class="adate" id="fromDate" value="{$fromdate}" size=8/> <b>To Date: </b><input type="textbox" class="adate" id="toDate" value="{$todate}" size=8/> </p> It however doesn't work. I noticed the jquerydp.js file being commented out, it's also not in the /includes/jscript/ folder. I can also not find the Client Area Statement section in the client demo site http://demo.whmcs.com otherwise I could have done some more troubleshooting... Could someone please help or direct me on how to fix this or what the alternative method is for a logged in client to view a date ranged statement. The download PDF at the bottom doesn't appear to be a link either, but I suspect it's because the date ranged statement hasn't been generated. Any help soonest would be much appreciated! 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted February 13, 2015 Share Posted February 13, 2015 there is no option to generate Client Statements on the client side - but you can generate them on the Admin side... http://docs.whmcs.com/Reports#Client_Statement 0 Quote Link to comment Share on other sites More sharing options...
wilburlikesmith Posted February 13, 2015 Author Share Posted February 13, 2015 Then at least, how would I then not show the datepicker fields or the download PDF for the clients? - - - Updated - - - I meant to say thank you for the reply, but that post went missing between my browser and the Internet 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted February 13, 2015 Share Posted February 13, 2015 (edited) Then at least, how would I then not show the datepicker fields or the download PDF for the clients? you can edit the code within any of the reports - so you could remove the date pickers that way. what are you trying to do? add a client statement page in the client area and allow clients to generate their own statements ? if so, it's going to need a bit more than some javascript to do it. there's been a feature request for the option to send pdf statements to clients for two years - perhaps it will be added to v6. https://requests.whmcs.com/responses/monthly-emailed-pdf-statement Edited February 13, 2015 by brian! 0 Quote Link to comment Share on other sites More sharing options...
web2008 Posted February 13, 2015 Share Posted February 13, 2015 Can this be something to take a look on? http://forum.whmcs.com/showthread.php?46322-Download-Statement-as-PDF-Script&highlight=client+statement The problem is that I do not get it to work on 5.3.11 I get the following error: No User ID submitted. I have changed the path in statementpdf.php to the following: # Include the TCPDF library require(ROOTDIR . "/includes/classes/TCPDF/tcpdf.php"); 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted February 14, 2015 Share Posted February 14, 2015 interesting find web2008 - it needs some polishing, but it still works with v5.3.11 ! did you download the first zip? that contains a readme file with installation instructions - those instructions are a little out of date now... they'll work, but they contain bad habits (e.g modifying language files instead of using overrides, editing an existing report instead of renaming and then modifying - to avoid it getting overwritten with a whmcs update etc). I downloaded the first zip, followed the instructions, then overwrote the php with the one in the second zip - modified the path to the tcpdf class as you suggested above. what I think you may be doing is just pressing the "Download as PDF" link - if I do that, I get the same error you mention... what you need to do is enter a user ID and then press the "Generate Report" button... once the report is generated, you can then click the "Download as PDF" link and that should work. 0 Quote Link to comment Share on other sites More sharing options...
web2008 Posted February 18, 2015 Share Posted February 18, 2015 When I click on the "Generate Report" button the "Download as PDF" disappears. Any idea what this can be? Otherwise, the PDF download from the client area existed and I bought this module a few years ago, but it seems that Shaun is not in business anymore. Silly that code can not be entrusted to someone else, so that the module will be further developed, for now it does not work anymore! http://forum.whmcs.com/showthread.php?18569-Client-Area-Statement-With-PDF-Download&highlight=client+statement+pdf 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted February 18, 2015 Share Posted February 18, 2015 have you renamed the filename of the report? it refers to itself in the code, so they need to be the same. 0 Quote Link to comment Share on other sites More sharing options...
web2008 Posted February 18, 2015 Share Posted February 18, 2015 I have changed the report name to "client_statement_PDF" When I click on the report I get the following: /reports.php?report=client_statement_PDF When I click on "Generate Report" I get the following: /reports.php?report=client_statement I have changed line 39 in statementpdf.php require(ROOTDIR . "/modules/reports/client_statement_PDF.php"); What am I doing wrong? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted February 18, 2015 Share Posted February 18, 2015 on line 9, there is a line of code that includes the following.... action="reports.php?report=client_statement"> you need to change this line to... action="reports.php?report=client_statement_PDF"> 0 Quote Link to comment Share on other sites More sharing options...
web2008 Posted February 19, 2015 Share Posted February 19, 2015 Thank you, I did not see this line and now it works! 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.