]> Git — Sourcephile - tmp/julm/literate-invoice.git/blob - tests/Tests/Invoice.hs
feat(invoice): add what I need
[tmp/julm/literate-invoice.git] / tests / Tests / Invoice.hs
1 {-# LANGUAGE OverloadedLists #-}
2 {-# LANGUAGE OverloadedStrings #-}
3
4 module Tests.Invoice where
5
6 import Data.List qualified as List
7 import Data.Map.Strict qualified as Map
8 import Data.Text.Lazy qualified as Text.Lazy
9 import Data.Time.Clock qualified as Time
10 import Data.Time.LocalTime qualified as Time
11 import Literate.Accounting.Math
12 import Literate.Document qualified as Doc
13 import Literate.Document.HTML qualified as HTML
14 import Literate.Invoice.HTML qualified as HTML
15 import Literate.Invoice.Invoice
16 import Literate.Prelude
17 import Test.Syd
18 import Tests.Organization qualified
19 import Tests.Utils.Tests
20 import Text.Blaze.Renderer.Text qualified as Blaze.Text
21 import Text.Blaze.Renderer.Utf8 qualified as Blaze
22 import Prelude (undefined, (*))
23
24 spec :: HasCallStack => Spec
25 spec =
26 -- aroundAll readDicts do
27 describe "Invoice" do
28 forM_ (invoices & Map.toList) \(invId, inv) -> do
29 let idS = invId & Doc.toInline & HTML.toHtml & Blaze.Text.renderMarkup & Text.Lazy.unpack
30 outPath <- goldenPath idS "html"
31 it idS do
32 goldenByteStringBuilderFile outPath do
33 HTML.htmlIO (invId, inv) <&> Blaze.renderMarkupBuilder
34
35 ngipkgsLog :: [InvoiceLog]
36 ngipkgsLog =
37 [ InvoiceLog
38 { invoiceLogDate = "2025-11-06"
39 , invoiceLogDuration = 0.5
40 , invoiceLogAction = ["organization"]
41 , invoiceLogScope = ["NGIpkgs"]
42 , invoiceLogReferences = ["https://meet.google.com/hii-druc-tjp"]
43 , invoiceLogDescription = "first meeting"
44 }
45 , InvoiceLog
46 { invoiceLogDate = "2025-11-06"
47 , invoiceLogDuration = 4
48 , invoiceLogAction = ["development"]
49 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
50 , invoiceLogReferences = ["https://github.com/ju1m/bonfire-app/commits/nix"]
51 , invoiceLogDescription = "focus on the hardest part first"
52 }
53 , InvoiceLog
54 { invoiceLogDate = "2025-11-07"
55 , invoiceLogDuration = 8
56 , invoiceLogAction = ["development"]
57 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
58 , invoiceLogReferences = ["https://github.com/ju1m/bonfire-app/commits/nix"]
59 , invoiceLogDescription = "continuing to package Bonfire deps"
60 }
61 , InvoiceLog
62 { invoiceLogDate = "2025-11-08"
63 , invoiceLogDuration = 0.1
64 , invoiceLogAction = ["development"]
65 , invoiceLogScope = ["Nixpkgs", "opencv"]
66 , invoiceLogReferences = ["https://github.com/NixOS/nixpkgs/pull/459592"]
67 , invoiceLogDescription = "fix opencv in nixpkgs"
68 }
69 , InvoiceLog
70 { invoiceLogDate = "2025-11-09"
71 , invoiceLogDuration = 8
72 , invoiceLogAction = ["development"]
73 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
74 , invoiceLogReferences = ["https://github.com/ju1m/bonfire-app/commits/nix"]
75 , invoiceLogDescription = "continue to fix deps"
76 }
77 , InvoiceLog
78 { invoiceLogDate = "2025-11-09"
79 , invoiceLogDuration = 4
80 , invoiceLogAction = ["development"]
81 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
82 , invoiceLogReferences = ["https://github.com/ju1m/bonfire-app/commits/nix"]
83 , invoiceLogDescription = "continue to fix deps"
84 }
85 , InvoiceLog
86 { invoiceLogDate = "2025-11-11"
87 , invoiceLogDuration = 6
88 , invoiceLogAction = ["development"]
89 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
90 , invoiceLogReferences = ["https://github.com/ju1m/bonfire-app/commits/nix"]
91 , invoiceLogDescription = "continue to fix deps"
92 }
93 , InvoiceLog
94 { invoiceLogDate = "2025-11-12"
95 , invoiceLogDuration = 4
96 , invoiceLogAction = ["development"]
97 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
98 , invoiceLogReferences = ["https://github.com/ju1m/bonfire-app/commits/nix"]
99 , invoiceLogDescription = "continue to fix deps"
100 }
101 , InvoiceLog
102 { invoiceLogDate = "2025-11-14"
103 , invoiceLogDuration = 5
104 , invoiceLogAction = ["development"]
105 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
106 , invoiceLogReferences = ["https://github.com/ngi-nix/ngipkgs/pull/1812"]
107 , invoiceLogDescription = "continue to fix deps and move into ngipkgs"
108 }
109 , InvoiceLog
110 { invoiceLogDate = "2025-11-14"
111 , invoiceLogDuration = 1
112 , invoiceLogAction = ["organization"]
113 , invoiceLogScope = ["NGIpkgs"]
114 , invoiceLogReferences = ["https://www.notion.so/nixos-foundation/Nix-NGI-weekly-review-34-2ab59d49e1be80939503c655b009e934"]
115 , invoiceLogDescription = "weekly meeting"
116 }
117 , InvoiceLog
118 { invoiceLogDate = "2025-11-15"
119 , invoiceLogDuration = 6
120 , invoiceLogAction = ["development"]
121 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
122 , invoiceLogReferences = []
123 , invoiceLogDescription = "finish to build Bonfire and start to fix runtime bugs"
124 }
125 , InvoiceLog
126 { invoiceLogDate = "2025-11-16"
127 , invoiceLogDuration = 4
128 , invoiceLogAction = ["development"]
129 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
130 , invoiceLogReferences = ["https://github.com/ngi-nix/ngipkgs/pull/1812#issuecomment-3537609170"]
131 , invoiceLogDescription = "workaround and contribute upstream"
132 }
133 , InvoiceLog
134 { invoiceLogDate = "2025-11-17"
135 , invoiceLogDuration = 8
136 , invoiceLogAction = ["development"]
137 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
138 , invoiceLogReferences = []
139 , invoiceLogDescription = "add updateScript and fix opencv"
140 }
141 , InvoiceLog
142 { invoiceLogDate = "2025-11-19"
143 , invoiceLogDuration = 8
144 , invoiceLogAction = ["development"]
145 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
146 , invoiceLogReferences = ["https://github.com/ngi-nix/ngipkgs/pull/1812#issuecomment-3554376221"]
147 , invoiceLogDescription = "continue to fix startup crashes"
148 }
149 , InvoiceLog
150 { invoiceLogDate = "2025-11-21"
151 , invoiceLogDuration = 4
152 , invoiceLogAction = ["development"]
153 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
154 , invoiceLogReferences = []
155 , invoiceLogDescription = "begin to package yarn assets. Upstream likes convoluted code and fake libraries."
156 }
157 , InvoiceLog
158 { invoiceLogDate = "2025-11-21"
159 , invoiceLogDuration = 1
160 , invoiceLogAction = ["organization"]
161 , invoiceLogScope = ["NGIpkgs"]
162 , invoiceLogReferences = []
163 , invoiceLogDescription = "weekly meeting"
164 }
165 , InvoiceLog
166 { invoiceLogDate = "2025-11-21"
167 , invoiceLogDuration = 4
168 , invoiceLogAction = ["development"]
169 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
170 , invoiceLogReferences = []
171 , invoiceLogDescription = "continue to package assets"
172 }
173 , InvoiceLog
174 { invoiceLogDate = "2025-11-23"
175 , invoiceLogDuration = 4
176 , invoiceLogAction = ["development"]
177 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
178 , invoiceLogReferences = []
179 , invoiceLogDescription = "continue to package assets and try to get Bonfire to work"
180 }
181 , InvoiceLog
182 { invoiceLogDate = "2025-11-24"
183 , invoiceLogDuration = 10
184 , invoiceLogAction = ["development"]
185 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
186 , invoiceLogReferences = ["https://github.com/surface-ui/surface/issues/762#issuecomment-3577030748"]
187 , invoiceLogDescription = "continue to solve problems with bonfire packaging"
188 }
189 , InvoiceLog
190 { invoiceLogDate = "2025-11-27"
191 , invoiceLogDuration = 8
192 , invoiceLogAction = ["development"]
193 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
194 , invoiceLogReferences = ["https://github.com/ngi-nix/ngipkgs/pull/1812#issuecomment-3584319056"]
195 , invoiceLogDescription = "successfully auto-update and build bonfire"
196 }
197 , InvoiceLog
198 { invoiceLogDate = "2025-11-28"
199 , invoiceLogDuration = 1
200 , invoiceLogAction = ["organization"]
201 , invoiceLogScope = ["NGIpkgs"]
202 , invoiceLogReferences = ["https://www.notion.so/nixos-foundation/Nix-NGI-weekly-review-36-2b959d49e1be80fa823cd4d83581fda5#2b959d49e1be80fc85eed38c9a9dca86"]
203 , invoiceLogDescription = "weekly meeting"
204 }
205 , InvoiceLog
206 { invoiceLogDate = "2025-11-29"
207 , invoiceLogDuration = 5
208 , invoiceLogAction = ["development"]
209 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
210 , invoiceLogReferences = []
211 , invoiceLogDescription = "begin the service module"
212 }
213 , InvoiceLog
214 { invoiceLogDate = "2025-12-02"
215 , invoiceLogDuration = 4
216 , invoiceLogAction = ["development"]
217 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
218 , invoiceLogReferences = []
219 , invoiceLogDescription = "continue the service module"
220 }
221 , InvoiceLog
222 { invoiceLogDate = "2025-12-03"
223 , invoiceLogDuration = 8
224 , invoiceLogAction = ["development"]
225 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
226 , invoiceLogReferences = []
227 , invoiceLogDescription = "first working service module"
228 }
229 , InvoiceLog
230 { invoiceLogDate = "2025-12-04"
231 , invoiceLogDuration = 5
232 , invoiceLogAction = ["development"]
233 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
234 , invoiceLogReferences = ["https://github.com/ngi-nix/ngipkgs/pull/1871"]
235 , invoiceLogDescription = "improve service module"
236 }
237 , InvoiceLog
238 { invoiceLogDate = "2025-12-05"
239 , invoiceLogDuration = 1
240 , invoiceLogAction = ["organization"]
241 , invoiceLogScope = ["NGIpkgs"]
242 , invoiceLogReferences = ["https://www.notion.so/nixos-foundation/Nix-NGI-weekly-review-36-2b959d49e1be80fa823cd4d83581fda5"]
243 , invoiceLogDescription = "weekly meeting"
244 }
245 , InvoiceLog
246 { invoiceLogDate = "2025-12-05"
247 , invoiceLogDuration = 0.5
248 , invoiceLogAction = ["documentation"]
249 , invoiceLogScope = ["NGIpkgs", "Manuals"]
250 , invoiceLogReferences = ["https://github.com/ngi-nix/ngipkgs/pull/1954"]
251 , invoiceLogDescription = "meeting"
252 }
253 , InvoiceLog
254 { invoiceLogDate = "2025-12-06"
255 , invoiceLogDuration = 2
256 , invoiceLogAction = ["documentation"]
257 , invoiceLogScope = ["NGIpkgs", "Manuals"]
258 , invoiceLogReferences = []
259 , invoiceLogDescription = "prepare wednesday meeting"
260 }
261 , InvoiceLog
262 { invoiceLogDate = "2025-12-07"
263 , invoiceLogDuration = 4
264 , invoiceLogAction = ["documentation"]
265 , invoiceLogScope = ["NGIpkgs", "Manuals"]
266 , invoiceLogReferences = []
267 , invoiceLogDescription = "prepare demo for wednesday meeting"
268 }
269 , InvoiceLog
270 { invoiceLogDate = "2025-12-08"
271 , invoiceLogDuration = 4
272 , invoiceLogAction = ["documentation"]
273 , invoiceLogScope = ["NGIpkgs", "Manuals"]
274 , invoiceLogReferences = ["https://github.com/ngi-nix/ngipkgs/pull/1891"]
275 , invoiceLogDescription = "prepare demo for wednesday meeting"
276 }
277 , InvoiceLog
278 { invoiceLogDate = "2025-12-09"
279 , invoiceLogDuration = 4
280 , invoiceLogAction = ["documentation"]
281 , invoiceLogScope = ["NGIpkgs", "Manuals"]
282 , invoiceLogReferences = ["https://github.com/ngi-nix/ngipkgs/pull/1891"]
283 , invoiceLogDescription = "continue to document"
284 }
285 , InvoiceLog
286 { invoiceLogDate = "2025-12-10"
287 , invoiceLogDuration = 2
288 , invoiceLogAction = ["review"]
289 , invoiceLogScope = ["NGIpkgs"]
290 , invoiceLogReferences = ["https://www.notion.so/nixos-foundation/Nix-NGI-best-practices-for-NixOS-modules-implementation-2c559d49e1be80a8a499f21abb203d6f"]
291 , invoiceLogDescription = "visio on “best practices”"
292 }
293 , InvoiceLog
294 { invoiceLogDate = "2025-12-12"
295 , invoiceLogDuration = 1
296 , invoiceLogAction = ["organization"]
297 , invoiceLogScope = ["NGIpkgs"]
298 , invoiceLogReferences = []
299 , invoiceLogDescription = "weekly visio meeting"
300 }
301 , InvoiceLog
302 { invoiceLogDate = "2025-12-11"
303 , invoiceLogDuration = 8
304 , invoiceLogAction = ["documentation"]
305 , invoiceLogScope = ["NGIpkgs", "Manuals"]
306 , invoiceLogReferences = []
307 , invoiceLogDescription = "continue to document"
308 }
309 , InvoiceLog
310 { invoiceLogDate = "2025-12-12"
311 , invoiceLogDuration = 4
312 , invoiceLogAction = ["documentation"]
313 , invoiceLogScope = ["NGIpkgs", "Manuals"]
314 , invoiceLogReferences = []
315 , invoiceLogDescription = "continue to document"
316 }
317 , InvoiceLog
318 { invoiceLogDate = "2025-12-13"
319 , invoiceLogDuration = 2
320 , invoiceLogAction = ["documentation"]
321 , invoiceLogScope = ["NGIpkgs", "Manuals"]
322 , invoiceLogReferences = []
323 , invoiceLogDescription =
324 [ "setup sphinx like "
325 , Doc.InlineLink
326 { Doc.inlineLinkTarget = "https://nix.dev"
327 , Doc.inlineLinkText = "nix.dev"
328 }
329 , " for the manuals"
330 ]
331 }
332 , InvoiceLog
333 { invoiceLogDate = "2025-12-13"
334 , invoiceLogDuration = 5
335 , invoiceLogAction = ["development"]
336 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
337 , invoiceLogReferences = ["https://github.com/bonfire-networks/bonfire-app/issues/1670#issuecomment-3650762914"]
338 , invoiceLogDescription = "update to latest; overcoming new bugs introduced by upstream"
339 }
340 , InvoiceLog
341 { invoiceLogDate = "2025-12-15"
342 , invoiceLogDuration = 4
343 , invoiceLogAction = ["development"]
344 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
345 , invoiceLogReferences = []
346 , invoiceLogDescription = "improving the update script and still overcoming upstream bugs"
347 }
348 , InvoiceLog
349 { invoiceLogDate = "2025-12-16"
350 , invoiceLogDuration = 3
351 , invoiceLogAction = ["development"]
352 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
353 , invoiceLogReferences = []
354 , invoiceLogDescription = "overcoming bugs, again"
355 }
356 , InvoiceLog
357 { invoiceLogDate = "2025-12-16"
358 , invoiceLogDuration = 2
359 , invoiceLogAction = ["review"]
360 , invoiceLogScope = ["NGIpkgs"]
361 , invoiceLogReferences = []
362 , invoiceLogDescription = "visio to review PRs"
363 }
364 , InvoiceLog
365 { invoiceLogDate = "2025-12-16"
366 , invoiceLogDuration = 2
367 , invoiceLogAction = ["review"]
368 , invoiceLogScope = ["NGIpkgs"]
369 , invoiceLogReferences = []
370 , invoiceLogDescription = "visio to review PRs"
371 }
372 , InvoiceLog
373 { invoiceLogDate = "2025-12-17"
374 , invoiceLogDuration = 1.5
375 , invoiceLogAction = ["review"]
376 , invoiceLogScope = ["NGIpkgs"]
377 , invoiceLogReferences = []
378 , invoiceLogDescription = "visio to review PRs"
379 }
380 , InvoiceLog
381 { invoiceLogDate = "2025-12-18"
382 , invoiceLogDuration = 1
383 , invoiceLogAction = ["review"]
384 , invoiceLogScope = ["NGIpkgs", "dnsvizor"]
385 , invoiceLogReferences = []
386 , invoiceLogDescription = "review linj’s PR"
387 }
388 , InvoiceLog
389 { invoiceLogDate = "2025-12-19"
390 , invoiceLogDuration = 1.5
391 , invoiceLogAction = ["organization"]
392 , invoiceLogScope = ["NGIpkgs"]
393 , invoiceLogReferences = []
394 , invoiceLogDescription = "weekly meeting"
395 }
396 , InvoiceLog
397 { invoiceLogDate = "2025-12-21"
398 , invoiceLogDuration = 4
399 , invoiceLogAction = ["development"]
400 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
401 , invoiceLogReferences = []
402 , invoiceLogDescription =
403 [ "fix bug using "
404 , "__structuredAttrs" & Doc.InlineCode
405 ]
406 }
407 , InvoiceLog
408 { invoiceLogDate = "2025-12-23"
409 , invoiceLogDuration = 4
410 , invoiceLogAction = ["documentation"]
411 , invoiceLogScope = ["NGIpkgs", "Manuals"]
412 , invoiceLogReferences = []
413 , invoiceLogDescription = "improve building the manuals"
414 }
415 , InvoiceLog
416 { invoiceLogDate = "2025-12-23"
417 , invoiceLogDuration = 2
418 , invoiceLogAction = ["development"]
419 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
420 , invoiceLogReferences = []
421 , invoiceLogDescription = "address reviewers’ concerns"
422 }
423 , InvoiceLog
424 { invoiceLogDate = "2025-12-24"
425 , invoiceLogDuration = 4
426 , invoiceLogAction = ["development"]
427 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
428 , invoiceLogReferences = []
429 , invoiceLogDescription = "update bonfire and report issues upstream"
430 }
431 , InvoiceLog
432 { invoiceLogDate = "2025-12-24"
433 , invoiceLogDuration = 4
434 , invoiceLogAction = ["documentation"]
435 , invoiceLogScope = ["NGIpkgs", "Manuals"]
436 , invoiceLogReferences = []
437 , invoiceLogDescription = "document"
438 }
439 , InvoiceLog
440 { invoiceLogDate = "2025-12-24"
441 , invoiceLogDuration = 2
442 , invoiceLogAction = ["development"]
443 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
444 , invoiceLogReferences = []
445 , invoiceLogDescription = "update bonfire to fix bugs"
446 }
447 , InvoiceLog
448 { invoiceLogDate = "2025-12-25"
449 , invoiceLogDuration = 2
450 , invoiceLogAction = ["documentation"]
451 , invoiceLogScope = ["NGIpkgs", "Manuals"]
452 , invoiceLogReferences = []
453 , invoiceLogDescription = "document"
454 }
455 , InvoiceLog
456 { invoiceLogDate = "2025-12-25"
457 , invoiceLogDuration = 6
458 , invoiceLogAction = ["development"]
459 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
460 , invoiceLogReferences = ["https://github.com/bonfire-networks/bonfire-app/issues/1698#issuecomment-3692147409"]
461 , invoiceLogDescription = "update and fix bugs"
462 }
463 , InvoiceLog
464 { invoiceLogDate = "2025-12-26"
465 , invoiceLogDuration = 1
466 , invoiceLogAction = ["development"]
467 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
468 , invoiceLogReferences = []
469 , invoiceLogDescription = "update to fix bugs"
470 }
471 , InvoiceLog
472 { invoiceLogDate = "2025-12-28"
473 , invoiceLogDuration = 6
474 , invoiceLogAction = ["documentation"]
475 , invoiceLogScope = ["NGIpkgs", "Manuals"]
476 , invoiceLogReferences = []
477 , invoiceLogDescription = "document"
478 }
479 , InvoiceLog
480 { invoiceLogDate = "2025-12-29"
481 , invoiceLogDuration = 2
482 , invoiceLogAction = ["development"]
483 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
484 , invoiceLogReferences = []
485 , invoiceLogDescription = "add more tests"
486 }
487 , InvoiceLog
488 { invoiceLogDate = "2025-12-29"
489 , invoiceLogDuration = 0.5
490 , invoiceLogAction = ["review"]
491 , invoiceLogScope = ["NGIpkgs", "Funkwhale"]
492 , invoiceLogReferences = ["https://github.com/ngi-nix/ngipkgs/pull/1707#discussion_r2651644145"]
493 , invoiceLogDescription = ""
494 }
495 , InvoiceLog
496 { invoiceLogDate = "2025-12-30"
497 , invoiceLogDuration = 4
498 , invoiceLogAction = ["development"]
499 , invoiceLogScope = ["NGIpkgs", "Beam"]
500 , invoiceLogReferences = []
501 , invoiceLogDescription = "improve buildMix & mixRelease"
502 }
503 , InvoiceLog
504 { invoiceLogDate = "2026-01-01"
505 , invoiceLogDuration = 4
506 , invoiceLogAction = ["development"]
507 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
508 , invoiceLogReferences = []
509 , invoiceLogDescription = "support other flavours"
510 }
511 , InvoiceLog
512 { invoiceLogDate = "2026-01-03"
513 , invoiceLogDuration = 2
514 , invoiceLogAction = ["development"]
515 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
516 , invoiceLogReferences = []
517 , invoiceLogDescription = "support other flavours"
518 }
519 , InvoiceLog
520 { invoiceLogDate = "2026-01-04"
521 , invoiceLogDuration = 2
522 , invoiceLogAction = ["development"]
523 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
524 , invoiceLogReferences = []
525 , invoiceLogDescription = "provide upstream with reproducers"
526 }
527 , InvoiceLog
528 { invoiceLogDate = "2026-01-05"
529 , invoiceLogDuration = 2
530 , invoiceLogAction = ["development"]
531 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
532 , invoiceLogReferences = []
533 , invoiceLogDescription = "update to latest version"
534 }
535 , InvoiceLog
536 { invoiceLogDate = "2026-01-07"
537 , invoiceLogDuration = 5
538 , invoiceLogAction = ["development"]
539 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
540 , invoiceLogReferences = []
541 , invoiceLogDescription = "fix updating"
542 }
543 , InvoiceLog
544 { invoiceLogDate = "2026-01-07"
545 , invoiceLogDuration = 1
546 , invoiceLogAction = ["documentation"]
547 , invoiceLogScope = ["NGIpkgs", "Manuals"]
548 , invoiceLogReferences = ["https://github.com/ngi-nix/ngipkgs/pull/1891"]
549 , invoiceLogDescription = "address reviewer’s comment"
550 }
551 , InvoiceLog
552 { invoiceLogDate = "2026-01-09"
553 , invoiceLogDuration = 2
554 , invoiceLogAction = ["documentation"]
555 , invoiceLogScope = ["NGIpkgs", "Manuals"]
556 , invoiceLogReferences = []
557 , invoiceLogDescription = "address reviewer’s comments"
558 }
559 , InvoiceLog
560 { invoiceLogDate = "2026-01-09"
561 , invoiceLogDuration = 2
562 , invoiceLogAction = ["development"]
563 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
564 , invoiceLogReferences = ["https://github.com/bonfire-networks/bonfire-app/issues/1730"]
565 , invoiceLogDescription = "answer upstream’s questions"
566 }
567 , InvoiceLog
568 { invoiceLogDate = "2026-01-11"
569 , invoiceLogDuration = 5
570 , invoiceLogAction = ["development"]
571 , invoiceLogScope = ["NGIpkgs", "dnsvizor"]
572 , invoiceLogReferences = []
573 , invoiceLogDescription = "replace hillingar"
574 }
575 , InvoiceLog
576 { invoiceLogDate = "2026-01-09"
577 , invoiceLogDuration = 2
578 , invoiceLogAction = ["organization"]
579 , invoiceLogScope = ["NGIpkgs"]
580 , invoiceLogReferences = []
581 , invoiceLogDescription = "weekly meeting"
582 }
583 , InvoiceLog
584 { invoiceLogDate = "2026-01-12"
585 , invoiceLogDuration = 5
586 , invoiceLogAction = ["development"]
587 , invoiceLogScope = ["NGIpkgs", "dnsvizor"]
588 , invoiceLogReferences = ["https://github.com/ju1m/ngipkgs/commits/dnsvizor/"]
589 , invoiceLogDescription = "remove IFD"
590 }
591 , InvoiceLog
592 { invoiceLogDate = "2026-01-12"
593 , invoiceLogDuration = 6
594 , invoiceLogAction = ["documentation"]
595 , invoiceLogScope = ["NGIpkgs", "Manuals"]
596 , invoiceLogReferences = []
597 , invoiceLogDescription = "render options"
598 }
599 , InvoiceLog
600 { invoiceLogDate = "2026-01-13"
601 , invoiceLogDuration = 1
602 , invoiceLogAction = ["documentation"]
603 , invoiceLogScope = ["NGIpkgs", "Manuals"]
604 , invoiceLogReferences = []
605 , invoiceLogDescription = "update"
606 }
607 , InvoiceLog
608 { invoiceLogDate = "2026-01-16"
609 , invoiceLogDuration = 2
610 , invoiceLogAction = ["organization"]
611 , invoiceLogScope = ["NGIpkgs"]
612 , invoiceLogReferences = []
613 , invoiceLogDescription = "weekly meeting"
614 }
615 , InvoiceLog
616 { invoiceLogDate = "2026-01-19"
617 , invoiceLogDuration = 2
618 , invoiceLogAction = ["documentation"]
619 , invoiceLogScope = ["NGIpkgs", "Manuals"]
620 , invoiceLogReferences = []
621 , invoiceLogDescription = "split into several PDF"
622 }
623 ]
624
625 invoiceRateNGIpkgs =
626 [ ["organization"] := 31.25
627 , ["development"] := 31.25
628 , ["review"] := 31.25
629 ]
630
631 invoices :: Invoices
632 invoices =
633 traceShowId
634 [ InvoiceId
635 { invoiceIdRecipient = Tests.Organization.nixosFoundationNGITeam
636 , invoiceIdType = InvoiceTypeSale
637 , invoiceIdCount = 1
638 }
639 := let invoiceEmittedOn = "2026-01-22"
640 in invoice
641 { invoiceOrders = ["Contract n°2025-24"]
642 , invoiceEmittedOn
643 , invoicePaymentDueBefore = invoiceEmittedOn & Time.addLocalTime (31 * Time.nominalDay)
644 , invoiceIssuer = Tests.Organization.julmInfo
645 , invoiceRecipient = Tests.Organization.nixosFoundationNGITeam
646 , invoiceRates = invoiceRateNGIpkgs
647 , invoiceMentions =
648 [ InvoiceMentionTVANonApplicable
649 , InvoiceMentionIndemnitéForfaitaire
650 , InvoiceMentionIndemnitéTaux (12.15 :: Amount 100 (UnitName "%"))
651 ]
652 , invoiceLogs =
653 ngipkgsLog
654 & List.filter \inv ->
655 and $
656 list
657 [ inv & invoiceLogDate & (>= "2025-11-06")
658 , inv & invoiceLogDate & (<= "2025-12-22")
659 , inv & invoiceLogScope & (/= ["NGIpkgs", "Manuals"])
660 ]
661 }
662 , InvoiceId
663 { invoiceIdRecipient = Tests.Organization.nixosFoundationNGITeam
664 , invoiceIdType = InvoiceTypeSale
665 , invoiceIdCount = 2
666 }
667 := let invoiceEmittedOn = "2026-01-22"
668 in invoice
669 { invoiceOrders = ["contract n°2026-FixMe"]
670 , invoiceEmittedOn
671 , invoicePaymentDueBefore = invoiceEmittedOn & Time.addLocalTime (31 * Time.nominalDay)
672 , invoiceIssuer = Tests.Organization.julmInfo
673 , invoiceRecipient = Tests.Organization.nixosFoundationNGITeam
674 , invoiceRates = invoiceRateNGIpkgs
675 , invoiceMentions =
676 [ InvoiceMentionTVANonApplicable
677 , InvoiceMentionIndemnitéForfaitaire
678 , InvoiceMentionIndemnitéTaux (12.15 :: Amount 100 (UnitName "%"))
679 ]
680 , invoiceLogs =
681 ngipkgsLog
682 & List.filter \inv ->
683 and $
684 list
685 [ inv & invoiceLogDate & (>= "2025-12-23")
686 , inv & invoiceLogDate & (<= "2026-12-31")
687 , inv & invoiceLogScope & (/= ["NGIpkgs", "Manuals"])
688 ]
689 }
690 ]
691 & Map.fromListWith undefined