ride reconcilation with driver profile update

This commit is contained in:
Kalana B. Thilakarathna
2026-08-31 12:14:30 +05:30
parent 75b5035354
commit 76ca9f874d
24 changed files with 3912 additions and 112 deletions
+3 -1
View File
@@ -11,7 +11,9 @@ namespace Distribution.Models
public enum RideType { Delivery, Sale }
public enum RideStatus { Draft, Open, Active, CancelRequested, Cancelled, Closed }
public enum RideStatus { Draft, Open, Active, PendingClose, CancelRequested, Cancelled, Closed }
public enum VarianceStatus { Pending, Approved, Rejected }
public enum CancelRequestType { VehicleBreakdown, DriverUnavailable, RouteIssue, Other }
+21
View File
@@ -0,0 +1,21 @@
using System.ComponentModel.DataAnnotations.Schema;
namespace Distribution.Models
{
public class RideCloseSummary : Template
{
public Guid FK_RideId { get; set; }
[ForeignKey("FK_RideId")]
public DeliveryRun Ride { get; set; }
public decimal ExpectedCash { get; set; }
public decimal ActualCash { get; set; }
public decimal CashVariance { get; set; }
public Guid FK_ClosedByUserId { get; set; }
[ForeignKey("FK_ClosedByUserId")]
public User ClosedByUser { get; set; }
public DateTime ClosedAt { get; set; }
}
}
+17
View File
@@ -0,0 +1,17 @@
using System.ComponentModel.DataAnnotations.Schema;
namespace Distribution.Models
{
public class RideItemCount : Template
{
public Guid FK_RideId { get; set; }
[ForeignKey("FK_RideId")]
public DeliveryRun Ride { get; set; }
public Guid FK_ItemId { get; set; }
[ForeignKey("FK_ItemId")]
public Item Item { get; set; }
public decimal PhysicalQuantity { get; set; }
}
}
+30
View File
@@ -0,0 +1,30 @@
using System.ComponentModel.DataAnnotations.Schema;
namespace Distribution.Models
{
public class RideVariance : Template
{
public Guid FK_RideId { get; set; }
[ForeignKey("FK_RideId")]
public DeliveryRun Ride { get; set; }
public Guid? FK_ItemId { get; set; }
[ForeignKey("FK_ItemId")]
public Item? Item { get; set; }
public bool IsCash { get; set; }
public decimal ExpectedQuantity { get; set; }
public decimal ActualQuantity { get; set; }
public decimal VarianceQuantity { get; set; }
public string? ReasonCode { get; set; }
public VarianceStatus Status { get; set; } = VarianceStatus.Pending;
public Guid? FK_ResolvedByUserId { get; set; }
[ForeignKey("FK_ResolvedByUserId")]
public User? ResolvedBy { get; set; }
public DateTime? ResolvedAt { get; set; }
}
}