VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: D4niel on December 29, 2012, 16:45:04 PM

Title: Invoice & Delivery Note
Post by: D4niel on December 29, 2012, 16:45:04 PM
Hello everyone!

Tried for 4 hours now to include a new button in the BE to show a delivery note instead of the normal pdf invoice. My approach is to exchange the invoice.php in 'views' 'invoice' 'tmpl' with an adjusted version ...

If i change the invoice.php to my version everything is as i like it to be ... but i am not able to call my second version... "deliverynote.php" seperatly.

Adjusted the link in the BE orders.php but as deliverynote.php is not found it links back to my main page... also tried to adjust 'controllers' 'invoice.php' to change the path but nothing ...

Please i need someone to point me in the right direction! It's urgent!! And you'd save my day! :)

-> one button = invoice
-> second button (new) = delivery note (nearly a copy of invoice pdf but without prices)

:'(

Greetings!
Title: [PATCH] Re: Invoice & Delivery Note
Post by: reinhold on January 05, 2013, 18:50:16 PM
Attached is a patch for virtuemart 2.0.16, which adds a basic implementation of a delivery note. It adds a second icon, which (for now) looks identical to the invoice, and the created pdf does not contain any prices.
To adjust the invoice view template, you can check for  $this->doctype=="invoice" or "deliverynote" to distinguish (see also the patch).

Cheers,
Reinhold



[attachment cleanup by admin]