& /elements/header.html, 'Batch Payment Import' &>
Import a file containing customer payments.
<% include( '/elements/form-file_upload.html',
'name' => 'OneTrueForm',
'action' => 'process/cust_pay-import.cgi', #progress-init target
'fields' => [ 'agentnum', '_date', 'paybatch', 'format', 'payby' ],
'num_files' => 1,
'url' => popurl(2)."search/cust_pay.html?magic=paybatch;paybatch=$paybatch",
'message' => 'Batch Payment Imported',
)
%>
<% &ntable("#cccccc", 2) %>
<& /elements/tr-select-agent.html,
'label' => "Agent",
'empty_label' => 'Select agent',
&>
<& /elements/tr-input-date-field.html, {
'name' => '_date',
'label' => 'Date',
}
&>
Format |
|
<% include( '/elements/tr-select-payby.html',
'paybys' => \%paybys,
'disable_empty' => 1,
'label' => 'Payment type',
)
%>
<% include( '/elements/file-upload.html',
'field' => 'file',
'label' => 'Filename',
)
%>
|
Simple file format is CSV or XLS, with the following field order: custnum, agent_custid, amount, checknum, invnum
Field information:
- custnum: This is the freeside customer number. It may be left blank. If specified, agent_custid must be blank.
- agent_custid: This is the reseller's idea of the customer number or identifier. It may be left blank. If specified, custnum must be blank.
- amount: A positive numeric value with at most two digits after the decimal point.
- checknum: A sequence of digits. May be left blank.
- invnum: Invoice number, optional
<& /elements/footer.html &>
<%init>
my $paybatch = time2str('webbatch-%Y/%m/%d-%T'. "-$$-". rand() * 2**32, time);
my %paybys;
tie %paybys, 'Tie::IxHash', FS::payby->payment_payby2payname();
%init>