nopCommerce Add Purchase Order Number (PO Number) to Packing Slip

Many times in B-to-B scenarios you need to have the purchase order number on the top of the packing slip.  Many receiving warehouses have specific stipulations on what has to be on a packing slip in order for the shipment to be received properly.

You will have to modify code (not just a .cshtml file) and repost Nop.Services.dll.

1. File nopCommerce solution\Libraries\Nop.Services\Common\PdfServices.cs
2. Find public virtual void PrintPackagingSlipsToPdf
3. If you are like us we are only storing the PO Number in order.CustomValues...nothing else so I used...

var customValues = order.DeserializeCustomValues();
                if (customValues != null)
                {
                    foreach (var item in customValues)
                    {
                        if (!string.IsNullOrWhiteSpace(item.Value.ToString()))
                        { 
                            addressTable.AddCell(new Paragraph(item.Key + ": " + item.Value, font));
                        }
                    }
                }
...I inserted it right after...
addressTable.AddCell(new Paragraph(String.Format(_localizationService.GetResource("PDFPackagingSlip.ShippingMethod", lang.Id), order.ShippingMethod), font));

This puts the PO Number and its associated localized text after the "Shipping Method" section but before the "order items" section.  I took out some addressTable.AddCell(new Paragraph(" ")); to make it cleaner...but that is about it.  That piece of code comes from the section that outputs the PO Number on the Invoice.

Test and post your code.