123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136 |
- using System;
- using InABox.Core;
- namespace Comal.Classes
- {
- public class ProductLink : EntityLink<Product>, IProduct
- {
- [CodePopupEditor(typeof(Product), "TaxCode.ID", "PurchaseGL.ID")]
- public override Guid ID { get; set; }
- [CodeEditor(Visible = Visible.Default)]
- public string Code { get; set; }
- [TextBoxEditor(Visible = Visible.Optional, Editable = Editable.Hidden)]
- public string Name { get; set; }
- [NullEditor]
- [Obsolete("Replaced with Dimensions", true)]
- // [DoubleEditor(Visible = Visible.Optional, Editable = Editable.Hidden)]
- public double UnitSize { get; set; }
- [NullEditor]
- [Obsolete("Replaced with Dimensions", true)]
- // [DoubleEditor(Visible = Visible.Optional, Editable = Editable.Hidden)]
- public double Weight { get; set; }
- [NullEditor]
- [Obsolete("Replaced with Dimensions", false)]
- public ProductUOMLink Units { get; set; }
- public ProductGroupLink Group { get; set; }
-
- public ProductSupplierLink Supplier { get; set; }
- [NullEditor]
- [RequiredColumn]
- public ProductInstanceLink DefaultInstance { get; set; }
-
- public ProductDimensionUnitLink UnitOfMeasure { get; set; }
- [NullEditor]
- [RequiredColumn]
- public StockLocationLink DefaultLocation { get; set; }
-
- [NullEditor]
- public StockWarehouseLink Warehouse { get; set; }
- [CurrencyEditor(Visible = Visible.Optional, Editable = Editable.Hidden)]
- public double BaseCost { get; set; }
- [CurrencyEditor(Visible = Visible.Optional, Editable = Editable.Hidden)]
- public double NettCost { get; set; }
-
- [Obsolete("Replaced with ProductInstance.AverageCost", true)]
- [CurrencyEditor(Visible = Visible.Optional, Editable = Editable.Hidden)]
- public double AverageCost { get; set; }
- [NullEditor]
- [RequiredColumn]
- public TaxCodeLink TaxCode { get; set; }
- [NullEditor]
- [RequiredColumn]
- public PurchaseGLCodeLink PurchaseGL { get; set; }
- [NullEditor]
- [RequiredColumn]
- public SalesGLCodeLink SellGL { get; set; }
- [NullEditor]
- public bool NonStock { get; set; } = true;
- [NullEditor]
- public ImageDocumentLink Image { get; set; }
- [CheckBoxEditor(Visible = Visible.Optional, Editable = Editable.Hidden)]
- public bool UseDefaultSupplierPricing { get; set; }
- [EnumLookupEditor(typeof(ProductPricingStrategy), Visible = Visible.Optional, Editable = Editable.Hidden)]
- public ProductPricingStrategy PricingStrategy { get; set; }
- [EnumLookupEditor(typeof(SupplierProductOrderStrategy), Visible = Visible.Optional, Editable = Editable.Hidden)]
- public SupplierProductOrderStrategy OrderStrategy { get; set; }
-
- [NullEditor]
- [RequiredColumn]
- public CostCentreLink CostCentre { get; set; }
-
- [NullEditor]
- public ProductCharge Charge { get; set; }
- [NullEditor]
- public DigitalFormLink DigitalForm { get; set; }
-
- [DoubleEditor(Visible=Visible.Optional, Editable = Editable.Hidden, Summary=Summary.Sum)]
- public double UnitQty { get; set; }
- [DoubleEditor(Visible=Visible.Optional, Editable = Editable.Hidden, Summary=Summary.Sum)]
- public double RemnantQty { get; set; }
- [DoubleEditor(Visible=Visible.Optional, Editable = Editable.Hidden, Summary=Summary.Sum)]
- public double OnOrder { get; set; }
- [DoubleEditor(Visible=Visible.Optional, Editable = Editable.Hidden, Summary=Summary.Sum)]
- public double TotalStock { get; set; }
- [DoubleEditor(Visible=Visible.Optional, Editable = Editable.Hidden, Summary=Summary.Sum)]
- public double ReservedStock { get; set; }
- [DoubleEditor(Visible=Visible.Optional, Editable = Editable.Hidden, Summary=Summary.Sum)]
- public double FreeStock { get; set; }
- [NullEditor]
- [RequiredColumn]
- [Obsolete]
- public ProductDimensions Dimensions { get; set; }
- [NullEditor]
- [RequiredColumn]
- [Obsolete]
- public ProductStyleLink DefaultStyle { get; set; }
- [NullEditor]
- [Obsolete]
- public int MinimumStockLevel { get; set; }
- [NullEditor]
- public string Issues { get; set; }
- public override string ToString()
- {
- return string.Format("{0}: {1}", Code, Name);
- }
- }
- }
|