AbanteCart Community

AbanteCart Development => Customization help => Topic started by: kavlito on April 21, 2020, 09:02:43 PM

Title: Convert Invoice to Packing Slip
Post by: kavlito on April 21, 2020, 09:02:43 PM
I need to produce Packing Slips. I thought I could figure out how to convert, or duplicate the Invoice to a Packing Slip, but can't figure it out.

Thanks.
Title: Re: Convert Invoice to Packing Slip
Post by: abantecart on April 24, 2020, 12:25:21 PM
You can replicate and modify the code portion for the invoice and display what you need for the Packing Slip 

See if this extension will help
http://marketplace.abantecart.com/pdf_orders
Title: Re: Convert Invoice to Packing Slip
Post by: kavlito on May 09, 2020, 08:36:05 AM
Hi,

Thank you.

We don't use invoices, so I just want to modify the Invoice to a Packing Slip (no prices).

Can someone point me to the files involved?

Thanks again.
Title: Re: Convert Invoice to Packing Slip
Post by: SAM172788 on May 10, 2020, 07:14:28 AM
As I remember you will need to edit your (localization>>Language Definitions)  and change the Word INVOICE to Packing list.
Title: Re: Convert Invoice to Packing Slip
Post by: kavlito on May 11, 2020, 03:57:37 PM
Thank you.

I found the file: admin/controller/responses/sale/invoice.php

I made the following changes between lines 141 & 151: commenting out 'price', 'total' & $total_data lines
And with your language change, I now have a Packing Slip with no prices!

Code: [Select]
                    $product_data[] = array(
                        'name'     => $product['name'],
                        'model'    => $product['model'],
                        'option'   => $option_data,
                        'quantity' => $product['quantity'],
                        //'price'    => $this->currency->format($product['price'], $order_info['currency'], $order_info['value']),
                        //'total'    => $this->currency->format_total($product['price'], $product['quantity'], $order_info['currency'], $order_info['value']),
                    );
                }

                //$total_data = $this->model_sale_order->getOrderTotals($order_id);
Title: Re: Convert Invoice to Packing Slip
Post by: abantecart on June 17, 2020, 08:37:34 PM
Great hack. Thank you for sharing
Title: Re: Convert Invoice to Packing Slip
Post by: kavlito on November 09, 2021, 12:46:00 PM
I also made a modification to admin\view\default\template\responses\sale\order_invoice.tpl so that it will initiate auto print when you click on the Invoice icon (now the Packing Slip Icon).

In the Chrome browser it's great because it pops up a print preview.

Using auto print increases efficiency as it is one less step in the production process for my employees.

Place the following code at the end of the file (see attachments):

<!--  mod to auto print -->
<script language="JavaScript">
window.print();
</script>