Home Forums Support Override entry invoice_designs

This topic contains 7 replies, has 2 voices, and was last updated by  KopfMedia 1 month, 1 week ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #22927

    KopfMedia
    Participant

    Hi fellow Invoice Ninjas, Hi Hillel (I guess you’re reading this),

    we’ve been doing some custom designs lately and everything works well.
    But we’ve found ourselves stuck with an issue regarding the limitations of invoice ninja, since we serve different customer groups and use different Designs for each of them, we ended up with more than 3 Designs. I already knew that there is no way to add more than 3 Custom Designs so I figured out we could just override the default ones using the MySQL table invoice_designs, which didn’t affect anything at all.
    Which I’ve found odd since I am able to update the Custom Themes in the account table using MySQL.

    So is there anyway to replace the default themes, I mean they need to be stored somewhere and if they do I could replace them. Or any other possible workaround ?

    Thanks 🙂

    #22928

    Hillel Coren
    Keymaster

    Hi 🙂

    The designs are stored in the storage/templates folder.

    https://github.com/invoiceninja/invoiceninja/tree/master/storage/templates

    If you change the files you can reload them into the database by loading /update (or /public/update) in the app.

    #22929

    KopfMedia
    Participant

    Wow, that’s a fast one. First of all thank you, did the trick. 🙂

    #22930

    Hillel Coren
    Keymaster

    Glad to hear it!

    FYI.. in the next version of the app we’re changing from pdfmake to HTML/CSS for the invoice designs, we think it should be much easier to customize.

    #22931

    KopfMedia
    Participant

    Makes sense, it took me a afternoon to get the whole pdfmake syntax right and html and css is kind of the common standard.

    Ohh btw is there a way to rename the standard themes, it’s not necessary, I mean I could deal with it if not, but it would be kinda nice just to make it easier to find the design needed. Thanks for your help so far!

    #22932

    Hillel Coren
    Keymaster

    Sorry, it isn’t supported

    #22933

    KopfMedia
    Participant

    No problem, anyway thanks! Maybe in v2 then 😀

    #22935

    KopfMedia
    Participant

    Got a workaround running … Javascript changing the innerHTML value of the selection options, not state of the art solution, but it does the job 😀

    If anyone is looking this up, searching for a workaround, just add some Javascript to
    /recources/views/master.blade.php with somethign like this.

    
            var designselection = document.getElementById("invoice_design_id");
            designselection.options[0].innerHTML ="your own theme name";
    
Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.

Posted in: