Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Crazy Highlighting on MRP Planned POs
12-15-2017, 05:48 AM (This post was last modified: 12-15-2017 05:49 AM by VortecCPI.)
Post: #1
Crazy Highlighting on MRP Planned POs
Main Menu > Manufacturing > MRP Suggested Purchase Orders

MRPPlannedPurchaseOrders.php

For some reason $fill=!$fill does not work as expected and does not highlight every other row.

Likely the same on MRPPlannedWorkOrders.php as well?

   

https://www.linkedin.com/in/eclipsepaulbecker
Visit this user's website Find all posts by this user
Quote this message in a reply
12-15-2017, 07:24 AM
Post: #2
RE: Crazy Highlighting on MRP Planned POs
I'll take a look at that handling too, though I may likely won't have a quick answer.
Find all posts by this user
Quote this message in a reply
12-15-2017, 07:38 AM (This post was last modified: 12-15-2017 07:38 AM by VortecCPI.)
Post: #3
RE: Crazy Highlighting on MRP Planned POs
There are also some text placement issues in that script. Attached is mine for reference.


Attached File(s)
.php  MRPPlannedPurchaseOrders.php (Size: 16.04 KB / Downloads: 1)

https://www.linkedin.com/in/eclipsepaulbecker
Visit this user's website Find all posts by this user
Quote this message in a reply
12-15-2017, 12:53 PM (This post was last modified: 12-15-2017 02:32 PM by TurboPT.)
Post: #4
RE: Crazy Highlighting on MRP Planned POs
In the image that you originally posted, was that before or after your script changes?

On a side note, I did see a small existing bug in that area: (line 153 in your file)

This check:
PHP Code:
if ($Partctr $holdpart != $myrow['part']) { 

Should be:
PHP Code:
if ($Partctr && $holdpart != $myrow['part']) { 

The same condition is correct in the MRPPlannedWorkOrders.php file, though the AND keyword is used instead of &&, so maybe that change along with the original fill handling might make it work as expected?

Other than that, I'm trying to get data together for the MRP or I'll have to use dummy data. (this area is new to me)
Find all posts by this user
Quote this message in a reply
12-15-2017, 10:17 PM (This post was last modified: 12-15-2017 11:32 PM by VortecCPI.)
Post: #5
RE: Crazy Highlighting on MRP Planned POs
(12-15-2017 12:53 PM)TurboPT Wrote:  In the image that you originally posted, was that before or after your script changes?

On a side note, I did see a small existing bug in that area: (line 153 in your file)

This check:
PHP Code:
if ($Partctr $holdpart != $myrow['part']) { 

Should be:
PHP Code:
if ($Partctr && $holdpart != $myrow['part']) { 

The same condition is correct in the MRPPlannedWorkOrders.php file, though the AND keyword is used instead of &&, so maybe that change along with the original fill handling might make it work as expected?

Other than that, I'm trying to get data together for the MRP or I'll have to use dummy data. (this area is new to me)


The image posted was of the original file with text placement changes for the last item only.

I still have crazy highlighting after the change but thank you for catching that!

That sort of error (i.e., " & " instead of " && " or " AND ") appears to exists in other scripts in webERP so perhaps you want to do a search on " & " in all the files and verify

We also have an inconsistency in the report date data in the header. Is this right (see image below)?

   

Also some inconsistencies in case and variable name (e.g., $Partctr versus $PartCounter)

I realize this is nit-picky but if we are in there why not tidy it up a bit?

https://www.linkedin.com/in/eclipsepaulbecker
Visit this user's website Find all posts by this user
Quote this message in a reply
12-16-2017, 03:40 AM (This post was last modified: 12-16-2017 03:41 AM by TurboPT.)
Post: #6
RE: Crazy Highlighting on MRP Planned POs
Tim added this note to another topic, but I believe it was likely meant to follow this topic...

(12-16-2017 12:41 AM)falkoner Wrote:  It should also be noted that &&/AND are not identical operators as they have different precedence rules so care needs to be taken when replacing them as it could lead to obscure regression bugs.
Find all posts by this user
Quote this message in a reply
12-16-2017, 04:10 AM
Post: #7
RE: Crazy Highlighting on MRP Planned POs
Thanks Paul Big Grin
Visit this user's website Find all posts by this user
Quote this message in a reply
12-16-2017, 06:08 AM (This post was last modified: 12-16-2017 06:43 AM by TurboPT.)
Post: #8
RE: Crazy Highlighting on MRP Planned POs
Paul:

It appears that having the condition change applied AND having the 'fill' toggle placed where you moved it, the highlighting appears to be ok. Try the attached script, below.

I used dummy data, with the first three based on your info and the last two I added as extra.

This is how it appears after a trial run:

[Image: 2bo569.png]

If that appears to be ok at your end, I'll commit the changes.
(Unless you have any additional tweaks, attach your latest file)

EDIT:
Oh, yes, I am ok on the "tidy up" changes that you mentioned in your last post, as it does help consistency.
(However, I did NOT do any of those in the attached file -- to keep it close to what you originally provided)


Attached File(s)
.php  MRPPlannedPurchaseOrders.php (Size: 16.04 KB / Downloads: 2)
Find all posts by this user
Quote this message in a reply
12-16-2017, 06:39 AM (This post was last modified: 12-16-2017 07:03 AM by VortecCPI.)
Post: #9
RE: Crazy Highlighting on MRP Planned POs
Yes looks good and moving the condition was just a wild guess.

Now we need to figure out how to get highlighting working in Planned Purchase Orders as well...

Looks like moving the fill code into the first condition repairs reports both POs and WOs:

   

Can you please verify on your end now?

https://www.linkedin.com/in/eclipsepaulbecker
Visit this user's website Find all posts by this user
Quote this message in a reply
12-16-2017, 06:44 AM (This post was last modified: 12-16-2017 07:01 AM by TurboPT.)
Post: #10
RE: Crazy Highlighting on MRP Planned POs
Very likely the same fill condition move? (I believe you meant Planned Work Orders?)

...and possibly the AND to && (that Tim mentioned) may also be necessary, but not certain, as it may be ok as-is.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


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