Dolibarr / dolibarr

Dolibarr ERP CRM is a modern software package to manage your company or foundation's activity (contacts, suppliers, invoices, orders, stocks, agenda, accounting, ...). it's an open source Web application (written in PHP) designed for businesses of any sizes, foundations and freelancers.
https://www.dolibarr.org
GNU General Public License v3.0
5.19k stars 2.71k forks source link

"Created By" is empty when "Due Date" is modified #30365

Open MC874 opened 1 month ago

MC874 commented 1 month ago

Bug

Hi! The "Created By" is becomes empty when the "Due Date" of the invoice is modified. Even though I'm using the same user that creates and modified the invoice. Tested on Customer Invoice.

Actual Result: image

Expected Result: image

Dolibarr Version

19

Environment PHP

No response

Environment Database

No response

Steps to reproduce the behavior and expected behavior

1) Create Customer Invoice 2) Create Draft/Concept WIHTOUT "Due Date" being modified 3) See the "Created By" attribute on Customer Invoice list 4) Edit the "Due Date" invoice 4) See the "Created By" attribute on Customer Invoice list

Attached files

No response

ems-co commented 1 month ago

this issue is resolved in dolibarr V20.0.0

the problem is on (compta/facture/class/facture.class.php/ line 2521 (change the words user_author to fk_user_author)

MC874 commented 1 month ago

Thank you, that resolve the issue.

jjjessen commented 1 month ago

How do you then set the "created by" on an invoice once it's gone?

ems-co commented 1 month ago

How do you then set the "created by" on an invoice once it's gone?

From your database you have to manually change the record, go to table llx_facture and update the relevant invoice's column fk_user_author and write the id related to the user in table llx_user -> column rowid

by updating the table llx_facture column fk_user_author then check the "created by" for the invoice you can set the user who created the invoice

this issue is resolved in the latest version in dolibarr

MC874 commented 1 month ago

How do you then set the "created by" on an invoice once it's gone?

Simply create a new invoice and delete the old one. It is a hassle but I really need the author who create the invoice.

jjjessen commented 4 weeks ago

How do you then set the "created by" on an invoice once it's gone?

From your database you have to manually change the record, go to table llx_facture and update the relevant invoice's column fk_user_author and write the id related to the user in table llx_user -> column rowid

by updating the table llx_facture column fk_user_author then check the "created by" for the invoice you can set the user who created the invoice

this issue is resolved in the latest version in dolibarr

I'm using the hosted version on https://www.dolicloud.com/ so at least I'm not aware if I have direct access to the database to fix this myself. But I use the suggestion from @MC874 though it feels a bit silly :-)