From 92eb0dcaf696fa84c2fe7d2141dafe6661b8cfdd Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 8 Sep 2008 02:47:20 +0000 Subject: add package invoice details & comments, RT#3810 --- httemplate/view/cust_main/packages.html | 142 ++++++++++++++++++++++++++++++-- 1 file changed, 134 insertions(+), 8 deletions(-) (limited to 'httemplate/view') diff --git a/httemplate/view/cust_main/packages.html b/httemplate/view/cust_main/packages.html index 77ca1cded..5c086f225 100755 --- a/httemplate/view/cust_main/packages.html +++ b/httemplate/view/cust_main/packages.html @@ -13,7 +13,7 @@ 'action' => $p. 'edit/quick-charge.html?custnum='. $cust_main->custnum, 'label' => 'One-time charge', 'actionlabel' => 'One-time charge', - 'width' => 545, + 'width' => 763, }) %>
@@ -76,16 +76,33 @@ Current packages - - <% $cust_pkg->pkgnum %>: - <% $part_pkg->pkg %> - <% $part_pkg->comment %> -
+ + + + + + % if ( $cust_pkg->quantity > 1 ) { -       Quantity: <% $cust_pkg->quantity %>
+ + + % } - + + + + +% my $editi = $curuser->access_right('Edit customer package invoice details'); +% my $editc = $curuser->access_right('Edit customer package comments'); +% +% if ( $cust_pkg->cust_pkg_detail('I') || $cust_pkg->cust_pkg_detail('C') +% || $editi || $editc ) { +% +% my $editlink = $p. 'edit/cust_pkg_detail?pkgnum='. $cust_pkg->pkgnum. +% ';detailtype='; + + + +% if ( $cust_pkg->cust_pkg_detail('I') ) { + + + +% foreach my $cust_pkg_detail ( $cust_pkg->cust_pkg_detail('I') ) { + + + +% } +
+ <% $curuser->option('show_pkgnum') ? $cust_pkg->pkgnum.': ' : '' %><% $part_pkg->pkg %> + - + <% $part_pkg->comment %> +
+       Quantity: + <% $cust_pkg->quantity %> +
+ + + % unless ( $cust_pkg->get('cancel') ) { % if ( $curuser->access_right('Change customer package') ) { @@ -101,8 +118,117 @@ Current packages % } % } - + + +
+ <% include('/elements/table-grid.html') %> +
+ + Invoice details +% if ( $editi && ! $cust_pkg->get('cancel') ) { + (<% include('/elements/popup_link.html', { + 'action' => $editlink. 'I', + 'label' => 'edit', + 'actionlabel' => 'Edit invoice details', + 'color' => '#333399', + 'width' => 763, + }) + %>) +% } + +
 - <% $cust_pkg_detail->detail |h %>
+ +% } else { + +% if ( $editi && ! $cust_pkg->get('cancel') ) { + + ( <% include('/elements/popup_link.html', { + 'action' => $editlink. 'I', + 'label' => 'Add invoice details', + 'actionlabel' => 'Add invoice details', + 'color' => '#333399', + 'width' => 763, + }) + %> ) + +% } + +% } + +% if ( $cust_pkg->cust_pkg_detail('C') ) { + + <% include('/elements/table-grid.html') %> + + + + Comments +% if ( $editc ) { + (<% include('/elements/popup_link.html', { + 'action' => $editlink. 'C', + 'label' => 'edit', + 'actionlabel' => 'Edit comments', + 'color' => '#333399', + 'width' => 763, + }) + %>) +% } + + + +% foreach my $cust_pkg_detail ( $cust_pkg->cust_pkg_detail('C') ) { + +  - <% $cust_pkg_detail->detail |h %> + +% } + + +% } else { + +% if ( $editc ) { + + ( <% include('/elements/popup_link.html', { + 'action' => $editlink. 'C', + 'label' => 'Add comments', + 'actionlabel' => 'Add comments', + 'color' => '#333399', + 'width' => 763, + }) + %> ) + +% } + +% } + + +% } + + + + % -- cgit v1.2.1