ActivityCharge.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. using System;
  2. using InABox.Core;
  3. using Newtonsoft.Json.Serialization;
  4. namespace Comal.Classes
  5. {
  6. public class ActivityCharge : EnclosedEntity
  7. {
  8. public ActivityCharge() { }
  9. public ActivityCharge(Func<BaseObject>? entity) : base(entity) { }
  10. [EditorSequence(1)]
  11. [Caption(nameof(Chargeable), IncludePath = false)]
  12. public bool Chargeable { get; set; }
  13. [EditorSequence(2)]
  14. [CurrencyEditor]
  15. [Caption(nameof(FixedCharge), IncludePath = false)]
  16. public double FixedCharge { get; set; }
  17. [EditorSequence(3)]
  18. [CurrencyEditor]
  19. [Caption(nameof(ChargeRate), IncludePath = false)]
  20. public double ChargeRate { get; set; }
  21. [EditorSequence(4)]
  22. [DurationEditor]
  23. [Caption(nameof(ChargePeriod), IncludePath = false)]
  24. public TimeSpan ChargePeriod { get; set; }
  25. [EditorSequence(5)]
  26. [CurrencyEditor()]
  27. [Caption(nameof(MinimumCharge), IncludePath = false)]
  28. public double MinimumCharge { get; set; }
  29. [EditorSequence(6)]
  30. [Caption(nameof(TaxCode), IncludePath = false)]
  31. public TaxCodeLink TaxCode { get; set; }
  32. protected override void Init()
  33. {
  34. base.Init();
  35. TaxCode = new TaxCodeLink(() => LinkedEntity());
  36. }
  37. }
  38. }