News:

Looking for documentation? Take a look on our wiki

Main Menu

Direct print a Delivery note without creating an invoice record and PDF

Started by AH, October 30, 2013, 10:16:31 AM

Previous topic - Next topic

AH

I do not like the use of PDFs for the creation of delivery notes and certainly did not like the creation of a reserved invoice number.

I might create a delivery note (Picking note for our purposes) days before I dispatch and I do not want the date of delivery note creation fixing the Invoice date.

There is also a bug with the existing delivery note process (I will report this separately - as this does not occur with the solution below)

I want a printed verions of the delivery note that does not create an Invoice record, and that I can reprint if I change the order.

Create yourself an adminstration template override in:-

site\administrator\templates\yourbackendtemplate\html\com_virtuemart\orders\orders.php

Then just replace the link code for delivery note with a printable version that does not reserve an invoice number:-



//Quorvia changed this to print delivery notes directly and prevent delivery storing an invoice number and PDF
// if (!$order->invoiceNumber) {
// $deliverynote_url = juri::root () . 'index.php?option=com_virtuemart&view=invoice&layout=deliverynote&format=pdf&tmpl=component&virtuemart_order_id=' . $order->virtuemart_order_id . '&order_number=' . $order->order_number . '&order_pass=' . $order->order_pass . '&create_invoice=1';
// $deliverynote_link = "<a href=\"$deliverynote_url\"  >" . '<span class="hasTip deliverynotenew_32" title="' . JText::_ ('COM_VIRTUEMART_DELIVERYNOTE_CREATE') . '"></span></a>';
// } elseif (!shopFunctions::InvoiceNumberReserved ($order->invoiceNumber)) {
// $deliverynote_url = juri::root () . 'index.php?option=com_virtuemart&view=invoice&layout=deliverynote&format=pdf&tmpl=component&virtuemart_order_id=' . $order->virtuemart_order_id . '&order_number=' . $order->order_number . '&order_pass=' . $order->order_pass;
// $deliverynote_link = "<a href=\"$deliverynote_url\"  >" . '<span class="hasTip deliverynote_32" title="' . JText::_ ('COM_VIRTUEMART_DELIVERYNOTE') . '"></span></a>';
// }

                $deliverynote_url = juri::root () . 'index.php?option=com_virtuemart&view=invoice&layout=deliverynote&tmpl=component&virtuemart_order_id=' . $order->virtuemart_order_id . '&order_number=' . $order->order_number . '&order_pass=' . $order->order_pass;
                $deliverynote_link = "<a href=\"javascript:void window.open('$deliverynote_url', 'win2', 'status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width=640,height=700,directories=no,location=no');\"  >";
                $deliverynote_link .= '<span class="hasTip deliverynote_32" title="' . JText::_ ('COM_VIRTUEMART_DELIVERYNOTE') . '"></span></a>';




Regards
A

Joomla 4.4.5
php 8.1