Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Packing Slip 3 copies
11-19-2015, 07:49 AM,
#1
Packing Slip 3 copies
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
Reply
11-19-2015, 11:40 PM,
#2
RE: Packing Slip 3 copies
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.
Reply
11-30-2015, 02:36 AM,
#3
RE: Packing Slip 3 copies
Sorry for the delay I just got back on the project and tried the change you suggested and still only two copies.
Reply
11-30-2015, 04:44 AM,
#4
RE: Packing Slip 3 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
Reply
11-30-2015, 09:14 AM,
#5
RE: Packing Slip 3 copies
Thanks Tim
That did the trick.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)