Pullsheet Item by Item Discount - Hide/Remove?

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
User avatar
Mizmo67
Commander (CMDR)
Commander (CMDR)
Posts: 155
Joined: Wed Mar 16, 2005 5:35 pm
Location: NJ
Contact:

Pullsheet Item by Item Discount - Hide/Remove?

Post by Mizmo67 » 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

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;
    }
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:
An 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).
Should I instead be looking at the PullSheet.aspx instead and modifying this

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">
in some way to add discount visible = false?

Any help is appreciated. I'll keep tinkering in the meantime.
~Mo

Maureen Albertson
Scott's Bait & Tackle / Mystic Reel Parts LLC
Contact Me Via Store Website
Image
Ablecommerce Gold R11 Catalog LIVE

User avatar
compunerdy
Admiral (ADM)
Admiral (ADM)
Posts: 1283
Joined: Sun Nov 18, 2007 3:55 pm

Re: Pullsheet Item by Item Discount - Hide/Remove?

Post by compunerdy » Sat Aug 25, 2012 11:01 am

You could try the invoices ones I posted in this thread.. viewtopic.php?f=42&t=15747&start=25

They are modified to be more like pull sheets.

User avatar
Mizmo67
Commander (CMDR)
Commander (CMDR)
Posts: 155
Joined: Wed Mar 16, 2005 5:35 pm
Location: NJ
Contact:

Re: Pullsheet Item by Item Discount - Hide/Remove?

Post by Mizmo67 » Sat Aug 25, 2012 11:07 am

Thanks Tim!

I'll slide over there and take a look :)

~Mo
~Mo

Maureen Albertson
Scott's Bait & Tackle / Mystic Reel Parts LLC
Contact Me Via Store Website
Image
Ablecommerce Gold R11 Catalog LIVE

Post Reply