Pullsheet Item by Item Discount - Hide/Remove?
Posted: Sat Aug 25, 2012 10:21 am
We'd like to simplify the PullSheet so that the line by line discount no longer displays, but the discount still shows in the summary at the bottom. It's really not necessary for us to see the line by line on the pullsheet and especially on larger orders it makes it bulky to print. If we need to see line by line we could always look at the summary or the customers invoice.
The summary is all we really need to reference on our copy of the paperwork.
So I'm trying to make the item discount visible=false
I tried adding something like this return (item.OrderItemType.Discount).visible(false);
to the code here in PullSheet.aspx.cs
A rough attempt, as I'm not sure how to set up the code. Of course, it didn't work. I'm missing something or not phrasing it right. I just end up with an error screen.
and this error:
in some way to add discount visible = false?
Any help is appreciated. I'll keep tinkering in the meantime.
The summary is all we really need to reference on our copy of the paperwork.
So I'm trying to make the item discount visible=false
I tried adding something like this return (item.OrderItemType.Discount).visible(false);
to the code here in PullSheet.aspx.cs
Code: Select all
protected OrderItemCollection GetDisplayItems(object dataItem)
{
OrderItemType[] displayTypes = { OrderItemType.Product, OrderItemType.Discount, OrderItemType.Coupon, OrderItemType.GiftWrap, OrderItemType.Charge, OrderItemType.Credit, OrderItemType.Handling, OrderItemType.Shipping, OrderItemType.Tax};
OrderItemCollection productList = new OrderItemCollection();
OrderItemCollection orderItems = dataItem as OrderItemCollection;
if (orderItems != null)
{
foreach (OrderItem item in orderItems)
{
if (Array.IndexOf(displayTypes, item.OrderItemType) > -1) productList.Add(item);
return (item.OrderItemType.Discount).visible(false);
}
}
productList.Sort(new OrderItemComparer());
return productList;
}
and this error:
Should I instead be looking at the PullSheet.aspx instead and modifying thisAn error has occured at https://store.scottsbt.com/Admin/Orders ... erId=88183 e:\hshome\scottsbt\store.scottsbt.com\Admin\Orders\Print\PullSheet2.aspx.cs(32): error ASPNET: Make sure that the class defined in this code file matches the 'inherits' attribute, and that it extends the correct base class (e.g. Page or UserControl).
Code: Select all
<asp:GridView ID="ShipmentItems" runat="server" ShowHeader="true" ShowFooter="true" DataSource='<%#GetDisplayItems(Eval("OrderItems"))%>' AutoGenerateColumns="false" Width="100%" GridLines="none" CellPadding="2" CellSpacing="1">
Any help is appreciated. I'll keep tinkering in the meantime.