- "transaction_description", "open",
- "closed", "delivered"
- );
-
- $form->{l_open} = $form->{l_closed} = "Y"
- if ($form->{open} && $form->{closed});
-
- $form->{"l_delivered"} = "Y"
- if ($form->{"delivered"} && $form->{"notdelivered"});
-
- 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";
- }
- }
-
- # only show checkboxes if gotten here via sales_order form.
- if ($form->{type} =~ /sales_order/) {
- unshift @column_index, "ids";
- }
-
- if ($form->{l_subtotal} eq 'Y') {
- $callback .= "&l_subtotal=Y";
- $href .= "&l_subtotal=Y";
- }
-
- if ($form->{vc} eq 'vendor') {
- if ($form->{type} eq 'purchase_order') {
- $form->{title} = $locale->text('Purchase Orders');
- } else {
- $form->{title} = $locale->text('Request for Quotations');
- }
- $name = $locale->text('Vendor');
- $employee = $locale->text('Employee');
- }
- if ($form->{vc} eq 'customer') {
- if ($form->{type} eq 'sales_order') {
- $form->{title} = $locale->text('Sales Orders');
- } else {
- $form->{title} = $locale->text('Quotations');
- }
- $employee = $locale->text('Employee');
- $name = $locale->text('Customer');
- }
-
- $column_header{id} =
- qq|<th><a class=listheading href=$href&sort=id>|
- . $locale->text('ID')
- . qq|</a></th>|;
- $column_header{transdate} =
- qq|<th><a class=listheading href=$href&sort=transdate>|
- . $locale->text('Date')
- . qq|</a></th>|;
- $column_header{reqdate} =
- qq|<th><a class=listheading href=$href&sort=reqdate>|
- . $locale->text('Required by')
- . qq|</a></th>|;
- $column_header{ordnumber} =
- qq|<th><a class=listheading href=$href&sort=ordnumber>|
- . $locale->text('Order')
- . qq|</a></th>|;
- $column_header{quonumber} =
- qq|<th><a class=listheading href=$href&sort=quonumber>|
- . ($form->{"type"} eq "request_quotation" ?
- $locale->text('RFQ') :
- $locale->text('Quotation'))
- . qq|</a></th>|;
- $column_header{name} =
- qq|<th><a class=listheading href=$href&sort=name>$name</a></th>|;
- $column_header{netamount} =
- qq|<th class=listheading>| . $locale->text('Amount') . qq|</th>|;
- $column_header{tax} =
- qq|<th class=listheading>| . $locale->text('Tax') . qq|</th>|;
- $column_header{amount} =
- qq|<th class=listheading>| . $locale->text('Total') . qq|</th>|;
- $column_header{curr} =
- qq|<th class=listheading>| . $locale->text('Curr') . qq|</th>|;
- $column_header{shipvia} =
- qq|<th><a class=listheading href=$href&sort=shipvia>|
- . $locale->text('Ship via')
- . qq|</a></th>|;
- $column_header{globalprojectnumber} =
- qq|<th class="listheading">| . $locale->text('Project Number') . qq|</th>|;
- $column_header{open} =
- qq|<th class=listheading>| . $locale->text('O') . qq|</th>|;
- $column_header{closed} =
- qq|<th class=listheading>| . $locale->text('C') . qq|</th>|;
- $column_header{"delivered"} =
- qq|<th class="listheading">| . $locale->text("Delivered") . qq|</th>|;
-
- $column_header{employee} =
- qq|<th><a class=listheading href=$href&sort=employee>$employee</a></th>|;
- $column_header{transaction_description} =
- qq|<th><a class=listheading href="$href&sort=transaction_description">|
- . $locale->text("Transaction description") . qq|</a></th>|;
-
- $column_header{ids} = qq|<th></th>|;
-
- if ($form->{ $form->{vc} }) {
- $option = $locale->text(ucfirst $form->{vc});
- $option .= " : $form->{$form->{vc}}";
- }
- if ($form->{department}) {
- $option .= "\n<br>" if ($option);
- ($department) = split /--/, $form->{department};
- $option .= $locale->text('Department') . " : $department";
- }
- if ($form->{transdatefrom}) {
- $option .= "\n<br>"
- . $locale->text('From') . " "
- . $locale->date(\%myconfig, $form->{transdatefrom}, 1);
- }
- if ($form->{transdateto}) {
- $option .= "\n<br>"
- . $locale->text('Bis') . " "
- . $locale->date(\%myconfig, $form->{transdateto}, 1);
- }
- if ($form->{open}) {
- $option .= "\n<br>" if ($option);
- $option .= $locale->text('Open');
- }
- if ($form->{closed}) {
- $option .= "\n<br>" if ($option);
- $option .= $locale->text('Closed');
- }
-
- $form->header;
-
- print qq|
-<body>
-
-<form method="post" action="oe.pl">
-<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>|;