freeside/httemplate/edit part_bill_event.cgi,1.22,1.23
Ivan Kohler
ivan at pouncequick.420.am
Wed Jun 8 22:34:10 PDT 2005
Update of /home/cvs/cvsroot/freeside/httemplate/edit
In directory pouncequick:/tmp/cvs-serv27905/httemplate/edit
Modified Files:
part_bill_event.cgi
Log Message:
add multiple agent selection to agent-specific invoicing
Index: part_bill_event.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/part_bill_event.cgi,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- part_bill_event.cgi 11 Dec 2004 20:42:27 -0000 1.22
+++ part_bill_event.cgi 9 Jun 2005 05:34:07 -0000 1.23
@@ -83,11 +83,12 @@
sub select_agentnum {
my $plandata = shift;
- my $agentnum = $plandata->{'agentnum'};
- '<SELECT NAME="agentnum">'.
+ #my $agentnum = $plandata->{'agentnum'};
+ my %agentnums = map { $_=>1 } split(/,\s*/, $plandata->{'agentnum'});
+ '<SELECT NAME="agentnum" MULTIPLE>'.
join("\n", map {
'<OPTION VALUE="'. $_->agentnum. '"'.
- ( $_->agentnum == $agentnum ? ' SELECTED' : '' ).
+ ( $agentnums{$_->agentnum} ? ' SELECTED' : '' ).
'>'. $_->agent
} qsearch('agent', { 'disabled' => '' } ) ).
'</SELECT>';
@@ -187,11 +188,11 @@
'send_agent' => {
'name' => 'Send invoice (email/print) ',
- 'code' => '$cust_bill->send(\'%%%agent_templatename%%%\', %%%agentnum%%%, \'%%%agent_invoice_from%%%\');',
+ 'code' => '$cust_bill->send(\'%%%agent_templatename%%%\', [ %%%agentnum%%% ], \'%%%agent_invoice_from%%%\');',
'html' => sub {
'<TABLE BORDER=0>
<TR>
- <TD ALIGN="right">only for agent </TD>
+ <TD ALIGN="right">only for agent(s) </TD>
<TD>'. &select_agentnum(@_). '</TD>
</TR>
<TR>
More information about the freeside-commits
mailing list