From b96629eb08231f78f334f78c0bd6c277c60844fa Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 8 Sep 2008 02:47:22 +0000 Subject: add package invoice details & comments, RT#3810 --- httemplate/view/cust_main/packages.html | 140 ++++++++++++++++++++++++++++++-- 1 file changed, 131 insertions(+), 9 deletions(-) (limited to 'httemplate/view/cust_main') diff --git a/httemplate/view/cust_main/packages.html b/httemplate/view/cust_main/packages.html index 9d5f993cd..ad5595c1a 100755 --- a/httemplate/view/cust_main/packages.html +++ b/httemplate/view/cust_main/packages.html @@ -85,7 +85,7 @@ function taxoverridequickchargemagic() { 'label' => 'One-time charge', 'actionlabel' => 'One-time charge', 'color' => '#333399', - 'width' => 545, + 'width' => 763, }) %> % } @@ -149,17 +149,32 @@ 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') ) { % my $br = 0; % if ( $curuser->access_right('Change customer package') ) { $br=1; @@ -185,7 +200,114 @@ Current packages ( <%pkg_event_link($cust_pkg)%> ) % } - + + +
+ <% 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