Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
General Ledger Account Inquiry - No Show - SOLVED
03-16-2018, 11:32 AM (This post was last modified: 03-16-2018 11:16 PM by VortecCPI.)
Post: #1
General Ledger Account Inquiry - No Show - SOLVED
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!

https://www.linkedin.com/in/eclipsepaulbecker
Visit this user's website Find all posts by this user
Quote this message in a reply
03-16-2018, 06:33 PM
Post: #2
RE: General Ledger Account Inquiry - No Show - SOLVED?
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
Visit this user's website Find all posts by this user
Quote this message in a reply
03-16-2018, 10:18 PM
Post: #3
RE: General Ledger Account Inquiry - No Show - SOLVED?
Thank you Tim!

https://www.linkedin.com/in/eclipsepaulbecker
Visit this user's website Find all posts by this user
Quote this message in a reply
03-17-2018, 02:57 AM
Post: #4
RE: General Ledger Account Inquiry - No Show - SOLVED
Committed here:

https://github.com/timschofield/webERP-s...792e91012a
Visit this user's website Find all posts by this user
Quote this message in a reply
03-17-2018, 07:27 AM
Post: #5
RE: General Ledger Account Inquiry - No Show - SOLVED
Tim, your change is separate from Paul's change in post #1, correct? (both are needed?)
Find all posts by this user
Quote this message in a reply
03-17-2018, 07:35 AM
Post: #6
RE: General Ledger Account Inquiry - No Show - SOLVED
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
Visit this user's website Find all posts by this user
Quote this message in a reply
03-17-2018, 09:31 AM
Post: #7
RE: General Ledger Account Inquiry - No Show - SOLVED
PaulB, change committed.

Tim: pulled your change to both repo's. (that is to say mine and webERP-team)
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)