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
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!
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?
(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.
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)
(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.
Yep, agreed, so I'll leave that one specific line as-is.
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 ?
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)
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
(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.
Pages: 1 2 3 4