Tokens in the description of products / services?

Hi guys!

I am wondering if there is a possibility to work with tokens in the description of products and services (e. g. to set the delivery date of an order automatically in the invoice)?

Case: I am collecting several orders for some customers during the month. At the end of each month I generate an invoice with the function “Bill orders” in Third party, tab: “Customer” so that I have one monthly invoice for the customer of all done orders. Unfortunately Dolibarr does not print the delivery date for each position / order.

What I am doing now: I restore every single order to draft status after processing so that I can type in the delivery date by hand in the description, validate it again and classify it as delivered.

Would be easier if there was a token like delivery_date and Dolibarr would replace it automatically by the date when I classified “delivered”. Or am I doing it wrong and there is another much easier solution for that!?

Thank you very much for your help!

You’ll have to look into module ‘crabe’ for ‘Show top header of page’.

[code]

cd … htdocs/core/modules/facture/doc[/code]

In this section your rightmost header gets constructed (eg. Order Date gets printed)

Here you have to insert your Delivery Date.

The Delivery Date in turn is used in another PDF construction:

[code]

… htdocs/core/modules/expedition/doc[/code]

So you can use the code snippet from there (I hope …) - AND you should check, if the needed includes are present in ‘crabe’.

Disclaimer: Investigated only, because I could need this approach as well. Yet not tested.

Best regards

1 Like