namespace PowderCoating.Core.Enums;

public enum AccountType
{
    Asset = 1,
    Liability = 2,
    Equity = 3,
    Revenue = 4,
    CostOfGoods = 5,
    Expense = 6
}

public enum AccountSubType
{
    // Assets
    Cash = 8,
    Checking = 1,
    Savings = 2,
    AccountsReceivable = 3,
    Inventory = 4,
    FixedAsset = 5,
    OtherCurrentAsset = 6,
    OtherAsset = 7,

    // Liabilities
    AccountsPayable = 10,
    CreditCard = 11,
    OtherCurrentLiability = 12,
    LongTermLiability = 13,

    // Equity
    OwnersEquity = 20,
    RetainedEarnings = 21,

    // Revenue
    Sales = 30,
    ServiceRevenue = 31,
    OtherIncome = 32,

    // Cost of Goods Sold
    CostOfGoodsSold = 40,

    // Expenses
    Advertising = 50,
    SuppliesMaterials = 51,
    Equipment = 52,
    Insurance = 53,
    Payroll = 54,
    ProfessionalFees = 55,
    Rent = 56,
    Utilities = 57,
    Vehicle = 58,
    Travel = 59,
    Meals = 60,
    OfficeSupplies = 61,
    Depreciation = 62,
    BankCharges = 63,
    Other = 99
}

public enum BillStatus
{
    Draft = 0,
    Open = 1,
    PartiallyPaid = 2,
    Paid = 3,
    Voided = 4
}

/// <summary>
/// Company-level accounting method preference. Affects how financial reports
/// (P&amp;L, Balance Sheet, Cash Flow) query and present data. Switching this
/// setting never re-posts historical GL entries — it is a report-time choice only.
/// </summary>
public enum AccountingMethod
{
    /// <summary>Revenue and expenses recognised when cash changes hands.</summary>
    Cash = 0,
    /// <summary>Revenue and expenses recognised when earned/incurred (default).</summary>
    Accrual = 1
}

public enum BankReconciliationStatus
{
    InProgress = 0,
    Completed = 1
}

public enum VendorCreditStatus
{
    Open = 0,
    PartiallyApplied = 1,
    Applied = 2,
    Voided = 3
}

/// <summary>Source document type for a recurring template — controls which entity is created on each fire.</summary>
public enum RecurringTemplateType
{
    /// <summary>Creates a vendor Bill (Draft, pending user review).</summary>
    Bill = 1,
    /// <summary>Creates a direct Expense entry (immediately recorded).</summary>
    Expense = 2
}

/// <summary>How often a recurring template fires.</summary>
public enum RecurringFrequency
{
    Daily = 1,
    Weekly = 2,
    BiWeekly = 3,
    Monthly = 4,
    Quarterly = 5,
    Annually = 6
}

/// <summary>Lifecycle state of a Manual Journal Entry.</summary>
public enum JournalEntryStatus
{
    /// <summary>Not yet posted — can still be edited or deleted.</summary>
    Draft = 0,
    /// <summary>Posted to the GL — immutable; can only be reversed.</summary>
    Posted = 1,
    /// <summary>A reversal JE has been created and posted for this entry.</summary>
    Reversed = 2
}
