6 ms·
How I Write Invoices in Vim
- joemi 11y agoThis seems ok for really simple invoices, maybe with just one or two line items. But anything more complex than that and it would seem foolish not to use a spreadsheet, I think. I'd get annoyed having to do the math myself.
- Amorymeltzer 11y agoSame here, it's what I do. Plus, in my experience, people receiving your invoice or timesheet appreciate a spreadsheet.
- Amorymeltzer 11y agoFor simple ones this is fine and all, but I'd sooner write the same thing in markdown then convert it directly to pdf via mm2pdf or whatever. Saves the trouble of vim options, browser, etc.
- ckluis 11y agoUsing a good tool for the wrong problem makes it the wrong tool.
- privong 11y agoIt seems to work fine for them. And with the apparently simple invoices, why bother making things more complicated by using a more complicated tool? If the invoices were complex, I'd agree that this method might be the wrong tool, but for simple invoices, it seems like a lightweight and fairly straight forward approach. So it can be considered a right tool for the job.
- amelius 11y agohttps://en.wikipedia.org/wiki/Law_of_the_instrument https://en.wikipedia.org/wiki/Law_of_the_instrument Next up: how I write invoices using duct tape.
- JorgeGT 11y agoYou can also have a nice LaTeX template ready and then programmatically complete it with the required information, for instance the template is set to read a \input{clientinfo.tex} somewhere that you create with a command like echo Mike > clientinfo.tex etc. Then you issue the compile order and you have a nice PDF that can then be emailed or archived or whatever. At least that's how we make repetitive reports in our lab!
- StavrosK 11y agoThat is also how I generate contracts! makecontract --ip=mine --fee=100 --duration=30 contract.pdf
- jeremysmyth 11y agoI've a slightly modified version of invoice.sty that I use to do exactly this. Most of an invoice is boilerplate, so there's no point reproducing a pile of work when you can script it.
- tambourine_man 11y agoI also write it in Vim, but a script turns a kind of markdown derivative of mine into HTML, inserts it into a template, which in turn is converted to PDF by Chrome. I have most of the bugs sorted out, which fonts work fine and render selectable text, how to deal with a single pixel white line in a full page background image, etc. It works, but it's an ugly hack. I'm dreaming of writing my own PostScript someday. From my initial research, it seems to be not that hard really.
- derekp7 11y agoPostscript is actually really easy. The language itself is RPN based (like the older HP calculators) and really fun to work with. Grab a copy of the "Blue Book" (do a google search for Postscript Blue Book and it should be one of the first links) -- it has a lot of good examples and exercises in it. Should take about a good weekend to get the feel for it, then just keep a copy of the function reference from the end of the book printed out.
- semi-extrinsic 11y agoFor rendering markdown straight into PDF (and other formats), have a look at pandoc, it's really powerful. If you can make your markdown flavour compatible with (or a superset of) pandoc markdown it should be simple. See RMarkdown for inspiration.
- tambourine_man 11y agoPandoc is great, but my layout is a bit complex, and last I checked, templating in HTML first seemed easier.
- RBerenguel 11y agoI fill CSVs and wrote a small python tool to add the totals and add VAT if needed, outputs a TeX file. Then a Bash file creates snippets for month/date stuff and numbering. If I had to do it again I'd just use Go's text/template system & CSV support. Edit: oh sure, the bash script generates a numbered (filename prepared for tax filing) PDF with PDFlatex
- x5n1 11y agoI use PayPal for my invoices. I have yet to regret my decision.
- logn 11y agoI do like that you can accept credit/debit card there from a domain name that's trusted. And if people pay by alternate means you can manually mark the invoice as paid and optionally add a discount.
- geon 11y agoI have successfully used wkhtmltopdf to render PDFs from HTML. Better than opening chrome and printing manually. http://wkhtmltopdf.org/ http://wkhtmltopdf.org/
- yoshamano 11y agoLibreOffice is my go to office suite. When I decided to stop using hand written invoices I decided to take a look through their template library and I landed on this. http://templates.libreoffice.org/template-center/simple-service-invoice-1 http://templates.libreoffice.org/template-center/simple-serv... I've been using it now for over 2 years and its been great.
- zacharycohn 11y agoI'm a huge fan of https://invoiceatonce.com https://invoiceatonce.com. Keeps it simple, and it looks nice for the client.
- ogig 11y agoI used a similar method until I realized my data wasn't very accessible afterwards. When I needed an anual report I had to write a small script, then for taxes, then for repeating customers, and so on. I also had to go and look customer data to an old invoice and copy that when the customer repeats. All this was error prone and not architected with care. I moved to a simple invoicing app and most of my problems were gone. I miss the command line a bit, that's all. Just my experience.
- kasbah 11y agoWhich app did you switch to?
- ogig 11y agoIt is Odoo's invoicing + customers modules.
- catern 11y agoHmm, ledger[0] or hledger[1] is probably the best solution then. You could instead write a script to generate invoices from the data in them. [0] http://ledger-cli.org/ http://ledger-cli.org/ [1] http://hledger.org/ http://hledger.org/
- seiji 11y agoledger-cli is great, but I'd strongly encourage using an older 2.6 release. The 3.x releases don't forecast accurately for me and the 3.x code is (a complex and disturbingly unreadable) complete rewrite of 2.x.
- masida 11y agoYeah, that's exactly the way I do it. The invoice data from my hledger file and a HTML template together are generated to a HTML invoice. The HTML invoice together with a CSS file are processed to PDF using WeasyPrint [1]. [1] http://weasyprint.org/ http://weasyprint.org/
- pearjuice 11y agoTextbook HN hint: (Here's how I) don't do X in a traditional manner, but use Y, an obscure, undocumented, poorly supported and inferior alternative because f- you and your standards, that's why.
- icebraining 11y agoThe title is "how I write", not "how you should write." What in this blog post deserves such bile?
- Sanddancer 11y agoBecause it's a fundamentally wrong way to do business accounting. It's more difficult to check, more difficult to look for year/year patterns, more difficult to integrate into other tools, etc. A pile of invoices created by vim are a lot more difficult for your accountant to enter in to their systems for year-end taxes than a more common format, like a spreadsheet or a database.
- HeyLaughingBoy 11y agoMaybe he does what I do: gives his accountant a categorized list of income & expenses rather than the raw data. My accountant cares that I did $xxxxx in total sales, not that I sold $aa to AA Inc and $bbb to BB Co., etc.
- todd3834 11y agoThis is a textbook example of using creativity and a free toolset to solve a very common problem. As a member of this community, I love stuff like this. I might never do it myself but I learned some new VIM commands that could totally come in handy. If this kind of post is annoying to you, you aren't going to enjoy this place.
- vegabook 11y agobut (s)he's been a member for more than 2 years and has a very high karma for the time. So I'm going to take this observation on HN's tendencies seriously. Why should observations on the HN community's biases inevitably solicit downvotes or finger wagging? I personally love Vim and like to use it far outside its scope, but I recognise that there is a case to be made for many posts on HN being a little "originality for originality's sake".
- kirk21 11y agoI created an overview of invoicing systems for myself a while ago: http://goo.gl/forms/QAOLcuW6F2 http://goo.gl/forms/QAOLcuW6F2
- kvndebryne 11y agoUsed https://www.getharvest.com https://www.getharvest.com before but now that I am working a retainer, I use https://www.recurvoice.com https://www.recurvoice.com
- eik3_de 11y agoHarvest does have retainers and recurring invoices: https://www.getharvest.com/help/invoices-and-estimates/invoices-estimates-faqs/recurring-or-retainer https://www.getharvest.com/help/invoices-and-estimates/invoi... (Disclosure: I work at Harvest)
- jweir 11y agoI use Harvest to send several automated quarterly retainer invoices. It works great.
- imakesnowflakes 11y ago>When you issue the :TOhtml command, Vim turns your text into html 7 years of using VIM and my mind is more than blown after I just tried it now. It worked perfectly and It even showed a frigging progress bar!
- dpcan 11y agoIn a couple years, he will probably learn that maintaining this invoice system to support the changes in his business will prove to be a frustrating waste of time. For a reasonable fee, I now use Freshbooks. I love paying a small fee to have a company constantly improving and perfecting the invoice system I use, and the system saves me A LOT of time each month. 13 years ago, I could just put numbers in an invoice in word, send it to a customer, they paid by check. Then over the years, it got much more complicated. In-house tools, mixed with other accounting software, was just sucking time. I know it's fun to write tools like this for business tasks, but I think you also have to pick your battles, and when you can pay for an affordable tool that will greatly simplify a business task, I choose this path. EDIT: I recently started using Freshbooks' API to do little reporting tasks they don't provide, and this fills the "make my own tools" void when it comes to accounting.
- tomphoolery 11y agoFreshbooks is great. At a consulting company I used to work at, we used spreadsheets for time tracking. When Freshbooks came out, we immediately jumped ship and started getting tasks, tracking hours and being able to actually see when (all) projects go over budget.
- t0mk 11y agoThis is great! I was using Google Doc Spreasheet and export to PDF but it sucks, I hate the tables. I'm going the vim way from now on for sure! It's simple and straightforward and that's what counts! I'll keep my invoices in a simple text files in a private git repo. Book-keeping and accounting is a simple concept. Just nowadays over-complicated by accounting companies, historical software etc. Unfortunately also by regulations. :(
- mpnordland 11y agomarkdown + pandoc would be perfect for his system, yeah you need haskell, but pandoc is so nice.
- Retra 11y agoIf I were to do a similar task, I would use pandoc, too. I'd probably set it up so you just enter a line in a CSV or spreadsheet and run a script that outputs an invoice for the new entries. Setting up vim to do it is about the last thing I'd try...
- radoslawc 11y agoJust my 2 cents: Despite comments like "wrong tool for..." this gives great elasticity when it comes to data manipulation, you can grep it, put in RDBMS, make csv/graph/one large flat file out of it, keep it in VCS etc. Sure you can use one of billion apps to do that, but then what's the point of developing your own solution to anything, just buy/use someone else app. Keeping your financial data in cloud for me seems like so-so idea. Of course there's emacs mode for it ;) (http://orgmode.org/w/?p=org-mode.git;a=blob_plain;f=contrib/lisp/org-invoice.el;hb=HEAD http://orgmode.org/w/?p=org-mode.git;a=blob_plain;f=contrib/...)
- tunesmith 11y agoI currently use (on a Mac) Intuit's "My Time" to track hours - what I like about it is that it'll publish my hours straight to Quickbooks without me having to do repetitive data entry. But I don't know if there are other solutions that also have that easy communication with Quickbooks (Quickbooks is a requirement for me). Since QB generates invoices, I don't need a separate tool for that.
- gexla 11y agoIf I wanted my editor to do everything for me, I would switch to Emacs. On the other hand, scratching my itches (some which others probably thought were silly) is what got me here.
- Havoc 11y agoSpeaking as an accountant...please dont write invoices with Vim, Excel or minesweeper. Just use a standardised package. The amount of botched homecooked invoices I've encountered is frightening & worse the people producing them seem entirely oblivious to the fact that they're wrong (sometimes wrong to the point of constituting tax evasion). It really one of those cases of "just because you can doesn't mean you should"
- thaumasiotes 11y ago> (sometimes wrong to the point of constituting tax evasion) Can you say more about this?
- Havoc 11y agoThat would be a country specific thing & is a bit of an outlier. As a simplified example though - sometimes the sales tax / VAT is calculated as 10/110 instead of 10/100 (or vice versa depending on law). Or there is some small piece of info missing that technically means the invoice isn't a legal tax invoice which means whoever you issued it to claims tax on that illegally (again country specific). It's unfortunately a case of people dont know how much they don't know.
- jqm 11y agoI love Vim and hate spreadsheets. But this just seems wrong. At the end of the month I open my spreadsheet invoice templates and send my invoices. The right tool for the job and all...
- e-xcavator 11y agoI am sure that all the programs mentioned here are useful and helpful. However, the best open source accounting software by far is GnuCash ( www.gnucash.org ). I have been using it for years to do the books for online retailers and hedge funds and still get amazed by the versatility of the program. If you have any question do not hesitate to drop me a line. seeit1st@gmail.com