set buyer email in get invoice to refund email if not set (#1023)

closes #973 fixes #941
This commit is contained in:
Andrew Camilleri
2019-09-20 12:15:07 +02:00
committed by Nicolas Dorier
parent edfdae744f
commit 5b73f22eb4

View File

@@ -475,6 +475,11 @@ retry:
{
entity.Events = invoice.Events.OrderBy(c => c.Timestamp).ToList();
}
if (!string.IsNullOrEmpty(entity.RefundMail) && string.IsNullOrEmpty(entity.BuyerInformation.BuyerEmail))
{
entity.BuyerInformation.BuyerEmail = entity.RefundMail;
}
return entity;
}