Jump to content

PROBLEM: How to generate Delivery slip without generating an Invoice?


Recommended Posts

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

  • 1 month later...
  • 1 month later...
  • 4 weeks later...

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 by caesarc (see edit history)
Link to comment
Share on other sites

  • 1 month later...

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...