webERP Forum

Full Version: Contract - Retrieval Issue
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
(01-02-2018, 07:26 PM)falkoner Wrote: [ -> ]Moving the conditional statement to the top section as Paul suggests, but then altering it to be:

if (isset($_GET['Quotations'])){
$_POST['Quotations']=$_GET['Quotations'];
}

Thank you both for checking!

Though I can get the situation mentioned previously, I do have that suggested code snippet moved to the top, but with a slight modification:
PHP Code:
if ( isset($_GET['Quotations']) ) {
    
$_POST['Quotations'] = $_GET['Quotations'];
}
else {
    
$_POST['Quotations'] = '';


The else portion will help to reduce conditional checks (later down in the code) to remove:
PHP Code:
isset($_POST['Quotations']) 
Some conditions checked for this, but some others did not, so this will help facilitate some minor code reduction too.
Good stuff, thanks Paul.

Paul's suggested change (along with some other minor code improvements) committed to SVN.
(01-03-2018, 05:26 AM)TurboPT Wrote: [ -> ]Paul's suggested change (along with some other minor code improvements) committed to SVN.

Thank you all for helping me with this one. I realize it doesn't add any value but it does make webERP a little easier and quicker to use.

One thing I notice is that the new script does not automatically load current Sales Orders in the list in my instance.

Also... When changing Order Type to "Quotations" and clicking Search it reverts back to "Sales Orders".
To be sure, is the matter with the current Sales Orders a new issue or was it already that way before the changes?

Meanwhile, I'll investigate the search handling.
Attached is an update to fix the search.
(01-04-2018, 01:38 AM)TurboPT Wrote: [ -> ]To be sure, is the matter with the current Sales Orders a new issue or was it already that way before the changes?

Meanwhile, I'll investigate the search handling.
Attached is an update to fix the search.

My hack was working as expected so this occurred with the new file via SVN.

I am trying the newest file right now...
Okay... It now remembers selected Order Type but the new script does not automatically load current Sales Orders.

Changing line 680 to $_POST['StockLocation'] = $_SESSION['UserStockLocation']; makes it load orders.

Can you please have a look and verify?
Curious that there was no change to the 'StockLocation' anywhere only Quotations. (perhaps you had a change applied locally?)

Anyway, no big deal. Applying that simple change makes sense because of the potential use at four places between lines 800-815 as all that handling is contained within the 'else' block that starts at line 643.

I'll have both of those changes (the search fix and location set) committed in just a moment.
Changes committed to SVN.
(01-04-2018, 05:15 AM)TurboPT Wrote: [ -> ]Curious that there was no change to the 'StockLocation' anywhere only Quotations. (perhaps you had a change applied locally?)

Anyway, no big deal. Applying that simple change makes sense because of the potential use at four places between lines 800-815 as all that handling is contained within the 'else' block that starts at line 643.

I'll have both of those changes (the search fix and location set) committed in just a moment.
Changes committed to SVN.

Thank you so much!
Paul (Thursby): It is this change you were missing http://www.weberp.org/forum/showthread.php?tid=8014
Tim, yep the second change in that image.

That has been applied, but I don't know if the first change in that image is still necessary. (Paul B.?)
Pages: 1 2 3 4