Updateed some formatting and bug fixes

Fixed inconsistencies in queries that would result in errors because
the parameters were missing. Updating a guest is an example that had
this issue. After checking parameters should all be supplied where
needed.
This commit is contained in:
雲華
2022-04-17 18:55:38 -04:00
parent 0ce34d9d23
commit 0a5fa3e402
6 changed files with 36 additions and 16 deletions

View File

@@ -15,10 +15,10 @@ namespace Ophelias.Reporting
{
string report = $"ACCOMMODATION BILL - GENERATED ON {DateTime.Now.Date.ToString("yyyy-MM-dd")}\n" +
$"Name: {r.Guest.LastName}, {r.Guest.FirstName}\n" +
$"Arrival Date: {r.StartDate}\n" +
$"Departure Date: {r.EndDate}\n" +
$"Arrival Date: {r.StartDate.Date.ToString("yyyy-MM-dd")}\n" +
$"Departure Date: {r.EndDate.Date.ToString("yyyy-MM-dd")}\n" +
$"Length of Stay: {(int)(r.EndDate.Date - r.StartDate.Date).TotalDays} days\n" +
$"Charged: ${r.Transaction.Owed}\n\n";
$"Charged: ${Math.Round(r.Transaction.Owed, 2)}\n\n";
File.AppendAllText(Path.GetFullPath("AccommodationBills.txt"), report);
}
}