optimize CDR rating after timed rate perf regression, RT#15739
[freeside.git] / httemplate / misc / cust_main-import_charges.cgi
1 <% include("/elements/header.html",'Batch Charge Import') %>
2
3 Import a CSV file containing customer charges.
4 <BR><BR>
5
6 <FORM ACTION="process/cust_main-import_charges.cgi" METHOD="post" ENCTYPE="multipart/form-data">
7
8 <% &ntable("#cccccc", 2) %>
9
10 <% include('/elements/tr-select-agent.html',
11               #'curr_value' => '', #$agentnum,
12               'label'       => "<B>Agent</B>",
13               'empty_label' => 'Select agent',
14            )
15 %>
16
17 <TR>
18   <TH ALIGN="right">Format</TH>
19   <TD>
20     <SELECT NAME="format">
21       <OPTION VALUE="simple">Simple
22 <!--      <OPTION VALUE="extended" SELECTED>Extended -->
23     </SELECT>
24   </TD>
25 </TR>
26
27 <TR>
28   <TH ALIGN="right">CSV filename</TH>
29   <TD><INPUT TYPE="file" NAME="csvfile"></TD>
30 </TR>
31
32 <TR><TD COLSPAN=2 ALIGN="center" STYLE="padding-top:6px"><INPUT TYPE="submit" VALUE="Import CSV file"></TD></TR>
33
34 </TABLE>
35
36 </FORM>
37
38 <BR>
39
40 Simple file format is CSV, with the following field order: <i>custnum, agent_custid, amount, description</i>
41 <BR><BR>
42
43 <!-- Extended file format is not yet defined</i>
44 <BR><BR> -->
45
46 Field information:
47
48 <ul>
49
50   <li><i>custnum</i>: This is the freeside customer number.  It may be left blank.  If specified, agent_custid must be blank.
51
52   <li><i>agent_custid</i>: This is the reseller's idea of the customer number or identifier.  It may be left blank.  If specified, custnum must be blank.
53
54   <li><i>amount</i>: A numeric value with at most two digits after the decimal point.  If <i>amount</i> is negative, a credit will be applied instead.
55
56   <li><i>description</i>: Text describing the transaction.
57
58 </ul>
59
60 <BR>
61
62 <% include('/elements/footer.html') %>
63 <%init>
64
65 die "access denied"
66   unless $FS::CurrentUser::CurrentUser->access_right('Import');
67
68 </%init>
69