refactorise la génération de la facture au format Pdf, presente la facture aquittée.

This commit is contained in:
2017-07-08 03:23:21 +02:00
parent 4268b6d7af
commit 6bab04c143
9 changed files with 41 additions and 30 deletions

View File

@ -78,6 +78,19 @@ namespace Yavsc.Models.Billing
public virtual Activity Context  { get; set ; }
public abstract System.Collections.Generic.List<IBillItem> GetBillItems();
public bool GetIsAcquitted()
{
return Regularisation?.IsOk() ?? false;
}
public string GetFileBaseName()
{
string type = GetType().Name;
string ack = GetIsAcquitted() ? "-ack" : null;
return $"facture-{ActivityCode}-{type}-{Id}{ack}";
}
public string PaymentId { get; set; }
[ForeignKey("PaymentId"), Display(Name = "Acquittement de la facture")]