Prerequisite information:
- Ubuntu 20.04.6 LTS
- Apache v2.4.41 (Ubuntu)
- MariaDB v10.3.38
- PHP 7.4.3-4ubuntu2.19 with Zend v3.4.0 and Zend Opcache v7.4.3-4ubuntu2.19
- Dolibarr v17.0.2
Hi there,
I hope this is the correct space to post this in. If not, please redirect me. I’m American, so please forgive me for that. For the record, I didn’t vote for that orange dude in 2016, and won’t in 2024 either. I’m actually a dual American/UK citizen.
My company is in the process of transitioning over to Dolibarr from another ERP/ERM product. With any amount of luck, if successful I have two customers who want to transition to Dolibarr as well, and we’re hoping we can become an official Dolibarr consultant here in the states.
As the lead technical person in our company, it’s fallen on me to set all the settings and make all the custom forms needed to make it function for us. There are a number of things that don’t apply to the US built into Dolibarr (example: VAT tax doesn’t exist as long as we’re selling inside the US), but I’m getting quite the education on how accounting works outside the states!
I’m presently working on the [Commercial] Proposals module. I have a number of questions, most of which can probably be answered easily, but Google has not helped me find the answers yet.
The biggest by far is that our sales staff often adjust the markup/margin of each individual item within a proposal. For instance, one item may have a 10% markup, but another item may have a 100% markup/margin if it’s a small enough item.
I could not find a way to do this per line in each proposal in Dolibarr. It seemed like I could set these settings “per customer” or “per item” (Buying price vs Selling price) in the Products & Services, but I could not set them “per proposal” or “per line.”
I tried playing with the “Disc.” field… for example, using “-10%” to increase the item’s cost by 10% over our cost… but this seems to compound on top of the product selling cost (more on that below). Also, the “discount” is advertised to the customer on the PDF, so we certainly don’t want that! So…
To get rid of the discount column above (and for other small tweaks to the proposal) I followed the directions to copy the pdf_azur.modules.php and make our own, which I called pdf_{ourcompanyname}_custom.modules.php. I renamed the class as instructed. Following through the directions, I found the discount column on ~ line 634 and commented out the entire section for the discount. Above that on ~ line 188 I changed “this->posxdiscount = 0” so the column just wouldn’t show up on the resulting PDF. This did get rid of the “Disc.” column. However…
… When I looked at my “U.P (net)” column and multiplied it by my “Qty” column, the resulting “Total (excl.)” column did not match. This is when I discovered that the “Disc.” (Margin/Markup) I applied was being compounded against my product selling price in the Products & Services section! So, that won’t do it!
I also discovered that when I removed the “Disc.” percentage from the line items in the proposal to prevent the compounding effect I mentioned above, suddenly I had no Quantity column and no Unit Price (U.P.) columns!
I then decided to go back a few steps and see what it looked like under the stock “azur” template and see what happened when I removed all the discounts. It looks pretty good, except there’s no way to edit the margin/markup “per line item.”
I looked into adding an additional field, but I get the impression this is overkill.
The last thing I want is sales guys using calculators or excel worksheets to calculate margins and type them into the proposals. Frankly, that’s bit us in the rear end too many times in the last 10 years to ever go back to that. I’d like Dolibarr to do the calculation, but I need the calculation to be correct!
So, I’m giving up and asking for help. I think if I can figure this out, we’ll be good.
Thank you, in advance!