X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fmisc%2Fcust_main-import_charges.cgi;h=215cc4c9d095ace256636244dcf0f57084982982;hp=0822b9eb641a5ea92a5fc2ba2751a456425a1068;hb=HEAD;hpb=eb9668a6f3181ee02cb335272c5ee4616e61fd09 diff --git a/httemplate/misc/cust_main-import_charges.cgi b/httemplate/misc/cust_main-import_charges.cgi index 0822b9eb6..215cc4c9d 100644 --- a/httemplate/misc/cust_main-import_charges.cgi +++ b/httemplate/misc/cust_main-import_charges.cgi @@ -1,14 +1,102 @@ - -<%= header('Batch Customer Charge') %> -
-Import a CSV file containing customer charges.

-Default file format is CSV, with the following field order: custnum, amount, description

-If amount is negative, a credit will be applied instead.

+<% include("/elements/header.html",'Batch Charge Import') %> + +Import a CSV file containing customer charges. +

+ +<& /elements/form-file_upload.html, + 'name' => 'OneTimeChargeImportForm', + 'action' => 'process/cust_main-import_charges.cgi', + 'num_files' => 1, + 'fields' => [ 'agentnum', 'custbatch', 'format' ], + 'message' => 'One time charge batch import successful', + 'url' => $p."misc/cust_main-import_charges.cgi", + 'onsubmit' => "document.OneTimeChargeImportForm.submitButton.disabled=true;", +&> + +<% &ntable("#cccccc", 2) %> + +<% include('/elements/tr-select-agent.html', + #'curr_value' => '', #$agentnum, + 'label' => "Agent", + 'empty_label' => 'Select agent', + ) +%> + + + + + Format + + + + + + <% include( '/elements/file-upload.html', + 'field' => 'file', + 'label' => 'Filename', + ) + %> + + + + + + + + + +
+ +
+ +Simple file format is CSV, with the following field order: custnum, agent_custid, amount, description

- CSV Filename:

- - - - + + +Field information: + + + +
+ +Ooma format has the following field order: Description, Description2, Record Type, Customer Number, Billing Phone Number or Zip Code, Bus/Res Indicator, Invoice Date, Invoice Number, Group, Item, Revenue<%$req%>, LineCount, Exempt, ExemptList, State, City, Zipcode, OfferingPK, Offering name<%$req%>, Quantity, AccountNo<%$req%>, Status, Cust Created, PartnerID +

+ + +<% include('/elements/footer.html') %> + +<%once> + my $req = qq!*!; + + +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Import'); + + tie my %formats, 'Tie::IxHash', FS::cust_main::Import_Charges->import_formats; + + my $custbatch = time2str('webimport-%Y/%m/%d-%T'. "-$$-". rand() * 2**32, time); + +