Purchase order printing problems - PO_PDFPurchOrder.php

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Purchase order printing problems - PO_PDFPurchOrder.php

This post was updated on .
There are several problems with PO_PDFPurchOrder.php script.

1) When we create a purchase order, order detail lines are sorted by itemcode.  This creates problems when ordering non-inventory items.  Additionally the order of printing does not match the order of entry.  For non-inventory items (no itemcode), the order of detail items is random (undefined).  We have several very lengthy PO's for which every item/service is one time purchase and the order of items on the Purchase order needs to match the vendor quote as closely as possible.
2) There is always one too many lines in the detail printout per page.

We have made the following changes to PO_PDFPurchOrder.php:

Around line 223 replace itemcode to podetailitem:

                                WHERE orderno ='" . $OrderNo . "'
                                ORDER BY podetailitem"; /*- ADDED: Sort by our item code -*/

Around line 275:

                                if ($YPos - 2*$line_height <= $Bottom_Margin) {

Around line 292:

                                if ($YPos - 2*$line_height <= $Bottom_Margin) {

Our default paper size is Letter.  We hope that these changes could be incorporated into the trunk.

Bob Thomas