delpo Posted February 1, 2013 Share Posted February 1, 2013 Hi! In our shop we want to generate a delivery slip, which it will be sent to the delivery company. Then, when delivery is in process we want to make avaliable an invoice. To solve that, I disabled the option "generate invoice pdf" from the preparation in progress status. Then I made a status called "Sent" that generates the invoice pdf. When an order is set at preparation in progress, backoffice shows the "download delivery slip", but not the "download invoice" option. Perfect, but when I click to the delivery slip option, a white page opens. When I change the status to "sent, invoice is generated, and then it shows the delivery slip properly I want to be able to generate a delivery slip before changing status and generating an invoice. Looking at AdminPdfController.php y can see two functions related to that topic: public function generateDeliverySlipPDFByIdOrder($id_order) { $order = new Order((int)$id_order); if (!Validate::isLoadedObject($order)) throw new PrestaShopException('Can\'t load Order object'); $order_invoice_collection = $order->getInvoicesCollection(); $this->generatePDF($order_invoice_collection, PDF::TEMPLATE_DELIVERY_SLIP); } and public function processGenerateDeliverySlipPDF() { if (Tools::isSubmit('id_order')) $this->generateDeliverySlipPDFByIdOrder((int)Tools::getValue('id_order')); elseif (Tools::isSubmit('id_order_invoice')) $this->generateDeliverySlipPDFByIdOrderInvoice((int)Tools::getValue('id_order_invoice')); elseif (Tools::isSubmit('id_delivery')) { $order = Order::getByDelivery((int)Tools::getValue('id_delivery')); $this->generateDeliverySlipPDFByIdOrder((int)$order->id); } else die (Tools::displayError('Missing order ID or invoice order ID')); } Any idea? Link to comment Share on other sites More sharing options...
dwilden Posted March 13, 2013 Share Posted March 13, 2013 Hi, For create a Delivery Slip on a new status, You must open the table ps_order_state from you database, search the id of the new status, and add 1 on the delivery column. Link to comment Share on other sites More sharing options...
josias Posted April 16, 2013 Share Posted April 16, 2013 (edited) Still without solution? I have the same problem ... If I generate invoice the delivery slip is generated. if Im not generating invoice.. no delivery slip appears.. Edited April 16, 2013 by josias (see edit history) Link to comment Share on other sites More sharing options...
josias Posted April 16, 2013 Share Posted April 16, 2013 (edited) (Im sorry, double post by mistake) Edited April 16, 2013 by josias (see edit history) Link to comment Share on other sites More sharing options...
caesarc Posted May 12, 2013 Share Posted May 12, 2013 (edited) Same problem here, no delivery slip available until the invoice is generated. Delivery slips seem to be closely tied with invoices in PS1.5, maybe there is something that we can override to help in our particular cases? Anyone care to throw us some hints? PS: we already know how to activate the delivery slips in every status, that's not the problem. Thanks for trying to help dwilden. Edited May 12, 2013 by caesarc (see edit history) Link to comment Share on other sites More sharing options...
LMA Posted June 28, 2013 Share Posted June 28, 2013 Me too, i have the same problem ! I have seen that delivery-slip is generated only after invoice because the system search for id_order_invoice into order_invoice table, but i have not find a solution. You Too ? Please, forgive my english. I hope in your help. Thank you Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now