Compare commits

..

1 Commits

Author SHA1 Message Date
4e6b02a73b
Lisää README 2024-09-07 21:21:12 +03:00
2 changed files with 2 additions and 8 deletions

View File

@ -20,7 +20,7 @@ seuraavankaltaisella pätkällä:
(branch "main")
(introduction
(make-channel-introduction
"4a4d0add212aab3554689adb7971bc0b0db32d13"
"3c7b52f0bf3615cba85466b139edceef9ae1d6e9"
(openpgp-fingerprint
"A0C9 1947 734F 076F 5F08 E9FF 257D 284A 2A1D 3A32"))))
```

View File

@ -36,16 +36,10 @@ instance ToNamedRecord Kululasku where
toNamedRecord Kululasku {..} = namedRecord
[ referenceField .= referenceNumber
, submitterField .= submitter
-- Kitsas reads this as money to our bank account and kululaskut.fi
-- reports what we need to pay. Negating it makes them understand each other
, amountField .= negateBS amount
, amountField .= amount
, descriptionField .= description
, dateField .= paymentDate
]
where negateBS bs = case BS.head bs of
-- 45 is the - character in ASCII/UTF-8
45 -> BS.tail bs
_ -> BS.cons 45 bs
instance DefaultOrdered Kululasku where
headerOrder _ = header [dateField, referenceField, submitterField, amountField, descriptionField]