Add line numbers to invoice

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
User avatar
Jaz
Captain (CAPT)
Captain (CAPT)
Posts: 245
Joined: Wed Nov 05, 2008 4:04 am
Location: Torrance, CA
Contact:

Add line numbers to invoice

Post by Jaz » Fri Oct 01, 2010 12:07 am

How can I add line numbers to the invoice.
David Jasiewicz
President
Trick Concepts - Metal Fab. Engineering and Product Design
http://www.trickconcepts.com-- If you are an ASP or PHP programmer or CSS web specialist I will gladly trade for graphic design, mechanical engineering or metal fabrication service! --

plugables
Captain (CAPT)
Captain (CAPT)
Posts: 276
Joined: Sat Aug 15, 2009 4:04 am
Contact:

Re: Add line numbers to invoice

Post by plugables » Fri Oct 01, 2010 6:28 am

Not sure what you mean... line numbers to the invoice?

User avatar
Jaz
Captain (CAPT)
Captain (CAPT)
Posts: 245
Joined: Wed Nov 05, 2008 4:04 am
Location: Torrance, CA
Contact:

Re: Add line numbers to invoice

Post by Jaz » Wed Nov 03, 2010 7:38 pm

Similar to most invoices. For example

right no you have:

HDTV - $100
DVD player -$50

I want

1 HDTV - $100
2 DVD Player - $50


This way I have a way to refer to the items on the invoice by line number.
David Jasiewicz
President
Trick Concepts - Metal Fab. Engineering and Product Design
http://www.trickconcepts.com-- If you are an ASP or PHP programmer or CSS web specialist I will gladly trade for graphic design, mechanical engineering or metal fabrication service! --

User avatar
s_ismail
Commander (CMDR)
Commander (CMDR)
Posts: 162
Joined: Mon Nov 09, 2009 12:20 am
Contact:

Re: Add line numbers to invoice

Post by s_ismail » Thu Nov 04, 2010 6:56 am

For adding line no you need to customize ConLib/ReceiptPage.ascx control.
Locate this code in ReceiptPage.ascx

Code: Select all

 <asp:GridView ID="ShipmentItemsGrid" runat="server" Width="100%" AutoGenerateColumns="false"
                        DataSource='<%# OrderHelper.GetShipmentItems(Container.DataItem) %>' GridLines="none"
                        SkinID="ItemList" OnDataBinding="ItemsGrid_DataBinding">
                        <Columns>
and replace with this code

Code: Select all

  <asp:GridView ID="ShipmentItemsGrid" runat="server" Width="100%" AutoGenerateColumns="false"
                        DataSource='<%# OrderHelper.GetShipmentItems(Container.DataItem) %>' GridLines="none"
                        SkinID="ItemList" OnDataBinding="ItemsGrid_DataBinding">
                        <Columns>
                            <asp:TemplateField HeaderText="No">
                                <HeaderStyle Width="50" HorizontalAlign="Center" />
                                <ItemStyle HorizontalAlign="center" />
                                <ItemTemplate>
                                    <asp:Label ID="No" runat="server" Text='<%# GetCounter().ToString()  %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
Now go ReceiptPage.ascx.cs and add this code at the end

Code: Select all

 int i = 1;
    public int GetCounter()
    {   
        return i++;
    }

Post Reply