webERP Forum

Full Version: Packing Slip 3 copies
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
To All
I would like to be able to print the packing 3 copies instead of the current 2 for PrintCustOrder_generic.php
I found this code here for the above

for ($i=1;$i<=2;$i++){ /*Print it out twice one copy for customer and one for office */
if ($i==2){
$PageNumber = 1;
$pdf->newPage();
}
And also this in PDFOrderPageHeader_generic.php

if ($Copy=='Customer'){
$pdf->addText($XPos-120, 520,$FontSize, _('DELIVERY RECEIPT') );
$pdf->addText($XPos-120, 500,$FontSize, _('CUSTOMER ORIGINAL-NOT NEGOTIABLE') );
} else {
$pdf->addText($XPos-120, 520,$FontSize, _('DELIVERY RECEIPT') );
$pdf->addText($XPos-120, 500,$FontSize, _('OFFICE ORIGINAL-NOT NEGOTIABLE') );
}

Any help would be appreciated
Thanks
Dave
What do you want the third copy to say? if the third copy can be the same as the second copy then you only need to change this code
"for ($i=1;$i<=2;$i++){ /*Print it out twice one copy for customer and one for office */
if ($i==2){"
to
"for ($i=1;$i<=3;$i++){ /*Print it out twice one copy for customer and one for office */
if ($i>=2){"
and you should get a third copy that looks just like the second copy.
If you need the third copy to say something different at the top or look like the first copy then you will need to add some code in other areas.
Sorry for the delay I just got back on the project and tried the change you suggested and still only two copies.
Hi Dave, you also need to set the line immediately after the above change

if ($i == 2)

to be

if ($i == 2 or $i == 3)

Tim
Thanks Tim
That did the trick.