webERP Forum

Full Version: Crazy Highlighting on MRP Planned POs
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
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?

[attachment=624]
I'll take a look at that handling too, though I may likely won't have a quick answer.
There are also some text placement issues in that script. Attached is mine for reference.
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)
(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)?

[attachment=626]

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?
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.
Thanks Paul Big Grin
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)
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:

[attachment=628]

Can you please verify on your end now?
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.
Pages: 1 2
Reference URL's