/// <summary> /// Gets picked order detail for item (Used by the IssueLog) /// </summary> /// <param name="ordID"></param> /// <param name="storeid"></param> /// <param name="pricedItems">True - For Priced Items Only, False - For Delivery Notes Only</param> /// <returns></returns> public DataView GetPickedOrderDetailForOrder(int stvLogID, bool includeDeleted)//,bool pricedItems) { string query; // remove this line ... // check if this has changed the dn to stv conversion // (pld.DeliveryNote is null or pld.DeliveryNote = 0 or (pld.DeliveryNote=1 and pld.UnitPrice<>0)) and query = HCMIS.Repository.Queries.PickList.SelectGetPickedOrderDetailForOrder(stvLogID); if (includeDeleted) { query = HCMIS.Repository.Queries.PickList.SelectGetPickedOrderDetailForOrderIncludeDeleted(stvLogID); } this.LoadFromRawSql(query); // Add important columns this.DataTable.Columns.Add("SKUTOPICK", typeof(int)); this.DataTable.Columns.Add("SKUPICKED", typeof(int)); this.DataTable.Columns.Add("BUPICKED", typeof(int)); this.DataTable.Columns.Add("BoxSizeDisplay"); this.DataTable.Columns.Add("SKUBU", typeof(int)); this.DataTable.Columns.Add("IsManufacturerLocal", typeof(bool)); this.DataTable.Columns.Add("PrintedSTVNumber", typeof(string)); this.DataTable.Columns.Add("PhysicalStoreName", typeof(string)); this.DataTable.Columns.Add("PhysicalStoreTypeID", typeof(int)); this.DataTable.Columns.Add("PhysicalStoreTypeName", typeof(string)); ItemManufacturer im = new ItemManufacturer(); int i = 1; while (!this.EOF) { int packs = Convert.ToInt32(this.GetColumn("Packs")); int manufacturer = Convert.ToInt32(this.GetColumn("ManufacturerID")); Manufacturer m = new Manufacturer(); m.LoadByPrimaryKey(manufacturer); if (!m.IsColumnNull("CountryOfOrigin") && m.CountryOfOrigin == "Ethiopia") { this.SetColumn("IsManufacturerLocal", true); } else { this.SetColumn("IsManufacturerLocal", false); } int recPalletID = Convert.ToInt32(this.GetColumn("ReceivePalletID")); ReceivePallet rp = new ReceivePallet(); rp.LoadByPrimaryKey(recPalletID); try { this.SetColumn("PhysicalStoreName", rp.GetPhysicalStoreName()); int physicalStoreTypeID = rp.GetPhysicalStoreTypeID(); this.SetColumn("PhysicalStoreTypeID", physicalStoreTypeID); Warehouse phyStoreType = new Warehouse(); phyStoreType.LoadByPrimaryKey(physicalStoreTypeID); this.SetColumn("PhysicalStoreTypeName", phyStoreType.Name); } catch { } int itemId = Convert.ToInt32(this.GetColumn("ItemID")); int boxLevel = Convert.ToInt32(this.GetColumn("BoxLevel")); int qtyPerPack = this.Getint("QtyPerPack"); //im.LoadIMbyLevel(itemId, manufacturer, boxLevel); this.SetColumn("SKUTOPICK", (packs)); this.SetColumn("SKUPICKED", this.GetColumn("SKUTOPICK")); // TODO:show the box size here for Program store this.SetColumn("BoxSizeDisplay", ""); this.SetColumn("SKUBU", qtyPerPack); this.SetColumn("BUPICKED", qtyPerPack * Convert.ToInt32(this.GetColumn("SKUPICKED"))); this.SetColumn("LineNum", i++); this.MoveNext(); } return(this.DefaultView); }
/// <summary> /// Gets the pick list details for order. /// </summary> /// <param name="ordID">The ord ID.</param> /// <param name="Preparedby">The preparedby.</param> /// <returns></returns> public DataView GetPickListDetailsForOrder(int ordID, string Preparedby) { this.LoadByOrderID(ordID); var query = HCMIS.Repository.Queries.PickList.SelectGetPickListDetailsForOrder(this.ID); this.LoadFromRawSql(query); // Add important columns this.DataTable.Columns.Add("SKUTOPICK", typeof(decimal)); this.DataTable.Columns.Add("SKUPICKED", typeof(decimal)); this.DataTable.Columns.Add("BUPICKED", typeof(decimal)); this.DataTable.Columns.Add("BoxSizeDisplay"); this.DataTable.Columns.Add("SKUBU", typeof(decimal)); this.DataTable.Columns.Add("IsManufacturerLocal", typeof(bool)); this.DataTable.Columns.Add("PrintedSTVNumber", typeof(string)); this.DataTable.Columns.Add("PhysicalStoreName", typeof(string)); this.DataTable.Columns.Add("PhysicalStoreTypeID", typeof(int)); this.DataTable.Columns.Add("PhysicalStoreTypeName", typeof(string)); this.DataTable.Columns.Add("PreparedBy", typeof(string)); int i = 1; while (!this.EOF) { decimal packs = Convert.ToDecimal(this.GetColumn("Packs")); int manufacturer = Convert.ToInt32(this.GetColumn("ManufacturerID")); Manufacturer m = new Manufacturer(); m.LoadByPrimaryKey(manufacturer); if (!m.IsColumnNull("CountryOfOrigin") && m.CountryOfOrigin.Contains("Ethiopia")) this.SetColumn("IsManufacturerLocal", true); else this.SetColumn("IsManufacturerLocal", false); int recPalletID = Convert.ToInt32(this.GetColumn("ReceivePalletID")); ReceivePallet rp = new ReceivePallet(); rp.LoadByPrimaryKey(recPalletID); try { ReceiveDoc receiveDoc = new ReceiveDoc(); Receipt receipt = new Receipt(); receiveDoc.LoadByPrimaryKey(rp.ReceiveID); receipt.LoadByPrimaryKey(receiveDoc.ReceiptID); this.SetColumn("PhysicalStoreName", rp.GetPhysicalStoreName()); int physicalStoreTypeID = rp.GetPhysicalStoreTypeID(); this.SetColumn("PhysicalStoreTypeID", physicalStoreTypeID); Warehouse phyStoreType = new Warehouse(); phyStoreType.LoadByPrimaryKey(physicalStoreTypeID); this.SetColumn("PhysicalStoreTypeName", phyStoreType.Name); if (BLL.Settings.PrintUserNameOnInvoice) { this.SetColumn("PreparedBy", Preparedby); } } catch { } int itemId = Convert.ToInt32(this.GetColumn("ItemID")); int boxLevel = Convert.ToInt32(this.GetColumn("BoxLevel")); decimal qtyPerPack = this.Getint("QtyPerPack"); //im.LoadIMbyLevel(itemId, manufacturer, boxLevel); this.SetColumn("SKUTOPICK", (packs)); this.SetColumn("SKUPICKED", this.GetColumn("SKUTOPICK")); // TODO:show the box size here for Program store this.SetColumn("BoxSizeDisplay", ""); this.SetColumn("SKUBU", qtyPerPack); this.SetColumn("BUPICKED", qtyPerPack * Convert.ToDecimal(this.GetColumn("SKUPICKED"))); this.SetColumn("LineNum", i++); if (this.IsColumnNull("DeliveryNote")) { this.SetColumn("DeliveryNote", false); } this.MoveNext(); } return this.DefaultView; }
/// <summary> /// Gets the pick list details for order. /// </summary> /// <param name="ordID">The ord ID.</param> /// <param name="Preparedby">The preparedby.</param> /// <returns></returns> public DataView GetPickListDetailsForOrder(int ordID, string Preparedby) { this.LoadByOrderID(ordID); var query = HCMIS.Repository.Queries.PickList.SelectGetPickListDetailsForOrder(this.ID); this.LoadFromRawSql(query); // Add important columns this.DataTable.Columns.Add("SKUTOPICK", typeof(decimal)); this.DataTable.Columns.Add("SKUPICKED", typeof(decimal)); this.DataTable.Columns.Add("BUPICKED", typeof(decimal)); this.DataTable.Columns.Add("BoxSizeDisplay"); this.DataTable.Columns.Add("SKUBU", typeof(decimal)); this.DataTable.Columns.Add("IsManufacturerLocal", typeof(bool)); this.DataTable.Columns.Add("PrintedSTVNumber", typeof(string)); this.DataTable.Columns.Add("PhysicalStoreName", typeof(string)); this.DataTable.Columns.Add("PhysicalStoreTypeID", typeof(int)); this.DataTable.Columns.Add("PhysicalStoreTypeName", typeof(string)); this.DataTable.Columns.Add("PreparedBy", typeof(string)); int i = 1; while (!this.EOF) { decimal packs = Convert.ToDecimal(this.GetColumn("Packs")); int manufacturer = Convert.ToInt32(this.GetColumn("ManufacturerID")); Manufacturer m = new Manufacturer(); m.LoadByPrimaryKey(manufacturer); if (!m.IsColumnNull("CountryOfOrigin") && m.CountryOfOrigin.Contains("Ethiopia")) { this.SetColumn("IsManufacturerLocal", true); } else { this.SetColumn("IsManufacturerLocal", false); } int recPalletID = Convert.ToInt32(this.GetColumn("ReceivePalletID")); ReceivePallet rp = new ReceivePallet(); rp.LoadByPrimaryKey(recPalletID); try { ReceiveDoc receiveDoc = new ReceiveDoc(); Receipt receipt = new Receipt(); receiveDoc.LoadByPrimaryKey(rp.ReceiveID); receipt.LoadByPrimaryKey(receiveDoc.ReceiptID); this.SetColumn("PhysicalStoreName", rp.GetPhysicalStoreName()); int physicalStoreTypeID = rp.GetPhysicalStoreTypeID(); this.SetColumn("PhysicalStoreTypeID", physicalStoreTypeID); Warehouse phyStoreType = new Warehouse(); phyStoreType.LoadByPrimaryKey(physicalStoreTypeID); this.SetColumn("PhysicalStoreTypeName", phyStoreType.Name); if (BLL.Settings.PrintUserNameOnInvoice) { this.SetColumn("PreparedBy", Preparedby); } } catch { } int itemId = Convert.ToInt32(this.GetColumn("ItemID")); int boxLevel = Convert.ToInt32(this.GetColumn("BoxLevel")); decimal qtyPerPack = this.Getint("QtyPerPack"); //im.LoadIMbyLevel(itemId, manufacturer, boxLevel); this.SetColumn("SKUTOPICK", (packs)); this.SetColumn("SKUPICKED", this.GetColumn("SKUTOPICK")); // TODO:show the box size here for Program store this.SetColumn("BoxSizeDisplay", ""); this.SetColumn("SKUBU", qtyPerPack); this.SetColumn("BUPICKED", qtyPerPack * Convert.ToDecimal(this.GetColumn("SKUPICKED"))); this.SetColumn("LineNum", i++); if (this.IsColumnNull("DeliveryNote")) { this.SetColumn("DeliveryNote", false); } this.MoveNext(); } return(this.DefaultView); }
//,bool pricedItems) /// <summary> /// Gets picked order detail for item (Used by the IssueLog) /// </summary> /// <param name="ordID"></param> /// <param name="storeid"></param> /// <param name="pricedItems">True - For Priced Items Only, False - For Delivery Notes Only</param> /// <returns></returns> public DataView GetPickedOrderDetailForOrder(int stvLogID, bool includeDeleted) { string query; // remove this line ... // check if this has changed the dn to stv conversion // (pld.DeliveryNote is null or pld.DeliveryNote = 0 or (pld.DeliveryNote=1 and pld.UnitPrice<>0)) and query = HCMIS.Repository.Queries.PickList.SelectGetPickedOrderDetailForOrder(stvLogID); if (includeDeleted) { query = HCMIS.Repository.Queries.PickList.SelectGetPickedOrderDetailForOrderIncludeDeleted(stvLogID); } this.LoadFromRawSql(query); // Add important columns this.DataTable.Columns.Add("SKUTOPICK", typeof(int)); this.DataTable.Columns.Add("SKUPICKED", typeof(int)); this.DataTable.Columns.Add("BUPICKED", typeof(int)); this.DataTable.Columns.Add("BoxSizeDisplay"); this.DataTable.Columns.Add("SKUBU", typeof(int)); this.DataTable.Columns.Add("IsManufacturerLocal", typeof(bool)); this.DataTable.Columns.Add("PrintedSTVNumber", typeof(string)); this.DataTable.Columns.Add("PhysicalStoreName", typeof(string)); this.DataTable.Columns.Add("PhysicalStoreTypeID", typeof(int)); this.DataTable.Columns.Add("PhysicalStoreTypeName", typeof(string)); ItemManufacturer im = new ItemManufacturer(); int i = 1; while (!this.EOF) { int packs = Convert.ToInt32(this.GetColumn("Packs")); int manufacturer = Convert.ToInt32(this.GetColumn("ManufacturerID")); Manufacturer m = new Manufacturer(); m.LoadByPrimaryKey(manufacturer); if (!m.IsColumnNull("CountryOfOrigin") && m.CountryOfOrigin == "Ethiopia") this.SetColumn("IsManufacturerLocal", true); else this.SetColumn("IsManufacturerLocal", false); int recPalletID = Convert.ToInt32(this.GetColumn("ReceivePalletID")); ReceivePallet rp = new ReceivePallet(); rp.LoadByPrimaryKey(recPalletID); try { this.SetColumn("PhysicalStoreName", rp.GetPhysicalStoreName()); int physicalStoreTypeID = rp.GetPhysicalStoreTypeID(); this.SetColumn("PhysicalStoreTypeID", physicalStoreTypeID); Warehouse phyStoreType = new Warehouse(); phyStoreType.LoadByPrimaryKey(physicalStoreTypeID); this.SetColumn("PhysicalStoreTypeName", phyStoreType.Name); } catch { } int itemId = Convert.ToInt32(this.GetColumn("ItemID")); int boxLevel = Convert.ToInt32(this.GetColumn("BoxLevel")); int qtyPerPack = this.Getint("QtyPerPack"); //im.LoadIMbyLevel(itemId, manufacturer, boxLevel); this.SetColumn("SKUTOPICK", (packs)); this.SetColumn("SKUPICKED", this.GetColumn("SKUTOPICK")); // TODO:show the box size here for Program store this.SetColumn("BoxSizeDisplay", ""); this.SetColumn("SKUBU", qtyPerPack); this.SetColumn("BUPICKED", qtyPerPack * Convert.ToInt32(this.GetColumn("SKUPICKED"))); this.SetColumn("LineNum", i++); this.MoveNext(); } return this.DefaultView; }