Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
BUGS IN PDFCOA.php (Related to QA samples)
05-19-2016, 03:38 AM,
#1
Tongue  BUGS IN PDFCOA.php (Related to QA samples)
Hi,
I have noticed bugs in the PDFCOA.php where in it was not selecting proper data. I have altered the SQL query + a few sections of the PDFCOA.php, PDFCOAHEADER.inc and also SelectQASamples.php

In PDFCOA.php, there was bug in the SQL which is corrected.

SelectQASamples.php is altered to send the sample id also as parameter when printCOA is clicked on. Also the Stockid is displayed in the column in the table of the samples list.

COA format changes are :
Format of the COA is changed to show important values on the COA like stock id, description, Lot no, expiry date, identifier number, etc.
The result table display is changed to show the test ranges and target value also.
"Groupby" is shown as the header.

Please see attached changed files. If you feel the changes are correct, please update.

However, there is still a bug : When two different products have the same lot number then there is no way for the ERP system to know that for which product it is pulling out the test results. The present modified SQL gives a double row output for every test result where the lot number is same for another product. This is due to the outer join. Please see if you can solve this problem.


Attached Files
.php   PDFCOA.php (Size: 10.65 KB / Downloads: 6)
.txt   PDFCOAHeaderinc.txt (Size: 2.62 KB / Downloads: 11)
.php   SelectQASamples.php (Size: 22.51 KB / Downloads: 6)
Reply
05-19-2016, 04:59 AM, (This post was last modified: 05-19-2016, 05:10 AM by agaluski.)
#2
RE: BUGS IN PDFCOA.php (Related to QA samples)
Hello,
Thanks for your feedback.
How are you using "prodspeckey" field when you define specifications? If you set that equal to the stockid/item# you are defining the specification for then you won't get duplicates if you include stockserialitems.stockid=qasamples.prodspeckey in your queries. It will also by default show the stock id in the selectqasamples program in the field titled "Specification". And the search by stockid issue you inquired about last week should work. They system will also auto-create a sample ID for you for lot/serial for each P/O receipt and W/O receipt if you have set the flags to Yes in the setup screen and you have defined specs for the stockids.
The systems was designed to allow a 'loose' association with items. If you use an item number it links to the stockid everywhere in the module. If you don't use a stockid you can setup specs and enter test results against non item master goods (Perhaps a sample of a competitor's material, calibration of fixed assets). This is also the reason the COA doesn't utilize stockerialitems - there is no requirement you have a stockserialitem record for what you are testing/certifying. Of course if you wish to include this for data like Expiry date that is fine - and the fix above should get you where you need to be.
Using an Item# as the prodspec key also pulls in the item's description on associated documents.

Have you read this part of the manual?
http://www.weberp.org/weberp/doc/Manual/...yAssurance



Also - Take a look at the demo at http://www.weberp.org/weberp/
I setup 2 items with 2 different specs, entered the same lot# with different results for each. You can see how system functions with data entered that way including the search and COA print w/out duplicates.
Reply
05-20-2016, 03:06 AM,
#3
RE: BUGS IN PDFCOA.php (Related to QA samples)
Dear Agaluski,
Thanks for your feed back.
I have gone through the manual. And yes, I now notice that you meant the productspeckey to be the same as the stockid. But in my scenario, I have thousands of products. However, there are only about 30 different Product specifications list among which all of the products fall under. In this case, it does not make sense for me to create a product spec for each product.
For example : I have 100 different types of Polypropylene (Stockid PP001 and so on) but the test specifications for all these are same (Polypropylene). Similarly I have 100 differnt types of nylon (stockid Nylon001,...and so on), but the test specs for all these is same (Nylon). I am guessing that this will be the scenario in any company.
How do we solve this?

Appreciate your time and effort.
Thanks
Avinash

(05-19-2016, 04:59 AM)agaluski Wrote: Hello,
Thanks for your feedback.
How are you using "prodspeckey" field when you define specifications? If you set that equal to the stockid/item# you are defining the specification for then you won't get duplicates if you include stockserialitems.stockid=qasamples.prodspeckey in your queries. It will also by default show the stock id in the selectqasamples program in the field titled "Specification". And the search by stockid issue you inquired about last week should work. They system will also auto-create a sample ID for you for lot/serial for each P/O receipt and W/O receipt if you have set the flags to Yes in the setup screen and you have defined specs for the stockids.
The systems was designed to allow a 'loose' association with items. If you use an item number it links to the stockid everywhere in the module. If you don't use a stockid you can setup specs and enter test results against non item master goods (Perhaps a sample of a competitor's material, calibration of fixed assets). This is also the reason the COA doesn't utilize stockerialitems - there is no requirement you have a stockserialitem record for what you are testing/certifying. Of course if you wish to include this for data like Expiry date that is fine - and the fix above should get you where you need to be.
Using an Item# as the prodspec key also pulls in the item's description on associated documents.

Have you read this part of the manual?
http://www.weberp.org/weberp/doc/Manual/...yAssurance



Also - Take a look at the demo at http://www.weberp.org/weberp/
I setup 2 items with 2 different specs, entered the same lot# with different results for each. You can see how system functions with data entered that way including the search and COA print w/out duplicates.

Reply
05-20-2016, 03:18 AM,
#4
RE: BUGS IN PDFCOA.php (Related to QA samples)
My question would be why do you have setup in your system so many stocks with the same product/specification. What is different about them that they need a different SKU but have the same specs?
Can you be more specific with the type of product or an example?

Product Specifications are usually setup 1 time - at new item creation time. If you have a template in the system you can easily use the copy function to copy to the new item.
Receiving (p/o) and Building(w/o) happen MANY times for a stock. So the benefit from QA Samples being auto created at P/O Receipt and W/O Receipt instead of you having to do it every time you needed to test and enter results should outweigh creating a unique spec using the copy function one time at item setup.

If that won't work then you would need to modify the software
Reply
05-21-2016, 01:39 AM,
#5
RE: BUGS IN PDFCOA.php (Related to QA samples)
Example 1: we have different Polypropylene items with different diameters, different elongation property, different dye color, different Tensile strengths, etc. Each type is defined as a separate item. You may argue as to why we need to make them separate. Because these are separate SKUs which we sell based on the color, diameter, etc. I cannot have the same SKU for all the types.
Test specs remain same for all the polypropylene types like : Diameter should be with in +/-5% of label claim, dye content should be less than 0.5%, Elongation should be with in XX limits, Tensile strength etc. etc.

Example 2: Say in a Pharmaceutical company, they manufacture various types of tablets of different drugs. Each is obviously a separate SKU defined as a stock item.
But the test specs for almost all tablet are same : Drug content, tablet hardness, tablet dissolution time, tablet disintegration time, etc. etc.

Example 3: Engineering industry manufacturing steel pipes of various crossections like round tubes, square tubes, hexagonal tubes, solid rods, etc.
Now they will have SKUs like SSROUNDTUBE_100MM, SSROUNDTUBE_150MM and so on for the various SKU's. However the test specs for all round tubes is same, for square tubes is same and so on.

Hope I am able to get my point across
Reply
05-21-2016, 04:18 AM,
#6
RE: BUGS IN PDFCOA.php (Related to QA samples)
I would think in the majority of cases at least 1 aspect of what is being tested is different by sku. Your 1st example says items have different diameters and the test spec of the diameter should be +/- 5% label claim. For each diameter you should have a different spec because of the Diameter test. if you have two skus, one with 10 mm and one with 20 mm diameter, the first should have a diameter test with a Min, target and Max of 9.5, 10 and 10.5, the second has values 19,20,21 in those fields. If you don't create different specifications then you can't set different limits for each diameter sku you sell. Same with Pharma - each drug would have its own need for drug content. Even the same drug - ex: Aspirin will have a different spec for content 100 mg, 200 mg, 300. Aspirin, 200 mg Capsule vs 200 mg tablet will have same values for content but different for the other aspects.

But if you don't agree I see two options for you:

1) as stated above, make a generic spec and for each new item use the copy function. This takes about 3 seconds for each new stock you create. Save your time by not manually creating Sample records - let the system create them for you when you receive and/or produce goods every lot/serial record. There aren't any customizations needed for this and you control it with setup

2) Customize: Add a new field (stockid) to the qasamples database table. Add a field to the stocks table or use Item category properties to add a new property where you set the Specification for each stock. You will need to alter The Creation of QA Samples records in the function CreateQASample in includes\SQL_CommonFunction.inc to assign both the stockid and prodspeckey. You should alter the call to the function in both WorkOrderReceive.php and GoodsReceived.php. You will need to alter PDFProdSpec.php and PDFCOA.php to prompt the user for a stock instead of a prodspec. Then pickup the prodspec from the stockid or Item Category Property on the stock. If you have both values you can display the correct Stock Information and description as well as pick the right stock when the same lot exists for 2 different stockids.
I hope that helps.
Reply
05-21-2016, 02:20 PM,
#7
RE: BUGS IN PDFCOA.php (Related to QA samples)
Dear Agaluski,
I think I may have to customize. I will follow your advice and make changes.
Thanks for the help and time. Appreciate it.
Avinash
Reply
09-08-2016, 03:41 PM, (This post was last modified: 03-04-2020, 09:30 PM by solofoxo.)
#8
RE: BUGS IN PDFCOA.php (Related to QA samples)
(05-21-2016, 02:20 PM)newuser990 Wrote: Dear Agaluski,
I think I may have to customize. I will follow your advice and give Testo Max a shot since the results look so good.
Thanks for the help and time. Appreciate it.
Avinash

Hi Avinash, can you share you changes?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)