webERP Forum
Contract - Retrieval Issue - 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: Contract - Retrieval Issue (/showthread.php?tid=8000)

Pages: 1 2 3 4


Contract - Retrieval Issue - VortecCPI - 12-20-2017

Main Menu > Sales > Select Contract

Modify > Update Confirmation

Click "Go to Confirmation N"

SelectSalesOrder.php

Multiple errors: "ERROR Message Report : The date does not appear to be in a valid format. The date being converted from SQL format was:"

[attachment=638]

Looking into it now...

Looks like SQL is using condition " AND salesorders.quotation=0" where it should be " AND salesorders.quotation=1"

$_POST['Quotations'] is empty or not set?

Look like this needs to be set at the top of the code page instead of where it is now just below "if (!isset($StockID)) {"

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

Attached is my change. Can somebody please check it to be sure what I did is correct? Just because it works does not mean it is right!


RE: Contract - Retrieval Issue - TurboPT - 12-21-2017

It appears to be ok to me (a minor change, takes care of the date error), but that area is new to me, so I'd like to hear an opinion from Tim, Phil, or anyone else more familiar with that area.

One question in the file changes:

Line 352, the concat of the part number with the description?


RE: Contract - Retrieval Issue - VortecCPI - 12-21-2017

(12-21-2017, 04:25 AM)TurboPT Wrote: It appears to be ok to me (a minor change, takes care of the date error), but that area is new to me, so I'd like to hear an opinion from Tim, Phil, or anyone else more familiar with that area.

One question in the file changes:

Line 352, the concat of the part number with the description?

I removed that from my instance and keep the Supplier/Vendor PN separate.


RE: Contract - Retrieval Issue - TurboPT - 12-21-2017

Oh, I see, sorry I had that backwards.

I may likely have to keep the original form of that specific line to avoid surprises, unless others feel that the change is ok.
(though that being said, as the change is so minor it may get committed anyway, as it may likely go unnoticed Smile)


RE: Contract - Retrieval Issue - VortecCPI - 12-21-2017

(12-21-2017, 06:47 AM)TurboPT Wrote: Oh, I see, sorry I had that backwards.

I may likely have to keep the original form of that specific line to avoid surprises, unless others feel that the change is ok.
(though that being said, as the change is so minor it may get committed anyway, as it may likely go unnoticed Smile)

Yes. To avoid any surprises best to leave as is. Some may expect and/or require it to be presented in that fashion.


RE: Contract - Retrieval Issue - TurboPT - 12-21-2017

Yep, agreed, so I'll leave that one specific line as-is.


RE: Contract - Retrieval Issue - TurboPT - 12-23-2017

I have not yet committed the file, as I was investigating more around that area.

The suggested fix DOES appear to fix the case when there is an actual quotation and order number combination, but then using the Outstanding Sales Orders/Quotations link with the order number, and 'Orders_Only' can generate the similar date error as shown below: [the date error message is generated by function: ConvertSQLDateTime()]

[Image: sl20dy.png]

The query does return 1 row, though ALL fields are NULL: (as also shown in the debug textarea above)

[Image: bex948.png]

...and running the explain on that query gives:

[Image: xkpw77.png]

Any ideas on why we would not get 0 rows instead of 1 row that has all fields NULL to avoid this issue? As it's not just the dates, but the output table (below the error messages) appears to be pointless with null information, but output because 1 row was found.

I am using Server version: 10.1.21-MariaDB ... does anyone see different behavior on MySQL ?


RE: Contract - Retrieval Issue - TurboPT - 12-28-2017

No other opinions to my previous post above?

Ok, well I'll have to drop this matter for now, and return focus to the pickList.
(or some other matter if there is a higher priority to know)


RE: Contract - Retrieval Issue - TimSchofield - 01-02-2018

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'];
}

Seems to work for me in all scenarios I have tried. Can you confirm it?

Tim


RE: Contract - Retrieval Issue - VortecCPI - 01-03-2018

(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'];
}

Seems to work for me in all scenarios I have tried. Can you confirm it?

Tim

Works for me as well.