WEBVTT

00:10.290 --> 00:22.480
What is an invoice?

00:22.480 --> 00:25.630
Invoice is a document

00:25.630 --> 00:28.660
that you give it to your customer

00:28.660 --> 00:30.416
so that they can pay you 

00:30.416 --> 00:31.450
for your service or your goods.

00:31.450 --> 00:35.720
But you are a professor and consultant. 

00:35.720 --> 00:38.730
Why do you need to generate invoices?

00:38.730 --> 00:39.730
Well...

00:39.730 --> 00:46.640
I do a service for my clients

00:46.640 --> 00:47.884
if I'm a consultant,

00:47.884 --> 00:48.999
and when I'm a professor,

00:48.999 --> 00:51.530
I'm teaching students,

00:51.530 --> 00:54.910
so I have to generate an invoice.

00:54.910 --> 00:58.420
Why not use Excel or something simple

00:58.420 --> 01:00.079
to generate your invoices?

01:00.079 --> 01:01.079
I've tried that.

01:01.079 --> 01:04.609
It's no good, when it... particularly, 

01:04.609 --> 01:07.150
when there are many clients,

01:07.150 --> 01:09.035
managing Excels and templates 

01:09.035 --> 01:10.799
becomes very very tricky.

01:10.799 --> 01:15.725
Why don't you hire someone, you know, professional 

01:15.725 --> 01:17.350
to do these for you?

01:17.350 --> 01:18.428
I've tried it. 

01:18.428 --> 01:22.381
I have to give them lots of information. 

01:22.381 --> 01:25.140
Not that there's anything wrong with them,

01:25.140 --> 01:30.130
just that I found it to be a bit too tricky.

01:30.130 --> 01:31.250
Professional software?

01:31.250 --> 01:33.902
Good point. I've tried that too. 

01:33.902 --> 01:36.900
But, what's the fun in that, right?

01:36.900 --> 01:38.850
So what did you do?

01:38.850 --> 01:40.869
Haa.. this is the interesting part!

01:40.869 --> 01:45.600
I took a software called Emacs Org mode

01:45.600 --> 01:50.640
and with that, I added Python code to it.

01:50.640 --> 01:52.418
I added so many other things to it,

01:52.418 --> 01:56.168
and then it became a really nice 

01:56.168 --> 01:59.640
customizable way to generate invoices.

01:59.640 --> 02:04.549
Whoa whoa whoa... Just slow it down, bro.

02:04.549 --> 02:06.659
Give me the story.

02:06.659 --> 02:10.170
Hey. Okay... Okay... I will.

02:10.170 --> 02:11.170
Story.

02:11.170 --> 02:14.620
Uh.. Story is simple.

02:14.620 --> 02:16.590
The client wanted an invoice.

02:16.590 --> 02:19.900
So, I generated an invoice.

02:19.900 --> 02:21.419
It wasn't good enough.

02:21.419 --> 02:24.959
So, I hacked some little bit of it.

02:24.959 --> 02:28.480
I changed every time a new client came.

02:28.480 --> 02:29.848
I had to do it all over again. 

02:29.848 --> 02:30.989
I did that. I did it.

02:30.989 --> 02:33.110
Then I got really tired of it.

02:33.110 --> 02:36.760
And that's what led me to all these customizations.

02:36.760 --> 02:38.632
I want features. 

02:38.632 --> 02:43.249
So, rapid fire questions. Ready? Yep.

02:43.249 --> 02:46.079
Project management? Yep.

02:46.079 --> 02:48.079
Format customization? Yes.

02:48.079 --> 02:50.079
PDF export? Yes.

02:50.079 --> 02:52.079
Multi-client support? Yes.

02:52.079 --> 02:53.579
Washing my clothes?

02:53.579 --> 02:54.959
Yes... No.

02:54.959 --> 02:57.013
Haa. I was just testing you, 

02:57.013 --> 03:00.900
if you're paying attention or not.

03:00.900 --> 03:04.659
Logo and signature customization? Yes.

03:04.659 --> 03:06.730
Multi-currency support? Yes.

03:06.730 --> 03:08.930
Okay, enough talky or it's just...

03:08.930 --> 03:10.930
Can you show me a demo that you did?

03:10.930 --> 03:12.950
Or is it just talky.

03:12.950 --> 03:15.239
Yes, of course. Demo.

03:15.239 --> 03:16.969
Okay, demo time.

03:16.969 --> 03:18.909
Some ingredients for invoicing.

03:18.909 --> 03:21.069
Org mode, of course.

03:21.069 --> 03:23.849
Python environment and libraries for Python:

03:23.849 --> 03:25.930
pandas, tabulate, numbers.

03:25.930 --> 03:28.260
yasnippet package, very useful.

03:28.260 --> 03:30.969
And I use for LaTeX, MikTeX packages.

03:30.969 --> 03:34.090
So, I have a project already set up.

03:34.090 --> 03:36.540
This is what we have.

03:36.540 --> 03:38.673
The project is Teaching 2021 

03:38.673 --> 03:41.239
and you can set all this up.

03:41.239 --> 03:43.819
So let's start with the first and foremost.

03:43.819 --> 03:46.849
Okay, so we're going to use

03:46.849 --> 03:49.209
the yasnippet package.

03:49.209 --> 03:52.219
uh.. um.. sorry, the invoice, okay.

03:52.219 --> 03:54.550
This one introduced, it gives you this whole...

03:54.550 --> 03:56.377
generates this whole bunch of code 

03:56.377 --> 03:57.150
based on a template.

03:57.150 --> 03:58.371
All you're going to do 

03:58.371 --> 04:00.939
is to type out the client's name.

04:00.939 --> 04:02.797
Okay and that's it. 

04:02.797 --> 04:04.469
That's all there is to it.

04:04.469 --> 04:06.446
Okay there's a whole bunch of instructions

04:06.446 --> 04:07.199
that you can follow.

04:07.199 --> 04:09.284
If it's for the first time,

04:09.284 --> 04:10.549
use bankinfo.org.

04:10.549 --> 04:14.409
Let's check out what bankinfo.org involves.

04:14.409 --> 04:16.819
Okay so you can copy this template 

04:16.819 --> 04:19.269
from my GitHub repository.

04:19.269 --> 04:24.300
It's basically setup of the LaTeX tags,

04:24.300 --> 04:26.854
and particularly this text file, 

04:26.854 --> 04:28.620
which is a template.

04:28.620 --> 04:30.469
There's some personal info 

04:30.469 --> 04:32.125
for all the details that you want.

04:32.125 --> 04:33.814
Bank information. 

04:33.814 --> 04:35.580
You can look at it in detail

04:35.580 --> 04:40.330
from my repo. The tax invoice...

04:40.330 --> 04:42.840
There are some basic constructs.

04:42.840 --> 04:45.809
You can totally change any of these

04:45.809 --> 04:47.620
to your liking.

04:47.620 --> 04:50.320
Okay, so that's bank info.

04:50.320 --> 04:52.200
Go back. That's the first part.

04:52.200 --> 04:55.540
The second part is creating a client name.

04:55.540 --> 04:58.420
So let's look at this setup,

04:58.420 --> 05:00.710
and I have one created already.

05:00.710 --> 05:02.804
So, in order to create this, 

05:02.804 --> 05:03.880
all you need to do

05:03.880 --> 05:06.610
is to use the inv-setup

05:06.610 --> 05:10.300
invoice setup for your client,

05:10.300 --> 05:12.230
and it will give you all the information.

05:12.230 --> 05:14.790
All you need to do is type in here

05:14.790 --> 05:16.410
and then type in the client's name,

05:16.410 --> 05:18.785
exactly the same that you see 

05:18.785 --> 05:20.210
as the file name.

05:20.210 --> 05:22.620
Okay, client one. And that's it.

05:22.620 --> 05:24.250
You're all set for you.

05:24.250 --> 05:26.218
Okay, so that's what it looks like. 

05:26.218 --> 05:28.043
All the address and stuff

05:28.043 --> 05:29.710
filled out here.

05:29.710 --> 05:32.131
Okay. And then the next one 

05:32.131 --> 05:37.010
is to use the... One time,

05:37.010 --> 05:38.890
you're going to do the invoice item,

05:38.890 --> 05:40.590
which is the rate table.

05:40.590 --> 05:42.490
So let's do the invoice.

05:42.490 --> 05:44.400
Invoice item...

05:44.400 --> 05:47.080
This is item master.

05:47.080 --> 05:50.320
So here again, another place

05:50.320 --> 05:53.060
where you have to enter the client name,

05:53.060 --> 05:56.780
and your rate table is ready for use.

05:56.780 --> 05:58.891
Okay. So that was... 

05:58.891 --> 06:00.749
Now we go to step two, 

06:00.749 --> 06:02.510
which is clock table for reference.

06:02.510 --> 06:04.150
Okay. Let's go to the clock table.

06:04.150 --> 06:09.660
I already set up this for ACMEClient1,

06:09.660 --> 06:12.030
and I give it a tag: billable.

06:12.030 --> 06:13.260
Okay. We will see that...

06:13.260 --> 06:17.470
Where have I done that?

06:17.470 --> 06:23.890
Okay, so that's the client, you know,

06:23.890 --> 06:25.360
ACMEClient1 table teaching 2021.

06:25.360 --> 06:29.090
I've clocked it for the previous month.

06:29.090 --> 06:30.090
That's what you will see.

06:30.090 --> 06:31.090
Let's see it again.

06:31.090 --> 06:34.840
Okay. That's... Let's put the instructions.

06:34.840 --> 06:38.110
And then you go to clock table

06:38.110 --> 06:40.490
to generate the clock table for the client.

06:40.490 --> 06:42.342
Okay. So clock table...

06:42.342 --> 06:44.335
This is only for your reference, 

06:44.335 --> 06:45.484
not going to be exported.

06:45.484 --> 06:50.586
Here we get a clock table. All right. 

06:50.586 --> 06:53.150
So with this, you get the clock table.

06:53.150 --> 06:55.670
Okay. Now go into the items part.

06:55.670 --> 06:59.810
You will see two Python blocks,

06:59.810 --> 07:01.500
which is what the next instruction says.

07:01.500 --> 07:03.526
Go into the python block 

07:03.526 --> 07:06.180
and do Control-c c (C-c c).

07:06.180 --> 07:09.860
Go to the control python source block,

07:09.860 --> 07:12.413
second one, and do Ctrl-c c... 

07:12.413 --> 07:14.490
Ctrl-c Ctrl-c (C-c C-c) rather.

07:14.490 --> 07:16.028
and then finally come back 

07:16.028 --> 07:18.765
to Raise Invoice and do dispatcher 

07:18.765 --> 07:21.270
which is exported into PDF.

07:21.270 --> 07:22.718
Okay, let's do that. 

07:22.718 --> 07:27.853
First one is... I just run this code, 

07:27.853 --> 07:30.950
and it generated this table for me.

07:30.950 --> 07:34.160
Okay. So it has all the details.

07:34.160 --> 07:35.253
Now we go in 

07:35.253 --> 07:39.560
the second source code block,

07:39.560 --> 07:41.700
and does all this...

07:41.700 --> 07:43.530
And it has generated this stuff.

07:43.530 --> 07:46.335
Plus, you should note that for beancount, 

07:46.335 --> 07:50.795
it has also generated the block for that.

07:50.795 --> 07:51.775
It's all in the code. 

07:51.775 --> 07:53.820
You can customize it if you're on Ledger.

07:53.820 --> 07:54.782
You can customize it 

07:54.782 --> 07:55.390
to the way you want, 

07:55.390 --> 07:56.978
any accounts that you want to change. 

07:56.978 --> 07:58.870
It's all customizable. 

07:58.870 --> 08:00.710
Here, even the currency symbols

08:00.710 --> 08:02.840
can be changed from INR and Rupees

08:02.840 --> 08:04.681
to whatever currency you have

08:04.681 --> 08:07.190
can be changed accordingly.

08:07.190 --> 08:11.304
I have org-babel-tangle-append code 

08:11.304 --> 08:12.650
that I will share in the...

08:12.650 --> 08:13.872
I've borrowed it 

08:13.872 --> 08:14.889
from somebody on the Internet,

08:14.889 --> 08:16.440
so I'll share that as well 

08:16.440 --> 08:18.650
in my GitHub repo.

08:18.650 --> 08:20.830
Lastly, I just want to share that

08:20.830 --> 08:23.730
you can fill your GST website

08:23.730 --> 08:24.988
with these info, 

08:24.988 --> 08:26.171
so you can... You can even put in 

08:26.171 --> 08:27.590
as many entries as you want 

08:27.590 --> 08:29.370
in your yasnippet.

08:29.370 --> 08:30.560
Customize it the way you want.

08:30.560 --> 08:32.590
I also added a month later 

08:32.590 --> 08:33.820
due date reminder,

08:33.820 --> 08:36.239
saying if the invoice is paid or not.

08:36.239 --> 08:37.209
Okay.

08:37.209 --> 08:42.051
So, a few tips to end this demo. 

08:42.051 --> 08:44.990
You can customize currency symbol 

08:44.990 --> 08:45.860
and currency words

08:45.860 --> 08:47.540
according to your own currency.

08:47.540 --> 08:51.269
I use the European/Indian date format

08:51.269 --> 08:54.980
which is %d-%m-%Y. You can also...

08:54.980 --> 08:56.816
The language is Indian English, 

08:56.816 --> 08:57.998
so it will change according--

08:57.998 --> 08:59.860
the numerals change according to the

08:59.860 --> 09:02.180
Indian format. Numbering format

09:02.180 --> 09:04.959
for invoice number is today's date

09:04.959 --> 09:06.620
followed by client name.

09:06.620 --> 09:07.959
That's my default.

09:07.959 --> 09:11.120
You can customize that as well.

09:11.120 --> 09:13.574
Let's try and export this 

09:13.574 --> 09:17.325
to the subtree. Ctrl-s. 

09:17.325 --> 09:20.579
So that's step number seven.

09:20.579 --> 09:22.029
And there it is,

09:22.029 --> 09:23.339
the tax invoice 

09:23.339 --> 09:25.870
for Dr. Wile E. Coyote,

09:25.870 --> 09:27.810
and with a lovely signature as well.

09:27.810 --> 09:29.990
[Interviewer:] Well, that's great!

09:29.990 --> 09:34.309
If I were to try this out, what do I do?

09:34.309 --> 09:36.779
Go to github.com, into my repository.

09:36.779 --> 09:38.915
I'll leave my GitHub URL. 

09:38.915 --> 09:42.790
You can download it use it,

09:42.790 --> 09:43.848
and let me know 

09:43.848 --> 09:46.829
how it pans out for you.

09:46.829 --> 09:47.632
[Interviewer:] I have spent

00:09:47.632 --> 00:09:49.018
so much time on this.

00:09:49.018 --> 00:09:50.060
May I invoice you?