Add a barcode to invoice

Looking at this, there is a value passed through in the javascript in a variable invoiceID. However, inserting this on a PDF would become a little bit more tricky.

I’m not entirely sure how possible this would be, but I’ll convert this thread to a feature request, and if there’s enough interest, we’ll revisit this.

[Edit]
Would this work for you? This script checks if the URL is already present in the notes, and if not inserts an image linking to the URL.

    var n = $('#txtterms').val().search("qr-code-generator.com");
    
    if((n == -1) && (invoiceID > 0))
    {
        $('#txtterms').val($(this).val() + '<img src="http://www.qr-code-generator.com/phpqrcode/getCode.php?cht=qr&chl=' + invoiceID + '&chs=75x75&choe=UTF-8&chld=L|0">');
    }

I’ve used a generic QR generator, but you can use your own URL here.

You would also need to save the invoice, and modify it again, but you can play around with the code and see how that goes. Hopefully that’ll give you a good starting point

1 Like