webERP Forum
General Ledger Account Inquiry - No Show - SOLVED - Printable Version

+- webERP Forum (http://www.weberp.org/forum)
+-- Forum: webERP Discussion (http://www.weberp.org/forum/forumdisplay.php?fid=1)
+--- Forum: Problems / Bugs? (http://www.weberp.org/forum/forumdisplay.php?fid=8)
+--- Thread: General Ledger Account Inquiry - No Show - SOLVED (/showthread.php?tid=8138)



General Ledger Account Inquiry - No Show - SOLVED - VortecCPI - 03-16-2018

GLAccountInquiry.php

When passing the Parameter Show=Yes the script does not show data. The user must click the "Show Account Transactions" button even though all the data has been passed to the script via Parameters.

I made it work by adding this to the top of the script:

PHP Code:
if(isset($_GET['Show'])) {
    
$_POST['Show'] = $_GET['Show'];


And by changing this:

PHP Code:
} elseif(isset($_GET['FromPeriod'])) { //If it was called from the Trial Balance/P&L or Balance sheet
    
$FirstPeriodSelected $_GET['FromPeriod'];
    
$LastPeriodSelected $_GET['ToPeriod']; 

To this:

PHP Code:
} elseif(isset($_GET['FromPeriod'])) { //If it was called from the Trial Balance/P&L or Balance sheet
    
$FirstPeriodSelected $_GET['FromPeriod'];
    
$LastPeriodSelected $_GET['ToPeriod'];
    
$SelectedPeriod[0] = $_GET['FromPeriod'];
    
$SelectedPeriod[1] = $_GET['ToPeriod']; 

Can somebody please check my work?

Thank you!


RE: General Ledger Account Inquiry - No Show - SOLVED? - TimSchofield - 03-16-2018

Looks good, but when you are coming from SelectGLAccount.php it now shows a message about no periods being set. I added in a line before the display code with

$TargetPeriod = GetPeriod(date($_SESSION['DefaultDateFormat']));

and then altered the link to GLAccountInquiry.php to:

<a href="' . $RootPath . '/GLAccountInquiry.php?Account=' . urlencode($MyRow['accountcode']) . '&amp;Show=Yes&FromPeriod=', $TargetPeriod, '&ToPeriod=', $TargetPeriod, '">

This will show the current period, of course $TargetPeriod can be changed to show something else.

Thanks
Tim


RE: General Ledger Account Inquiry - No Show - SOLVED? - VortecCPI - 03-16-2018

Thank you Tim!


RE: General Ledger Account Inquiry - No Show - SOLVED - TimSchofield - 03-17-2018

Committed here:

https://github.com/timschofield/webERP-svn/commit/f492056dc3cfcc71ed8b01b34cfc7c792e91012a


RE: General Ledger Account Inquiry - No Show - SOLVED - TurboPT - 03-17-2018

Tim, your change is separate from Paul's change in post #1, correct? (both are needed?)


RE: General Ledger Account Inquiry - No Show - SOLVED - TimSchofield - 03-17-2018

Yes. Paul's change was to GLAccountInquiry.php. My change is to the way that script gets called from SelectGLAccount.php. My change is pointless without Paul's


RE: General Ledger Account Inquiry - No Show - SOLVED - TurboPT - 03-17-2018

PaulB, change committed.

Tim: pulled your change to both repo's. (that is to say mine and webERP-team)