|
@@ -68,7 +68,7 @@ namespace EVCB_OCPP.WSServer.Message
|
|
|
static private ILogger logger = NLog.LogManager.GetCurrentClassLogger();
|
|
|
string webConnectionString = ConfigurationManager.ConnectionStrings["WebDBContext"].ConnectionString;
|
|
|
private OuterHttpClient httpClient = new OuterHttpClient();
|
|
|
-
|
|
|
+
|
|
|
async internal Task<MessageResult> ExecuteCoreRequest(Actions action, ClientData session, IRequest request)
|
|
|
{
|
|
|
Stopwatch watch = new Stopwatch();
|
|
@@ -574,7 +574,7 @@ namespace EVCB_OCPP.WSServer.Message
|
|
|
_idTagInfo = new IdTagInfo() { expiryDate = DateTime.UtcNow.AddDays(1), status = AuthorizationStatus.Accepted };
|
|
|
}
|
|
|
try
|
|
|
- {
|
|
|
+ {
|
|
|
using (var db = new MainDBContext())
|
|
|
{
|
|
|
var transaction = db.TransactionRecord.Where(x => x.Id == _request.transactionId
|
|
@@ -1022,8 +1022,8 @@ namespace EVCB_OCPP.WSServer.Message
|
|
|
chargingCost = confirmbill.Count > 0 ? confirmbill.Sum(x => x.Total) : chargingCost;
|
|
|
receipt += string.Format("|Total Energy Fee : ${0}", chargingCost);
|
|
|
|
|
|
- receipt += string.Format("|Parking Fee: | {0} - {1} @ ${2}/hr= ${3}", feedto.StartTime.ToString("hh:mm tt", new CultureInfo("en-us")),
|
|
|
- feedto.StopTime.ToString("hh:mm tt", new CultureInfo("en-us")), parkingFee, parkingCost);
|
|
|
+ receipt += string.Format("|Parking Fee: | {0} - {1}: | {2} @ ${3}/hr= ${4}", feedto.StartTime.ToString("hh:mm tt", new CultureInfo("en-us")),
|
|
|
+ feedto.StopTime.ToString("hh:mm tt", new CultureInfo("en-us")), (totalHours / 1 >= 1) ? string.Format("{0} hours {1} minutes", (int)totalHours / 1, ((totalHours % 1) * 60).ToString("0.0")) : string.Format("{0} minutes", ((totalHours % 1) * 60).ToString("0.0")), parkingFee, parkingCost);
|
|
|
receipt += string.Format("|Stop Reason: {0}", tx.StopReason);
|
|
|
|
|
|
tx.Cost = chargingCost + parkingCost;
|