import { AbstractControl } from "@angular/forms";

export interface ValidateUnicodeNamedParameters { event: any, includeNewline?: boolean };
export interface ValidateNumbersNamedParameters { event: any, includeDecimal?: boolean, includePlus?: boolean, includeMinus?: boolean, includeComma?: boolean, includeSpace?: boolean };
export interface ValidatorsNamedParameters { control: AbstractControl, required: number, regExp: string, minLen?: number, maxLen?: number, minValue?: number, maxValue?: number };

export enum GlCodeTypeEnum
{
  BankAccount = 1,
  GlCode = 2,
  Vat = 3,
  Ait = 4
}

export enum EmployeeType_oldEnum
{
  ProjectLeader = 1,
  ProjectManager = 2,
  Employee = 3
}

export enum EmployeeTypeEnum
{
  Employee = 1,
  ProjectLeader = 2,
  ProjectManager = 4,
  Developer = 8,
  Support = 16,
  QA = 32,
}

export enum LookupTypeEnum
{
  Select_Lookup_Type = 0,
  OrderType = 1,
  JobType = 2,
  VoucherType = 3,
  InventoryType = 4,
  GoodsType = 5,
  UOM = 6,
  AnomalyReason = 7,
  Designation = 8,
  StockTakeReason = 9,
  Department = 10,
  LeaveType = 11,
  AssetType = 12,
  LoginRemarks = 13,
  LogoutRemarks = 14,
  SecurityCategories = 15,
  SalesPointType = 16,
  BloodGroup = 17,
  UnitType = 18,
  ProductHierarchyLevel = 19,
  ChannelHierarchyLevel = 20,
  MarketHierarchyLevel = 21,
  CustomerGrade = 22,
  PriceType = 23,
  ProductVatSdCommission = 24,
  ExternalProductLevel = 25,
  IdealWorkingHours = 26,
  RamadanWorkingHours = 27,
}

export class VatPayMethod
{
  public id: number;
  public value: string;
}

export const VatPayMethods: VatPayMethod[] = [
  { id: 1, value: 'Regular' },
  { id: 2, value: 'Deducted' },
  { id: 3, value: 'Paid Later' },
  { id: 4, value: 'No VAT' }
];

export enum SettingsModuleEnum
{
  Select_Module = 0,
  This_System = 1,
  Group = 2,
  User = 3,
  User_Attributes = 4,
  Bank_Branches = 5,
  Client = 6,
  Bank_Account = 7,
  GL_Code = 8,
  VAT_GL = 9,
  AIT_GL = 10,
  Employee = 68,
  Employee_Search = 69,
  Employee_Role = 11,
  Projects = 13,
  Authentications = 14,
  Authorizations = 15,
  Deactivation = 12,
  Purchase_Order = 16,
  Invoice = 17,
  Bill_Picker = 18,
  Payment = 19,
  Gl_Vouchers = 20,
  Transactional_Report = 21,
  Contact_Expiry_Report = 22,
  Freeze_PO_Or_Invoice = 23,
  Chart_Of_Accounts = 24,
  GL_Search = 25,
  GL_Tran = 26,
  GL_Client_Supplier_Customer_Ledger = 27,
  GL_TurnOver = 28,
  GL_Trial_Balance = 29,
  GL_Income_Expenditure = 76,
  GL_DayBook = 30,
  Gl_BankOrCash_Book = 31,
  Gl_Schedule = 32,
  GL_Tran_AV = 33,
  GL_Yearend_Process = 34,
  Locations = 35,
  Stores = 36,
  GL_Code_FAOrP2P = 37,
  Suppliers = 38,
  Product_Types = 39,
  Products = 40,
  Product_Search = 46,
  FA_Types = 41,
  FA_Categories = 42,
  FA_Items = 43,
  AIT_VAT_Rate = 44,
  Work_Order_P2P = 45,
  GRN_P2P = 47,
  Invoice_P2P = 48,
  Cash_Purchase_P2P = 49,
  Bill_Picker_P2P = 50,
  Payment_P2P = 51,
  Goods_Consumption = 52,
  Goods_Damage = 53,
  Goods_Transfer = 54,
  Goods_Receive = 55,
  Stock_Report = 56,
  Goods_Transfer_Anomaly = 57,
  Stock_Take = 58,
  Stock_Ledger = 59,
  GRN_FA = 60,
  Work_Order_FA = 61,
  Invoice_FA = 62,
  Payment_FA = 63,
  ItemAcquisition = 64,
  AssetInstallation = 65,
  Product_Stock_Search = 66,
  AssetLocationTransfer = 67,
  Asset_WriteOff = 70,
  Asset_Sale = 71,
  Asset_AddValue = 74,
  Asset_ReduceValue = 75,
  No_Depreciation_Mark = 72,
  Depreciation_Calculation = 73,
  GL_Head_Identification = 77,
  Initial_Stock_FA = 78,
  Initial_Stock_P2P = 79,
  FA_Item_Details = 80,
  FA_At_A_Glance = 81,
  FA_No_Dprn_Marked = 82,
  FA_Waiting_Aquisition = 83,
  FA_Acquired = 84,
  FA_Waiting_Install = 85,
  FA_Depreciation_Report = 86,
  FA_Item_Description_Update = 87,
  Priority = 88,
  Task_Status = 89,
  Task_Category = 96,
  Task_Type = 90,
  Team_Space = 91,
  Team_Space_Attribute = 92,
  Team_Space_User_Projects = 98,
  Task = 93,
  Sub_Task = 97,
  My_Task = 94,
  Task_Report = 95,
  Ip_Mac_Address_Entry = 99,
  Attendance_Report = 100,
  Employee_Absent = 101,
  Asset_Booking = 102,
  Advance_Payment = 103,
  Challan_Number_Update = 104,
  SalesPoints = 105,
  ProductHierarchies = 106,
  Brands = 107,
  SKU = 108,
  ChannelHierarchies = 109,
  Customers = 110,
  SalesOfficers = 111,
  MarketHierarchies = 112,
  SKU_Parameters = 113,
  Market_Search = 114,
  Customer_Credit = 115,
  SalesPromotions = 116,
  Customer_Transaction = 117,
  ExternalProducts = 118,
  Orders = 119,
  SalesInvoices = 120,
  Initial_Stock_Sales = 121,
  Transfer_Anomaly_Sales = 122,
  Stock_Take_Sales = 123,
  SalesPayments = 124
}

export enum SalesTypeEnum
{
  DirectSales = 1,
  OrderSales = 2                                                                                    
}

export enum InvoiceSourceEnum
{
  FromApplication = 1,
  FromMobile = 2,
  FromOthers = 3
}
