X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fpackages%2Fpackage.html;h=c79742b8b03b5ebe44fc28239fa5424d642dfbbc;hb=93519f9371b41ded713a93fba031ed7a361be04c;hp=3c486dd257b097f07d20e61f25bd7e6d177d658b;hpb=481011e14852aa62181bed0c7ae34b1e37ebff18;p=freeside.git diff --git a/httemplate/view/cust_main/packages/package.html b/httemplate/view/cust_main/packages/package.html index 3c486dd25..c79742b8b 100644 --- a/httemplate/view/cust_main/packages/package.html +++ b/httemplate/view/cust_main/packages/package.html @@ -13,7 +13,7 @@ % if ( $cust_pkg->quantity > 1 ) { -       Quantity: +       <% mt('Quantity:') |h %> <% $cust_pkg->quantity %> @@ -39,6 +39,7 @@ % if ( $curuser->access_right('Discount customer package') % && $part_pkg->can_discount % && ! scalar($cust_pkg->cust_pkg_discount_active) +% && ! scalar($cust_pkg->part_pkg->part_pkg_discount) % ) % { % $br=1; @@ -80,20 +81,20 @@ % if ( @invoice_detail ) { - <% include('/elements/table-grid.html') %> + <& /elements/table-grid.html &> - Invoice details + <% mt('Invoice details') |h %> % if ( $editi && ! $cust_pkg->get('cancel') ) { - (<% include('/elements/popup_link.html', { + (<& /elements/popup_link.html, { 'action' => $editlink. 'I', - 'label' => 'edit', - 'actionlabel' => 'Edit invoice details', + 'label' => mt('edit'), + 'actionlabel' => mt('Edit invoice details'), 'color' => '#333399', 'width' => 763, - }) - %>) + } + &>) % } @@ -111,8 +112,8 @@ ( <% include('/elements/popup_link.html', { 'action' => $editlink. 'I', - 'label' => 'Add invoice details', - 'actionlabel' => 'Add invoice details', + 'label' => mt('Add invoice details'), + 'actionlabel' => mt('Add invoice details'), 'color' => '#333399', 'width' => 763, }) @@ -124,20 +125,20 @@ % if ( @comments ) { - <% include('/elements/table-grid.html') %> + <& /elements/table-grid.html &> - Comments + <% mt('Comments') |h %> % if ( $editc ) { - (<% include('/elements/popup_link.html', { + (<& /elements/popup_link.html, { 'action' => $editlink. 'C', - 'label' => 'edit', - 'actionlabel' => 'Edit comments', + 'label' => mt('edit'), + 'actionlabel' => mt('Edit comments'), 'color' => '#333399', 'width' => 763, - }) - %>) + } + &>) % } @@ -153,22 +154,30 @@ % if ( $editc ) { - ( <% include('/elements/popup_link.html', { + ( <& /elements/popup_link.html, { 'action' => $editlink. 'C', - 'label' => 'Add comments', - 'actionlabel' => 'Add comments', + 'label' => mt('Add comments'), + 'actionlabel' => mt('Add comments'), 'color' => '#333399', 'width' => 763, - }) - %> ) + } + &> ) % } % } +% if ( $curuser->access_right('Change customer package') and +% !$cust_pkg->get('cancel') and +% !$opt{'show_location'}) { + + + ( <% pkg_change_location_link($cust_pkg) %> ) + + +% } % } - @@ -183,6 +192,10 @@ my $part_pkg = $opt{'part_pkg'}; my $curuser = $FS::CurrentUser::CurrentUser; +my $countrydefault = $opt{'countrydefault'} || 'US'; +my $statedefault = $opt{'statedefault'} + || ($countrydefault eq 'US' ? 'CA' : ''); + #subroutines #false laziness w/status.html @@ -197,22 +210,33 @@ sub pkg_change_link { my $locationnum = $cust_pkg->locationnum; include( '/elements/popup_link-cust_pkg.html', 'action' => $p. "misc/change_pkg.cgi?locationnum=$locationnum", - 'label' => 'Change package', - 'actionlabel' => 'Change', + 'label' => mt('Change package'), + 'actionlabel' => mt('Change'), + 'cust_pkg' => $cust_pkg, + ); +} + +sub pkg_change_location_link { + my $cust_pkg = shift; + my $pkgpart = $cust_pkg->pkgpart; + include( '/elements/popup_link-cust_pkg.html', + 'action' => $p. "misc/change_pkg.cgi?locationnum=-1;pkgpart=$pkgpart;". + "address1=;address2=;city=;county=;state=$statedefault;". + "zip=;country=$countrydefault", + 'label' => mt('Change location'), + 'actionlabel' => mt('Change'), 'cust_pkg' => $cust_pkg, ); } -sub pkg_dates_link { pkg_link('edit/REAL_cust_pkg', 'Edit dates', @_ ); } +sub pkg_dates_link { pkg_link('edit/REAL_cust_pkg', mt('Edit dates'), @_ ); } sub pkg_discount_link { my $cust_pkg = shift or return ''; - #my $part_pkg = shift; - #my $custnum = $cust_pkg->custnum; include( '/elements/popup_link-cust_pkg.html', 'action' => $p.'edit/cust_pkg_discount.html', - 'label' => 'Discount', - 'actionlabel' => 'Discount', + 'label' => mt('Discount'), + 'actionlabel' => mt('Discount'), 'cust_pkg' => $cust_pkg, 'width' => 616, ); @@ -225,13 +249,13 @@ sub pkg_customize_link { qq!Customize!; + qq!">!.mt('Customize').''; } sub pkg_event_link { my($cust_pkg) = @_; qq!!. - 'View package events'. + mt('View package events'). ''; }