How are you using Dolibarr without being able to issue payment reference numbers?

Dolibarr doesn’t have a means to issue payment reference numbers, which to me seems a very fundamental business process; how are you supposed to keep track of who is paying what and when without one? For freelancers sending 2 invoices a week, sure - you can get away with it, but for an actual business you will have big issues without them.

So, just how are you running your businesses without payment reference numbers or have you found some way to remedy this?

I absolutely do keep track of who is paying what proposal/order/invoice. I mostly do it using the Stripe payment module, but for locals I do also offer support for paying using the Danish MobilePay system - god I wish that the EU would MANDATE that mobile phone paying system should work across the whole of EU, because I can’t get the Swedish Swish system, and they can not get the Danish MobilePay :frowning:

Anyway, enough ranting, and on to the details.

As payment reference I use the order reference, one could also use the order ID, but I do not want to reveal the order ID because it is auto incrementing and I

a) don’t want to reveal how many orders I have
b) don’t want to having the possibility of malicious users just trying with other numbers to get some information about other customers.

Here’s my use case and the funnel/flow of customers

We are a small non profit community driven dance organization. We organize weekly classes as well as international weekend workshops all centeret around dance. (our dance is a partnered swing dance called Balboa, but that’s kind of irrelevant).

I’ve programmed a python flask form system that presents our dance classes and lets people register. You can see that on https://shop.balboaswing.dk/

From that form system I feed data into Dolibarr using the API.

  1. I create a proposal, and then I validate that proposal and create a draft order.

  2. I use the automatic notification system in Dolibarr to email those who register which is triggered when the draft proposal is validated.

  3. I have another python flask system that generates an overview of all our classes, who registered for what, and how far along in the registration funnel/flow their registration are. Viewers of this system are me and our local teachers, who can accept registrations into their own classes.

  4. Acceptance into our classes is done inside Dolibarr by simply validating the draft order created in step 2. This triggers another dolibarr automatic notification that emails the registrant asking them to pay (preferably using Stripe).

  5. In that email I include a link to another python flask based webapp that finds the correct stripe payment url inside Dolibarr and lets the viewer go there and pay. This is where I am using extrafields/Complementary attrributes from both the thirdparty (customer) and the registration, some unique fields to make sure that only the registrant who got the email can get to view the details of the registration and pay. You could absolutely use a combination of thirdparty id and order id, but I would strongly advice against that. The only reason for why I use my own webapp is because there is a bug in Dolibarr that does not send the correct url for payment when the order is validated. In technical details it sends the reference to the draft order, not the validated order.

  6. a. When the order is paid using stripe, Dolibarr creates a draft invoice, validates the invoice and registers a payment. I have an automatic notification that trigger on the payment and send the thirdparty an email. Once again I link to my own webapp because of a bug in dolibarr.

  7. b. If the order is paid using danish mobilepay or a bank transfer then I manually find the order based on the payer, but I do plan to make some python that parses my mobilePay and banking CSV statements, finds the order reference and marks a payment. Once again when I enter the payment the automatic notification system is triggered and an email is sent.

  8. If you send all emails manually, then you are not impacted by this bug, because you will always send the email after you validated the order/registered payment.

  9. If you want to use a different payment reference number than the order/invoice ID, then you can make a Complementary attribute that is shown on the PDF, and then your customers can type in that reference, and you can even see the reference inside the dolibarr roder/invoice/proposal overviews. It is slightly harder finding them using the API.

  10. If you don’t want to use the API, then I think that you can import Accounting entries in at least 2 different formats.

1 Like

Thank you for your comprehensive breakdown, very interesting read. I love your use case, sounds fun!

I might just be out of my depth with Dolibarr and will have to find something more consumer facing; I am not a programmer - so much of the language you used isn’t easy to understand to me, though I did pick up on your workflow.

The two things I’ve tried since are,

Option 1. Add a line to the ‘Free text on invoices’ text box found within the ‘Invoices module setup’ page. This isn’t suitable as it adds text to the invoice footer which isn’t proper; this area is commonly reserved for company information and there is a good chance it is missed. It’s out of context with the rest of the document too, information regarding payment should be together.

Option 2. Add a complementary attribute asking for the customer to use the invoice ID as reference. Now, this does work in a way, however, it adds a box above the item area, which is again, out of context with the rest of the invoice. It should come after the item area and near the payment section.

So, there are two workarounds, though I would consider both improper. If I could add a line to the payment area regarding referencing the invoice number, that would be a good solution, but I’ve clicked just about every option and can’t find the means to do so.

I’m honestly baffled this software has existed for over 20 years and something like this hasn’t been accounted for, I don’t get it. It’s like going to a restaurant and them not having knives to cut your food with, only forks and spoons, I mean yes, I can cut the steak with the fork, or I guess could find some way to modify the spoon to behave more like a knife, but… really? (My rant over haha).

I’ve looked on the DoliStore marketplace, but there are no templates that address this available to buy, all of the templates that are on the DoliStore do not work for the latest version of Dolibarr anyway.

For future reference if any developer decides to pick this up, you can find below two ways of referencing a payment reference ID on an invoice below, using Tesla for both examples:

I see some of what you mean.

In Home, Setup, Modules, Invoice

There are this segment

“INVOICE DOCUMENTS MODELS”

what if you edited your own template?

by adding a Complementary attribute and setting the visibility to one, I can get an invoice PDF like this

IN2402-0165 (1).pdf (54.9 KB)

Not ideal but it might just work

I read a thread on doing it yourself and found it a bit too involved, I am not a programmer of any kind, so I will end up sinking more time in to it than I am prepared to, I am a consumer - currently trialing Dolibarr along with a couple of the other cheaper ERP options.

Yes, thank you for trying it out.

I was able to create that exact result adding a complementary attribute line, from what I have found so far, it is the best workaround available.

Though, I include the company’s bank account details on the invoice (it shows up when you add a bank account and select it as an option on the invoice). This adds the payment information to the bottom left corner of the invoice (after the item area) which is standard. To split the payment reference information away from the other payment content isn’t ideal, though it is a viable workaround.

what if you don’t select that as an option on the invoice and add some Complementary Attributes - I added mine to the invoice, not to invoice lines - and those attributes are your banking details and the payment reference?

Hmm, yeah that is an idea, I’ll test it out. I am not too fussed about my invoices ‘looking the part’ right now, though they must be sensible, confusion causes a lot of problems.

that doesn’t sound too hard. Where does one actually enable putting the banking details on the invoice? I don’t use it and I can’t seem to find it right now :frowning:

You have to add a bank account in the Banks | Cash module (must be enabled first). Once you have have created an account, when you initiate creating an invoice, an option comes up to select your ‘Bank account’, all the bank accounts you’ve added will then show up in a dropdown list.

We will need to stick together on this software, as I fear we are the only English speakers on the forum haha.

okay, I never use that functionality, I let dolibarr create the invoice after the customer paid the order using the stripe payment module.

I was wondering what the exact text was, then I would search for it in the codebase just to see how easy it would be to add an extra line.

I think there are many others

I use a module that is in dolistore, it can generate payment receipts for sales, for purchases.

If you want more personalized, contact me.

1 Like

@trader I wonder if you can set your details in the PaymentCondition’s?

I don’t see any problems with adding payment terms.
Send me the data or fields you want to see on the payment receipt

Hi ramiroques,

That is not quite what I was referring to, but is a good feature nonetheless - I will bookmark it for review.

What I was looking for is a manner to present the payment reference on the invoice you send to a client for billing.

The payment reference is to be used by the client when making the payment (in case of a bank transfer) so you can identify which invoice the payment is for.

What would be great is to be able to add a line/note to the payment section, so you could add for example: ‘Please reference the invoice number when making your payment’, but I haven’t found a method to do so myself.

In the meantime, I think the best solution for the Dolibarr software is to add it to the description of an item, I personally add it as a note to the description of the very last item in the description area.

@jonbendtsen I don’t believe there is a manner to add an extra line to the payment/conditions area, unfortunately. The public note option adds a section above the item area, and the ‘add free text’ option in the invoice setup module adds the note to the footer of your invoice (or just above), which to me should be reserved for company information. I instead have been adding the payment reference instruction to the description of the last item in the item area, which I believe to the best option available at the moment.

@ramiroques

There are two common ways that I see as standard for displaying the payment reference number on an invoice:

  1. Adding it to the payment section of an invoice as an instruction as seen in the following image:
    https://imgv2-2-f.scribdassets.com/img/document/556137172/original/434ad16a7a/1701607661?v=1

  2. Adding it to the invoice section of an invoice as seen in the following image:
    https://pbs.twimg.com/media/ECkcCF-U4AAoJ0c.jpg:large

@trader why not? the box with the orders could be 1 line smaller.

Or it could be just left of the date and amount?

Hi @trader
You can print your Complementary attribute in the top right side of the pdf like in your second image by modifying htdocs/core/modules/facture/doc/pdf_sponge.modules.php.
Locate this line of code

$pdf->MultiCell($w, 3, $title." : ".dol_print_date($object->date_lim_reglement, "day", false, $outputlangs, true), '', 'R');
		}

and paste right under the following code

$extrafields = new ExtraFields($this->db);
$extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
$object->fetch($rowid);
$object->fetch_optionals($rowid,$extralabels);
$payref = $extrafields->showOutputField('yourAttributecode', $object->array_options['options_yourAttributecode'], '', $object->table_element);
$posy += 3;
$pdf->SetXY($posx, $posy);
$pdf->MultiCell($w, 3, "Payment reference number"." : ".$payref, '', 'R');

Make sure to replace the 2 instances of yourAttributecode with your actual complementary Attribute code
You can play with $posy += 3; value for placement
The only caveat is that you have to repeat the same process in every Dolibarr update…

1 Like