Lähetä ensimmäiset laskut nollasummallakin
This commit is contained in:
parent
2198931d97
commit
992d0b42b7
|
@ -41,7 +41,7 @@ sendEmail sendmail email = do
|
||||||
|
|
||||||
renderInvoice :: Bool -> Invoice -> Maybe (Text, Text)
|
renderInvoice :: Bool -> Invoice -> Maybe (Text, Text)
|
||||||
renderInvoice isReminder invoice@Invoice {rows, reference, account, recipient, due, subject, message, paid}
|
renderInvoice isReminder invoice@Invoice {rows, reference, account, recipient, due, subject, message, paid}
|
||||||
| invoiceSum invoice <= 0 = Nothing
|
| invoiceSum invoice <= 0 && isReminder = Nothing
|
||||||
| otherwise = Just $ (subjectPrefix <> " – " <> subject,) $
|
| otherwise = Just $ (subjectPrefix <> " – " <> subject,) $
|
||||||
(if isReminder then "Muistutus alla olevan laskun maksamisesta. Jos olet juuri maksanut kyseisen laskun, tämä muistutus on aiheeton.\n\n" else mempty)
|
(if isReminder then "Muistutus alla olevan laskun maksamisesta. Jos olet juuri maksanut kyseisen laskun, tämä muistutus on aiheeton.\n\n" else mempty)
|
||||||
<> (if T.null message then mempty else (message <> "\n\n\n"))
|
<> (if T.null message then mempty else (message <> "\n\n\n"))
|
||||||
|
|
Loading…
Reference in New Issue