diff --git a/Marco.Pms.Services/Controllers/ExpenseController.cs b/Marco.Pms.Services/Controllers/ExpenseController.cs index 4a24160..c3196a0 100644 --- a/Marco.Pms.Services/Controllers/ExpenseController.cs +++ b/Marco.Pms.Services/Controllers/ExpenseController.cs @@ -237,7 +237,7 @@ namespace Marco.Pms.Services.Controllers var response = await _expensesService.CreateRecurringPaymentAsync(model, loggedInEmployee, tenantId); if (response.Success) { - var notification = new { LoggedInUserId = loggedInEmployee.Id, Keyword = "Payment_Request", Response = response.Data }; + var notification = new { LoggedInUserId = loggedInEmployee.Id, Keyword = "Recurring_Payment", Response = response.Data }; await _signalR.SendNotificationAsync(notification); } return StatusCode(response.StatusCode, response); @@ -249,7 +249,11 @@ namespace Marco.Pms.Services.Controllers { var loggedInEmployee = await _userHelper.GetCurrentEmployeeAsync(); var response = await _expensesService.PaymentRequestConversionAsync(model.RecurringTemplateIds, loggedInEmployee, tenantId); - + if (response.Success) + { + var notification = new { LoggedInUserId = loggedInEmployee.Id, Keyword = "Payment_Request", Response = response.Data }; + await _signalR.SendNotificationAsync(notification); + } return StatusCode(response.StatusCode, response); } diff --git a/Marco.Pms.Services/Service/ExpensesService.cs b/Marco.Pms.Services/Service/ExpensesService.cs index 7ba9e9c..539fb07 100644 --- a/Marco.Pms.Services/Service/ExpensesService.cs +++ b/Marco.Pms.Services/Service/ExpensesService.cs @@ -3153,6 +3153,7 @@ namespace Marco.Pms.Services.Service var response = newRecurringPayments.Select(rp => new { RecurringPayment = _mapper.Map(rp), + DueDate = DateTime.UtcNow.AddDays(rp.PaymentBufferDays), Emails = rp.NotifyTo.Split(",", StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries) }).ToList();