From 10adfb99055cc684f96cf446da34a7423cac3459 Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 30 Aug 2002 23:42:47 +0000 Subject: new invoice event: upload a CSV file --- httemplate/edit/part_bill_event.cgi | 24 ++++++++++++++++++++++++ httemplate/edit/process/part_bill_event.cgi | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) (limited to 'httemplate/edit') diff --git a/httemplate/edit/part_bill_event.cgi b/httemplate/edit/part_bill_event.cgi index 324daeb90..a10a186a9 100755 --- a/httemplate/edit/part_bill_event.cgi +++ b/httemplate/edit/part_bill_event.cgi @@ -134,6 +134,30 @@ tie my %events, 'Tie::IxHash', 'weight' => 50, }, + '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%%%\' );', + 'html' => + ''. + ''. + ''. + ''. + ''. + ''. + '
FTP server: '. + '
FTP username: '. + ''. + '
FTP password: '. + ''. + '
FTP directory: '. + '
', + 'weight' => 50, + }, + 'bill' => { 'name' => 'Generate invoices (normally only used with a Late Fee event)', 'code' => '$cust_main->bill();', diff --git a/httemplate/edit/process/part_bill_event.cgi b/httemplate/edit/process/part_bill_event.cgi index 4049ade80..e224bf634 100755 --- a/httemplate/edit/process/part_bill_event.cgi +++ b/httemplate/edit/process/part_bill_event.cgi @@ -12,7 +12,7 @@ if ( ! $cgi->param('plan_weight_eventcode') ) { $error = "Must select an action"; } else { - $cgi->param('plan_weight_eventcode') =~ /^([\w\-]+):(\d+):(.*)$/ + $cgi->param('plan_weight_eventcode') =~ /^([\w\-]+):(\d+):(.*)$/s or die "illegal plan_weight_eventcode:". $cgi->param('plan_weight_eventcode'); $cgi->param('plan', $1); -- cgit v1.2.1