diff --git a/Controllers/VehicleController.cs b/Controllers/VehicleController.cs index 9b4e9d7..62bdeb8 100644 --- a/Controllers/VehicleController.cs +++ b/Controllers/VehicleController.cs @@ -927,6 +927,11 @@ namespace CarCareTracker.Controllers { //move files from temp. taxRecord.Files = taxRecord.Files.Select(x => { return new UploadedFiles { Name = x.Name, Location = _fileHelper.MoveFileFromTemp(x.Location, "documents/") }; }).ToList(); + //push back any reminders + if (taxRecord.ReminderRecordId != default) + { + PushbackRecurringReminderRecordWithChecks(taxRecord.ReminderRecordId); + } var result = _taxRecordDataAccess.SaveTaxRecordToVehicle(taxRecord.ToTaxRecord()); return Json(result); } diff --git a/Models/TaxRecord/TaxRecordInput.cs b/Models/TaxRecord/TaxRecordInput.cs index 723623d..4ad9c2f 100644 --- a/Models/TaxRecord/TaxRecordInput.cs +++ b/Models/TaxRecord/TaxRecordInput.cs @@ -4,6 +4,7 @@ { public int Id { get; set; } public int VehicleId { get; set; } + public int ReminderRecordId { get; set; } public string Date { get; set; } = DateTime.Now.ToShortDateString(); public string Description { get; set; } public decimal Cost { get; set; } diff --git a/Views/Vehicle/_TaxRecordModal.cshtml b/Views/Vehicle/_TaxRecordModal.cshtml index 38f4f58..56cec53 100644 --- a/Views/Vehicle/_TaxRecordModal.cshtml +++ b/Views/Vehicle/_TaxRecordModal.cshtml @@ -24,6 +24,14 @@ + @if (isNew) + { +
+
+ @translator.Translate(userLanguage, "Select Reminder") +
+
+ } @@ -107,6 +115,7 @@