From a75c66ffe670d078f27032f653ead9cfe6ceacd5 Mon Sep 17 00:00:00 2001 From: levinse Date: Mon, 11 Apr 2011 23:03:33 +0000 Subject: improvements to bulk DID orders, RT11291 --- httemplate/browse/did_order.html | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) (limited to 'httemplate/browse') diff --git a/httemplate/browse/did_order.html b/httemplate/browse/did_order.html index e844169b3..570b78475 100644 --- a/httemplate/browse/did_order.html +++ b/httemplate/browse/did_order.html @@ -35,21 +35,37 @@ my $display_date = sub { time2str($date_format, $date); }; -my $header = [ '#', 'Vendor',' Vendor Order #', - 'Submitted', 'Confirmed', 'Customer', 'Received', - ]; +my $header = [ '#', 'Vendor',' Vendor Order #', 'Submitted', 'Confirmed', + 'Customer', 'Received', ]; my $fields = [ sub { my $did_order = shift; $did_order->ordernum; }, 'vendorname', 'vendor_order_id', sub { &$display_date(shift->submitted); }, - sub { &$display_date(shift->confirmed); }, - 'custnum', + sub { + my $did_order = shift; + my $ordernum = $did_order->ordernum; + return &$display_date($did_order->confirmed) if $did_order->confirmed; + include( '/elements/popup_link.html', + { 'action' => "${p}misc/did_order_confirm.html?ordernum=$ordernum", + 'label' => 'Confirm Bulk DID Order', + 'actionlabel' => 'Confirm Bulk DID Order', + 'width' => 480, + 'height' => 300, + } + ) + }, + sub { + my $did_order = shift; + my $cust_main = $did_order->cust_main; + return "Stock" unless $cust_main; + "".$cust_main->name.""; + }, sub { my $did_order = shift; my $ordernum = $did_order->ordernum; return &$display_date($did_order->received) - if $did_order->received; + if $did_order->received; "Upload Received"; }, ]; -- cgit v1.2.1