diff --git a/src/Laskutin/Email.hs b/src/Laskutin/Email.hs index 9d9fcaf..413f469 100644 --- a/src/Laskutin/Email.hs +++ b/src/Laskutin/Email.hs @@ -41,7 +41,7 @@ sendEmail sendmail email = do renderInvoice :: Bool -> Invoice -> Maybe (Text, Text) 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,) $ (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"))