[freeside-commits] freeside/httemplate/misc order_pkg.html, 1.7, 1.8 change_pkg.cgi, 1.10, 1.11 cust-part_pkg.cgi, NONE, 1.1
Ivan,,,
ivan at wavetail.420.am
Sat Mar 28 15:59:38 PDT 2009
- Previous message: [freeside-commits] freeside/FS/FS svc_acct.pm, 1.217.2.21, 1.217.2.22
- Next message: [freeside-commits] freeside/httemplate/elements tr-select-cust-part_pkg.html, NONE, 1.1 select-cust-pkg_class.html, NONE, 1.1 select-table.html, 1.14, 1.15 select-cust-part_pkg.html, 1.3, 1.4 select-part_pkg.html, 1.3, 1.4 tr-selectmultiple-part_pkg.html, 1.3, 1.4
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/cvsroot/freeside/httemplate/misc
In directory wavetail.420.am:/tmp/cvs-serv18155/httemplate/misc
Modified Files:
order_pkg.html change_pkg.cgi
Added Files:
cust-part_pkg.cgi
Log Message:
package selector, split by package class, RT#5077
Index: change_pkg.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/change_pkg.cgi,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- change_pkg.cgi 10 Jan 2009 23:56:57 -0000 1.10
+++ change_pkg.cgi 28 Mar 2009 22:59:36 -0000 1.11
@@ -13,19 +13,15 @@
<% $curuser->option('show_pkgnum') ? $cust_pkg->pkgnum.': ' : '' %><B><% $part_pkg->pkg |h %></B> - <% $part_pkg->comment |h %>
</TD>
</TR>
-
- <TR>
- <TH ALIGN="right">New package</TH>
- <TD COLSPAN=7>
- <% include('/elements/select-cust-part_pkg.html',
- 'cust_main' => $cust_main,
- 'element_name' => 'pkgpart',
- #'extra_sql' => ' AND pkgpart != '. $cust_pkg->pkgpart,
- 'curr_value' => scalar($cgi->param('pkgpart')),
- )
- %>
- </TD>
- </TR>
+
+ <% include('/elements/tr-select-cust-part_pkg.html',
+ 'pre_label' => 'New',
+ 'curr_value' => scalar($cgi->param('pkgpart')),
+ 'classnum' => $part_pkg->classnum,
+ 'cust_main' => $cust_main,
+ #'extra_sql' => ' AND pkgpart != '. $cust_pkg->pkgpart,
+ )
+ %>
<% include('/elements/tr-select-cust_location.html',
'cgi' => $cgi,
--- NEW FILE: cust-part_pkg.cgi ---
<% objToJson( \@return ) %>
<%init>
my( $custnum, $classnum ) = $cgi->param('arg');
#XXX i guess i should be agent-virtualized. cause "packages a customer can
#order" is such a huge deal
my $cust_main = qsearchs('cust_main', { 'custnum' => $custnum } );
my %hash = ( 'disabled' => '' );
if ( $classnum > 0 ) {
$hash{'classnum'} = $classnum;
} elsif ( $classnum eq '' || $classnum == 0 ) {
$hash{'classnum'} = '';
} #else -1, all classes, so don't set classnum
my @part_pkg = qsearch({
'table' => 'part_pkg',
'hashref' => \%hash,
'extra_sql' =>
' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql( 'null'=>1 ).
' AND '. FS::part_pkg->agent_pkgs_sql( $cust_main->agent ),
});
my @return = map { $_->pkgpart => $_->pkg_comment }
sort { $a->pkg_comment cmp $b->pkg_comment }
@part_pkg;
</%init>
Index: order_pkg.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/order_pkg.html,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- order_pkg.html 10 Jan 2009 00:43:06 -0000 1.7
+++ order_pkg.html 28 Mar 2009 22:59:36 -0000 1.8
@@ -19,17 +19,13 @@
<INPUT TYPE="hidden" NAME="custnum" VALUE="<% $cust_main->custnum %>">
<% ntable("#cccccc", 2) %>
-<TR>
- <TH ALIGN="right">Package</TH>
- <TD COLSPAN=7>
- <% include('/elements/select-cust-part_pkg.html',
- 'curr_value' => $pkgpart,
- 'cust_main' => $cust_main,
- 'onchange' => 'enable_order_pkg',
- )
- %>
- </TD>
-</TR>
+<% include('/elements/tr-select-cust-part_pkg.html',
+ 'curr_value' => $pkgpart,
+ 'classnum' => -1,
+ 'cust_main' => $cust_main,
+ 'onchange' => 'enable_order_pkg',
+ )
+%>
% if ( $conf->exists('pkg_referral') ) {
<% include('/elements/tr-select-part_referral.html',
- Previous message: [freeside-commits] freeside/FS/FS svc_acct.pm, 1.217.2.21, 1.217.2.22
- Next message: [freeside-commits] freeside/httemplate/elements tr-select-cust-part_pkg.html, NONE, 1.1 select-cust-pkg_class.html, NONE, 1.1 select-table.html, 1.14, 1.15 select-cust-part_pkg.html, 1.3, 1.4 select-part_pkg.html, 1.3, 1.4 tr-selectmultiple-part_pkg.html, 1.3, 1.4
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the freeside-commits
mailing list