leiy před 1 rokem
rodič
revize
ed9ef53a5b

+ 1 - 1
OASystem/OASystem.Api/OAMethodLib/PayrollComputation.cs

@@ -573,7 +573,7 @@ namespace OASystem.API.OAMethodLib
                     }
                 }
 
-                if (ex_reissuecard_Items.Count > 0拿工资)
+                if (ex_reissuecard_Items.Count > 0)
                 {
                     ex_Items_dk.Ex_ItemInfo = ex_reissuecard_Items;
                 }

+ 1 - 1
OASystem/OASystem.Domain/Entities/PersonnelModule/Pm_WageSheet.cs

@@ -89,7 +89,7 @@ namespace OASystem.Domain.Entities.PersonnelModule
         /// 特殊津贴
         /// </summary>
         [SugarColumn(IsNullable = true, ColumnDataType = "decimal(8,2)")]
-        public decimal SpecialAllowance { get; set; }
+        public decimal SpecialAllowance { get; set; } = 0.00M;
 
         /// <summary>
         /// 其他补贴

+ 20 - 0
OASystem/OASystem.Infrastructure/Repositories/PersonnelModule/WageSheetRepository.cs

@@ -105,6 +105,26 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
             pm_WageSheet = _mapper.Map<Pm_WageSheet>(dto);
             pm_WageSheet.LastUpdateUserId = dto.CreateUserId;
 
+            #region 计算工资
+
+            //应发合计
+            decimal salary = pm_WageSheet.Basic + pm_WageSheet.Floats + pm_WageSheet.PostAllowance + pm_WageSheet.GarmentWashSubsidies + pm_WageSheet.CommunicationSubsidies + pm_WageSheet.GroupCost +
+                             pm_WageSheet.TrafficSubsidies + pm_WageSheet.InformationSecurityFee + pm_WageSheet.OperationBonus + pm_WageSheet.SpecialAllowance + pm_WageSheet.OtherSubsidies + 
+                             pm_WageSheet.Mealsupplement;
+            //扣款合计
+            decimal totalDeduction = pm_WageSheet.SickLeave + pm_WageSheet.SomethingFalse + pm_WageSheet.LateTo + pm_WageSheet.LeaveEarly + pm_WageSheet.Absenteeism + pm_WageSheet.NotPunch +
+                pm_WageSheet.OtherDeductions;
+
+            //实发合计 不含个税
+            decimal actualTotal = salary - totalDeduction;
+            pm_WageSheet.Should = salary;
+            pm_WageSheet.TotalDeductions = totalDeduction;
+            pm_WageSheet.TotalRealHair = actualTotal;
+            pm_WageSheet.AfterTax = actualTotal - pm_WageSheet.WithholdingTax;
+
+            #endregion
+
+
             if (dto.Status == 1) //添加
             {
                 var select = await _sqlSugar.Queryable<Pm_WageSheet>().