1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
|
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?
|