Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Contract - Retrieval Issue
12-20-2017, 12:12 PM, (This post was last modified: 12-20-2017, 12:58 PM by VortecCPI.)
#1
Contract - Retrieval Issue
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:"

   

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!


Attached Files
.php   SelectSalesOrder.php (Size: 42.18 KB / Downloads: 2)
https://www.linkedin.com/in/eclipsepaulbecker
Reply
12-21-2017, 04:25 AM, (This post was last modified: 12-21-2017, 04:39 AM by TurboPT.)
#2
RE: Contract - Retrieval Issue
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?
Reply
12-21-2017, 06:42 AM,
#3
RE: Contract - Retrieval Issue
(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.
https://www.linkedin.com/in/eclipsepaulbecker
Reply
12-21-2017, 06:47 AM, (This post was last modified: 12-21-2017, 07:11 AM by TurboPT.)
#4
RE: Contract - Retrieval Issue
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)
Reply
12-21-2017, 07:16 AM,
#5
RE: Contract - Retrieval Issue
(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.
https://www.linkedin.com/in/eclipsepaulbecker
Reply
12-21-2017, 07:31 AM,
#6
RE: Contract - Retrieval Issue
Yep, agreed, so I'll leave that one specific line as-is.
Reply
12-23-2017, 04:20 AM, (This post was last modified: 12-23-2017, 04:37 AM by TurboPT.)
#7
RE: Contract - Retrieval Issue
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 ?
Reply
12-28-2017, 03:09 PM, (This post was last modified: 12-28-2017, 03:10 PM by TurboPT.)
#8
RE: Contract - Retrieval Issue
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)
Reply
01-02-2018, 07:26 PM,
#9
RE: Contract - Retrieval Issue
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
Reply
01-03-2018, 12:17 AM,
#10
RE: Contract - Retrieval Issue
(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.
https://www.linkedin.com/in/eclipsepaulbecker
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)