InvoiceLineStore.cs 966 B

1234567891011121314151617181920212223242526272829
  1. using System;
  2. using Comal.Classes;
  3. namespace Comal.Stores
  4. {
  5. internal class InvoiceLineStore : BaseStore<InvoiceLine>
  6. {
  7. protected override void BeforeSave(InvoiceLine entity)
  8. {
  9. base.BeforeSave(entity);
  10. //UpdateAggregate<Invoice>(entity, entity.InvoiceLink,
  11. // Sum<Invoice>(il => il.ExTax, i => i.ExTax),
  12. // Sum<Invoice>(il => il.Tax, i => i.Tax),
  13. // Sum<Invoice>(il => il.IncTax, i => i.IncTax)
  14. //);
  15. }
  16. protected override void BeforeDelete(InvoiceLine entity)
  17. {
  18. base.BeforeDelete(entity);
  19. entity.InvoiceLink.ID = Guid.Empty;
  20. //UpdateAggregate<Invoice>(entity, entity.InvoiceLink,
  21. // Sum<Invoice>(il => il.ExTax, i => i.ExTax),
  22. // Sum<Invoice>(il => il.Tax, i => i.Tax),
  23. // Sum<Invoice>(il => il.IncTax, i => i.IncTax)
  24. //);
  25. }
  26. }
  27. }