First major version of the project
This finishes the first iteration of the project. Reports have been tested and are functional in terms of writing out and outputting some form of text. There are still a few bugs here and there that are found but ultimately this commit is so testing can begin. Since the changes are too large to individually summarize, here is the generalization: Reports have been integrated into the admin mode. They write out to text files rather than export to say email or a printer as it was not to be considered for this version. The files are appended too and exist in the debug director of the project. I made this easier to find by outputting where the files were output to after running the report. Other changes included some bug fixes, optimizations, and a few bit of automatic cleanup. This may lead to sylistic inconsistencies. Documentation will come in a later commit.
This commit is contained in:
@@ -16,17 +16,17 @@ namespace Ophelias.Models
|
||||
internal Guest(string FirstName, string LastName, string Email, string? CreditCard = null, string? Expiration = null, string? CCV = null)
|
||||
{
|
||||
int Id;
|
||||
using (DatabaseManager Manager = new DatabaseManager())
|
||||
using (Database Manager = new())
|
||||
{
|
||||
using (SQLiteCommand cmd = Manager.con.CreateCommand())
|
||||
{
|
||||
cmd.CommandText = "INSERT INTO guests (Fname, Lname, Email, CreditCard, Expiration, CCV) " +
|
||||
"VALUES (@Fname, @Lname, @Email, @CC, @Expiry, @CCV);";
|
||||
"VALUES (@Fname, @Lname, @Email, @CreditCard, @Expiry, @CCV);";
|
||||
cmd.Parameters.AddWithValue("@Fname", FirstName);
|
||||
cmd.Parameters.AddWithValue("@Lname", LastName);
|
||||
cmd.Parameters.AddWithValue("@Email", Email);
|
||||
cmd.Parameters.AddWithValue("@CreditCard", CreditCard);
|
||||
cmd.Parameters.AddWithValue("@Expiration", Expiration);
|
||||
cmd.Parameters.AddWithValue("@Expiry", Expiration);
|
||||
cmd.Parameters.AddWithValue("@CCV", CCV);
|
||||
cmd.ExecuteNonQuery();
|
||||
}
|
||||
@@ -63,25 +63,40 @@ namespace Ophelias.Models
|
||||
}
|
||||
internal void UpdateGuest(int Id, string? FirstName = null, string? LastName = null, string? Email = null, string? CreditCard = null, string? Expiration = null, string? CCV = null)
|
||||
{
|
||||
using (DatabaseManager Manager = new DatabaseManager())
|
||||
using (Database Manager = new())
|
||||
{
|
||||
using (SQLiteCommand cmd = Manager.con.CreateCommand())
|
||||
{
|
||||
cmd.CommandText = QueryBuilder.UpdateGuest(Id, FirstName, LastName, Email, CreditCard, Expiration, CCV);
|
||||
cmd.ExecuteNonQuery();
|
||||
}
|
||||
using SQLiteCommand cmd = Manager.con.CreateCommand();
|
||||
cmd.CommandText = QueryBuilder.UpdateGuest(Id, FirstName, LastName, Email, CreditCard, Expiration, CCV);
|
||||
cmd.ExecuteNonQuery();
|
||||
}
|
||||
if (FirstName != null)
|
||||
{
|
||||
this.FirstName = FirstName;
|
||||
}
|
||||
|
||||
if (LastName != null)
|
||||
{
|
||||
this.LastName = LastName;
|
||||
if (FirstName != null)
|
||||
}
|
||||
|
||||
if (Email != null)
|
||||
{
|
||||
this.Email = Email;
|
||||
this.CreditCard = CreditCard;
|
||||
if (FirstName != null)
|
||||
}
|
||||
|
||||
if (CreditCard != null)
|
||||
{
|
||||
this.CreditCard = CreditCard;
|
||||
}
|
||||
if (Expiration != null)
|
||||
{
|
||||
this.Expiration = Expiration;
|
||||
if (FirstName != null)
|
||||
}
|
||||
|
||||
if (CCV != null)
|
||||
{
|
||||
this.CCV = CCV;
|
||||
}
|
||||
}
|
||||
internal void SetCreditCardInformation(string CreditCard, string Expiration, string CCV)
|
||||
{
|
||||
@@ -96,7 +111,7 @@ namespace Ophelias.Models
|
||||
|
||||
internal GuestList()
|
||||
{
|
||||
Guests = new List<Guest>();
|
||||
Guests = new();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace Ophelias.Models
|
||||
|
||||
internal Rates()
|
||||
{
|
||||
BaseRates = new List<BaseRate>();
|
||||
BaseRates = new();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Ophelias.Managers;
|
||||
using Ophelias.Managers;
|
||||
using System.Data.SQLite;
|
||||
|
||||
namespace Ophelias.Models
|
||||
@@ -39,23 +36,27 @@ namespace Ophelias.Models
|
||||
case ReservationType.SixtyDayAdvance: Multiplier = TxFunctions.SixtyDayFee; break;
|
||||
default: throw new NotImplementedException();
|
||||
}
|
||||
double? BaseRate = HotelManager.GetBaseRate();
|
||||
if (BaseRate == null) {
|
||||
double? BaseRate = Hotel.GetBaseRate();
|
||||
if (BaseRate == null)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
Transaction Transaction = new Transaction(
|
||||
Transaction Transaction = new(
|
||||
Rate: (double)BaseRate,
|
||||
Owed: TxFunctions.CalculateOwed((double)BaseRate, (int)(EndDate.Date - StartDate.Date).TotalDays, Multiplier),
|
||||
Multiplier: Multiplier,
|
||||
PayBy: TxFunctions.GetPayByDate(Type, StartDate, EndDate)
|
||||
);
|
||||
using (DatabaseManager Manager = new DatabaseManager())
|
||||
using (Database Manager = new())
|
||||
{
|
||||
using (SQLiteCommand cmd = Manager.con.CreateCommand())
|
||||
{
|
||||
if (RoomNum != null)
|
||||
{
|
||||
this.RoomNum = RoomNum;
|
||||
}
|
||||
|
||||
cmd.CommandText =
|
||||
"INSERT INTO reservations (RoomNum, GuestID, TransactionID, IsNoShow, Type, Status, CreationDate, StartDate, EndDate, CheckIn, CheckOut, DateChanged) " +
|
||||
"VALUES (@RoomNum, @GuestID, @TransactionID, @IsNoShow, @Type, @Status, @CreationDate, @StartDate, @EndDate, @CheckIn, @CheckOut, @DateChanged);";
|
||||
@@ -69,17 +70,31 @@ namespace Ophelias.Models
|
||||
cmd.Parameters.AddWithValue("@StartDate", StartDate.ToString("yyyy-MM-dd"));
|
||||
cmd.Parameters.AddWithValue("@EndDate", EndDate.ToString("yyyy-MM-dd"));
|
||||
if (CheckIn.HasValue)
|
||||
{
|
||||
cmd.Parameters.AddWithValue("@CheckIn", CheckIn.Value.ToString("yyyy-MM-dd"));
|
||||
}
|
||||
else
|
||||
{
|
||||
cmd.Parameters.AddWithValue("@CheckIn", CheckIn);
|
||||
}
|
||||
|
||||
if (CheckOut.HasValue)
|
||||
{
|
||||
cmd.Parameters.AddWithValue("@CheckOut", CheckOut.Value.ToString("yyyy-MM-dd"));
|
||||
}
|
||||
else
|
||||
{
|
||||
cmd.Parameters.AddWithValue("@CheckOut", CheckOut);
|
||||
}
|
||||
|
||||
if (DateChanged.HasValue)
|
||||
{
|
||||
cmd.Parameters.AddWithValue("@DateChanged", DateChanged.Value.ToString("yyyy-MM-dd"));
|
||||
}
|
||||
else
|
||||
{
|
||||
cmd.Parameters.AddWithValue("@DateChanged", DateChanged);
|
||||
}
|
||||
|
||||
cmd.ExecuteNonQuery();
|
||||
}
|
||||
@@ -99,7 +114,7 @@ namespace Ophelias.Models
|
||||
this.CheckOut = CheckOut;
|
||||
this.DateChanged = DateChanged;
|
||||
}
|
||||
internal Reservation(int Id, Guest Guest, Transaction Transaction, ReservationType Type, ReservationStatus Status,
|
||||
internal Reservation(int Id, Guest Guest, Transaction Transaction, ReservationType Type, ReservationStatus Status,
|
||||
DateTime CreationDate, DateTime StartDate, DateTime EndDate, bool IsNoShow = false, DateTime? CheckIn = null, DateTime? CheckOut = null, DateTime? DateChanged = null, int? RoomNum = null)
|
||||
{
|
||||
this.Id = Id;
|
||||
@@ -121,14 +136,16 @@ namespace Ophelias.Models
|
||||
this.StartDate = StartDate;
|
||||
this.EndDate = EndDate;
|
||||
DateChanged = DateTime.Now.Date;
|
||||
using (DatabaseManager Manager = new DatabaseManager())
|
||||
using (Database Manager = new())
|
||||
{
|
||||
using (SQLiteCommand cmd = Manager.con.CreateCommand())
|
||||
{
|
||||
string? query = QueryBuilder.UpdateReservation(Id: Id, Status: ReservationStatus.Changed, StartDate: this.StartDate, EndDate: this.EndDate, DateChanged: DateChanged);
|
||||
|
||||
if (query == null)
|
||||
{
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
cmd.CommandText = query;
|
||||
cmd.Parameters.AddWithValue("@ID", Id);
|
||||
@@ -139,22 +156,27 @@ namespace Ophelias.Models
|
||||
cmd.ExecuteNonQuery();
|
||||
}
|
||||
}
|
||||
double? BaseRate = HotelManager.GetBaseRate();
|
||||
double? BaseRate = Hotel.GetBaseRate();
|
||||
if (BaseRate == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(BaseRate));
|
||||
}
|
||||
|
||||
Transaction.UpdateTransactionFees((double)BaseRate, TxFunctions.Changed, TxFunctions.GetPayByDate(Type, this.StartDate, this.EndDate));
|
||||
}
|
||||
internal void CancelReservation()
|
||||
{
|
||||
DateTime _DateChanged = DateTime.Now.Date;
|
||||
using (DatabaseManager Manager = new DatabaseManager())
|
||||
using (Database Manager = new())
|
||||
{
|
||||
using (SQLiteCommand cmd = Manager.con.CreateCommand())
|
||||
{
|
||||
string? query = QueryBuilder.UpdateReservation(Id: Id, Status: ReservationStatus.Cancelled, DateChanged: _DateChanged);
|
||||
|
||||
if (query == null)
|
||||
{
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
Status = ReservationStatus.Cancelled;
|
||||
DateChanged = _DateChanged;
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Ophelias.Models
|
||||
{
|
||||
internal class @int
|
||||
{
|
||||
internal int Id;
|
||||
internal bool Occupied;
|
||||
|
||||
internal @int(int id)
|
||||
{
|
||||
Id = id;
|
||||
Occupied = false;
|
||||
}
|
||||
}
|
||||
|
||||
internal class RoomList
|
||||
{
|
||||
internal List<@int> Rooms;
|
||||
|
||||
internal RoomList()
|
||||
{
|
||||
Rooms = new List<@int>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,53 +1,58 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Ophelias.Models;
|
||||
using Ophelias.Managers;
|
||||
using Ophelias.Managers;
|
||||
using System.Data.SQLite;
|
||||
|
||||
namespace Ophelias.Models
|
||||
{
|
||||
internal class Transaction
|
||||
{
|
||||
internal int Id { get; set; }
|
||||
internal double Rate { get; set; }
|
||||
internal double Owed { get; set; }
|
||||
internal double Penalty { get; set; }
|
||||
internal double Multiplier { get; set; }
|
||||
internal double RefundAmount { get; set; }
|
||||
internal DateTime PayBy { get; set; }
|
||||
internal DateTime? LastPaid { get; set; } = null;
|
||||
internal DateTime? PaidOn { get; set; } = null;
|
||||
internal int Id;
|
||||
internal double Rate;
|
||||
internal double Owed;
|
||||
internal double Penalty;
|
||||
internal double Multiplier;
|
||||
internal double RefundAmount;
|
||||
internal double AmountPaid;
|
||||
internal DateTime PayBy;
|
||||
internal DateTime? LastPaid = null;
|
||||
internal DateTime? PaidOn = null;
|
||||
|
||||
internal Transaction(double Rate, double Owed,
|
||||
double Multiplier, DateTime PayBy, DateTime? LastPaid = null,
|
||||
DateTime? PaidOn = null, double RefundAmount = 0, double Penalty = 0)
|
||||
DateTime? PaidOn = null, double RefundAmount = 0, double Penalty = 0, double AmountPaid = 0)
|
||||
{
|
||||
int Id;
|
||||
using (DatabaseManager Manager = new DatabaseManager())
|
||||
using (Database Manager = new())
|
||||
{
|
||||
using (SQLiteCommand cmd = Manager.con.CreateCommand())
|
||||
{
|
||||
cmd.CommandText = "INSERT INTO transactions (Rate, Owed, Penalty, Multiplier, RefundAmount, PayBy, LastPaid, PaidOn) " +
|
||||
"VALUES (@Rate, @Owed, @Penalty, @Multiplier, @RefundAmount, @PayBy, @LastPaid, @PaidOn)";
|
||||
cmd.CommandText = "INSERT INTO transactions (Rate, Owed, Penalty, Multiplier, RefundAmount, AmountPaid, PayBy, LastPaid, PaidOn) " +
|
||||
"VALUES (@Rate, @Owed, @Penalty, @Multiplier, @RefundAmount, @AmountPaid, @PayBy, @LastPaid, @PaidOn)";
|
||||
cmd.Parameters.AddWithValue("@Rate", Rate);
|
||||
cmd.Parameters.AddWithValue("@Owed", Owed);
|
||||
cmd.Parameters.AddWithValue("@Multiplier", Multiplier);
|
||||
cmd.Parameters.AddWithValue("@RefundAmount", RefundAmount);
|
||||
cmd.Parameters.AddWithValue("@AmountPaid", AmountPaid);
|
||||
cmd.Parameters.AddWithValue("@Penalty", Penalty);
|
||||
cmd.Parameters.AddWithValue("@PayBy", PayBy.ToString("yyyy-MM-dd"));
|
||||
cmd.Parameters.AddWithValue("@LastPaid", LastPaid);
|
||||
cmd.Parameters.AddWithValue("@PaidOn", PaidOn);
|
||||
if (LastPaid != null)
|
||||
{
|
||||
cmd.Parameters.AddWithValue("@LastPaid", LastPaid.Value.ToString("yyyy-MM-dd"));
|
||||
}
|
||||
else
|
||||
{
|
||||
cmd.Parameters.AddWithValue("@LastPaid", LastPaid);
|
||||
}
|
||||
|
||||
if (PaidOn != null)
|
||||
{
|
||||
cmd.Parameters.AddWithValue("@PaidOn", PaidOn.Value.ToString("yyyy-MM-dd"));
|
||||
}
|
||||
else
|
||||
{
|
||||
cmd.Parameters.AddWithValue("@PaidOn", PaidOn);
|
||||
}
|
||||
|
||||
//cmd.CommandText = QueryBuilder.CreateTransaction(Rate, Owed, Multiplier, PayBy, Refund: RefundAmount, Penalty: Penalty, LastPaid: LastPaid, PaidOn: PaidOn);
|
||||
cmd.ExecuteNonQuery();
|
||||
@@ -60,13 +65,14 @@ namespace Ophelias.Models
|
||||
this.Penalty = Penalty;
|
||||
this.Multiplier = Multiplier;
|
||||
this.RefundAmount = RefundAmount;
|
||||
this.AmountPaid = AmountPaid;
|
||||
this.PayBy = PayBy;
|
||||
this.LastPaid = LastPaid;
|
||||
this.PaidOn = PaidOn;
|
||||
}
|
||||
internal Transaction(int Id, double Rate, double Owed,
|
||||
double Multiplier, DateTime PayBy, DateTime? LastPaid = null,
|
||||
DateTime? PaidOn = null, double RefundAmount = 0, double Penalty = 0)
|
||||
double Multiplier, DateTime PayBy, DateTime? LastPaid = null,
|
||||
DateTime? PaidOn = null, double RefundAmount = 0, double Penalty = 0, double AmountPaid = 0)
|
||||
{
|
||||
this.Id = Id;
|
||||
this.Rate = Rate;
|
||||
@@ -74,6 +80,7 @@ namespace Ophelias.Models
|
||||
this.Penalty = Penalty;
|
||||
this.Multiplier = Multiplier;
|
||||
this.RefundAmount = RefundAmount;
|
||||
this.AmountPaid = AmountPaid;
|
||||
this.PayBy = PayBy;
|
||||
this.LastPaid = LastPaid;
|
||||
this.PaidOn = PaidOn;
|
||||
@@ -84,71 +91,77 @@ namespace Ophelias.Models
|
||||
this.Rate = Rate;
|
||||
this.Multiplier = Multiplier;
|
||||
this.PayBy = PayBy;
|
||||
using (DatabaseManager Manager = new DatabaseManager())
|
||||
using Database Manager = new();
|
||||
using SQLiteCommand cmd = Manager.con.CreateCommand();
|
||||
string? query = QueryBuilder.UpdateTransaction(Id: Id, Rate: this.Rate, Multiplier: this.Multiplier, PayBy: this.PayBy);
|
||||
|
||||
if (query == null)
|
||||
{
|
||||
using (SQLiteCommand cmd = Manager.con.CreateCommand())
|
||||
{
|
||||
string? query = QueryBuilder.UpdateTransaction(Id: Id, Rate: this.Rate, Multiplier: this.Multiplier, PayBy: this.PayBy);
|
||||
|
||||
if (query == null)
|
||||
throw new Exception();
|
||||
|
||||
cmd.CommandText = query;
|
||||
cmd.Parameters.AddWithValue("@ID", Id);
|
||||
cmd.Parameters.AddWithValue("@Rate", this.Rate);
|
||||
cmd.Parameters.AddWithValue("@Multiplier", this.Multiplier);
|
||||
cmd.Parameters.AddWithValue("@PayBy", this.PayBy.ToString("yyyy-MM-dd"));
|
||||
cmd.ExecuteNonQuery();
|
||||
}
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
cmd.CommandText = query;
|
||||
cmd.Parameters.AddWithValue("@ID", Id);
|
||||
cmd.Parameters.AddWithValue("@Rate", this.Rate);
|
||||
cmd.Parameters.AddWithValue("@Multiplier", this.Multiplier);
|
||||
cmd.Parameters.AddWithValue("@PayBy", this.PayBy.ToString("yyyy-MM-dd"));
|
||||
cmd.ExecuteNonQuery();
|
||||
}
|
||||
internal void Pay(double Amount)
|
||||
{
|
||||
if (Amount <= 0)
|
||||
return;
|
||||
LastPaid = DateTime.Now;
|
||||
Owed -= Amount;
|
||||
if (Owed < 0)
|
||||
RefundAmount = Math.Abs(Owed);
|
||||
else if (Owed == 0)
|
||||
PaidOn = DateTime.Now;
|
||||
using (DatabaseManager Manager = new DatabaseManager())
|
||||
{
|
||||
using (SQLiteCommand cmd = Manager.con.CreateCommand())
|
||||
{
|
||||
string? query = QueryBuilder.UpdateTransaction(Id: Id, Owed: Owed, Refund: RefundAmount, LastPaid: LastPaid, PaidOn: PaidOn);
|
||||
|
||||
if (query == null)
|
||||
throw new Exception();
|
||||
|
||||
cmd.CommandText = query;
|
||||
cmd.Parameters.AddWithValue("@ID", Id);
|
||||
cmd.Parameters.AddWithValue("@Owed", Owed);
|
||||
cmd.Parameters.AddWithValue("@RefundAmount", RefundAmount);
|
||||
cmd.Parameters.AddWithValue("@LastPaid", LastPaid);
|
||||
cmd.Parameters.AddWithValue("@PaidOn", PaidOn);
|
||||
cmd.ExecuteNonQuery();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
LastPaid = DateTime.Now;
|
||||
AmountPaid += Amount;
|
||||
if (Owed - AmountPaid < 0)
|
||||
{
|
||||
RefundAmount = Math.Abs(Owed - Amount);
|
||||
}
|
||||
|
||||
if (Owed - AmountPaid <= 0)
|
||||
{
|
||||
PaidOn = DateTime.Now;
|
||||
}
|
||||
|
||||
using Database Manager = new();
|
||||
using SQLiteCommand cmd = Manager.con.CreateCommand();
|
||||
string? query = QueryBuilder.UpdateTransaction(Id: Id, Refund: RefundAmount, AmountPaid: AmountPaid, LastPaid: LastPaid, PaidOn: PaidOn);
|
||||
|
||||
if (query == null)
|
||||
{
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
cmd.CommandText = query;
|
||||
cmd.Parameters.AddWithValue("@ID", Id);
|
||||
cmd.Parameters.AddWithValue("@RefundAmount", RefundAmount);
|
||||
cmd.Parameters.AddWithValue("@AmountPaid", AmountPaid);
|
||||
cmd.Parameters.AddWithValue("@LastPaid", LastPaid.Value.ToString("yyyy-MM-dd"));
|
||||
if(!PaidOn.HasValue)
|
||||
throw new Exception();
|
||||
cmd.Parameters.AddWithValue("@PaidOn", PaidOn.Value.ToString("yyyy-MM-dd"));
|
||||
cmd.ExecuteNonQuery();
|
||||
}
|
||||
internal void Refund()
|
||||
{
|
||||
AmountPaid -= RefundAmount;
|
||||
RefundAmount = 0;
|
||||
using (DatabaseManager Manager = new DatabaseManager())
|
||||
using Database Manager = new();
|
||||
using SQLiteCommand cmd = Manager.con.CreateCommand();
|
||||
string? query = QueryBuilder.UpdateTransaction(Id: Id, Refund: RefundAmount);
|
||||
|
||||
if (query == null)
|
||||
{
|
||||
using (SQLiteCommand cmd = Manager.con.CreateCommand())
|
||||
{
|
||||
string? query = QueryBuilder.UpdateTransaction(Id: Id, Refund: RefundAmount);
|
||||
|
||||
if (query == null)
|
||||
throw new Exception();
|
||||
|
||||
cmd.CommandText = query;
|
||||
cmd.Parameters.AddWithValue("@ID", Id);
|
||||
cmd.Parameters.AddWithValue("@RefundAmount", RefundAmount);
|
||||
cmd.ExecuteNonQuery();
|
||||
}
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
cmd.CommandText = query;
|
||||
cmd.Parameters.AddWithValue("@ID", Id);
|
||||
cmd.Parameters.AddWithValue("@RefundAmount", RefundAmount);
|
||||
cmd.ExecuteNonQuery();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -161,9 +174,12 @@ namespace Ophelias.Models
|
||||
internal static double IncentiveFee(DateTime Start, DateTime End)
|
||||
{
|
||||
int thirtyDayOcc;
|
||||
(thirtyDayOcc, _) = HotelManager.AvgOccupancySpan(Start, End);
|
||||
(thirtyDayOcc, _) = Hotel.AvgOccupancySpan(Start, End);
|
||||
if ((double)(thirtyDayOcc / 45.0) <= 0.6)
|
||||
{
|
||||
return 0.80;
|
||||
}
|
||||
|
||||
return 1.0;
|
||||
}
|
||||
internal static DateTime GetPayByDate(ReservationType Type, DateTime StartDate, DateTime EndDate)
|
||||
@@ -179,7 +195,7 @@ namespace Ophelias.Models
|
||||
}
|
||||
internal static double CalculateOwed(double Rate, int Days, double Multiplier)
|
||||
{
|
||||
return Rate * Days * Multiplier;
|
||||
return Math.Round(Rate * Days * Multiplier);
|
||||
}
|
||||
|
||||
|
||||
@@ -190,7 +206,7 @@ namespace Ophelias.Models
|
||||
|
||||
internal TransactionList()
|
||||
{
|
||||
Transactions = new List<Transaction>();
|
||||
Transactions = new();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user