- @columns =
- qw(transdate id type invnumber ordnumber name netamount tax amount paid
- datepaid due duedate transaction_description notes employee shippingpoint shipvia
- globalprojectnumber);
-
- $form->{"l_type"} = "Y";
-
- foreach $item (@columns) {
- if ($form->{"l_$item"} eq "Y") {
- push @column_index, $item;
-
- # add column to href and callback
- $callback .= "&l_$item=Y";
- $href .= "&l_$item=Y";
- }
- }
-
- if ($form->{l_subtotal} eq 'Y') {
- $callback .= "&l_subtotal=Y";
- $href .= "&l_subtotal=Y";
- }
-
- $column_header{id} =
- "<th><a class=listheading href=$href&sort=id>"
- . $locale->text('ID')
- . "</a></th>";
- $column_header{transdate} =
- "<th><a class=listheading href=$href&sort=transdate>"
- . $locale->text('Date')
- . "</a></th>";
- $column_header{duedate} =
- "<th><a class=listheading href=$href&sort=duedate>"
- . $locale->text('Due Date')
- . "</a></th>";
- $column_header{type} =
- "<th class=\"listheading\">" . $locale->text('Type') . "</th>";
- $column_header{invnumber} =
- "<th><a class=listheading href=$href&sort=invnumber>"
- . $locale->text('Invoice')
- . "</a></th>";
- $column_header{ordnumber} =
- "<th><a class=listheading href=$href&sort=ordnumber>"
- . $locale->text('Order')
- . "</a></th>";
- $column_header{name} =
- "<th><a class=listheading href=$href&sort=name>"
- . $locale->text('Customer')
- . "</a></th>";
- $column_header{netamount} =
- "<th class=listheading>" . $locale->text('Amount') . "</th>";
- $column_header{tax} =
- "<th class=listheading>" . $locale->text('Tax') . "</th>";
- $column_header{amount} =
- "<th class=listheading>" . $locale->text('Total') . "</th>";
- $column_header{paid} =
- "<th class=listheading>" . $locale->text('Paid') . "</th>";
- $column_header{datepaid} =
- "<th><a class=listheading href=$href&sort=datepaid>"
- . $locale->text('Date Paid')
- . "</a></th>";
- $column_header{due} =
- "<th class=listheading>" . $locale->text('Amount Due') . "</th>";
- $column_header{notes} =
- "<th class=listheading>" . $locale->text('Notes') . "</th>";
- $column_header{employee} =
- "<th><a class=listheading href=$href&sort=employee>"
- . $locale->text('Salesperson') . "</th>";
-
- $column_header{shippingpoint} =
- "<th><a class=listheading href=$href&sort=shippingpoint>"
- . $locale->text('Shipping Point')
- . "</a></th>";
- $column_header{shipvia} =
- "<th><a class=listheading href=$href&sort=shipvia>"
- . $locale->text('Ship via')
- . "</a></th>";
- $column_header{globalprojectnumber} =
- qq|<th class="listheading">| . $locale->text('Project Number') . qq|</th>|;
- $column_header{transaction_description} =
- "<th class=listheading>" . $locale->text('Transaction description') . "</th>";
-
- $form->{title} = $locale->text('AR Transactions');
-
- $form->header;
-
- print qq|
-<body>
-
-<table width=100%>
- <tr>
- <th class=listtop>$form->{title}</th>
- </tr>
- <tr height="5"></tr>
- <tr>
- <td>$option</td>
- </tr>
- <tr>
- <td>
- <table width=100%>
- <tr class=listheading>
-|;
-
- map { print "\n$column_header{$_}" } @column_index;
-
- print qq|
- </tr>
-|;