__LOGOBAR__ __MENUBAR__

Order Status

[mvasp transactions] <% my $uid = $Session->{username}; my $spec = { rf => [qw/ 0 status nitems subtotal payment_tax shipping order_date/], bd => 'transactions', fi => ['transactions'], tf => 0, sf => ['username'], se => $uid, }; $DbSearch->{table} = $Db{transactions}; my $orders = $DbSearch->array($spec); if (! $uid) { HTML ("

You are not logged in.

"); return; } if(! $orders or scalar @$orders == 0) { HTML "No pending orders."; return; } HTML ""; my $trailer_template = <<'EOF'; EOF my $header_template = <<'EOF'; EOF my $line_template = <<'EOF'; EOF my %hash; my @fields = qw/order_number status nitems subtotal payment_tax shipping date/; my @line = qw/line status nitems price description code date/; my $row; my %summary; my $first; my $record; foreach $record (@$orders) { if($record->[0] =~ s/^\d+-//) { HTML $header_template if $first; undef $first; @hash{@line} = @$record; $hash{price} = $Tag->currency({ body=> $hash{price} }); $row = $line_template; $row =~ s/\$(\w+)/$hash{$1}/eg; HTML $row; } else { $first = 1; if($previous) { HTML $previous; } @hash{@fields} = @$record; $previous = $trailer_template; $hash{subtotal} = $Tag->currency ({ body=> $hash{subtotal} }); $previous =~ s/\$(\w+)/$hash{$1}/g; } } HTML $previous; HTML "
DATE ORDER ID QTY TOTAL PAYMENT/TAX/SHIPPING SUBTOTAL SHIPPING
$date $order_number $nitems $payment_tax $shipping $subtotal $status
 
 
Line SKU QTY DESCRIPTION PRICE STATUS
$line $code $nitems $description $price $status
"; %> [/mvasp]

__MENUBOTTOM__ __COPYRIGHT__