'send_csv_ftp' => {
'name' => 'Upload CSV invoice data to an FTP server',
- 'code' => '$cust_bill->send_csv( protocol => \'ftp\',
- server => \'%%%ftpserver%%%\',
- username => \'%%%ftpusername%%%\',
- password => \'%%%ftppassword%%%\',
- dir => \'%%%ftpdir%%%\' );',
+ 'code' => '$cust_bill->send_csv( protocol => \'ftp\',
+ server => \'%%%ftpserver%%%\',
+ username => \'%%%ftpusername%%%\',
+ password => \'%%%ftppassword%%%\',
+ dir => \'%%%ftpdir%%%\',
+ \'format\' => \'%%%ftpformat%%%\',
+ );',
'html' =>
- '<TABLE BORDER=0><TR><TD ALIGN="right">FTP server: </TD>'.
+ '<TABLE BORDER=0>'.
+ '<TR><TD align="right">Format ("default" or "billco"): </TD>'.
+ '<TD>'.
+ '<!--'.
+ '<SELECT NAME="ftpformat">'.
+ '<OPTION VALUE="default">Default'.
+ '<OPTION VALUE="billco">Billco'.
+ '</SELECT>'.
+ '-->'.
+ '<INPUT TYPE="text" NAME="ftpformat" VALUE="%%%ftpformat%%%">'.
+ '</TD></TR>'.
+ '<TR><TD ALIGN="right">FTP server: </TD>'.
'<TD><INPUT TYPE="text" NAME="ftpserver" VALUE="%%%ftpserver%%%">'.
'</TD></TR>'.
'<TR><TD ALIGN="right">FTP username: </TD><TD>'.
'weight' => 50,
},
+ 'spool_csv' => {
+ 'name' => 'Spool CSV invoice data',
+ 'code' => '$cust_bill->spool_csv( \'format\' => \'%%%spoolformat%%%\',
+ \'dest\' => \'%%%spooldest%%%\',
+ );',
+ 'html' =>
+ '<TABLE BORDER=0>'.
+ '<TR><TD align="right">Format ("default" or "billco"): </TD>'.
+ '<TD>'.
+ '<!--'.
+ '<SELECT NAME="spoolformat">'.
+ '<OPTION VALUE="default">Default'.
+ '<OPTION VALUE="billco">Billco'.
+ '</SELECT>'.
+ '-->'.
+ '<INPUT TYPE="text" NAME="spoolformat" VALUE="%%%spoolformat%%%">'.
+ '</TD></TR>'.
+ '<TR><TD align="right">For destination: </TD>'.
+ '<TD>'.
+ '<SELECT NAME="spooldest">'.
+ '<OPTION VALUE="">(all)'.
+ '<OPTION VALUE="POST">Postal mail'.
+ '<OPTION VALUE="EMAIL">Email'.
+ '<OPTION VALUE="Fax">Fax'.
+ '</SELECT>'.
+ '</TD></TR>'.
+ '</TABLE>',
+ 'weight' => 50,
+ },
+
'bill' => {
'name' => 'Generate invoices (normally only used with a <i>Late Fee</i> event)',
'code' => '$cust_main->bill();',