Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Substitution KEY __DATE_DELIVERY__ return null #29624

Closed
Pic-Event opened this issue May 6, 2024 · 4 comments
Closed

Substitution KEY __DATE_DELIVERY__ return null #29624

Pic-Event opened this issue May 6, 2024 · 4 comments
Labels
Bug This is a bug (something does not work as expected)

Comments

@Pic-Event
Copy link

Bug

Hello,
you need to change the line 8265 in htdocs/core/lib/functions.lib.php

Change

$substitutionarray['DATE_DELIVERY'] = (isset($object->date_delivery) ? dol_print_date($object->date_delivery, 'day', 0, $outputlangs) : '');

To

$substitutionarray['DATE_DELIVERY'] = (isset($object->delivery_date) ? dol_print_date($object->date_delivery, 'day', 0, $outputlangs) : '');

And all the times date_delivery is used in PROPAL,.

Thanks.

Dolibarr Version

19.0.1

Environment PHP

All

Environment Database

Mysql

Steps to reproduce the behavior and expected behavior

Try to used the KEY DATE_DELIVERY in email templates.
It return all the time nothing.

Attached files

No response

@Pic-Event Pic-Event added the Bug This is a bug (something does not work as expected) label May 6, 2024
@Pic-Event
Copy link
Author

Please could you correct this bug ?

Dolibarr 9.0.3

you need to change the line 8283 in htdocs/core/lib/functions.lib.php

$substitutionarray['DATE_DELIVERY'] = (isset($object->date_delivery) ? dol_print_date($object->date_delivery, 'day', 0, $outputlangs) : '');

by

$substitutionarray['DATE_DELIVERY'] = (isset($object->delivery_date) ? dol_print_date($object->delivery_date, 'day', 0, $outputlangs) : '');

Thanks

@jman482002
Copy link

jman482002 commented Nov 12, 2024

Hello @picarcyr
I tried your fix by changing to:
$substitutionarray['DATE_DELIVERY'] = (isset($object->delivery_date) ? dol_print_date($object->date_delivery, 'day', 0, $outputlangs) : '');

This did not work for me. Can you explain what else I need to do to get this working?

Thanks

image

Also not working in Sales Orders module.

@jman482002
Copy link

Figured it out. You must change it in both places for every line:
$substitutionarray['DATE_DELIVERY'] = (isset($object->delivery_date) ? dol_print_date($object->delivery_date, 'day', 0, $outputlangs) : '');

@priojk
Copy link
Contributor

priojk commented Jan 2, 2025

Fixed by #32507, also for the other substitution variables related to DATE_DELIVERY for _DAY, _MON, _YEAR etc.

eldy added a commit that referenced this issue Jan 13, 2025
FIX #29624 - substitution of __DATE_DELIVERY__
@eldy eldy closed this as completed in 83abe6a Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is a bug (something does not work as expected)
Projects
None yet
Development

No branches or pull requests

3 participants