[freeside-commits] freeside/httemplate/misc cust_edi_data-onp.cgi, NONE, 1.1.2.1 cust_main-import-oldonp.cgi, NONE, 1.1.2.1 payment.cgi, 1.26, 1.26.4.1 qualified_liteup_customers.cgi, NONE, 1.1.2.1 transaction810-import.cgi, NONE, 1.1.2.1 usage_elec_prefilled_input.cgi, NONE, 1.1.2.1
Jeff Finucane,420,,
jeff at wavetail.420.am
Mon Aug 2 12:49:26 PDT 2010
- Previous message: [freeside-commits] freeside/httemplate/elements menu.html, 1.92, 1.92.2.1
- Next message: [freeside-commits] freeside/httemplate/misc/process cust_edi_data-onp.cgi, NONE, 1.1.2.1 cust_main-import-oldonp.cgi, NONE, 1.1.2.1 qualified_liteup_customers.cgi, NONE, 1.1.2.1 transaction810-import.cgi, NONE, 1.1.2.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/cvsroot/freeside/httemplate/misc
In directory wavetail.420.am:/tmp/cvs-serv14262/httemplate/misc
Modified Files:
Tag: svc_elec_features
payment.cgi
Added Files:
Tag: svc_elec_features
cust_edi_data-onp.cgi cust_main-import-oldonp.cgi
qualified_liteup_customers.cgi transaction810-import.cgi
usage_elec_prefilled_input.cgi
Log Message:
add svc_elec_features merged from reference code RT#7643
--- NEW FILE: cust_edi_data-onp.cgi ---
<% include("/elements/header.html",'Import EDI Info') %>
<FORM ACTION="process/cust_edi_data-onp.cgi" METHOD="post" ENCTYPE="multipart/form-data">
Import a CSV file containing customer records.
<BR><BR>
<!-- Simple file format is CSV, with the following field order: <i>cust_pkg.setup, dayphone, first, last, address1, address2, city, state, zip, comments</i>
<BR><BR> -->
<!--
Extended file format is CSV, with the following field order: <i>custnum<%$req%>, last<%$req%>, first<%$req%>, address1<%$req%>, address2, city state<%$req%>, zip<%$req%>, ss, daytime ph#, nightime ph#, service_lastname<%$req%>, service_firstname<%$req%>, service_address1<%$req%>, service_address2, service_city service_state <%$req%>, service_zip<%$req%>, newcustdate<%$req%></i> -->
<BR><BR>
<%$req%> Required fields
<BR><BR>
<% &ntable("#cccccc") %>
<% include('/elements/tr-select-agent.html', '', #$agentnum,
'label' => "<B>Agent</B>",
'empty_label' => 'Select agent',
)
%>
<TR>
<TH ALIGN="right">Format</TH>
<TD>
<SELECT NAME="format">
<!-- <OPTION VALUE="simple">Simple -->
<OPTION VALUE="extended" SELECTED>Extended
</SELECT>
</TD>
</TR>
<TR>
<TH ALIGN="right">CSV filename</TH>
<TD><INPUT TYPE="file" NAME="csvfile"></TD>
</TR>
% #include('/elements/tr-select-part_referral.html')
%
<!--
-->
</TABLE>
<BR><BR>
<INPUT TYPE="submit" VALUE="Import">
</FORM>
<% include('/elements/footer.html') %>
<%once>
my $req = qq!<font color="#ff0000">*</font>!;
</%once>
--- NEW FILE: qualified_liteup_customers.cgi ---
<% include("/elements/header.html",'LITEUP') %>
<h3> <FONT COLOR="Blue">Process new Liteup List</FONT></h3>
<FORM ACTION="process/qualified_liteup_customers.cgi" METHOD="post" ENCTYPE="multipart/form-data">
Import a text file from PUCT containg qualified LITEUP customers.
<BR>
The text file should contain ESIID, Address, City, StateZip, Qualifydate. All seperated by 2 or more white spaces.
<BR><BR>
ie.
<BR>
10032789488231455 3608 ORING EDINBURG TX78539 2008030120080731<BR>
1008939284701838499830 2206 W REEN RD HOUSTON TX77067 2008030120080731
<BR><BR>
<% &ntable("#cccccc") %>
<% include('/elements/tr-select-agent.html', '', #$agentnum,
'label' => "<B>Agent</B>",
'empty_label' => 'Select agent',
)
%>
<!--
<TR>
<TH ALIGN="right">Format</TH>
<TD>
<SELECT NAME="format">
<OPTION VALUE="simple">Simple
<OPTION VALUE="extended" SELECTED>Extended
</SELECT>
</TD>
</TR>
-->
<TR>
<TH ALIGN="right">filename</TH>
<TD><INPUT TYPE="file" NAME="textfile"></TD>
</TR>
% #include('/elements/tr-select-part_referral.html')
%
</TABLE>
<BR>
<INPUT STYLE="background-color:lightgreen" TYPE="submit" name="action" VALUE="Process List">
<BR><BR>
<hr color="#CC2277" size="5">
<h3> <FONT COLOR="Blue">Audit Liteup Program</FONT></h3>
<TABLE>
<% include( '/elements/tr-input-beginning_ending.html' ) %>
</TABLE>
<BR>
<INPUT STYLE="background-color:lightgreen" TYPE="submit" name="action" VALUE="Get Report">
<BR><BR>
<hr color="#CC2277" size="5">
</FORM>
<% include('/elements/footer.html') %>
<%once>
my $req = qq!<font color="#ff0000">*</font>!;
</%once>
Index: payment.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/payment.cgi,v
retrieving revision 1.26
retrieving revision 1.26.4.1
diff -u -w -d -r1.26 -r1.26.4.1
--- payment.cgi 5 Oct 2009 18:17:55 -0000 1.26
+++ payment.cgi 2 Aug 2010 19:49:24 -0000 1.26.4.1
@@ -182,7 +182,7 @@
<INPUT TYPE="hidden" NAME="paystate" VALUE="<% $paystate %>">
% }
-% if ( $conf->exists('show_ss') ) {
+% if ( $conf->exists('show_ss') && !$conf->exists('svc_elec_features') ) {
<TR>
<TD ALIGN="right">
Account holder<BR>
--- NEW FILE: cust_main-import-oldonp.cgi ---
<% include("/elements/header.html",'Batch Customer Import') %>
<FORM ACTION="process/cust_main-import-oldonp.cgi" METHOD="post" ENCTYPE="multipart/form-data">
Import a CSV file containing customer records.
<BR><BR>
<!-- Simple file format is CSV, with the following field order: <i>cust_pkg.setup, dayphone, first, last, address1, address2, city, state, zip, comments</i>
<BR><BR> -->
Extended file format is CSV, with the following field order: <i>custnum<%$req%>, last<%$req%>, first<%$req%>, address1<%$req%>, address2, city state<%$req%>, zip<%$req%>, ss, daytime ph#, nightime ph#, service_lastname<%$req%>, service_firstname<%$req%>, service_address1<%$req%>, service_address2, service_city service_state <%$req%>, service_zip<%$req%>, newcustdate<%$req%></i>
<BR><BR>
<%$req%> Required fields
<BR><BR>
<% &ntable("#cccccc") %>
<% include('/elements/tr-select-agent.html', '', #$agentnum,
'label' => "<B>Agent</B>",
'empty_label' => 'Select agent',
)
%>
<TR>
<TH ALIGN="right">Format</TH>
<TD>
<SELECT NAME="format">
<!-- <OPTION VALUE="simple">Simple -->
<OPTION VALUE="extended" SELECTED>Extended
</SELECT>
</TD>
</TR>
<TR>
<TH ALIGN="right">CSV filename</TH>
<TD><INPUT TYPE="file" NAME="csvfile"></TD>
</TR>
% #include('/elements/tr-select-part_referral.html')
%
<!--
<TR>
<TH>First package</TH>
<TD>
<SELECT NAME="pkgpart"><OPTION VALUE="">(none)</OPTION>
% foreach my $part_pkg ( qsearch('part_pkg',{'disabled'=>'' }) ) {
<OPTION VALUE="<% $part_pkg->pkgpart %>"><% $part_pkg->pkg. ' - '. $part_pkg->comment %></OPTION>
% }
</SELECT>
</TD>
</TR>
-->
</TABLE>
<BR><BR>
<INPUT TYPE="submit" VALUE="Import">
</FORM>
<% include('/elements/footer.html') %>
<%once>
my $req = qq!<font color="#ff0000">*</font>!;
</%once>
--- NEW FILE: transaction810-import.cgi ---
<% include("/elements/header.html",'Batch Customer Import') %>
<FORM ACTION="process/transaction810-import.cgi" METHOD="post" ENCTYPE="multipart/form-data">
Import a CSV file containing 810 data.
<BR><BR>
<!-- Simple file format is CSV, with the following field order: <i>duns, inv_num, 867_usage, esiid, tdsp, due_date, inv_date, usage_kwatts, srvc_from_date, srvc_to_date, puct_fund, billed_demand, measure_demand, bill_status, billing_type, 997_ack</i>
<BR><BR> -->
Extended file format is CSV, with the
<BR><BR>
<%$req%> Required fields
<BR><BR>
[1] This field has special treatment upon import: If a string is passed instead
of an integer, the string is searched for and if necessary auto-created in the
target table.
<BR><BR>
[2] <i>username</i> and <i>_password</i> are required if <i>pkgpart</i> is specified.
<BR><BR>
<% &ntable("#cccccc") %>
<% include('/elements/tr-select-agent.html', '', #$agentnum,
'label' => "<B>Agent</B>",
'empty_label' => 'Select agent',
)
%>
<TR>
<TH ALIGN="right">Format</TH>
<TD>
<SELECT NAME="format">
<!-- <OPTION VALUE="simple">Simple -->
<OPTION VALUE="extended" SELECTED>Extended
</SELECT>
</TD>
</TR>
<TR>
<TH ALIGN="right">CSV filename</TH>
<TD><INPUT TYPE="file" NAME="csvfile"></TD>
</TR>
% #include('/elements/tr-select-part_referral.html')
%
<!--
<TR>
<TH>First package</TH>
<TD>
<SELECT NAME="pkgpart"><OPTION VALUE="">(none)</OPTION>
% foreach my $part_pkg ( qsearch('part_pkg',{'disabled'=>'' }) ) {
<OPTION VALUE="<% $part_pkg->pkgpart %>"><% $part_pkg->pkg. ' - '. $part_pkg->comment %></OPTION>
% }
</SELECT>
</TD>
</TR>
-->
</TABLE>
<BR><BR>
<INPUT TYPE="submit" VALUE="Import">
</FORM>
<% include('/elements/footer.html') %>
<%once>
my $req = qq!<font color="#ff0000">*</font>!;
</%once>
--- NEW FILE: usage_elec_prefilled_input.cgi ---
%my $debug=0; # toggle debug
%my ($svcnum, $p_prev_date, $p_curr_date, $p_prev_reading, $p_curr_reading,
% $p_tdsp, $p_meter_mult, $p_total_usage, $p_measured_demand,
% $p_billed_demand, $p_svcnum, $p_entry_date, $p_meter_number,
% $p_first, $p_last, $p_balance, $p_last_billed);
%my ($pkgnum, $svcpart, $svc_external );
%my @field_descriptions = ( 'prev date', 'curr date', 'prev reading',
% 'curr reading', 'tdsp', 'meter mult',
% 'total usage', 'measured demand', 'billed demand',
% 'svcnum', 'entry date', 'meter number' );
%my @field_name = qw / prev_date curr_date prev_read curr_read tdsp
% meter_multiplier total_usage measured_demand
% billed_demand svcnum _date meter_number /;
%my $date_exception = '(prev_date|curr_date|_date)';
%
%if ( $cgi->param('error') ) {
% ### handle error call
% $svcnum = $cgi->param('svcnum');
%}
%else {
%
% my($query) = $cgi->keywords;
%# $query =~ /^(\d+)$/ or die "unparsable svcnum";
% #$svcnum=$1;
%
% $p_prev_date = $cgi->param('p_prev_date');
% $p_curr_date = $cgi->param('p_curr_date');
% $p_prev_reading = $cgi->param('p_prev_reading');
% $p_curr_reading = $cgi->param('p_curr_reading');
% $p_tdsp = $cgi->param('p_tdsp');
% $p_meter_mult = $cgi->param('p_meter_mult');
% $p_total_usage = $cgi->param('p_total_usage');
% $p_measured_demand = $cgi->param('p_measured_demand');
% $p_billed_demand = $cgi->param('p_billed_demand');
% $p_svcnum = $svcnum = $cgi->param('p_svcnum');
% $p_first = $cgi->param('p_first');
% $p_last = $cgi->param('p_last');
% $p_balance = $cgi->param('p_balance');
% $p_last_billed = $cgi->param('p_last_billed');
% #$svcnum = $cgi->param('p_meter_number');
%}
%
%# this is sample data for print in case no previous record of usage_elec
%my @sample_data = ( '20070201', '20070228', '10000', '100100', '76.50',
% '5', '500', '179', '220', "$svcnum", 'NA', '030234972LM');
%
%### this is where i start
%###
%### let gather all the info from usage_elec for the particular 'svcnum'
%###
%my $p1 = popurl(1);
%
%print qq!<FONT SIZE="+1" COLOR="#ff0000">Error: !, $cgi->param('error'),
% "</FONT>"
% if $cgi->param('error');
%
%print qq!<FORM ACTION="${p1}process/usage_elec_manual_input.cgi" METHOD=POST>!;
%
%# print header
%#print header("Manually Adding Record to usage_elec Table", '');
%print header("NAME: ${p_first} ${p_last}", '');
%print header("BALANCE: \$${p_balance} LAST BILLED: ${p_last_billed}", '');
%
%#display
%#
%#
<TABLE BORDER=1>
%
% # -ctran 04/10/08
% # change getting previous 10 record to 13 so we can see at least 1 year
% # worth of transaction
% # get the previous 13 usage_elec items
% my @usage_obj = FS::usage_elec::query_usage($svcnum, 13);
%
% # print the heading
% print "<TR bgcolor=#88b2ce class='maintitle'>"
% . join("\n", map("<TH>" . $_ . "</TH>", @field_descriptions))
% . "</TR>\n";
%
% if (@usage_obj) {
% foreach my $usage (@usage_obj) {
% # fill @usage_ele with data order by @field_name
% my @usage_ele = ();
% foreach my $field (@field_name) {
% if ( $field =~ /$date_exception/ ) {
% # exception handling of converting time to string
% push(@usage_ele,time2str("%Y%m%d",$usage->$field));
% }
% else {
%#debug: field= <% $field %> = <% $usage->$field %><BR>
% push(@usage_ele, $usage->$field);
% }
% }
%
% print "<TR bgcolor=#e8e8ea class='mainbody'>"
% . join("\n", map("<TD>" . $_ . "</TD>", @usage_ele))
% . "</TR>\n";
% }
% }
%
% ###
% ### gathering pre-filled information
% ###
%
% my ($h_prev_date, $h_prev_read, $h_tdsp, $h_meter_multiplier,
% $h_measured_demand, $h_billed_demand, $h_svcnum, $h_meter_number);
%
% if (@usage_obj) {
% # fill in all the history data
% my $lindex = $#usage_obj;
% $h_prev_date = time2str("%Y%m%d",$usage_obj[$lindex]->curr_date);
% $h_prev_read = $usage_obj[$lindex]->curr_read;
% $h_tdsp = $usage_obj[$lindex]->tdsp;
% $h_meter_multiplier = $usage_obj[$lindex]->meter_multiplier;
% $h_measured_demand = $usage_obj[$lindex]->measured_demand;
% $h_billed_demand = $usage_obj[$lindex]->billed_demand;
% $h_svcnum = $usage_obj[$lindex]->svcnum;
% $h_meter_number = $usage_obj[$lindex]->meter_number;
% }
%
% # let figure out if tdsp is charge or not (only charge for BUSINESS)
% my $cust_svc = qsearchs('cust_svc',{'svcnum'=>$p_svcnum});
% my $part_svc = qsearchs('part_svc',{'svcpart' => $cust_svc->svcpart});
% $p_tdsp = '0.00' if ($part_svc->svc !~ /BUSINESS/i);
%
% # this hash store info to configure the table with text box for input
% # size - [int] how big textbox
% # value - [alpha numeric] default value of the text box
% # extra - [alpha numeric] other option for text box. I.E. READONLY
% # mean the text box is a readonly
% my %field_info = (
% prev_date => {
% 'size' => '8',
% 'value' => $p_prev_date,
% },
% curr_date => { 'size' => '8',
% 'value' => $p_curr_date,
% },
% prev_read => {
% 'size' => '8',
% 'value' => $p_prev_reading,
% },
% curr_read => { 'size' => '8',
% 'value' => $p_curr_reading,
% },
% tdsp => {
% 'size' => '8',
% 'value' => $p_tdsp/100,
% },
% meter_multiplier => {
% 'size' => '4',
% 'value' => $p_meter_mult,
% },
% total_usage => { 'size' => '6',
% 'value' => $p_total_usage,
% },
% measured_demand => {
% 'size' => '4',
% 'value' => $p_measured_demand,
% },
% billed_demand => {
% 'size' => '4',
% 'value' => $p_billed_demand,
% },
% svcnum => {
% 'size' => '6',
% 'value' => $p_svcnum,
% 'extra' => 'READONLY'
% },
% _date => {
% 'size' => '8',
% 'value' => 'N/A',
% 'extra' => 'READONLY'
% },
% meter_number => {
% 'size' => '14',
% 'value' => $h_meter_number,
% },
% );
%
%
% # input box for entry
% print qq !<TR bgcolor=#e8e8ea class='mainbody'>!;
% my $input_style = 'STYLE="color:#000000; background-color: #FFFFCC;"';
% foreach my $field (@field_name) {
% my $txt = '';
% $txt .= ' SIZE=' . $field_info{$field}->{'size'}
% if (exists($field_info{$field}->{'size'}));
% $txt .= ' VALUE="' . $field_info{$field}->{'value'} . '"'
% if (exists($field_info{$field}->{'value'}));
% $txt .= ' ' . $field_info{$field}->{'extra'}
% if (exists($field_info{$field}->{'extra'}));
% if ($field eq 'meter_multiplier') {
% print qq !
% <TD>
% <TABLE>
% <TD>
% <INPUT TYPE="text" $input_style NAME="$field" $txt>
% </TD>
% <TD>
% <INPUT TYPE="checkbox" NAME="ignore_meter_multiplier">Ignore<P>
% </TD>
% </TABLE>
% </TD>
% !;
% }
% else {
% print qq !
% <TD>
% <INPUT TYPE="text" $input_style NAME="$field" $txt>
% </TD>
% !;
% }
% }
% print "</TR>\n";
%
</TABLE><BR>
%print "<BR>measured demand = ",$h_measured_demand,"\n<BR>" if ($debug);
%
<INPUT TYPE="submit" VALUE="Submit">
<INPUT TYPE="Reset" VALUE="Clear">
<INPUT TYPE=BUTTON OnClick="$cgi->redirect(popurl(2)."view/svc_external.cgi?$svcnum")"
VALUE="Cancel">
%
% print qq !
% <br><br>
% prev_date, curr_date -
% 8 digit in format of yyyymmdd (y-year m-month d-date)<br>
% prev_read, curr_read - positive interger. Also, curr_read > prev_read
% Unless meter multiplier ignore value is set. In
% this case, this condition will be ignore.<br>
% tdsp - an dollar amount w/wo cent<br>
% meter_multiplier - positive integer<br>
% total_usage -
% should equal (total_usage = (prev_read-curr_read) * meter_multiplier)
% unless meter multiplier ignore value is set<br>
% measured_demand - positive integer<br>
% billed_demand - positive integer<br>
% !;
%
</FORM>
</BODY>
</HTML>
- Previous message: [freeside-commits] freeside/httemplate/elements menu.html, 1.92, 1.92.2.1
- Next message: [freeside-commits] freeside/httemplate/misc/process cust_edi_data-onp.cgi, NONE, 1.1.2.1 cust_main-import-oldonp.cgi, NONE, 1.1.2.1 qualified_liteup_customers.cgi, NONE, 1.1.2.1 transaction810-import.cgi, NONE, 1.1.2.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the freeside-commits
mailing list