TRS-ZS-574 交易确认书对接OA自动提交审批

This commit is contained in:
shangzhongyuan
2025-07-25 13:40:56 +08:00
parent 75793f9f4f
commit d9fff3e9b8
32 changed files with 730 additions and 126 deletions
@@ -262,12 +262,14 @@ namespace YLErp.Modules.UnderlyingModule
int totalMonths = (sourceDate.Value.Year - calcDate.Value.Year) * 12
+ (sourceDate.Value.Month - calcDate.Value.Month);
if (sourceDate.Value.Day < calcDate.Value.Day)
double fractionalMonth = 0;
if (sourceDate.Value.Day != calcDate.Value.Day)
{
totalMonths--;
int daysInMonth = DateTime.DaysInMonth(sourceDate.Value.Year, sourceDate.Value.Month);
fractionalMonth = (sourceDate.Value.Day - calcDate.Value.Day) / (double)daysInMonth;
}
double yearTerm = totalMonths / 12.0;
double yearTerm = (totalMonths + fractionalMonth) / 12.0;
return yearTerm;
}
/// <summary>