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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user