You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

137 lines
3.3 KiB

2 years ago
  1. using System;
  2. namespace EasyBL
  3. {
  4. public class ProfitInfo
  5. {
  6. #region BasicInfo
  7. /// <summary>
  8. /// Guid
  9. /// </summary>
  10. public string Guid { get; set; }
  11. /// <summary>
  12. /// 帳單號碼
  13. /// </summary>
  14. public string BillNO { get; set; }
  15. /// <summary>
  16. /// 展覽簡稱
  17. /// </summary>
  18. public string ExhibitionName { get; set; }
  19. /// <summary>
  20. /// 客戶簡稱
  21. /// </summary>
  22. public string CustomerName { get; set; }
  23. /// <summary>
  24. /// 業務員
  25. /// </summary>
  26. public string MemberID { get; set; }
  27. #endregion
  28. #region 帳款部分
  29. /// <summary>
  30. /// 收入(A)[帳單:未稅金額欄位]
  31. /// </summary>
  32. public decimal BillUntaxAmt { get; set; }
  33. /// <summary>
  34. /// (權重)實際成本(B):一筆帳單實際成本=(整票貨總成本/整票貨CBM)*單家廠商CBM
  35. /// </summary>
  36. public decimal SharedActualCost { get; set; }
  37. /// <summary>
  38. /// 毛利(C) = A-B
  39. /// </summary>
  40. public decimal GrossProfit
  41. {
  42. get
  43. {
  44. return BillUntaxAmt - Math.Abs(SharedActualCost);
  45. }
  46. }
  47. /// <summary>
  48. /// 毛利率(C)/(A)
  49. /// </summary>
  50. public decimal GrossProfitPercent
  51. {
  52. get
  53. {
  54. if (BillUntaxAmt == 0)
  55. return 0;
  56. return GrossProfit / BillUntaxAmt;
  57. }
  58. }
  59. /// <summary>
  60. /// 帳單代墊款D:bill項目(TE188,TG188)
  61. /// </summary>
  62. public decimal BillReimburseAmount { get; set; }
  63. /// <summary>
  64. /// 實際代墊款E:成本裡面的99-12、99-16等
  65. /// </summary>
  66. public decimal ActualBillReimburseAmount { get; set; }
  67. /// <summary>
  68. /// 淨收入(F) =(A)-(D)
  69. /// </summary>
  70. public decimal NetIncome
  71. {
  72. get
  73. {
  74. return (BillUntaxAmt - Math.Abs(BillReimburseAmount));
  75. }
  76. }
  77. /// <summary>
  78. /// 淨成本(G) =(B)-(E)
  79. /// </summary>
  80. public decimal NetCost
  81. {
  82. get
  83. {
  84. return (SharedActualCost - Math.Abs(ActualBillReimburseAmount));
  85. }
  86. }
  87. /// <summary>
  88. /// 淨毛利(F)= F-G or [(A-D)]-[(B)-(E)]
  89. /// </summary>
  90. public decimal NetProfit
  91. {
  92. get
  93. {
  94. return NetIncome - Math.Abs(NetCost);
  95. }
  96. }
  97. /// <summary>
  98. /// 淨毛利率 (H)/(F)
  99. /// </summary>
  100. public decimal NetProfitPercent
  101. {
  102. get
  103. {
  104. if (NetIncome == 0)
  105. return 0;
  106. return NetProfit / NetIncome;
  107. }
  108. }
  109. /// <summary>
  110. /// 公斤
  111. /// </summary>
  112. public decimal Weight { set; get; }
  113. /// <summary>
  114. /// 單位CBM
  115. /// </summary>
  116. public decimal Volume { set; get; }
  117. public long OrderValue { set; get; }
  118. /// <summary>
  119. /// 各種值
  120. /// </summary>
  121. public object ExField { set; get; }
  122. #endregion
  123. }
  124. }