2129 lines
60 KiB
C#
2129 lines
60 KiB
C#
using Newtonsoft.Json.Serialization;
|
|
using Sarand.Net.Standard.Base.App;
|
|
using Sarand.Net.Standard.Base.Core;
|
|
using Sarand.Net.Standard.Base.Dbas;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace Sarand.BusinessMgr.Net.Standard.Base.App
|
|
{
|
|
//=======================================================================
|
|
public static partial class Sbm
|
|
{
|
|
//-------------------------------------------------------------------
|
|
// Application configuration defaults.
|
|
public static class Config
|
|
{
|
|
public static String Context_Defaults { get; } = "Defaults";
|
|
public static class Security
|
|
{
|
|
public static class Demo
|
|
{
|
|
public static class Register
|
|
{
|
|
public static int EmailLinkExpiresMins_Default { get; } = 60;
|
|
public static int EmailLinkExpiresMins_Min { get; } = 30;
|
|
public static int EmailLinkExpiresMins_Max { get; } = 60 * 4;
|
|
}
|
|
}
|
|
public static class Password
|
|
{
|
|
public static int MinLength { get; } = 8;
|
|
public static int MaxLength { get; } = 16;
|
|
}
|
|
public static class Activation
|
|
{
|
|
public static int EmailLinkExpiresMins_Default { get; } = 60;
|
|
public static int EmailLinkExpiresMins_Min { get; } = 30;
|
|
public static int EmailLinkExpiresMins_Max { get; } = 60 * 24;
|
|
}
|
|
public static class SignIn
|
|
{
|
|
public static class PasswordRequest
|
|
{
|
|
public static int EmailLinkExpiresMins_Default { get; } = 60;
|
|
public static int EmailLinkExpiresMins_Min { get; } = 30;
|
|
public static int EmailLinkExpiresMins_Max { get; } = 60 * 24;
|
|
}
|
|
public static class KeepLoggedIn
|
|
{
|
|
public static bool Allowed_Default { get; } = true;
|
|
public static int CookieExpiresDays_Default { get; } = 10;
|
|
public static int CookieExpiresDays_Min { get; } = 1;
|
|
public static int CookieExpiresDays_Max { get; } = 30;
|
|
}
|
|
}
|
|
}
|
|
public class Database
|
|
{
|
|
public class Identifier
|
|
{
|
|
public static int MaxLength { get; } = 16;
|
|
}
|
|
}
|
|
public class Logging
|
|
{
|
|
public class Folder
|
|
{
|
|
public static String WebControl { get; } = "WebControl";
|
|
public static String WebPortal { get; } = "WebPortal";
|
|
public static String WebApi { get; } = "Api";
|
|
}
|
|
}
|
|
public class Portal
|
|
{
|
|
public static class Session
|
|
{
|
|
public static class Cookie
|
|
{
|
|
/// <summary>Default cookie name: '.AspNetCore.Session'</summary>
|
|
public static String Name { get; } = "BMPSN";
|
|
public static bool HttpOnly { get; } = true;
|
|
public static TimeSpan IdleTimeout { get; } = SacsSystem.DebugMode ? TimeSpan.FromMinutes(5) : TimeSpan.FromMinutes(60);
|
|
public static long RememberMeTimeoutMilis { get; } = (long)(SacsSystem.DebugMode ? TimeSpan.FromMinutes(2) : TimeSpan.FromMinutes(10)).TotalMilliseconds;
|
|
}
|
|
}
|
|
public static class DataCache
|
|
{
|
|
public static class RefreshIntervalSecs
|
|
{
|
|
public static int Initial { get; } = SacsSystem.DebugMode ? 2 : 5;
|
|
public static int Periodic { get; } = SacsSystem.DebugMode ? 60 : 1800;
|
|
}
|
|
}
|
|
}
|
|
public class Control
|
|
{
|
|
public static class Session
|
|
{
|
|
public static class Cookie
|
|
{
|
|
/// <summary>Default cookie name: '.AspNetCore.Session'</summary>
|
|
public static String Name { get; } = "BusMgr.Control.Session";
|
|
public static bool HttpOnly { get; } = true;
|
|
public static TimeSpan IdleTimeout { get; } = SacsSystem.DebugMode ? TimeSpan.FromMinutes(5) : TimeSpan.FromMinutes(15);
|
|
public static long KeepLoggedInTimeoutMillis { get; } = (long)(SacsSystem.DebugMode ? TimeSpan.FromMinutes(2) : TimeSpan.FromMinutes(10)).TotalMilliseconds;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
// Definitions.
|
|
public static String ApplicationCaption { get; } = "Sarand BusinessMgr";
|
|
public static DbUpdateInfo DbUpdateInfo_Anon { get; } = new DbUpdateInfo(null, "", "");
|
|
// Option values.
|
|
public static String ValueYes { get; } = "YES";
|
|
public static String ValueNo { get; } = "NO";
|
|
public static List<CodeDesc> ValuesYesNo { get; } = new List<CodeDesc>() { new CodeDesc(ValueYes, "Yes"), new CodeDesc(ValueNo, "No") };
|
|
|
|
//-------------------------------------------------------------------
|
|
public enum Application
|
|
{
|
|
WebControl,
|
|
WebPortal,
|
|
WebDemo,
|
|
}
|
|
public enum InstanceType
|
|
{
|
|
Production,
|
|
UAT,
|
|
QC,
|
|
Dev
|
|
}
|
|
public enum Database
|
|
{
|
|
Unknown,
|
|
Control,
|
|
BusMgr,
|
|
Template,
|
|
Demo,
|
|
}
|
|
public const String RepositoryContext_Template = "Template";
|
|
public const String RepositoryContext_Demo= "Demo";
|
|
|
|
//-------------------------------------------------------------------
|
|
// Configuration console.
|
|
public enum SessionConfig
|
|
{
|
|
Generic,
|
|
Sarand,
|
|
MPE,
|
|
BPE,
|
|
Cadix,
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
// Application caption type.
|
|
public enum CaptionType
|
|
{
|
|
Text,
|
|
Html
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
/// <summary>
|
|
/// Application menu sections of the main navigation.
|
|
/// </summary>
|
|
public enum MenuSection
|
|
{
|
|
Unknown = 0,
|
|
Config,
|
|
Contacts,
|
|
Commodities,
|
|
SalesTransactions,
|
|
PurchasesTransactions,
|
|
Planning,
|
|
Actions,
|
|
Database,
|
|
Testing,
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
/// <summary>
|
|
/// Application menu navigation options.
|
|
/// </summary>
|
|
public enum MenuOption
|
|
{
|
|
Unknown = 0,
|
|
Console,
|
|
// Config.
|
|
Config_SelectOrganisation,
|
|
Config_Organisation,
|
|
Config_ReferenceData,
|
|
Config_CodeTypes,
|
|
Config_Interfaces,
|
|
// Security.
|
|
Security_Manage,
|
|
Security_Login,
|
|
Security_Logout,
|
|
// Contact Management.
|
|
Contacts_Associations,
|
|
Contacts_Affiliates,
|
|
Contacts_Associations_ContactGroups,
|
|
Contacts_Associations_Customer,
|
|
Contacts_Associations_Supplier,
|
|
Contacts_Associations_Associate,
|
|
Contacts_Associations_Stockist,
|
|
Contacts_Associations_FinanceAgency,
|
|
Contacts_Associations_Member,
|
|
Contacts_Associations_Contractor,
|
|
// Transaction Handling.
|
|
Transactions,
|
|
Transactions_Project,
|
|
Transactions_SalesLead,
|
|
Transactions_SalesQuote,
|
|
Transactions_ProformaSalesOrder,
|
|
Transactions_SalesOrder,
|
|
Transactions_SalesPO,
|
|
Transactions_SalesDispatch,
|
|
Transactions_ProformaSalesInvoice,
|
|
Transactions_SalesInvoice,
|
|
Transactions_PurchaseQuote,
|
|
Transactions_ProformaPurchaseOrder,
|
|
Transactions_PurchaseOrder,
|
|
Transactions_PurchaseSO,
|
|
Transactions_PurchaseDelivery,
|
|
Transactions_ProformaPurchaseInvoice,
|
|
Transactions_PurchaseInvoice,
|
|
PurchasingPlanning,
|
|
ProductionControl,
|
|
DeliveryPlanning,
|
|
// Commodity Management.
|
|
Commodities,
|
|
Commodity_Portfolio,
|
|
Commodity_SalesBudget,
|
|
Commodities_StockControl,
|
|
Commodities_StockTake,
|
|
Commodities_StockContainers,
|
|
Commodity_Locations,
|
|
Commodity_Containers,
|
|
// Other.
|
|
Constituents,
|
|
ConstituentsTime,
|
|
ConstituentsTask,
|
|
SystemInterfaces,
|
|
SystemUsers,
|
|
SystemAccounts,
|
|
Assets,
|
|
Vehicles,
|
|
ComputerHardware,
|
|
PriceSets,
|
|
// Actions.
|
|
RefreshView,
|
|
CreateItem,
|
|
UpdateItem,
|
|
DeleteItem,
|
|
ImportData,
|
|
ExportData,
|
|
Timesheet,
|
|
// Database.
|
|
RefreshDbIndices,
|
|
GenerateDbDefinitions,
|
|
GenerateQuickBooksDbDefinition,
|
|
// Testing.
|
|
WindowsServiceTester,
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
/// <summary>
|
|
/// Application Views can be displayed by the applications
|
|
/// </summary>
|
|
public enum View
|
|
{
|
|
Unknown = -1,
|
|
Splash = 0,
|
|
Main,
|
|
Console,
|
|
Diary,
|
|
// Contact Management.
|
|
Contacts_Affiliates,
|
|
Contacts_ContactGroups,
|
|
Contacts_Associations,
|
|
Contacts_Associations_Customer,
|
|
Contacts_Associations_Supplier,
|
|
Contacts_Associations_Associate,
|
|
Contacts_Associations_Stockist,
|
|
Contacts_Associations_FinanceAgency,
|
|
Contacts_Associations_Member,
|
|
Contacts_Associations_Contractor,
|
|
// Transactions.
|
|
Transactions,
|
|
Transactions_Project,
|
|
Transactions_SalesLead,
|
|
Transactions_SalesQuote,
|
|
Transactions_ProformaSalesOrder,
|
|
Transactions_SalesOrder,
|
|
Transactions_SalesPO,
|
|
Transactions_SalesDispatch,
|
|
Transactions_ProformaSalesInvoice,
|
|
Transactions_SalesInvoice,
|
|
Transactions_PurchaseQuote,
|
|
Transactions_ProformaPurchaseOrder,
|
|
Transactions_PurchaseOrder,
|
|
Transactions_PurchaseSO,
|
|
Transactions_PurchaseDelivery,
|
|
Transactions_ProformaPurchaseInvoice,
|
|
Transactions_PurchaseInvoice,
|
|
Transactions_PurchasingPlanning,
|
|
Transactions_ProductionControl,
|
|
Transactions_DeliveryPlanning,
|
|
// Commodities Mangement.
|
|
Commodities,
|
|
Commodity_Locations,
|
|
Commodity_Containers,
|
|
Commodity_Portfolio,
|
|
Commodity_SalesBudget,
|
|
Commodity_StockControl,
|
|
Commodity_StockTake,
|
|
Commodity_StockContainers,
|
|
// Assets.
|
|
AssetCategories,
|
|
Assets,
|
|
VehicleClasses,
|
|
Vehicles,
|
|
// Constituents Management.
|
|
Constituents,
|
|
Constituents_Time,
|
|
Constituents_Task,
|
|
// System Management.
|
|
SystemInterfaces,
|
|
SystemUsers,
|
|
SystemAccounts,
|
|
// Other.
|
|
ComputerHardware,
|
|
PriceSets,
|
|
|
|
/*//Admin.
|
|
Admin_Companies,
|
|
*/
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
/// <summary>
|
|
/// Application Configuration - Config Options.
|
|
/// <para>Default: False unless otherwise specified.</para>
|
|
/// </summary>
|
|
public enum ConfigOption
|
|
{
|
|
Unknown,
|
|
//---------------------------------------------------------------
|
|
// Application.
|
|
/// <summary>Display system menu [Default: True for debug session]</summary>
|
|
SystemMenu = 10,
|
|
/// <summary>Display dialog bar.</summary>
|
|
DialogBar = 11,
|
|
// Core application modules.
|
|
ConsoleView = 20, /* Default: True */
|
|
OrganisationUpdate, /* Default: True */
|
|
Contacts, /* Default: True */
|
|
ComputerHardware,
|
|
Commodities, /* Default: True */
|
|
CommodityAssociations,
|
|
Processes, /* Default: True */
|
|
Assets,
|
|
Vehicles,
|
|
Portfolios,
|
|
PriceSets,
|
|
Transactions, /* Default: True */
|
|
ItemDocuments,
|
|
FinancialsAccessControl,
|
|
//---------------------------------------------------------------
|
|
// Navigation (view) options.
|
|
DiaryView = 60, /* Default: True */
|
|
ContactGroupsView,
|
|
AnyAssociationView,
|
|
AnyTransactionView,
|
|
Jobs = 70,
|
|
TimeRecording,
|
|
Tasks,
|
|
//---------------------------------------------------------------
|
|
// Associations.
|
|
AssocMaxTransAmount = 100,
|
|
// Order Pricing (NB price sets and discounts allowed if Sage accounts in use)
|
|
CustomerPriceSet = 120,
|
|
CustomerDiscount,
|
|
/// <summary>Use discount if commodity not in price set.</summary>
|
|
CustomerDiscountWhenNoPriceInSet,
|
|
SupplierPriceSet,
|
|
SupplierDiscount,
|
|
/// <summary>Use discount if commodity not in price set.</summary>
|
|
SupplierDiscountWhenNoPriceInSet,
|
|
//---------------------------------------------------------------
|
|
// Transactions.
|
|
CreateSalesOrderInProgress = 200,
|
|
CreatePurchaseOrderInProgress,
|
|
TransactionUpperRefExt,
|
|
ShowSiteAddrOnTransView,
|
|
ShowTransRefInDropdown,
|
|
RaiseOrderWithQuoteRef,
|
|
TransactionEstimatedAmount,
|
|
TransactionPayments,
|
|
TransactionDeliveryCosts,
|
|
TransactionSplitTimes,
|
|
FixedSalesQuoteToWordExport,
|
|
//---------------------------------------------------------------
|
|
// Requirements.
|
|
PurchasingPlanning = 220,
|
|
ProductionControl,
|
|
DeliveryPlanning,
|
|
/// <summary>For quicker addition of items to order (all with quantity=0).</summary>
|
|
OrderSelectCommodities,
|
|
/// <summary>Direct update from main view (default: true).</summary>
|
|
RequirementUpdateInline,
|
|
/// <summary>Using cost and labour codes (unit and job).</summary>
|
|
EstimateSalesQuotesByCosts,
|
|
/// <summary>To derive processes for commodities from quote cost estimates.</summary>
|
|
LinkCostCodesToProcesses,
|
|
ClearQuoteEstimateDetailsOnCopy,
|
|
EstimateLabourByMinutes,
|
|
SalesOrderItemJobNumber,
|
|
/// <summary>Research and development against sales order requirements.</summary>
|
|
SalesOrderItemRandD,
|
|
/// <summary>Whether requirements with associated requirements (referenced via ReqntIdSource) can be removed.</summary>
|
|
RequirementRemoveWithAssociated,
|
|
//---------------------------------------------------------------
|
|
// Commodities.
|
|
CommodityExclusiveToCustomer = 300,
|
|
/// <summary>Temporary until columns are user sized. [Mar11 for MPE]</summary>
|
|
CommodityDoubleColumnWidth,
|
|
/// <summary>Treat code filter as partial (match anywhere in code). [Default: derived from organisation param]</summary>
|
|
CommodityPartialCodeFilter,
|
|
/// <summary>Allow commodity code entry against requirement.</summary>
|
|
CommodityRequirementCodeEntry,
|
|
CommodityProductionQuantity,
|
|
CommodityPromotion,
|
|
CommodityVerifyPrices,
|
|
CommodityShowTabDefaults = 320,
|
|
CommodityUpperDescription,
|
|
CommodityCustomers,
|
|
CommoditySuppliers,
|
|
CommodityItemDocs,
|
|
//---------------------------------------------------------------
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
/// <summary>
|
|
/// Item Type supported by the system
|
|
/// </summary>
|
|
public enum ItemType
|
|
{
|
|
Unknown = 0,
|
|
// Do not change existing values - these are tied to the database.
|
|
SecItem = 10,
|
|
Currency = 20,
|
|
Language = 21,
|
|
Region = 22,
|
|
TaxCode = 23,
|
|
UnitMeasure = 24,
|
|
Process = 25,
|
|
ItemBatch = 26,
|
|
Affiliate = 30,
|
|
Address = 31,
|
|
Commodity = 32,
|
|
PortfolioItem = 33,
|
|
Location = 34,
|
|
Container = 35,
|
|
ContainerItem = 36,
|
|
Movement = 37,
|
|
StockLevel = 38,
|
|
PriceSet = 40,
|
|
Price = 41,
|
|
CommodityCustomer = 42,
|
|
CommoditySupplier = 43,
|
|
Association = 50,
|
|
Transaction = 51,
|
|
Requirement = 52,
|
|
Constituent = 53,
|
|
SystemAccount = 60,
|
|
SystemUser = 61,
|
|
SystemAccountUser = 62,
|
|
AssetCategory = 70,
|
|
Asset = 71,
|
|
VehicleClass = 75,
|
|
Vehicle = 76,
|
|
VehicleEvent = 77,
|
|
VehicleFeature = 78,
|
|
// Link item types.
|
|
CommodityProcess = 1200,
|
|
RequirementProcess = 1201,
|
|
AssetCategoryProcess = 1210,
|
|
AssetProcess = 1211,
|
|
// Code types, eg. as used by Security rights.
|
|
FinancialType = 2000,
|
|
InterfaceCategory = 2010,
|
|
TransactionType = 2100,
|
|
TransactionTypeStatus = 2110,
|
|
// System data types.
|
|
DiaryEntry = SaDataItemType.DiaryEntry,
|
|
DiaryLink = SaDataItemType.DiaryLink,
|
|
Interface = SaDataItemType.Interface,
|
|
ItemOption = SaDataItemType.ItemOption,
|
|
SecurityItem = SaDataItemType.SecurityItem,
|
|
SecurityLink = SaDataItemType.SecurityLink,
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
/// <summary>
|
|
/// Data lists for configuration etc.
|
|
/// </summary>
|
|
public enum DataList
|
|
{
|
|
Address,
|
|
Affiliate,
|
|
AssetCategory,
|
|
Asset,
|
|
Association,
|
|
CommodityCustomer,
|
|
Commodity,
|
|
Constituent,
|
|
ContainerItem,
|
|
Container,
|
|
Location,
|
|
Movement,
|
|
PortfolioItem,
|
|
Price,
|
|
PriceSet,
|
|
Process,
|
|
Requirement,
|
|
StockLevel,
|
|
SystemAccount,
|
|
SystemAccountUser,
|
|
SystemUser,
|
|
Transaction,
|
|
VehicleClass,
|
|
VehicleEvent,
|
|
VehicleFeature,
|
|
Vehicle,
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
// Item list - Used to identify list 'theme' (colouration etc).
|
|
public enum ItemList
|
|
{
|
|
General,
|
|
Customer, // Associations
|
|
Supplier,
|
|
Associate,
|
|
Stockist,
|
|
FinanceAgency,
|
|
Member,
|
|
Transaction, // Transactions
|
|
Requirement, // Requirements
|
|
Constituent_TimeRecord, // Constituents
|
|
Constituent_Event,
|
|
Constituent_Action,
|
|
Constituent_Response,
|
|
Constituent_Consumable,
|
|
Constituent_Expense,
|
|
PortfolioItem,
|
|
Location,
|
|
Container,
|
|
ContainerItem,
|
|
Commodity, // Commodities
|
|
Movement,
|
|
StockLevel,
|
|
Process,
|
|
PriceSet,
|
|
Price,
|
|
AssetCategory,
|
|
Asset,
|
|
VehicleClass,
|
|
Vehicle,
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
/// <summary>Association Tab.</summary>
|
|
public enum AssociationTab
|
|
{
|
|
Unknown = 0,
|
|
Details = 1,
|
|
Order,
|
|
ClientOrder,
|
|
Member,
|
|
Addresses,
|
|
Time,
|
|
Task,
|
|
Doc,
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
/// <summary>
|
|
/// Item Event.
|
|
/// </summary>
|
|
public enum ItemEvent
|
|
{
|
|
Create,
|
|
Update,
|
|
Remove,
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
/// <summary>
|
|
/// Data Type supported by the system.
|
|
/// </summary>
|
|
public enum DataType
|
|
{
|
|
DataInvalid = -1,
|
|
DataRegion,
|
|
DataLanguage,
|
|
DataCurrency,
|
|
DataTaxCode,
|
|
DataTaxRate,
|
|
DataUnitMeasure,
|
|
DataUomCategory, // has it own right of UOM Cat
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
/// <summary>ItemBatchType link between data items.</summary>
|
|
public enum ItemBatchType
|
|
{
|
|
Any = -1,
|
|
Unknown = 0, // Do not change existing values - these are tied to the database.
|
|
SalesOrder = 10,
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
/// <summary>
|
|
/// ItemLinkType between data items.
|
|
/// </summary>
|
|
public enum ItemLinkType
|
|
{
|
|
Any = -1,
|
|
Unknown = 0, // Do not change existing values - these are tied to the database.
|
|
ItemProcess = 10,
|
|
ItemCostEstimate = 11,
|
|
ItemPrice = 12,
|
|
Requirement_CostEstimate = 20,
|
|
Requirement_AssociatedItem = 21,
|
|
Transaction_Payment = 40,
|
|
Transaction_FinanceAgency = 41,
|
|
Transaction_Batch = 42,
|
|
Task_Assignee = 50,
|
|
Task_Follower = 51,
|
|
Commodity_RelatedWebsiteProduct = 65,
|
|
ItemCodeList_PostcodeArea = 100,
|
|
ItemCodeList_JobTrade = 101,
|
|
ItemCodeList_JobEngineer = 102,
|
|
ItemCodeList_SeasonalCategory = 103,
|
|
}
|
|
|
|
public enum AssociatedItemMode
|
|
{
|
|
Unknown,
|
|
Commodity_Parent, // 'From' item is fixed commodity - list associated 'To' items.
|
|
Commodity_Child, // 'To' item is fixed commodity - list associated 'From' items.
|
|
Requirement_Parent, // etc.
|
|
Requirement_Child,
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
|
|
/// <summary>
|
|
/// ItemDataType between data items.
|
|
/// </summary>
|
|
public enum ItemDataType
|
|
{
|
|
Any = -1,
|
|
Unknown = 0, // Do not change existing values - these are tied to the database.
|
|
Vehicle_HpiResponse = 100,
|
|
Transaction_VehicleFilter = 200,
|
|
Transaction_ExchangeVehicle = 201,
|
|
Transaction_Finance = 202,
|
|
Transaction_Payments = 203,
|
|
Process_FixedCost_Unit = 300,
|
|
Process_FixedCost_Job = 301,
|
|
Process_LabourCost_Unit = 310,
|
|
Process_LabourCost_Job = 311,
|
|
Currency = 312,
|
|
Region = 313,
|
|
}
|
|
//-------------------------------------------------------------------
|
|
|
|
/// <summary>
|
|
/// SysParamCategory.
|
|
/// </summary>
|
|
public enum SysParamCategory
|
|
{
|
|
Any = 0,
|
|
Security = 1, // Security parameter.
|
|
UserParam = 2, // User configuration parameter.
|
|
}
|
|
//-------------------------------------------------------------------
|
|
|
|
/// <summary>
|
|
/// SecurityRight.
|
|
/// </summary>
|
|
public enum SecurityRight
|
|
{
|
|
/* Admin. */
|
|
Security_Admin, // Security administration.
|
|
Database_Admin, // Database administration.
|
|
ReferenceData_Admin, // Reference data administration
|
|
InterfaceConfig, // Interface configuration
|
|
/* Contacts. */
|
|
Affiliate_Create, // Create new contacts (companies and individuals).
|
|
Affiliate_Update, // Update contacts.
|
|
/* Associations. */
|
|
Association_Create, // Create new Associations (customers and suppliers etc).
|
|
Association_Update, // Update Associations.
|
|
/* Commodity. */
|
|
Commodity_Create, // Create new products.
|
|
Commodity_Update, // Update products.
|
|
StockTake, // Update stock take information.
|
|
Asset_Create, // Create new assets.
|
|
Asset_Update, // Update assets.
|
|
/* Transaction. */
|
|
Transaction_Create, // Create new Transactions (quotes, orders etc).
|
|
Transaction_View, // View Transactions.
|
|
Transaction_Update, // Update Transactions.
|
|
Transaction_Manage, // Manage transactions.
|
|
Transaction_Remove, // Remove Transactions.
|
|
Transaction_ByType, // View Transactions by type.
|
|
Transaction_UpdateByTypeStatus, // Update Transactions by type and status.
|
|
InterfaceByCategory, // Interface configuration
|
|
/* Financal. */
|
|
Financial_Update, // View/update financial information.
|
|
Financial_View, // View financial information.
|
|
Financial_ViewByType, // View Financial information by type.
|
|
Financial_UpdateByType, // Update Financial information by type.
|
|
TimesheetManager, // View other users' timesheets.
|
|
TaskManager, // Manage tasks.
|
|
/*
|
|
// Admin.
|
|
Security_Manage,
|
|
Config_Manage,
|
|
Companies_Manage,
|
|
CodeTypes_Manage,
|
|
Database_Manage,
|
|
Financials_Manage,
|
|
Interfaces_Manage,
|
|
Interfaces_Process,
|
|
//Contact.
|
|
Contact_View,
|
|
Contact_Update,
|
|
Contact_Manage,
|
|
*/
|
|
}
|
|
//-------------------------------------------------------------------
|
|
|
|
/// <summary>
|
|
/// FinancialType.
|
|
/// </summary>
|
|
public enum FinancialType
|
|
{
|
|
Any = -1,
|
|
Unknown = 0,
|
|
CommoditySupply = 10,
|
|
CommoditySales = 20,
|
|
}
|
|
//-------------------------------------------------------------------
|
|
|
|
/// <summary>
|
|
/// CodeType fixed enumerated values.
|
|
/// </summary>
|
|
public enum ApplicationCode
|
|
{
|
|
ItemType,
|
|
ItemDataType,
|
|
// Contacts.
|
|
AffiliateType,
|
|
AddressType,
|
|
AssociationType,
|
|
SystemAccountType,
|
|
// Transactions.
|
|
TransactionType,
|
|
TransactionStatusCat,
|
|
RequirementType,
|
|
TaskCodeType,
|
|
RequirementStatusCat,
|
|
ConstituentType,
|
|
ConstituentStatusCat,
|
|
// Miscellaneous.
|
|
ItemLinkData,
|
|
SysParamCategory,
|
|
// Commodities.
|
|
CommodityType,
|
|
CommodityStatusCat,
|
|
PortfolioItemType,
|
|
ContainerCategory,
|
|
ContainerType,
|
|
// Stock.
|
|
LocationCategory,
|
|
LocationFilter,
|
|
MovementType,
|
|
StockLevelType,
|
|
StockLevelSource,
|
|
// Processes.
|
|
ProcessCategory,
|
|
ProcessType,
|
|
PaymentType,
|
|
// Assets.
|
|
AssetType,
|
|
AssetIncomeType,
|
|
// Vehicles.
|
|
VehicleType,
|
|
VehicleEventType,
|
|
VehicleFeatureSource,
|
|
VehicleFeatureType,
|
|
VehicleOptionType,
|
|
VehicleTransType,
|
|
FuelType,
|
|
OdometerUnits,
|
|
// Reference.
|
|
RegionType,
|
|
UnitMeasureCategory,
|
|
UnitMeasureType,
|
|
FinancialType,
|
|
// Pricing.
|
|
PriceType,
|
|
PriceCalcMethod,
|
|
PriceRounderMethod,
|
|
PriceRounderDirection,
|
|
DiscountType,
|
|
DiscountMarkup,
|
|
// Status.
|
|
ItemStatus,
|
|
EventStatus,
|
|
// Application configuration:
|
|
AssociationTab,
|
|
// Interface definitions:
|
|
InterfaceType_Website,
|
|
InterfaceType_Accounts,
|
|
InterfaceType_System,
|
|
InterfaceType_File,
|
|
InterfaceDataType,
|
|
// Organisation configuration options.
|
|
OrgOption_Value,
|
|
OrgOption_Folder,
|
|
OrgOption_Minutes,
|
|
OrgOption_PeriodDays,
|
|
OrgOption_PeriodWeeks,
|
|
OrgOption_AllowOption,
|
|
OrgOption_Caption,
|
|
OrgOption_ShowColumn,
|
|
OrgOption_ShowField,
|
|
OrgOption_FieldLabel,
|
|
OrgOption_TransactionCreationStatus,
|
|
OrgOption_ContainerStatusCaption,
|
|
OrgOption_NumericDecimals,
|
|
OrgOption_CommodityType,
|
|
OrgOption_StockLocation,
|
|
// Equivalent code, eg. Sage and other system interfaces.
|
|
OrgOption_TaxCodeColumn,
|
|
OrgOption_SystemUserRight,
|
|
// Configuration options.
|
|
SystemUserOption,
|
|
AssociationOption,
|
|
// Interface options.
|
|
InterfaceOption,
|
|
InterfaceOption_WebFlag,
|
|
InterfaceOption_WebUploadData,
|
|
InterfaceOption_WebUploadMethod,
|
|
InterfaceOption_WebDownloadData,
|
|
InterfaceOption_WebDownloadMethod,
|
|
// Generic file interface options.
|
|
FileInterface_RowColValue,
|
|
FileInterface_Mode,
|
|
}
|
|
//-------------------------------------------------------------------
|
|
|
|
/// <summary>
|
|
/// ApplCodeType user defined codes.
|
|
/// </summary>
|
|
public enum ApplCodeType
|
|
{
|
|
Unknown = 0,
|
|
// Commodity:
|
|
CommodityCategory = 1,
|
|
CommodityRange,
|
|
CommodityColour,
|
|
CommoditySource,
|
|
CommoditySupplyMethod,
|
|
CommodityHandling,
|
|
CommodityDelivery,
|
|
CommodityMaterial,
|
|
CommodityFinish,
|
|
CommodityPromotion,
|
|
// General:
|
|
ProcessType,
|
|
ReferType,
|
|
TaskCategory,
|
|
// Assets:
|
|
AssetSellCategory,
|
|
VehicleCategory,
|
|
VehicleMake,
|
|
VehicleServiceHistory,
|
|
VehicleInsurance,
|
|
VehicleTacho,
|
|
// HPI vehicle features:
|
|
HpiVehicleMake,
|
|
HpiVehicleModel,
|
|
HpiVehicleColour,
|
|
HpiVehicleFuel,
|
|
HpiVehicleTrans,
|
|
// Contact management:
|
|
AccountManager,
|
|
AccountHandler,
|
|
AccountType,
|
|
AccountRating, // AAA, AA, A etc.
|
|
ContactTitle, // Mr, Mrs, Miss etc
|
|
ContactArea, // Contact area? - applied to addresses and orders.
|
|
ContactHandler, // Contact handler? - applied to addresses and orders.
|
|
ContactMethod,
|
|
ContactCallCycle,
|
|
SeasonalCategory,
|
|
OrderLeadTime,
|
|
// Cost estimates:
|
|
CostPerUnit,
|
|
CostPerJob,
|
|
LabourPerUnit,
|
|
LabourPerJob,
|
|
// Orders/Jobs:
|
|
Department,
|
|
PostcodeArea,
|
|
ProductMaterialSource,
|
|
ProductionMachine,
|
|
JobResponse,
|
|
JobTrade,
|
|
JobEngineer,
|
|
// Delivery:
|
|
DeliveryStatus,
|
|
DeliveryType,
|
|
DeliveryMethod, // Courier, post, transport type, etc.
|
|
DeliveryCourier,
|
|
DeliveryBookIn,
|
|
StockPicker,
|
|
// Item documents:
|
|
DocType_Pdf,
|
|
DocType_Image,
|
|
}
|
|
//-------------------------------------------------------------------
|
|
|
|
/// <summary>
|
|
/// ApplCodeFlag.
|
|
/// </summary>
|
|
public enum ApplCodeFlag
|
|
{
|
|
EstimateType_QuoteDefault = 1,
|
|
DocType_Pdf_WebPublish,
|
|
DocType_Image_WebPublish,
|
|
}
|
|
//-------------------------------------------------------------------
|
|
|
|
/// <summary>
|
|
/// SystemUserOption configuration.
|
|
/// </summary>
|
|
public enum SystemUserOption
|
|
{
|
|
Right = 1000,
|
|
}
|
|
//-------------------------------------------------------------------
|
|
|
|
/// <summary>
|
|
/// SystemUserRight.
|
|
/// </summary>
|
|
public enum SystemUserRight
|
|
{
|
|
Unknown = 0,
|
|
AllAccounts = 1,
|
|
Admin,
|
|
Test,
|
|
}
|
|
//-------------------------------------------------------------------
|
|
|
|
/// <summary>
|
|
/// ConsoleGroup view configuration.
|
|
/// </summary>
|
|
public enum ConsoleGroup
|
|
{
|
|
Associations, // Associations
|
|
Commodities, // Commodities
|
|
Transactions, // Transactions
|
|
Utilities, // Utilities
|
|
Appl, // Application specific
|
|
}
|
|
//-------------------------------------------------------------------
|
|
|
|
/// <summary>
|
|
/// ConsoleItem.
|
|
/// </summary>
|
|
public enum ConsoleItem
|
|
{
|
|
All = -1,
|
|
None = 0,
|
|
Associations_Customers = 1,
|
|
Associations_Suppliers,
|
|
Commodities,
|
|
Transactions_SalesQuotes,
|
|
Transactions_SalesOrders,
|
|
Transactions_SalesDispatches,
|
|
Transactions_SalesInvoices,
|
|
Utilities_Codes,
|
|
Utilities_Security,
|
|
Appl, // Application specific
|
|
}
|
|
//-------------------------------------------------------------------
|
|
|
|
/// <summary>
|
|
/// ConsoleLink.
|
|
/// </summary>
|
|
public enum ConsoleLink
|
|
{
|
|
All = -1,
|
|
None = 0,
|
|
Assoc_Cust_Stats = 1,
|
|
Assoc_Cust_View,
|
|
Assoc_Cust_Create,
|
|
Assoc_Supp_Stats,
|
|
Assoc_Supp_View,
|
|
Assoc_Supp_Create,
|
|
Comm_Stats,
|
|
Comm_View,
|
|
Comm_Create,
|
|
Trans_SalesQuotes_Pend_Stats, // Pending sales quotes.
|
|
Trans_SalesQuotes_Pend_View,
|
|
Trans_SalesQuotes_Pend_Create,
|
|
Trans_SalesQuotes_Open_Stats, // Open (In Progress) sales quotes.
|
|
Trans_SalesQuotes_Open_View,
|
|
Trans_SalesQuotes_Open_Create,
|
|
Trans_SalesOrders_Pend_Stats, // Pending sales orders.
|
|
Trans_SalesOrders_Pend_View,
|
|
Trans_SalesOrders_Pend_Create,
|
|
Trans_SalesOrders_Open_Stats, // Open (In Progress) sales orders.
|
|
Trans_SalesOrders_Open_View,
|
|
Trans_SalesOrders_Open_Create,
|
|
Trans_SalesDispatches_Pend_Stats, // Pending sales Dispatches.
|
|
Trans_SalesDispatches_Pend_View,
|
|
Trans_SalesDispatches_Pend_Create,
|
|
Trans_SalesInvoices_Pend_Stats, // Pending sales Invoices.
|
|
Trans_SalesInvoices_Pend_View,
|
|
Trans_SalesInvoices_Pend_Create,
|
|
Util_Codes_Stats,
|
|
Util_Codes_Manage,
|
|
Util_Security_Stats,
|
|
Util_Security_Manage,
|
|
Appl, // Application specific
|
|
}
|
|
//-------------------------------------------------------------------
|
|
|
|
/// <summary>
|
|
/// OrganisationOption configuration.
|
|
/// </summary>
|
|
public enum OrganisationOption
|
|
{
|
|
Value = 1000,
|
|
Folder,
|
|
AllowOption,
|
|
Caption,
|
|
ShowColumn,
|
|
ShowField,
|
|
FieldLabel,
|
|
Minutes,
|
|
PeriodDays,
|
|
PeriodWeeks,
|
|
NumericDecimals,
|
|
CommodityType,
|
|
CommodityFilterDefaultStatusCat,
|
|
CommodityFilterInitialStockCat,
|
|
StatusCaption_Container,
|
|
SalesLocation,
|
|
}
|
|
//-------------------------------------------------------------------
|
|
|
|
/// <summary>
|
|
/// InterfaceOption configuration.
|
|
/// </summary>
|
|
public enum InterfaceOption
|
|
{
|
|
Value = 1000,
|
|
Flag,
|
|
Hidden,
|
|
ReadOnly,
|
|
Mode,
|
|
HostPc,
|
|
Folder,
|
|
UnitMeasure,
|
|
TaxCodeColumn,
|
|
Portfolio,
|
|
PriceSet,
|
|
TransactionCreationStatus,
|
|
BackgroundColour,
|
|
WebStore_UrlHome = 2000,
|
|
WebStore_UrlCgiBin,
|
|
WebStore_FtpHost,
|
|
WebStore_FtpUser,
|
|
WebStore_FtpPword,
|
|
WebStore_FtpPathWebHome,
|
|
WebStore_FtpPathWebCgiBin,
|
|
WebStore_FtpPathWebDataRoot,
|
|
WebStore_ServerPathWebDataRoot,
|
|
WebStore_Upload_PerlShebang,
|
|
WebStore_Upload_Data,
|
|
WebStore_Upload_Method,
|
|
WebStore_Download_Data,
|
|
WebStore_Download_Method,
|
|
File_RecordType = 5000,
|
|
File_ItemLocation,
|
|
File_ItemRow,
|
|
File_ItemColumn,
|
|
File_ColumnWidth,
|
|
File_ColumnCaption,
|
|
File_Unit,
|
|
}
|
|
//-------------------------------------------------------------------
|
|
|
|
/// <summary>
|
|
/// OrgOption_Value organisation configuration.
|
|
/// </summary>
|
|
public enum OrgOption_Value
|
|
{
|
|
MaxTransactionsQueriedForEmptyFilter,
|
|
AlternativePromotionText,
|
|
CostLabourRateDefault,
|
|
DefaultSalesCarriageNominal,
|
|
DefaultPurchaseCarriageNominal,
|
|
CommoditiesAllowedNegativePrice,
|
|
TransTimeChunk1Caption,
|
|
TransTimeChunk2Caption,
|
|
EmailSubject,
|
|
EmailBody,
|
|
}
|
|
//-------------------------------------------------------------------
|
|
public enum OrgOption_Folder
|
|
{
|
|
CommodityImage,
|
|
CommodityBarcodeImage,
|
|
}
|
|
//-------------------------------------------------------------------
|
|
public enum OrgOption_AllowOption
|
|
{
|
|
UpdateAssociationCode,
|
|
CustomerAccountDetails,
|
|
StockistAssociations,
|
|
FinanceAgencyAssociations,
|
|
Commodity_PartialCodeFilter,
|
|
Commodity_SalesBudget,
|
|
Commodity_EditHistoryItem,
|
|
ImminentStock,
|
|
ManageContainerMovemements,
|
|
AwaitingContainersInImminentStock,
|
|
TransactionFilter_AnyStatus,
|
|
TransactionFilter_RetainRef,
|
|
TransactionFilter_RetainRefExt,
|
|
TransactionExport_FixedContent,
|
|
Order_BillingAddress,
|
|
SalesOrder_OnHold,
|
|
SalesOrder_ReplacementOrders,
|
|
SalesOrder_DispatchDetails,
|
|
SalesOrder_PartialInvoice,
|
|
SalesOrder_RaiseInvoiceOnCompletion,
|
|
Transaction_RetainCurrentViewOnRaise,
|
|
OrderItem_ModifyCommodityDescription,
|
|
OrderItem_ShowCommodityDetails,
|
|
OrderItem_ShowStockDetails,
|
|
PurchaseItem_AssociatedSalesItems,
|
|
Asset_Purchase,
|
|
Asset_Sale,
|
|
Asset_Rental,
|
|
Asset_Disposal,
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
public enum OrgOption_Caption
|
|
{
|
|
TransType_Project,
|
|
TransType_SalesLead,
|
|
TransType_SalesQuote,
|
|
TransType_SalesPO,
|
|
TransType_ProformaSalesOrder,
|
|
TransType_SalesOrder,
|
|
TransType_SalesDispatch,
|
|
TransType_ProformaSalesInvoice,
|
|
TransType_SalesInvoice,
|
|
TransType_PurchaseQuote,
|
|
TransType_PurchaseSO,
|
|
TransType_ProformaPurchaseOrder,
|
|
TransType_PurchaseOrder,
|
|
TransType_PurchaseDelivery,
|
|
TransType_ProformaPurchaseInvoice,
|
|
TransType_PurchaseInvoice,
|
|
MenuOpt_Projects,
|
|
MenuOpt_SalesLeads,
|
|
MenuOpt_SalesQuotes,
|
|
MenuOpt_SalesPOs,
|
|
MenuOpt_ProformaSalesOrders,
|
|
MenuOpt_SalesOrders,
|
|
MenuOpt_SalesDispatches,
|
|
MenuOpt_ProformaSalesInvoices,
|
|
MenuOpt_SalesInvoices,
|
|
MenuOpt_PurchaseQuotes,
|
|
MenuOpt_PurchaseSOs,
|
|
MenuOpt_PurchaseOrders,
|
|
MenuOpt_ProformaPurchaseOrders,
|
|
MenuOpt_PurchaseDeliveries,
|
|
MenuOpt_ProformaPurchaseInvoices,
|
|
MenuOpt_PurchaseInvoices,
|
|
}
|
|
|
|
public static Sbm.OrgOption_Caption TransTypeToOrgOption(Sbm.TransactionType transactionType)
|
|
{
|
|
switch (transactionType)
|
|
{
|
|
case TransactionType.Project: return Sbm.OrgOption_Caption.TransType_Project;
|
|
case TransactionType.SalesLead: return Sbm.OrgOption_Caption.TransType_SalesLead;
|
|
case TransactionType.SalesQuote: return Sbm.OrgOption_Caption.TransType_SalesQuote;
|
|
case TransactionType.SalesPO: return Sbm.OrgOption_Caption.TransType_SalesPO;
|
|
case TransactionType.ProformaSalesOrder: return Sbm.OrgOption_Caption.TransType_ProformaSalesOrder;
|
|
case TransactionType.SalesOrder: return Sbm.OrgOption_Caption.TransType_SalesOrder;
|
|
case TransactionType.SalesDispatch: return Sbm.OrgOption_Caption.TransType_SalesDispatch;
|
|
case TransactionType.ProformaSalesInvoice: return Sbm.OrgOption_Caption.TransType_ProformaSalesInvoice;
|
|
case TransactionType.SalesInvoice: return Sbm.OrgOption_Caption.TransType_SalesInvoice;
|
|
case TransactionType.PurchaseQuote: return Sbm.OrgOption_Caption.TransType_PurchaseQuote;
|
|
case TransactionType.PurchaseSO: return Sbm.OrgOption_Caption.TransType_PurchaseSO;
|
|
case TransactionType.ProformaPurchaseOrder: return Sbm.OrgOption_Caption.TransType_ProformaPurchaseOrder;
|
|
case TransactionType.PurchaseOrder: return Sbm.OrgOption_Caption.TransType_PurchaseOrder;
|
|
case TransactionType.PurchaseDelivery: return Sbm.OrgOption_Caption.TransType_PurchaseDelivery;
|
|
case TransactionType.ProformaPurchaseInvoice: return Sbm.OrgOption_Caption.TransType_ProformaPurchaseInvoice;
|
|
case TransactionType.PurchaseInvoice: return Sbm.OrgOption_Caption.TransType_PurchaseInvoice;
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
public static Sbm.TransactionType OrgOptionToTransType(Sbm.OrgOption_Caption caption)
|
|
{
|
|
switch (caption)
|
|
{
|
|
case Sbm.OrgOption_Caption.TransType_Project: return TransactionType.Project;
|
|
case Sbm.OrgOption_Caption.TransType_SalesLead: return TransactionType.SalesLead;
|
|
case Sbm.OrgOption_Caption.TransType_SalesQuote: return TransactionType.SalesQuote;
|
|
case Sbm.OrgOption_Caption.TransType_SalesPO: return TransactionType.SalesPO;
|
|
case Sbm.OrgOption_Caption.TransType_ProformaSalesOrder: return TransactionType.ProformaSalesOrder;
|
|
case Sbm.OrgOption_Caption.TransType_SalesOrder: return TransactionType.SalesOrder;
|
|
case Sbm.OrgOption_Caption.TransType_SalesDispatch: return TransactionType.SalesDispatch;
|
|
case Sbm.OrgOption_Caption.TransType_ProformaSalesInvoice: return TransactionType.ProformaSalesInvoice;
|
|
case Sbm.OrgOption_Caption.TransType_SalesInvoice: return TransactionType.SalesInvoice;
|
|
case Sbm.OrgOption_Caption.TransType_PurchaseQuote: return TransactionType.PurchaseQuote;
|
|
case Sbm.OrgOption_Caption.TransType_PurchaseSO: return TransactionType.PurchaseSO;
|
|
case Sbm.OrgOption_Caption.TransType_ProformaPurchaseOrder: return TransactionType.ProformaPurchaseOrder;
|
|
case Sbm.OrgOption_Caption.TransType_PurchaseOrder: return TransactionType.PurchaseOrder;
|
|
case Sbm.OrgOption_Caption.TransType_PurchaseDelivery: return TransactionType.PurchaseDelivery;
|
|
case Sbm.OrgOption_Caption.TransType_ProformaPurchaseInvoice: return TransactionType.ProformaPurchaseInvoice;
|
|
case Sbm.OrgOption_Caption.TransType_PurchaseInvoice: return TransactionType.PurchaseInvoice;
|
|
case Sbm.OrgOption_Caption.MenuOpt_Projects: return TransactionType.Project;
|
|
case Sbm.OrgOption_Caption.MenuOpt_SalesLeads: return TransactionType.SalesLead;
|
|
case Sbm.OrgOption_Caption.MenuOpt_SalesQuotes: return TransactionType.SalesQuote;
|
|
case Sbm.OrgOption_Caption.MenuOpt_SalesPOs: return TransactionType.SalesPO;
|
|
case Sbm.OrgOption_Caption.MenuOpt_ProformaSalesOrders: return TransactionType.ProformaSalesOrder;
|
|
case Sbm.OrgOption_Caption.MenuOpt_SalesOrders: return TransactionType.SalesOrder;
|
|
case Sbm.OrgOption_Caption.MenuOpt_SalesDispatches: return TransactionType.SalesDispatch;
|
|
case Sbm.OrgOption_Caption.MenuOpt_ProformaSalesInvoices: return TransactionType.ProformaSalesInvoice;
|
|
case Sbm.OrgOption_Caption.MenuOpt_SalesInvoices: return TransactionType.SalesInvoice;
|
|
case Sbm.OrgOption_Caption.MenuOpt_PurchaseQuotes: return TransactionType.PurchaseQuote;
|
|
case Sbm.OrgOption_Caption.MenuOpt_PurchaseSOs: return TransactionType.PurchaseSO;
|
|
case Sbm.OrgOption_Caption.MenuOpt_ProformaPurchaseOrders: return TransactionType.ProformaPurchaseOrder;
|
|
case Sbm.OrgOption_Caption.MenuOpt_PurchaseOrders: return TransactionType.PurchaseOrder;
|
|
case Sbm.OrgOption_Caption.MenuOpt_PurchaseDeliveries: return TransactionType.PurchaseDelivery;
|
|
case Sbm.OrgOption_Caption.MenuOpt_ProformaPurchaseInvoices: return TransactionType.ProformaPurchaseInvoice;
|
|
case Sbm.OrgOption_Caption.MenuOpt_PurchaseInvoices: return TransactionType.PurchaseInvoice;
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
public enum OrgOption_ShowColumn
|
|
{
|
|
Association_AnnualSalesTarget,
|
|
Association_Trans_LastSaleRaised, // Most recent sales order opened date. 17-Nov-10
|
|
Association_Trans_SalesValue_Open, // Net open sales order value.
|
|
Association_Trans_SalesValue_Cytd, // Net sales order value closed this calendar year.
|
|
Association_Trans_SalesValue_Lcy, // Net sales order value closed last calendar year.
|
|
Association_Group,
|
|
Commodity_CatalogRef,
|
|
Commodity_Weight,
|
|
Commodity_PackQtySale,
|
|
Commodity_StockAllocated,
|
|
Commodity_StockLevelSales,
|
|
Commodity_StockAvailable,
|
|
Order_AllocationInd,
|
|
SalesOrder_DeliveryCourier,
|
|
SalesOrder_HasInvoice,
|
|
Transaction_ContactArea,
|
|
Accounts_InvoiceRef,
|
|
OrderItem_AllocationInd,
|
|
OrderItem_Stock_Current,
|
|
OrderItem_Stock_Available,
|
|
OrderItem_Stock_BySalesLocation,
|
|
SalesOrderItem_QtyDispatched,
|
|
SalesOrderItem_QtyInvoiced,
|
|
SalesOrderItem_NextProcess,
|
|
Vehicle_KeyLocation,
|
|
}
|
|
//-------------------------------------------------------------------
|
|
|
|
/// <summary>
|
|
/// OrgOption_ShowField equivalent list in SapItemOptionConsole & InitOptionData must be kept up to date.
|
|
/// </summary>
|
|
public enum OrgOption_ShowField
|
|
{
|
|
Association_AnnualSalesTarget = SbmDbDfn.ColumnIdx.Association_AnnualSalesTarget,
|
|
Address_LastVisitOn = SbmDbDfn.ColumnIdx.Address_LastVisitOn,
|
|
Commodity_DrawingIssue = SbmDbDfn.ColumnIdx.Commodity_DrawingIssue,
|
|
Commodity_DrawingNo = SbmDbDfn.ColumnIdx.Commodity_DrawingNo,
|
|
Commodity_Department = SbmDbDfn.ColumnIdx.Commodity_Department,
|
|
Commodity_CatalogRef = SbmDbDfn.ColumnIdx.Commodity_CatalogRef,
|
|
Commodity_Volume = SbmDbDfn.ColumnIdx.Commodity_Volume,
|
|
Commodity_Density = SbmDbDfn.ColumnIdx.Commodity_Density,
|
|
Commodity_BoxQuantity = SbmDbDfn.ColumnIdx.Commodity_BoxQuantity,
|
|
Commodity_ICNTariffCode = SbmDbDfn.ColumnIdx.Commodity_ICNTariffCode,
|
|
Commodity_PlaceOfOrigin = SbmDbDfn.ColumnIdx.Commodity_PlaceOfOrigin,
|
|
Commodity_MaterialCost = SbmDbDfn.ColumnIdx.Commodity_MaterialCost,
|
|
Commodity_ExWorksCost = SbmDbDfn.ColumnIdx.Commodity_ExWorksCost,
|
|
Commodity_RetailPricePlanned = SbmDbDfn.ColumnIdx.Commodity_RetailPricePlanned,
|
|
Commodity_CarriageCostIndicative = SbmDbDfn.ColumnIdx.Commodity_CarriageCostIndicative,
|
|
StockLevel_Bay1 = SbmDbDfn.ColumnIdx.StockLevel_Bay1,
|
|
StockLevel_Bay2 = SbmDbDfn.ColumnIdx.StockLevel_Bay2,
|
|
StockLevel_Bay3 = SbmDbDfn.ColumnIdx.StockLevel_Bay3,
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
/// <summary>
|
|
/// OrgOption_ShowField equivalent list in SapItemOptionConsole & InitOptionData must be kept up to date.
|
|
/// </summary>
|
|
public enum OrgOption_FieldLabel
|
|
{
|
|
Commodity_CatalogRef = SbmDbDfn.ColumnIdx.Commodity_CatalogRef,
|
|
Commodity_Dimensions = SbmDbDfn.ColumnIdx.Commodity_Dimensions,
|
|
Commodity_ICNTariffCode = SbmDbDfn.ColumnIdx.Commodity_ICNTariffCode,
|
|
Commodity_CostPrice = SbmDbDfn.ColumnIdx.Commodity_CostPrice,
|
|
Commodity_PlaceOfOrigin = SbmDbDfn.ColumnIdx.Commodity_PlaceOfOrigin,
|
|
Commodity_MaterialCost = SbmDbDfn.ColumnIdx.Commodity_MaterialCost,
|
|
Commodity_CurrencyIdMaterial = SbmDbDfn.ColumnIdx.Commodity_CurrencyIdMaterial,
|
|
Commodity_ExWorksCost = SbmDbDfn.ColumnIdx.Commodity_ExWorksCost,
|
|
Commodity_CurrencyIdExWorks = SbmDbDfn.ColumnIdx.Commodity_CurrencyIdExWorks,
|
|
Commodity_SpecSummary = SbmDbDfn.ColumnIdx.Commodity_SpecSummary,
|
|
Commodity_MaterialCode = SbmDbDfn.ColumnIdx.Commodity_MaterialCode,
|
|
Commodity_FinishCode = SbmDbDfn.ColumnIdx.Commodity_FinishCode,
|
|
Commodity_DescDetail = SbmDbDfn.ColumnIdx.Commodity_DescDetail,
|
|
Commodity_RetailPricePlanned = SbmDbDfn.ColumnIdx.Commodity_RetailPricePlanned,
|
|
Affiliate_Abbrev = SbmDbDfn.ColumnIdx.Affiliate_Abbrev,
|
|
Affiliate_Nature = SbmDbDfn.ColumnIdx.Affiliate_Nature,
|
|
Association_Location = SbmDbDfn.ColumnIdx.Association_Location,
|
|
Association_AccountManagerCode = SbmDbDfn.ColumnIdx.Association_AccountManagerCode,
|
|
Association_AccountHandlerCode = SbmDbDfn.ColumnIdx.Association_AccountHandlerCode,
|
|
Association_AccountTypeCode = SbmDbDfn.ColumnIdx.Association_AccountTypeCode,
|
|
Association_AccountRatingCode = SbmDbDfn.ColumnIdx.Association_AccountRatingCode,
|
|
Association_ContactAreaCode = SbmDbDfn.ColumnIdx.Association_ContactAreaCode,
|
|
Association_ContactHandlerCode = SbmDbDfn.ColumnIdx.Association_ContactHandlerCode,
|
|
Association_ContactMethodCode = SbmDbDfn.ColumnIdx.Association_ContactMethodCode,
|
|
Association_ContactCallCycleCode = SbmDbDfn.ColumnIdx.Association_ContactCallCycleCode,
|
|
Transaction_Ref = SbmDbDfn.ColumnIdx.Transaction_Ref,
|
|
Transaction_RefExt = SbmDbDfn.ColumnIdx.Transaction_RefExt,
|
|
StockLevel_Bay1 = SbmDbDfn.ColumnIdx.StockLevel_Bay1,
|
|
StockLevel_Bay2 = SbmDbDfn.ColumnIdx.StockLevel_Bay2,
|
|
StockLevel_Bay3 = SbmDbDfn.ColumnIdx.StockLevel_Bay3,
|
|
}
|
|
public enum OrgOption_TransCreateStatus
|
|
{
|
|
ProformaSalesOrder,
|
|
SalesOrder,
|
|
}
|
|
public enum OrgOption_StatusContainer
|
|
{
|
|
Provisional,
|
|
Awaiting,
|
|
Active,
|
|
Actioned,
|
|
Cancelled,
|
|
}
|
|
public enum OrgOption_PeriodDays
|
|
{
|
|
TransactionDatesInFuture,
|
|
UpdateClosedTransaction,
|
|
UpdateClosedTransaction_DispatchDetails,
|
|
UpdateStockLevelsInPast,
|
|
}
|
|
public enum OrgOption_Minutes
|
|
{
|
|
AutoSaveTransaction,
|
|
}
|
|
public enum OrgOption_PeriodWeeks
|
|
{
|
|
ImminentStockDue,
|
|
Timesheets,
|
|
UpdateTimeRecords_Control,
|
|
}
|
|
public enum OrgOption_NumericDecimals
|
|
{
|
|
OrderQuantity,
|
|
CommodityWeight,
|
|
CommodityLength,
|
|
CommodityVolume,
|
|
CommodityDensity,
|
|
}
|
|
public enum OrgOption_CommodityType
|
|
{
|
|
CommodityCreationDefault,
|
|
}
|
|
public enum OrgOption_StockLocation
|
|
{
|
|
SalesOrderDefault,
|
|
PurchaseOrderDefault,
|
|
TransactionFilterDefault,
|
|
}
|
|
public enum OrgOption_CmdFilterStockCat
|
|
{
|
|
MaintView,
|
|
SalesSearch,
|
|
PurchaseSearch,
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
/// <summary>
|
|
/// WebUploadData website configuration.
|
|
/// </summary>
|
|
public enum WebUploadData
|
|
{
|
|
Unknown = 0,
|
|
Portfolio = 10,
|
|
StockLevels,
|
|
Accounts,
|
|
SalesProfile,
|
|
}
|
|
public enum WebUploadMethod
|
|
{
|
|
Unknown = 0,
|
|
None = 10,
|
|
Ftp,
|
|
Webstore,
|
|
}
|
|
public enum WebDownloadData
|
|
{
|
|
Unknown = 0,
|
|
Orders = 10,
|
|
}
|
|
public enum WebDownloadMethod
|
|
{
|
|
Unknown = 0,
|
|
None = 10,
|
|
Ftp,
|
|
Webstore,
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
/// <summary>
|
|
/// SystemInterface_Website_Flag.
|
|
/// </summary>
|
|
public enum SystemInterface_Website_Flag
|
|
{
|
|
IncludeImminentStock,
|
|
AllowZeroOrderItemAmount,
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
/// <summary>FileInterface option.</summary>
|
|
public enum FileInterface_RowColValue
|
|
{
|
|
Unknown = 0,
|
|
Row = 10,
|
|
Col,
|
|
Value,
|
|
}
|
|
/// <summary>File interface mode.</summary>
|
|
public enum FileInterface_Mode
|
|
{
|
|
Unknown = 0,
|
|
Csv = 1,
|
|
MsExcel,
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
/// <summary>
|
|
/// SystemAccountType dont change positive values, these are tied to the database.
|
|
/// </summary>
|
|
public enum SystemAccountType
|
|
{
|
|
Unknown = 0,
|
|
Customer = 10,
|
|
}
|
|
//-------------------------------------------------------------------
|
|
|
|
/// <summary>
|
|
/// DiaryEntryType dont change positive values, these are tied to the database.
|
|
/// </summary>
|
|
public enum DiaryEntryType
|
|
{
|
|
Unknown = 0,
|
|
StockMovement = 10,
|
|
SalesOrderDelivery = 20,
|
|
TransContactReminder = 21, // One per transaction, eg. Customer sales order reminder.
|
|
JobBooking = 30, // Allows period across more than one day.
|
|
JobActionDue = 31,
|
|
StaffHoliday = 900,
|
|
}
|
|
//-------------------------------------------------------------------
|
|
|
|
/// <summary>
|
|
/// AffiliateCategory used to distinguish between individuals and organisations of any types.
|
|
/// </summary>
|
|
public enum AffiliateCategory
|
|
{
|
|
Unknown = -1,
|
|
Individual = 0,
|
|
Organisation = 1,
|
|
}
|
|
//-------------------------------------------------------------------
|
|
|
|
/// <summary>
|
|
/// AffiliateType dont change positive values, these are tied to the database.
|
|
/// </summary>
|
|
public enum AffiliateType
|
|
{
|
|
/// <summary>
|
|
/// Organisation or Individual.</summary>
|
|
AnyContact = -3,
|
|
/// <summary>Any type of Organisation.</summary>
|
|
AnyOrganisation = -2,
|
|
Any = 0,
|
|
Unknown = Any,
|
|
// NB Do not change the positive values, as tied to the database.
|
|
Individual = 1, // 'IND'
|
|
Commercial = 2, // 'COM'
|
|
Society = 3, // 'SOC'
|
|
Academic = 4, // 'ACA'
|
|
PublicSector = 5, // 'PUB'
|
|
Charity = 6, // 'CHA'
|
|
ContactGroup = 10, // 'GRP'
|
|
}
|
|
|
|
//---------------------------------------------------------------------------
|
|
public enum AddressType
|
|
{
|
|
Any = 0,
|
|
// NB Do not change the positive values, as tied to the database.
|
|
Office = 1, // 'OFF'
|
|
Registered = 2, // 'REG'
|
|
Home = 3, // 'HOM'
|
|
Delivery = 4, // 'DEL'
|
|
Billing = 5, // 'BIL'
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
/// <summary>
|
|
/// ItemStockAllocationStatus stock control.
|
|
/// </summary>
|
|
public enum ItemStockAllocationStatus
|
|
{
|
|
Unknown = 0,
|
|
None,
|
|
Full,
|
|
Partial,
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
/// <summary>
|
|
/// Location.
|
|
/// </summary>
|
|
public enum LocationCategory
|
|
{
|
|
Any = -1,
|
|
Unknown = 0,
|
|
Stock = 10,
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
public enum LocationFilter
|
|
{
|
|
Calc = -4, // All 'Calculated' locations.
|
|
Sales = -3, // All 'Sales' locations.
|
|
All = -2, // All locations.
|
|
Any = -1,
|
|
Unknown = 0,
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
// Containers.
|
|
public enum ContainerCategory
|
|
{
|
|
Any = -1,
|
|
Unknown = 0,
|
|
// NB Do not change the positive values, as tied to the database.
|
|
Stock = 10,
|
|
}
|
|
public enum ContainerType
|
|
{
|
|
Any = -1,
|
|
Unknown = 0,
|
|
// NB Do not change the positive values, as tied to the database.
|
|
Vehicle = 100,
|
|
Truck,
|
|
Train,
|
|
Ship,
|
|
Container = 200,
|
|
Wagon,
|
|
Pallet = 300,
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
/// <summary>
|
|
/// ItemLinkData.
|
|
/// </summary>
|
|
public enum ItemLinkData
|
|
{
|
|
Unknown = 0,
|
|
// NB Do not change the positive values, as tied to the database.
|
|
Requirement_AssocItem_PurchaseCostProportion = 1,
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
|
|
/// <summary>
|
|
/// ItemLinkData.
|
|
/// </summary>
|
|
public enum PortfolioItemType
|
|
{
|
|
Any = -1,
|
|
Unknown = 0,
|
|
Portfolio = 10,
|
|
Category = 20,
|
|
Commodity = 30,
|
|
}
|
|
public enum PortfolioItemStatusCat
|
|
{
|
|
Current = -2,
|
|
Any = -1,
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
// Commodity.
|
|
public enum CommodityType
|
|
{
|
|
AnyProduct = -2,
|
|
Any = -1,
|
|
Unknown = 0,
|
|
// NB Do not change the positive values, as tied to the database.
|
|
Stock = 1, // 'STK'
|
|
NonStock = 2, // 'NST'
|
|
Service = 3, // 'SRV'
|
|
Asset = 4, // 'AST'
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
// Stock Movement.
|
|
public static int DefaultUpdateLimit_Movement { get; } = 14;
|
|
public enum MovementType
|
|
{
|
|
Any = -1,
|
|
Unknown = 0,
|
|
// NB Do not change the positive values, as tied to the database.
|
|
StockTransfer = 10,
|
|
SalesAllocation = 20,
|
|
PurchaseAllocation = 30,
|
|
}
|
|
public enum StockLevelType
|
|
{
|
|
Any = -1,
|
|
Unknown = 0,
|
|
// NB Do not change the positive values, as tied to the database.
|
|
CurrentLevel = 10,
|
|
StockTake = 20,
|
|
}
|
|
public enum StockEventType
|
|
{
|
|
Any = -1,
|
|
Unknown = 0,
|
|
// NB Do not change the positive values, as tied to the database.
|
|
Movement = 1,
|
|
StockLevel,
|
|
}
|
|
public enum StockLevelSource
|
|
{
|
|
Any = -1,
|
|
Unknown = 0,
|
|
// NB Do not change the positive values, as tied to the database.
|
|
Manual = 10,
|
|
System = 20,
|
|
Sage = 30, // NB Needs to be corrected from '21' on Cadix db [Apr2012].
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
// Pricing.
|
|
public enum PriceType
|
|
{
|
|
Unknown = 0,
|
|
Customer = 10,
|
|
Supplier = 20,
|
|
Special = 30,
|
|
}
|
|
public enum PriceCalcMethod
|
|
{
|
|
Unknown = 0,
|
|
/// <summary>Fixed discounted price i.e. List=100.00 Fixed=60.00</summary>
|
|
Fixed = 10,
|
|
/// <summary>Uses standard stock record sales price</summary>
|
|
Standard = 11,
|
|
/// <summary>Decrease product sales price by a percentage</summary>
|
|
DecreasePercent = 12,
|
|
/// <summary>Decrease product sales price by a specified amount</summary>
|
|
DecreaseValue = 13,
|
|
/// <summary>Increase cost price by a percentage</summary>
|
|
MarkupCost = 14,
|
|
/// <summary>Increase cost price by a specified amount</summary>
|
|
MarkupValue = 15,
|
|
/// <summary>Increase sales price by a percentage</summary>
|
|
MarkupSales = 16,
|
|
}
|
|
public enum PriceRounderMethod
|
|
{
|
|
Unknown = 0,
|
|
}
|
|
public enum PriceRounderDirection
|
|
{
|
|
Unknown = 0,
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
// Associations.
|
|
public enum AssociationType
|
|
{
|
|
Personal = -2, // Task management only.
|
|
NotInternal = -1,
|
|
Any = 0,
|
|
Unknown = Any,
|
|
// NB Do not change the positive values, as tied to the database.
|
|
Internal = 1,
|
|
Customer = 2,
|
|
Supplier = 3,
|
|
Associate = 4,
|
|
Member = 5,
|
|
Contractor = 6,
|
|
Stockist = 7,
|
|
FinanceAgency = 8,
|
|
}
|
|
public enum AssociationTypeContext
|
|
{
|
|
Any,
|
|
TimeRecording, // Association types that can have time records.
|
|
Action, // Association types that can have actions.
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
// Transaction.
|
|
public enum TransactionType
|
|
{
|
|
Any = -1,
|
|
Unknown = 0,
|
|
// NB Do not change the positive values, as tied to the database.
|
|
Project = 10, // 'PRO'
|
|
SalesLead = 20, // 'SLD'
|
|
SalesQuote = 21, // 'SQT'
|
|
SalesOrder = 22, // 'SAL'
|
|
SalesPO = 23, // 'SPO'
|
|
ProformaSalesOrder = 24, // 'SAP'
|
|
PurchaseQuote = 30, // 'PQT'
|
|
PurchaseOrder = 31, // 'PUR'
|
|
PurchaseSO = 32, // 'PSO'
|
|
ProformaPurchaseOrder = 33, // 'PUP'
|
|
SalesDispatch = 40, // 'SDP'
|
|
PurchaseDelivery = 41, // 'PDL'
|
|
ProformaSalesInvoice = 50, // 'PSI'
|
|
SalesInvoice = 51, // 'SAI'
|
|
PurchaseInvoice = 52, // 'PUV'
|
|
ProformaPurchaseInvoice = 53, // 'PPI'
|
|
}
|
|
public enum TransactionTypeContext
|
|
{
|
|
Any,
|
|
TimeRecording, // Transaction types that can have time records.
|
|
Action, // Transaction types that can have actions.
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
// Requirements.
|
|
public enum RequirementType
|
|
{
|
|
Any = 0,
|
|
Unknown = Any,
|
|
Detail = 1,
|
|
Job = 2,
|
|
}
|
|
public enum TaskCodeType
|
|
{
|
|
Any = 0,
|
|
Project = 1,
|
|
Job = 2,
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
// Constituents.
|
|
public enum ConstituentType
|
|
{
|
|
Any = -1,
|
|
Unknown = 0,
|
|
// NB Do not change the positive values, as tied to the database.
|
|
TimeRecord = 10,
|
|
Event = 11, // Not used?
|
|
Task = 12,
|
|
Response = 13,
|
|
Consumable = 14,
|
|
Expense = 15,
|
|
Process = 20,
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
// Cost Estimates.
|
|
public enum CostEstimateCategoryType
|
|
{
|
|
Any = 0,
|
|
// NB Do not change the positive values, as tied to the database.
|
|
Cost = 1,
|
|
Labour
|
|
}
|
|
//-------------------------------------------------------------------
|
|
public enum CostEstimateCategory
|
|
{
|
|
Unknown = -1,
|
|
// NB Do not change the positive values, as tied to the database.
|
|
CommodityCost = 0,
|
|
CostPerUnit = 1,
|
|
CostPerJob = 2,
|
|
LabourPerUnit = 3,
|
|
LabourPerJob = 4,
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
public enum DiscountMarkup
|
|
{
|
|
Discount = 10,
|
|
Markup = 20,
|
|
}
|
|
public enum DiscountType
|
|
{
|
|
// Values 0 - 6 are in line with Sage Sales Order definition.
|
|
NoDiscount = 0, // No Discount Applied
|
|
ValueDiscount = 1, // Discount Applied by Invoice Value
|
|
QtyDiscountA = 2, // Discount Applied by Banding A
|
|
QtyDiscountB = 3, // Discount Applied by Banding B
|
|
QtyDiscountC = 4, // Discount Applied by Banding C
|
|
QtyDiscountD = 5, // Discount Applied by Banding D
|
|
QtyDiscountE = 6, // Discount Applied by Banding E
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
public enum ProcessCategory
|
|
{
|
|
Any = -1,
|
|
Unknown = 0,
|
|
// NB Do not change the positive values, as tied to the database.
|
|
Commodity = 10,
|
|
Asset = 20,
|
|
}
|
|
public enum ProcessType
|
|
{
|
|
Any = -1,
|
|
Unknown = 0,
|
|
// NB Do not change the positive values, as tied to the database.
|
|
Preparation = 10,
|
|
Production = 11,
|
|
Finishing = 12,
|
|
External = 20,
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
public enum PaymentType
|
|
{
|
|
Any = -1,
|
|
Unknown = 0,
|
|
// NB Do not change the positive values, as tied to the database.
|
|
Finance = 10,
|
|
Cash = 20,
|
|
Cheque = 30,
|
|
DebitCard = 40,
|
|
CreditCard = 50,
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
// Assets.
|
|
public enum AssetType
|
|
{
|
|
Unknown = 0,
|
|
Any = Unknown,
|
|
// NB Do not change the positive values, as tied to the database.
|
|
General = 10,
|
|
Furniture = 11,
|
|
Vehicle = 50,
|
|
ComputerHardware = 60,
|
|
}
|
|
public enum AssetIncomeType
|
|
{
|
|
None = 0,
|
|
Unknown = 0,
|
|
// NB Do not change the positive values, as tied to the database.
|
|
Sale = 10,
|
|
Rental = 20,
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
// Vehicles.
|
|
public enum VehicleType
|
|
{
|
|
Unknown = 0,
|
|
Any = Unknown,
|
|
// NB Do not change the positive values, as tied to the database.
|
|
Car = 10,
|
|
Minibus = 11,
|
|
Van = 12,
|
|
Truck = 13,
|
|
Coach = 14,
|
|
}
|
|
public enum VehicleEventType
|
|
{
|
|
Any = -1,
|
|
Unknown = 0,
|
|
// NB Do not change the positive values, as tied to the database.
|
|
Odometer = 10,
|
|
Service = 11,
|
|
Incident = 12,
|
|
Repair = 13,
|
|
Comment = 14,
|
|
}
|
|
public enum VehicleFeatureSource
|
|
{
|
|
Any = -1,
|
|
Unknown = 0,
|
|
// NB Do not change the positive values, as tied to the database.
|
|
Manual = 10,
|
|
HPI = 11,
|
|
CAP = 12,
|
|
DVLA = 13,
|
|
SMMT = 14,
|
|
}
|
|
public enum VehicleFeatureType
|
|
{
|
|
Any = -1,
|
|
Unknown = 0,
|
|
// NB Do not change the positive values, as tied to the database.
|
|
Make = 10,
|
|
Model = 11,
|
|
Derivative = 12,
|
|
Body = 13,
|
|
DoorPlan = 14,
|
|
Trim = 20,
|
|
Fuel = 21,
|
|
Transmission = 22, // Manual or Automatic.
|
|
TransDetail = 23, // As stated by HPI (gears, man/auto
|
|
WheelPlan = 24,
|
|
Colour = 50,
|
|
PreviousColour = 51,
|
|
LastPrevColour = 52,
|
|
OriginalColour = 53,
|
|
Technical = 100, // Multiple features.
|
|
Equipment = 101, // Standard equipment.
|
|
OptionalExtra = 102, // Manufacturer option.
|
|
SelectedOption = 103,
|
|
}
|
|
public enum VehicleOptionType
|
|
{
|
|
Any = -1,
|
|
Unknown = 0,
|
|
// NB Do not change the positive values, as tied to the database.
|
|
Trim = 10,
|
|
Ventilation,
|
|
Wheels,
|
|
PaintFinish,
|
|
Packs,
|
|
}
|
|
public enum VehicleTransType
|
|
{
|
|
Any = -1,
|
|
Unknown = 0,
|
|
// NB Do not change the positive values, as tied to the database.
|
|
Manual = 10,
|
|
Automatic = 20,
|
|
}
|
|
public enum VehicleFuelType
|
|
{
|
|
Any = -1,
|
|
Unknown = 0,
|
|
// NB Do not change the positive values, as tied to the database.
|
|
Petrol = 10,
|
|
Diesel = 11,
|
|
Lpg = 12,
|
|
Electric = 13,
|
|
Hybrid = 20,
|
|
}
|
|
public enum VehicleOdometerUnits
|
|
{
|
|
Any = -1,
|
|
Unknown = 0,
|
|
// NB Do not change the positive values, as tied to the database.
|
|
Mile = 10,
|
|
Kilometre = 11,
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
// Interface types.
|
|
public enum InterfaceType_Website
|
|
{
|
|
Unknown = 0,
|
|
// NB Do not change the positive values, as tied to the database.
|
|
WebStore = 10,
|
|
JoomlaVirtueMart = 40,
|
|
MiMoWeb = 150, // MiMo website.
|
|
}
|
|
public enum InterfaceType_Accounts
|
|
{
|
|
Unknown = 0,
|
|
// NB Do not change the positive values, as tied to the database.
|
|
SageLine50 = 50,
|
|
QuickBooks = 60,
|
|
}
|
|
public enum InterfaceType_System
|
|
{
|
|
Unknown = 0,
|
|
// NB Do not change the positive values, as tied to the database.
|
|
MSOutlook = 30, // MS Outlook.
|
|
PostcodeAnywhere = 50, // Postcode Anywhere service.
|
|
Bac = 75, // BAC handhelds (Cadix).
|
|
Capi = 76, // Capi, Holland(Cadix).
|
|
Pvh = 80, // Practical Van Hire (Vulcan).
|
|
Cap = 160, // Vehicle handling (MiMo).
|
|
Hpi = 161, // Vehicle handling (MiMo).
|
|
Anchor_OrderFulfilment = 200, // Order fulfilment for Anchor Storage.
|
|
Cadix_OrderSpreadsheet_Argos = 220,
|
|
Cadix_OrderSpreadsheet_Homebase = 221,
|
|
}
|
|
public enum InterfaceType_File
|
|
{
|
|
Unknown = 0,
|
|
// NB Do not change the positive values, as tied to the database.
|
|
TransactionImport = 10,
|
|
TransactionExport = 11,
|
|
AffiliateImport = 20,
|
|
AffiliateExport = 21,
|
|
AssociationImport = 22,
|
|
AssociationExport = 23,
|
|
CommodityImport = 30,
|
|
CommodityExport = 31,
|
|
VehicleImport = 40,
|
|
VehicleExport = 41,
|
|
LeasewayInvoice = 100, // Vulcan.
|
|
TransToWord_Project = 1500 + TransactionType.Project,
|
|
TransToWord_SalesLead = 1500 + TransactionType.SalesLead,
|
|
TransToWord_SalesQuote = 1500 + TransactionType.SalesQuote,
|
|
//TransToWord_ProformaSalesOrder = 1500+ProformaSalesOrder, - Use Sales Order interface.
|
|
TransToWord_SalesOrder = 1500 + TransactionType.SalesOrder,
|
|
TransToWord_SalesPO = 1500 + TransactionType.SalesPO,
|
|
TransToWord_SalesDispatch = 1500 + TransactionType.SalesDispatch,
|
|
//TransToWord_ProformaSalesInvoice = 1500+ProformaSalesInvoice, - Use Sales Invoice interface.
|
|
TransToWord_SalesInvoice = 1500 + TransactionType.SalesInvoice,
|
|
TransToWord_PurchaseQuote = 1500 + TransactionType.PurchaseQuote,
|
|
//TransToWord_ProformaPurchaseOrder = 1500+ProformaPurchaseOrder, - Use Purchase Order interface.
|
|
TransToWord_PurchaseOrder = 1500 + TransactionType.PurchaseOrder,
|
|
TransToWord_PurchaseSO = 1500 + TransactionType.PurchaseSO,
|
|
TransToWord_PurchaseDelivery = 1500 + TransactionType.PurchaseDelivery,
|
|
//TransToWord_ProformaPurchaseInvoice = 1500+ProformaPurchaseInvoice, - Use Purchase Invoice interface.
|
|
TransToWord_PurchaseInvoice = 1500 + TransactionType.PurchaseInvoice,
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
// Interface Data Types.
|
|
public enum InterfaceDataType
|
|
{
|
|
// Default.
|
|
Unknown = -1,
|
|
Default,
|
|
// Contacts:
|
|
Contact,
|
|
Association,
|
|
Customer,
|
|
Supplier,
|
|
Associate,
|
|
Contractor,
|
|
// Assets:
|
|
AssetCategory,
|
|
Asset,
|
|
VehicleClass,
|
|
Vehicle,
|
|
// Commodities:
|
|
Commodity,
|
|
PriceSet,
|
|
PortfolioItem,
|
|
CommodityCustomer,
|
|
CommoditySupplier,
|
|
// Stock control:
|
|
Location,
|
|
Container,
|
|
StockTake,
|
|
StockLevel,
|
|
StockMovement,
|
|
// Transactions:
|
|
Transaction,
|
|
SalesQuote,
|
|
ProformaSalesOrder,
|
|
SalesOrder,
|
|
SalesDispatch,
|
|
ProformaSalesInvoice,
|
|
SalesInvoice,
|
|
PurchaseQuote,
|
|
ProformaPurchaseOrder,
|
|
PurchaseOrder,
|
|
// Transaction details:
|
|
ConstituentTime,
|
|
// Utility data:
|
|
Pricing,
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
// Action to be performed for each Stock Type on import.
|
|
public enum SageStockTypeImportAction
|
|
{
|
|
Import,
|
|
Ignore
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
}
|
|
//=======================================================================
|
|
}
|