Extra Fields in Expense report

I am currently using Dolibar Version 10 on Ubuntu 19.04.

What I need: I need the ExtraFields module to allow me to modify the lines you add to the ExpenseReport.

What works right now: ExtraFields currently only updates the ExpenseReport fields NOT the lines.

What have I tried: I have attempted to modify the code and database to support my desired field types but I can’t get the “add” function to work correctly. I’m not a professional coder.

Any help would be greatly appreciated

Chris

Update:
I have figured out how to “hard code” the changes in the card.php and expensereport.class.php files to allow me add data into the new database fields I have created.
I think it would probably be much easier to use the “extrafields” module to accomplish this but at least I have it working now.
I must now adjust the code for the PDF report generator to fit my new fields.

I am still interested in hearing if someone has implemented the extrafields module into the lines section of the Expense Report.

Chris

Dear Chris,

Can you please share the changes you did on the card.php and expensereport.class.php for the benefit of the forum. Also the PDF .ODT file please.

I am trying to add two fields (Database field from third parties as vendor) in the line item of expense reports.

Many thanks
yesbee

Hi Chris,

I wanted to ask you if you can share how you did the extra fields on expense report lines. I really need to add custom attributes on expense report lines. Wish Dolibarr would make it available soon.

Rommel

Try this place:

Home, Setup, Modules/Applications

search for expense, and click the cogwheel to go into settings.

Select tab number 3, named Complementary attributes, and make new in there.

Thank you jon, however I need it on line items not on the Expense Report itself.

okay. Other modules likes orders, proposals and invoices have that option, it is called Complementary attributes (lines). I don’t know if expense reports has that.

I do use expense reports, and I did add my own types in Home, Setup, Dictionaries, Expense report - Types of expense report lines

Maybe you can use that?

Hi Jon,

Yes Jon thanks for your feedback. I do know those and I have used them. It’s just that the data I need is on Expense line item. I want to link it to vendor in such a way that one expense report can have multiple expense items with multiple vendors. I also want extra fields like the item bought, the purpose, etc… I just didn’t want to just chuck all of them in Description field which is easy to miss as that is free text.

yeah that makes good sense :slight_smile: