using ERPCore.Domain.Enums;

namespace ERPCore.Domain.Entities;

public class SalesSlipLine
{
    public int SalesSlipLineId { get; set; }

    public int SalesSlipId { get; set; }
    public SalesSlip? SalesSlip { get; set; }

    public int ItemId { get; set; }
    public Item? Item { get; set; }

    public string Description { get; set; } = string.Empty;

    public decimal Qty { get; set; }
    public decimal FreeQty { get; set; }
    public int WarehouseId { get; set; }
    public Warehouse? Warehouse { get; set; }

    public decimal UnitPrice { get; set; }
    public decimal BaseCost { get; set; }
    public string PriceSource { get; set; } = string.Empty;
    public SalesDiscountMode DiscountMode { get; set; } = SalesDiscountMode.Percentage;
    public decimal DiscountPct { get; set; }
    public decimal DiscountAmount { get; set; }
    public decimal NetUnitPrice { get; set; }
    public decimal LineTotal { get; set; }
    public decimal TaxPct { get; set; }
    public decimal TaxAmount { get; set; }
    public bool IsFreeIssue { get; set; }
    public int? ParentLineId { get; set; }

    public uint RowVersion { get; set; }
}
