diff options
Diffstat (limited to 'httemplate')
32 files changed, 965 insertions, 304 deletions
diff --git a/httemplate/browse/part_bill_event.cgi b/httemplate/browse/part_bill_event.cgi new file mode 100755 index 000000000..f33997666 --- /dev/null +++ b/httemplate/browse/part_bill_event.cgi @@ -0,0 +1,64 @@ +<!-- $Id: part_bill_event.cgi,v 1.1 2002-01-29 16:33:15 ivan Exp $ --> +<% + +my %search; +if ( $cgi->param('showdisabled') ) { + %search = (); +} else { + %search = ( 'disabled' => '' ); +} + +my @part_bill_event = qsearch('part_bill_event', \%search ); +my $total = scalar(@part_bill_event); + +%> +<%= header('Invoice Event Listing', menubar( 'Main Menu' => $p) ) %> + + Invoice events are actions taken on overdue invoices.<BR><BR> +<%= $total %> events +<%= $cgi->param('showdisabled') + ? do { $cgi->param('showdisabled', 0); + '( <a href="'. $cgi->self_url. '">hide disabled events</a> )'; } + : do { $cgi->param('showdisabled', 1); + '( <a href="'. $cgi->self_url. '">show disabled events</a> )'; } +%> +<TABLE BORDER=1> + <TR> + <TH COLSPAN=<%= $cgi->param('showdisabled') ? 2 : 3 %>>Event</TH> + <TH>Payby</TH> + <TH>After</TH> + <TH>Code</TH> + </TR> + +<% foreach my $part_bill_event ( sort { $a->payby cmp $b->payby + || $a->seconds <=> $b->seconds + || $a->eventpart <=> $b->eventpart + } @part_bill_event ) { + my $url = "${p}edit/part_bill_event.cgi?". $part_bill_event->eventpart; + use Time::Duration; + my $delay = duration_exact($hashref->{seconds}); +%> + <TR> + <TD><A HREF="<%= $url %>"> + <%= $part_bill_event->eventpart %></A></TD> +<% unless ( $cgi->param('showdisabled') ) { %> + <TD> + <%= $part_bill_event->disabled ? 'DISABLED' : '' %></TD> +<% } %> + <TD><A HREF="<%= $url %>"> + <%= $part_bill_event->event %></A></TD> + <TD> + <%= $part_bill_event->payby %></TD> + <TD> + <%= $delay %></TD> + <TD> + <%= $part_bill_event->eventcode %></TD> + </TR> +<% } %> + + <TR> + <TD COLSPAN=6><A HREF="<%= $p %>edit/part_bill_event.cgi"><I>Add a new billing event</I></A></TD> + </TR> +</TABLE> +</BODY> +</HTML> diff --git a/httemplate/docs/install.html b/httemplate/docs/install.html index 5e36d14a6..20bb168df 100644 --- a/httemplate/docs/install.html +++ b/httemplate/docs/install.html @@ -32,6 +32,7 @@ Before installing, you need: <li><a href="http://search.cpan.org/search?dist=MailTools">MailTools</a> <li><a href="http://search.cpan.org/search?dist=TimeDate">TimeDate</a> <li><a href="http://search.cpan.org/search?dist=DateManip">DateManip</a> + <li><a href="http://search.cpan.org/search?dist=Time-Duration">Time-Duration</a> <li><a href="http://search.cpan.org/search?dist=File-CounterFile">File-CounterFile</a> <li><a href="http://search.cpan.org/search?dist=FreezeThaw">FreezeThaw</a> <li><a href="http://search.cpan.org/search?dist=String-Approx">String-Approx</a> @@ -45,6 +46,7 @@ Before installing, you need: <li><a href="http://search.cpan.org/search?dist=String-ShellQuote">String-ShellQuote</a> <li><a href="http://search.cpan.org/search?dist=Net-SCP">Net-SCP</a> <li><a href="http://www.apache-asp.org/">Apache::ASP</a> or <a href="http://www.masonhq.com/">HTML::Mason</a> + <li><a href="http;//search.cpan.org/search?dist=Tie-IxHash">Tie-IxHash</a> </ul> </ul> Install the Freeside distribution: @@ -151,10 +153,10 @@ require valid-user <ul> <li>First user:<font size="-1"> <pre>$ su -$ freeside-adduser -c -h /usr/local/etc/freeside/htpasswd <i>username</i></pre></font> +$ <a href="man/bin/freeside-adduser.html">freeside-adduser</a> -c -h /usr/local/etc/freeside/htpasswd <i>username</i></pre></font> <li>Additional users:<font size="-1"> <pre>$ su -$ freeside-adduser -h /usr/local/etc/freeside/htpasswd <i>username</i></pre></font> +$ <a href="man/bin/freeside-adduser.html">freeside-adduser</a> -h /usr/local/etc/freeside/htpasswd <i>username</i></pre></font> </ul> <i>(using other auth types, add each user to your <a href="http://httpd.apache.org/docs/misc/FAQ.html#user-authentication">Apache authentication</a> and then run: <tt>freeside-adduser <b>username</b></tt></i> <li>As the freeside UNIX user, run <tt>bin/fs-setup <b>username</b></tt> to create the database tables, passing the username of a Freeside user you created above: diff --git a/httemplate/docs/man/FS.html b/httemplate/docs/man/FS.html index 23e8ca42f..7db6bb9fd 100644 --- a/httemplate/docs/man/FS.html +++ b/httemplate/docs/man/FS.html @@ -17,12 +17,17 @@ <LI><A HREF="#utility classes">Utility classes</A></LI> <LI><A HREF="#database record classes">Database record classes</A></LI> - <LI><A HREF="#user interface classes (under development; not yet usable)">User Interface classes (under development; not yet usable)</A></LI> + </UL> + + <LI><A HREF="#remote api modules">Remote API modules</A></LI> + <UL> + + <LI><A HREF="#commandline utilities">Command-line utilities</A></LI> + <LI><A HREF="#user interface classes (under (stalled) development; not yet usable)">User Interface classes (under (stalled) development; not yet usable)</A></LI> <LI><A HREF="#notes">Notes</A></LI> </UL> <LI><A HREF="#description">DESCRIPTION</A></LI> - <LI><A HREF="#version">VERSION</A></LI> <LI><A HREF="#support">SUPPORT</A></LI> <LI><A HREF="#author">AUTHOR</A></LI> <LI><A HREF="#see also">SEE ALSO</A></LI> @@ -37,29 +42,32 @@ <P> <HR> <H1><A NAME="synopsis">SYNOPSIS</A></H1> -<P>FS is the unofficial (i.e. non-CPAN) prefix for the Perl module portion of the -Freeside ISP billing software. This includes:</P> +<P>Freeside perl modules and CLI utilities.</P> <P> <H2><A NAME="utility classes">Utility classes</A></H2> <P><A HREF="././FS/Conf.html">the FS::Conf manpage</A> - Freeside configuration values</P> +<P><A HREF="././FS/ConfItem.html">the FS::ConfItem manpage</A> - Freeside configuration option meta-data.</P> <P><A HREF="././FS/UID.html">the FS::UID manpage</A> - User class (not yet OO)</P> -<P><A HREF="././FS/CGI.html">the FS::CGI manpage</A> - Non OO-subroutines for the web interface. This is -depriciated. Future development will be focused on the FS::UI user-interface -classes (see below).</P> +<P><A HREF="././FS/CGI.html">the FS::CGI manpage</A> - Non OO-subroutines for the web interface.</P> <P> <H2><A NAME="database record classes">Database record classes</A></H2> <P><A HREF="././FS/Record.html">the FS::Record manpage</A> - Database record base class</P> <P><A HREF="././FS/svc_acct_pop.html">the FS::svc_acct_pop manpage</A> - POP (Point of Presence, not Post Office Protocol) class</P> +<P><A HREF="././FS/part_pop_local.html">the FS::part_pop_local manpage</A> - Local calling area class</P> <P><A HREF="././FS/part_referral.html">the FS::part_referral manpage</A> - Referral class</P> <P><A HREF="././FS/cust_main_county.html">the FS::cust_main_county manpage</A> - Locale (tax rate) class</P> <P><A HREF="././FS/svc_Common.html">the FS::svc_Common manpage</A> - Service base class</P> <P><A HREF="././FS/svc_acct.html">the FS::svc_acct manpage</A> - Account (shell, RADIUS, POP3) class</P> <P><A HREF="././FS/svc_domain.html">the FS::svc_domain manpage</A> - Domain class</P> <P><A HREF="././FS/domain_record.html">the FS::domain_record manpage</A> - DNS zone entries</P> -<P><A HREF="././FS/svc_acct_sm.html">the FS::svc_acct_sm manpage</A> - Vitual mail alias class</P> +<P><A HREF="././FS/svc_forward.html">the FS::svc_forward manpage</A> - Mail forwarding class</P> +<P><A HREF="././FS/svc_acct_sm.html">the FS::svc_acct_sm manpage</A> - (Depreciated) Vitual mail alias class</P> <P><A HREF="././FS/svc_www.html">the FS::svc_www manpage</A> - Web virtual host class.</P> <P><A HREF="././FS/part_svc.html">the FS::part_svc manpage</A> - Service definition class</P> +<P><A HREF="././FS/part_svc_column.html">the FS::part_svc_column manpage</A> - Column constraint class</P> +<P><A HREF="././FS/part_export.html">the FS::part_export manpage</A> - External provisioning export class</P> +<P><A HREF="././FS/part_export_option.html">the FS::part_export_option manpage</A> - Export option class</P> <P><A HREF="././FS/part_pkg.html">the FS::part_pkg manpage</A> - Package (billing item) definition class</P> <P><A HREF="././FS/pkg_svc.html">the FS::pkg_svc manpage</A> - Class linking package (billing item) definitions (see <A HREF="././FS/part_pkg.html">the FS::part_pkg manpage</A>) with service definitions @@ -76,16 +84,36 @@ definitions (see <A HREF="././FS/part_pkg.html">the FS::part_pkg manpage</A>) wi class</P> <P><A HREF="././FS/cust_bill.html">the FS::cust_bill manpage</A> - Invoice class</P> <P><A HREF="././FS/cust_bill_pkg.html">the FS::cust_bill_pkg manpage</A> - Invoice line item class</P> +<P><A HREF="././FS/part_bill_event.html">the FS::part_bill_event manpage</A> - Invoice event definition class</P> +<P><A HREF="././FS/cust_bill_event.html">the FS::cust_bill_event manpage</A> - Completed invoice event class</P> <P><A HREF="././FS/cust_pay.html">the FS::cust_pay manpage</A> - Payment class</P> +<P><A HREF="././FS/cust_bill_pay.html">the FS::cust_bill_pay manpage</A> - Payment application class</P> <P><A HREF="././FS/cust_credit.html">the FS::cust_credit manpage</A> - Credit class</P> <P><A HREF="././FS/cust_refund.html">the FS::cust_refund manpage</A> - Refund class</P> +<P><A HREF="././FS/cust_credit_refund.html">the FS::cust_credit_refund manpage</A> - Refund application class</P> +<P><A HREF="././FS/cust_credit_bill.html">the FS::cust_credit_bill manpage</A> - Credit invoice application class</P> <P><A HREF="././FS/cust_pay_batch.html">the FS::cust_pay_batch manpage</A> - Credit card transaction queue class</P> <P><A HREF="././FS/prepay_credit.html">the FS::prepay_credit manpage</A> - Prepaid ``calling card'' credit class.</P> <P><A HREF="././FS/nas.html">the FS::nas manpage</A> - Network Access Server class</P> <P><A HREF="././FS/port.html">the FS::port manpage</A> - NAS port class</P> <P><A HREF="././FS/session.html">the FS::session manpage</A> - User login session class</P> +<P><A HREF="././FS/queue.html">the FS::queue manpage</A> - Job queue</P> +<P><A HREF="././FS/queue_arg.html">the FS::queue_arg manpage</A> - Job arguments</P> <P> -<H2><A NAME="user interface classes (under development; not yet usable)">User Interface classes (under development; not yet usable)</A></H2> +<HR> +<H1><A NAME="remote api modules">Remote API modules</A></H1> +<P><A HREF="./FS/SignupClient.html">the FS::SignupClient manpage</A></P> +<P><A HREF="./FS/SessionClient.html">the FS::SessionClient manpage</A></P> +<P><A HREF="./FS/MailAdminServer.html">the FS::MailAdminServer manpage</A></P> +<P> +<H2><A NAME="commandline utilities">Command-line utilities</A></H2> +<P><A HREF="././bin/freeside-email.html">the freeside-email manpage</A></P> +<P><A HREF="././bin/freeside-queued.html">the freeside-queued manpage</A></P> +<P><A HREF="././bin/freeside-adduser.html">the freeside-adduser manpage</A></P> +<P><A HREF="././bin/freeside-bill.html">the freeside-bill manpage</A></P> +<P><A HREF="././bin/freeside-overdue.html">the freeside-overdue manpage</A></P> +<P> +<H2><A NAME="user interface classes (under (stalled) development; not yet usable)">User Interface classes (under (stalled) development; not yet usable)</A></H2> <P><A HREF="././FS/UI/Base.html">the FS::UI::Base manpage</A> - User-interface base class</P> <P><A HREF="././FS/UI/Gtk.html">the FS::UI::Gtk manpage</A> - Gtk user-interface class</P> <P><A HREF="././FS/UI/CGI.html">the FS::UI::CGI manpage</A> - CGI (HTML) user-interface class</P> @@ -95,22 +123,23 @@ class</P> <P>To quote perl(1), ``If you're intending to read these straight through for the first time, the suggested order will tend to reduce the number of forward references.''</P> +<P>If you've never used OO modules before, +<A HREF="http://www.cpan.org/doc/FMTEYEWTK/easy_objects.html">http://www.cpan.org/doc/FMTEYEWTK/easy_objects.html</A> might help you out.</P> <P> <HR> <H1><A NAME="description">DESCRIPTION</A></H1> <P>Freeside is a billing and administration package for Internet Service Providers.</P> <P>The Freeside home page is at <http://www.sisd.com/freeside>.</P> -<P>The main documentation is in htdocs/docs.</P> -<P> -<HR> -<H1><A NAME="version">VERSION</A></H1> -<P>$Id: FS.html,v 1.1 2001-07-30 07:36:03 ivan Exp $</P> +<P>The main documentation is in httemplate/docs.</P> <P> <HR> <H1><A NAME="support">SUPPORT</A></H1> -<P>A mailing list for users and developers is available. Send a blank message to +<P>A mailing list for users is available. Send a blank message to <<A HREF="mailto:ivan-freeside-subscribe@sisd.com">ivan-freeside-subscribe@sisd.com</A>> to subscribe.</P> +<P>A mailing list for developers is available. It is intended to be lower volume +and higher SNR than the users list. Send a blank message to +<<A HREF="mailto:ivan-freeside-devel-subscribe@sisd.com">ivan-freeside-devel-subscribe@sisd.com</A>> to subscribe.</P> <P>Commercial support is available; see <http://www.sisd.com/freeside/commercial.html>.</P> <P> @@ -126,9 +155,6 @@ list and the individal files for details.</P> <P> <HR> <H1><A NAME="bugs">BUGS</A></H1> -<P>The version number of the FS Perl extension differs from the version of the -Freeside distribution, which are both different from the CVS version tag for -each file, which appears under the VERSION heading.</P> <P>Those modules which would be useful separately should be pulled out, renamed appropriately and uploaded to CPAN. So far: DBIx::DBSchema, Net::SSH and Net::SCP...</P> diff --git a/httemplate/docs/man/FS/CGI.html b/httemplate/docs/man/FS/CGI.html index 05f7823b4..54a0bf39b 100644 --- a/httemplate/docs/man/FS/CGI.html +++ b/httemplate/docs/man/FS/CGI.html @@ -79,12 +79,17 @@ Returns HTML tag for beginning an (invisible) table. <DT><STRONG><A NAME="item_ntable">ntable</A></STRONG><BR> <DD> This is getting silly. +<P></P> +<DT><STRONG><A NAME="item_small_custview_CUSTNUM_%7C%7C_CUST_MAIN_OBJECT%2C_">small_custview CUSTNUM || CUST_MAIN_OBJECT, COUNTRYDEFAULT</A></STRONG><BR> +<DD> +Sheesh. I should just switch to Mason. <P></P></DL> <P> <HR> <H1><A NAME="bugs">BUGS</A></H1> <P>Not OO.</P> <P>Not complete.</P> +<P>small_custview sooooo doesn't belong here. i should just switch to Mason.</P> <P> <HR> <H1><A NAME="see also">SEE ALSO</A></H1> diff --git a/httemplate/docs/man/FS/Conf.html b/httemplate/docs/man/FS/Conf.html index 7b1613efd..be49be31f 100644 --- a/httemplate/docs/man/FS/Conf.html +++ b/httemplate/docs/man/FS/Conf.html @@ -1,6 +1,6 @@ <HTML> <HEAD> -<TITLE>FS::Conf - Read access to Freeside configuration values</TITLE> +<TITLE>FS::Conf - Freeside configuration values</TITLE> <LINK REV="made" HREF="mailto:perl@packages.debian.org"> </HEAD> @@ -23,7 +23,7 @@ <HR> <P> <H1><A NAME="name">NAME</A></H1> -<P>FS::Conf - Read access to Freeside configuration values</P> +<P>FS::Conf - Freeside configuration values</P> <P> <HR> <H1><A NAME="synopsis">SYNOPSIS</A></H1> @@ -40,10 +40,12 @@ $value = $conf->config('key'); @list = $conf->config('key'); $bool = $conf->exists('key');</PRE> +<PRE> + @config_items = $conf->config_items;</PRE> <P> <HR> <H1><A NAME="description">DESCRIPTION</A></H1> -<P>Read access to Freeside configuration values. Keys currently map to filenames, +<P>Read and write Freeside configuration values. Keys currently map to filenames, but this may change in the future.</P> <P> <HR> @@ -66,15 +68,29 @@ Returns the configuration value or values (depending on context) for key. <DD> Returns true if the specified key exists, even if the corresponding value is undefined. +<P></P> +<DT><STRONG><A NAME="item_touch">touch</A></STRONG><BR> +<DD> +<DT><STRONG><A NAME="item_set">set</A></STRONG><BR> +<DD> +<DT><STRONG><A NAME="item_delete">delete</A></STRONG><BR> +<DD> +<DT><STRONG><A NAME="item_config_items">config_items</A></STRONG><BR> +<DD> +Returns all of the possible configuration items as FS::ConfItem objects. See +<A HREF=".././FS/ConfItem.html">the FS::ConfItem manpage</A>. <P></P></DL> <P> <HR> <H1><A NAME="bugs">BUGS</A></H1> -<P>Write access (with locking) should be implemented.</P> +<P>Write access (touch, set, delete) should be documented.</P> +<P>If this was more than just crud that will never be useful outside Freeside I'd +worry that config_items is freeside-specific and icky.</P> <P> <HR> <H1><A NAME="see also">SEE ALSO</A></H1> -<P>config.html from the base documentation contains a list of configuration files.</P> +<P>``Configuration'' in the web interface (config/config.cgi).</P> +<P>httemplate/docs/config.html</P> </BODY> diff --git a/httemplate/docs/man/FS/Record.html b/httemplate/docs/man/FS/Record.html index 09304083f..108a84ad7 100644 --- a/httemplate/docs/man/FS/Record.html +++ b/httemplate/docs/man/FS/Record.html @@ -17,7 +17,6 @@ <LI><A HREF="#constructors">CONSTRUCTORS</A></LI> <LI><A HREF="#methods">METHODS</A></LI> <LI><A HREF="#subroutines">SUBROUTINES</A></LI> - <LI><A HREF="#version">VERSION</A></LI> <LI><A HREF="#bugs">BUGS</A></LI> <LI><A HREF="#see also">SEE ALSO</A></LI> </UL> @@ -68,16 +67,17 @@ <PRE> $value = $record->unique('column');</PRE> <PRE> - $value = $record->ut_float('column'); - $value = $record->ut_number('column'); - $value = $record->ut_numbern('column'); - $value = $record->ut_money('column'); - $value = $record->ut_text('column'); - $value = $record->ut_textn('column'); - $value = $record->ut_alpha('column'); - $value = $record->ut_alphan('column'); - $value = $record->ut_phonen('column'); - $value = $record->ut_anythingn('column');</PRE> + $error = $record->ut_float('column'); + $error = $record->ut_number('column'); + $error = $record->ut_numbern('column'); + $error = $record->ut_money('column'); + $error = $record->ut_text('column'); + $error = $record->ut_textn('column'); + $error = $record->ut_alpha('column'); + $error = $record->ut_alphan('column'); + $error = $record->ut_phonen('column'); + $error = $record->ut_anything('column'); + $error = $record->ut_name('column');</PRE> <PRE> $dbdef = reload_dbdef; $dbdef = reload_dbdef "/non/standard/filename"; @@ -125,6 +125,14 @@ objects. #regular FS::TABLE methods #on it.</P> <P></P> +<DT><STRONG><A NAME="item_jsearch_TABLE%2C_HASHREF%2C_SELECT%2C_EXTRA_SQL%2C">jsearch TABLE, HASHREF, SELECT, EXTRA_SQL, PRIMARY_TABLE, PRIMARY_KEY</A></STRONG><BR> +<DD> +Experimental JOINed search method. Using this method, you can execute a +single SELECT spanning multiple tables, and cache the results for subsequent +method calls. Interface will almost definately change in an incompatible +fashion. +<P>Arguments:</P> +<P></P> <DT><STRONG><A NAME="item_qsearchs">qsearchs TABLE, HASHREF</A></STRONG><BR> <DD> Same as qsearch, except that if more than one record matches, it <STRONG>carp</STRONG>s but @@ -266,10 +274,29 @@ Check/untaint ip addresses. IPv4 only for now. May be null. <DD> Check/untaint host and domain names. <P></P> +<DT><STRONG><A NAME="item_ut_name_COLUMN">ut_name COLUMN</A></STRONG><BR> +<DD> +Check/untaint proper names; allows alphanumerics, spaces and the following +punctuation: , . - ' +<P>May not be null.</P> +<P></P> +<DT><STRONG><A NAME="item_ut_zip_COLUMN">ut_zip COLUMN</A></STRONG><BR> +<DD> +Check/untaint zip codes. +<P></P> +<DT><STRONG><A NAME="item_ut_country_COLUMN">ut_country COLUMN</A></STRONG><BR> +<DD> +Check/untaint country codes. Country names are changed to codes, if possible - +see <A HREF="../Locale/Country.html">the Locale::Country manpage</A>. +<P></P> <DT><STRONG><A NAME="item_ut_anything_COLUMN">ut_anything COLUMN</A></STRONG><BR> <DD> Untaints arbitrary data. Be careful. <P></P> +<DT><STRONG><A NAME="item_ut_enum_COLUMN_CHOICES_ARRAYREF">ut_enum COLUMN CHOICES_ARRAYREF</A></STRONG><BR> +<DD> +Check/untaint a column, supplying all possible choices, like the ``enum'' type. +<P></P> <DT><STRONG><A NAME="item_fields_%5B_TABLE_%5D">fields [ TABLE ]</A></STRONG><BR> <DD> This can be used as both a subroutine and a method call. It returns a list @@ -303,10 +330,6 @@ This is depriciated. Don't use it. <P></P></DL> <P> <HR> -<H1><A NAME="version">VERSION</A></H1> -<P>$Id: Record.html,v 1.1 2001-07-30 07:36:03 ivan Exp $</P> -<P> -<HR> <H1><A NAME="bugs">BUGS</A></H1> <P>This module should probably be renamed, since much of the functionality is of general use. It is not completely unlike Adapter::DBI (see below).</P> @@ -323,7 +346,7 @@ true maps to the database (and WHERE clauses) would also help.</P> <P>A fallback check method should be provided which uses the dbdef.</P> <P>The ut_money method assumes money has two decimal digits.</P> <P>The Pg money kludge in the new method only strips `$'.</P> -<P>The ut_phonen method assumes US-style phone numbers.</P> +<P>The ut_phonen method only checks US-style phone numbers.</P> <P>The _quote function should probably use ut_float instead of a regex.</P> <P>All the subroutines probably should be methods, here or elsewhere.</P> <P>Probably should borrow/use some dbdef methods where appropriate (like sub @@ -331,6 +354,7 @@ fields)</P> <P>As of 1.14, DBI fetchall_hashref( {} ) doesn't set fetchrow_hashref NAME_lc, or allow it to be set. Working around it is ugly any way around - DBI should be fixed. (only affects RDBMS which return uppercase column names)</P> +<P>ut_zip should take an optional country like ut_phone.</P> <P> <HR> <H1><A NAME="see also">SEE ALSO</A></H1> diff --git a/httemplate/docs/man/FS/SessionClient.html b/httemplate/docs/man/FS/SessionClient.html index 615f35e0e..0abb2a6a1 100644 --- a/httemplate/docs/man/FS/SessionClient.html +++ b/httemplate/docs/man/FS/SessionClient.html @@ -83,7 +83,7 @@ optional, but must be correct if specified. <P> <HR> <H1><A NAME="version">VERSION</A></H1> -<P>$Id: SessionClient.html,v 1.1 2001-07-30 07:36:03 ivan Exp $</P> +<P>$Id: SessionClient.html,v 1.3 2002-01-29 17:42:46 ivan Exp $</P> <P> <HR> <H1><A NAME="bugs">BUGS</A></H1> diff --git a/httemplate/docs/man/FS/SignupClient.html b/httemplate/docs/man/FS/SignupClient.html index 844f64f33..3438c804a 100644 --- a/httemplate/docs/man/FS/SignupClient.html +++ b/httemplate/docs/man/FS/SignupClient.html @@ -1,124 +1,131 @@ <HTML> <HEAD> <TITLE>FS::SignupClient - Freeside signup client API</TITLE> -<LINK REV="made" HREF="mailto:none"> +<LINK REV="made" HREF="mailto:perl@packages.debian.org"> </HEAD> <BODY> +<A NAME="__index__"></A> <!-- INDEX BEGIN --> <UL> - <LI><A HREF="#NAME">NAME</A> - <LI><A HREF="#SYNOPSIS">SYNOPSIS</A> - <LI><A HREF="#DESCRIPTION">DESCRIPTION</A> - <LI><A HREF="#SUBROUTINES">SUBROUTINES</A> - <LI><A HREF="#VERSION">VERSION</A> - <LI><A HREF="#BUGS">BUGS</A> - <LI><A HREF="#SEE_ALSO">SEE ALSO</A> + <LI><A HREF="#name">NAME</A></LI> + <LI><A HREF="#synopsis">SYNOPSIS</A></LI> + <LI><A HREF="#description">DESCRIPTION</A></LI> + <LI><A HREF="#subroutines">SUBROUTINES</A></LI> + <LI><A HREF="#bugs">BUGS</A></LI> + <LI><A HREF="#see also">SEE ALSO</A></LI> </UL> <!-- INDEX END --> <HR> <P> -<H1><A NAME="NAME">NAME</A></H1> -<P> -FS::SignupClient - Freeside signup client API - +<H1><A NAME="name">NAME</A></H1> +<P>FS::SignupClient - Freeside signup client API</P> <P> <HR> -<H1><A NAME="SYNOPSIS">SYNOPSIS</A></H1> -<P> -<PRE> use FS::SignupClient qw( signup_info new_customer ); -</PRE> -<P> -<PRE> ( $locales, $packages, $pops ) = signup_info; -</PRE> -<P> -<PRE> $error = new_customer ( { - 'first' => $first, - 'last' => $last, - 'ss' => $ss, - 'comapny' => $company, - 'address1' => $address1, - 'address2' => $address2, - 'city' => $city, - 'county' => $county, - 'state' => $state, - 'zip' => $zip, - 'country' => $country, - 'daytime' => $daytime, - 'night' => $night, - 'fax' => $fax, - 'payby' => $payby, - 'payinfo' => $payinfo, - 'paydate' => $paydate, - 'payname' => $payname, - 'invoicing_list' => $invoicing_list, - 'pkgpart' => $pkgpart, - 'username' => $username, - '_password' => $password, - 'popnum' => $popnum, - } ); -</PRE> +<H1><A NAME="synopsis">SYNOPSIS</A></H1> +<PRE> + use FS::SignupClient qw( signup_info new_customer );</PRE> +<PRE> + ( $locales, $packages, $pops ) = signup_info;</PRE> +<PRE> + $error = new_customer ( { + 'first' => $first, + 'last' => $last, + 'ss' => $ss, + 'comapny' => $company, + 'address1' => $address1, + 'address2' => $address2, + 'city' => $city, + 'county' => $county, + 'state' => $state, + 'zip' => $zip, + 'country' => $country, + 'daytime' => $daytime, + 'night' => $night, + 'fax' => $fax, + 'payby' => $payby, + 'payinfo' => $payinfo, + 'paydate' => $paydate, + 'payname' => $payname, + 'invoicing_list' => $invoicing_list, + 'referral_custnum' => $referral_custnum, + 'pkgpart' => $pkgpart, + 'username' => $username, + '_password' => $password, + 'popnum' => $popnum, + } );</PRE> <P> <HR> -<H1><A NAME="DESCRIPTION">DESCRIPTION</A></H1> -<P> -This module provides an API for a remote signup server. - -<P> -It needs to be run as the freeside user. Because of this, the program which -calls these subroutines should be written very carefully. - +<H1><A NAME="description">DESCRIPTION</A></H1> +<P>This module provides an API for a remote signup server.</P> +<P>It needs to be run as the freeside user. Because of this, the program which +calls these subroutines should be written very carefully.</P> <P> <HR> -<H1><A NAME="SUBROUTINES">SUBROUTINES</A></H1> +<H1><A NAME="subroutines">SUBROUTINES</A></H1> <DL> -<DT><STRONG><A NAME="item_signup_info">signup_info</A></STRONG><DD> -<P> +<DT><STRONG><A NAME="item_signup_info">signup_info</A></STRONG><BR> +<DD> Returns three array references of hash references. - -<P> -The first set of hash references is of allowable locales. Each hash -reference has the following keys: taxnum state county country - -<P> -The second set of hash references is of allowable packages. Each hash -reference has the following keys: pkgpart pkg - -<P> -The third set of hash references is of allowable POPs (Points Of Presence). -Each hash reference has the following keys: popnum city state ac exch - -<DT><STRONG><A NAME="item_new_customer">new_customer HASHREF</A></STRONG><DD> -<P> -Adds a customer to the remote Freeside system. Requires a hash reference as -a paramater with the following keys: first last ss comapny address1 -address2 city county state zip country daytime night fax payby payinfo -paydate payname invoicing_list pkgpart username _password popnum - -<P> -Returns a scalar error message, or the empty string for success. - -</DL> +<P>The first set of hash references is of allowable locales. Each hash reference +has the following keys: + taxnum + state + county + country</P> +<P>The second set of hash references is of allowable packages. Each hash +reference has the following keys: + pkgpart + pkg</P> +<P>The third set of hash references is of allowable POPs (Points Of Presence). +Each hash reference has the following keys: + popnum + city + state + ac + exch</P> +<P></P> +<DT><STRONG><A NAME="item_new_customer_HASHREF">new_customer HASHREF</A></STRONG><BR> +<DD> +Adds a customer to the remote Freeside system. Requires a hash reference as +a paramater with the following keys: + first + last + ss + comapny + address1 + address2 + city + county + state + zip + country + daytime + night + fax + payby + payinfo + paydate + payname + invoicing_list + referral_custnum + pkgpart + username + _password + popnum +<P>Returns a scalar error message, or the empty string for success.</P> +<P></P></DL> <P> <HR> -<H1><A NAME="VERSION">VERSION</A></H1> -<P> -$Id: SignupClient.html,v 1.1 2001-07-30 07:36:03 ivan Exp $ - -<P> -<HR> -<H1><A NAME="BUGS">BUGS</A></H1> +<H1><A NAME="bugs">BUGS</A></H1> <P> <HR> -<H1><A NAME="SEE_ALSO">SEE ALSO</A></H1> -<P> -<EM>fs_signupd</EM>, <A HREF="./htdocs/docs/man/FS/SignupServer.html">FS::SignupServer</A>, <A HREF="./htdocs/docs/man/FS/cust_main.html">FS::cust_main</A> - - +<H1><A NAME="see also">SEE ALSO</A></H1> +<P><EM>fs_signupd</EM>, <A HREF="../FS/SignupServer.html">the FS::SignupServer manpage</A>, <A HREF=".././FS/cust_main.html">the FS::cust_main manpage</A></P> </BODY> diff --git a/httemplate/docs/man/FS/UID.html b/httemplate/docs/man/FS/UID.html index 9f4947765..3c28eebfd 100644 --- a/httemplate/docs/man/FS/UID.html +++ b/httemplate/docs/man/FS/UID.html @@ -31,7 +31,7 @@ <H1><A NAME="synopsis">SYNOPSIS</A></H1> <PRE> use FS::UID qw(adminsuidsetup cgisuidsetup dbh datasrc getotaker - checkeuid checkruid swapuid);</PRE> + checkeuid checkruid);</PRE> <PRE> adminsuidsetup $user;</PRE> <PRE> @@ -100,10 +100,6 @@ Returns true if effective UID is that of the freeside user. <DD> Returns true if the real UID is that of the freeside user. <P></P> -<DT><STRONG><A NAME="item_swapuid">swapuid</A></STRONG><BR> -<DD> -Swaps real and effective UIDs. -<P></P> <DT><STRONG><A NAME="item_getsecrets_%5B_USER_%5D">getsecrets [ USER ]</A></STRONG><BR> <DD> Sets the user to USER, if supplied. @@ -122,7 +118,7 @@ coderef into the hash %FS::UID::callback :</P> <P> <HR> <H1><A NAME="version">VERSION</A></H1> -<P>$Id: UID.html,v 1.1 2001-07-30 07:36:03 ivan Exp $</P> +<P>$Id: UID.html,v 1.3 2002-01-29 17:42:46 ivan Exp $</P> <P> <HR> <H1><A NAME="bugs">BUGS</A></H1> diff --git a/httemplate/docs/man/FS/cust_bill.html b/httemplate/docs/man/FS/cust_bill.html index 2e2ad37fe..8bdb87b56 100644 --- a/httemplate/docs/man/FS/cust_bill.html +++ b/httemplate/docs/man/FS/cust_bill.html @@ -50,6 +50,8 @@ <PRE> @cust_pay_objects = $cust_bill->cust_pay;</PRE> <PRE> + $tax_amount = $record->tax;</PRE> +<PRE> @lines = $cust_bill->print_text; @lines = $cust_bill->print_text $time;</PRE> <P> @@ -72,6 +74,8 @@ following fields are currently supported:</P> <DT><STRONG><A NAME="item_automatically">printed - how many times this invoice has been printed automatically (see <A HREF=".././FS/cust_main.html#collect">collect in the FS::cust_main manpage</A>).</A></STRONG><BR> <DD> +<DT><STRONG><A NAME="item_closed_%2D_books_closed_flag%2C_empty_or_%60Y%27">closed - books closed flag, empty or `Y'</A></STRONG><BR> +<DD> </DL> <P> <HR> @@ -117,18 +121,34 @@ Returns the line items (see <A HREF=".././FS/cust_bill_pkg.html">the FS::cust_bi <P></P> <DT><STRONG><A NAME="item_cust_credit">cust_credit</A></STRONG><BR> <DD> -Returns a list consisting of the total previous credited (see -<A HREF=".././FS/cust_credit.html">the FS::cust_credit manpage</A>) for this customer, followed by the previous outstanding -credits (FS::cust_credit objects). +Depreciated. See the cust_credited method. +<PRE> + #Returns a list consisting of the total previous credited (see + #L<FS::cust_credit>) and unapplied for this customer, followed by the previous + #outstanding credits (FS::cust_credit objects).</PRE> <P></P> <DT><STRONG><A NAME="item_cust_pay">cust_pay</A></STRONG><BR> <DD> -Returns all payments (see <A HREF=".././FS/cust_pay.html">the FS::cust_pay manpage</A>) for this invoice. +Depreciated. See the cust_bill_pay method. +<P>#Returns all payments (see <A HREF=".././FS/cust_pay.html">the FS::cust_pay manpage</A>) for this invoice.</P> +<P></P> +<DT><STRONG><A NAME="item_cust_bill_pay">cust_bill_pay</A></STRONG><BR> +<DD> +Returns all payment applications (see <A HREF=".././FS/cust_bill_pay.html">the FS::cust_bill_pay manpage</A>) for this invoice. +<P></P> +<DT><STRONG><A NAME="item_cust_credited">cust_credited</A></STRONG><BR> +<DD> +Returns all applied credits (see <A HREF=".././FS/cust_credit_bill.html">the FS::cust_credit_bill manpage</A>) for this invoice. +<P></P> +<DT><STRONG><A NAME="item_tax">tax</A></STRONG><BR> +<DD> +Returns the tax amount (see <A HREF=".././FS/cust_bill_pkg.html">the FS::cust_bill_pkg manpage</A>) for this invoice. <P></P> <DT><STRONG><A NAME="item_owed">owed</A></STRONG><BR> <DD> Returns the amount owed (still outstanding) on this invoice, which is charged -minus all payments (see <A HREF=".././FS/cust_pay.html">the FS::cust_pay manpage</A>). +minus all payment applications (see <A HREF=".././FS/cust_bill_pay.html">the FS::cust_bill_pay manpage</A>) and credit +applications (see <A HREF=".././FS/cust_credit_bill.html">the FS::cust_credit_bill manpage</A>). <P></P> <DT><STRONG><A NAME="item_print_text_%5BTIME%5D%3B">print_text [TIME];</A></STRONG><BR> <DD> @@ -141,7 +161,7 @@ It is specified as a UNIX timestamp; see <EM>perlfunc/``time''</EM>. Also see <P> <HR> <H1><A NAME="version">VERSION</A></H1> -<P>$Id: cust_bill.html,v 1.1 2001-07-30 07:36:03 ivan Exp $</P> +<P>$Id: cust_bill.html,v 1.3 2002-01-29 17:42:46 ivan Exp $</P> <P> <HR> <H1><A NAME="bugs">BUGS</A></H1> @@ -153,8 +173,9 @@ or something similar so the look can be completely customized?)</P> <P> <HR> <H1><A NAME="see also">SEE ALSO</A></H1> -<P><A HREF=".././FS/Record.html">the FS::Record manpage</A>, <A HREF=".././FS/cust_main.html">the FS::cust_main manpage</A>, <A HREF=".././FS/cust_pay.html">the FS::cust_pay manpage</A>, <A HREF=".././FS/cust_bill_pkg.html">the FS::cust_bill_pkg manpage</A>, -<A HREF=".././FS/cust_credit.html">the FS::cust_credit manpage</A>, schema.html from the base documentation.</P> +<P><A HREF=".././FS/Record.html">the FS::Record manpage</A>, <A HREF=".././FS/cust_main.html">the FS::cust_main manpage</A>, <A HREF=".././FS/cust_bill_pay.html">the FS::cust_bill_pay manpage</A>, <EM>FS:;cust_pay</EM>, +<A HREF=".././FS/cust_bill_pkg.html">the FS::cust_bill_pkg manpage</A>, <A HREF="../FS/cust_bill_credit.html">the FS::cust_bill_credit manpage</A>, schema.html from the base +documentation.</P> </BODY> diff --git a/httemplate/docs/man/FS/cust_credit.html b/httemplate/docs/man/FS/cust_credit.html index 16caca60d..f30241371 100644 --- a/httemplate/docs/man/FS/cust_credit.html +++ b/httemplate/docs/man/FS/cust_credit.html @@ -61,6 +61,8 @@ FS::Record. The following fields are currently supported:</P> <DD> <DT><STRONG><A NAME="item_reason_%2D_text">reason - text</A></STRONG><BR> <DD> +<DT><STRONG><A NAME="item_closed_%2D_books_closed_flag%2C_empty_or_%60Y%27">closed - books closed flag, empty or `Y'</A></STRONG><BR> +<DD> </DL> <P> <HR> @@ -92,17 +94,28 @@ methods. <P></P> <DT><STRONG><A NAME="item_cust_refund">cust_refund</A></STRONG><BR> <DD> -Returns all refunds (see <A HREF=".././FS/cust_refund.html">the FS::cust_refund manpage</A>) for this credit. +Depreciated. See the cust_credit_refund method. +<P>#Returns all refunds (see <A HREF=".././FS/cust_refund.html">the FS::cust_refund manpage</A>) for this credit.</P> +<P></P> +<DT><STRONG><A NAME="item_cust_credit_refund">cust_credit_refund</A></STRONG><BR> +<DD> +Returns all refund applications (see <A HREF=".././FS/cust_credit_refund.html">the FS::cust_credit_refund manpage</A>) for this credit. +<P></P> +<DT><STRONG><A NAME="item_cust_credit_bill">cust_credit_bill</A></STRONG><BR> +<DD> +Returns all application to invoices (see <A HREF=".././FS/cust_credit_bill.html">the FS::cust_credit_bill manpage</A>) for this +credit. <P></P> <DT><STRONG><A NAME="item_credited">credited</A></STRONG><BR> <DD> Returns the amount of this credit that is still outstanding; which is -amount minus all refunds (see <A HREF=".././FS/cust_refund.html">the FS::cust_refund manpage</A>). +amount minus all refund applications (see <A HREF=".././FS/cust_credit_refund.html">the FS::cust_credit_refund manpage</A>) and +applications to invoices (see <A HREF=".././FS/cust_credit_bill.html">the FS::cust_credit_bill manpage</A>). <P></P></DL> <P> <HR> <H1><A NAME="version">VERSION</A></H1> -<P>$Id: cust_credit.html,v 1.1 2001-07-30 07:36:03 ivan Exp $</P> +<P>$Id: cust_credit.html,v 1.3 2002-01-29 17:42:46 ivan Exp $</P> <P> <HR> <H1><A NAME="bugs">BUGS</A></H1> @@ -110,7 +123,8 @@ amount minus all refunds (see <A HREF=".././FS/cust_refund.html">the FS::cust_re <P> <HR> <H1><A NAME="see also">SEE ALSO</A></H1> -<P><A HREF=".././FS/Record.html">the FS::Record manpage</A>, <A HREF=".././FS/cust_refund.html">the FS::cust_refund manpage</A>, <A HREF=".././FS/cust_bill.html">the FS::cust_bill manpage</A>, schema.html from the base +<P><A HREF=".././FS/Record.html">the FS::Record manpage</A>, <A HREF=".././FS/cust_credit_refund.html">the FS::cust_credit_refund manpage</A>, <A HREF=".././FS/cust_refund.html">the FS::cust_refund manpage</A>, +<A HREF=".././FS/cust_credit_bill.html">the FS::cust_credit_bill manpage</A> <A HREF=".././FS/cust_bill.html">the FS::cust_bill manpage</A>, schema.html from the base documentation.</P> </BODY> diff --git a/httemplate/docs/man/FS/cust_main.html b/httemplate/docs/man/FS/cust_main.html index f8e9a8cfb..86e659ad0 100644 --- a/httemplate/docs/man/FS/cust_main.html +++ b/httemplate/docs/man/FS/cust_main.html @@ -15,6 +15,7 @@ <LI><A HREF="#synopsis">SYNOPSIS</A></LI> <LI><A HREF="#description">DESCRIPTION</A></LI> <LI><A HREF="#methods">METHODS</A></LI> + <LI><A HREF="#subroutines">SUBROUTINES</A></LI> <LI><A HREF="#version">VERSION</A></LI> <LI><A HREF="#bugs">BUGS</A></LI> <LI><A HREF="#see also">SEE ALSO</A></LI> @@ -46,6 +47,8 @@ <PRE> @cust_pkg = $record->ncancelled_pkgs;</PRE> <PRE> + @cust_pkg = $record->suspended_pkgs;</PRE> +<PRE> $error = $record->bill; $error = $record->bill %options; $error = $record->bill 'time' => $time;</PRE> @@ -134,6 +137,8 @@ FS::Record. The following fields are currently supported:</P> <DD> <DT><STRONG><A NAME="item_taker">otaker - order taker (assigned automatically, see <A HREF=".././FS/UID.html">the FS::UID manpage</A>)</A></STRONG><BR> <DD> +<DT><STRONG><A NAME="item_comments">comments - comments (optional)</A></STRONG><BR> +<DD> </DL> <P> <HR> @@ -145,15 +150,15 @@ Creates a new customer. To add the customer to the database, see <A HREF="#inse <P>Note that this stores the hash reference, not a distinct copy of the hash it points to. You can ask the object for a copy with the <EM>hash</EM> method.</P> <P></P> -<DT><STRONG><A NAME="item_insert">insert</A></STRONG><BR> +<DT><STRONG><A NAME="item_insert_%5B_CUST_PKG_HASHREF_%5B_%2C_INVOICING_LIST">insert [ CUST_PKG_HASHREF [ , INVOICING_LIST_ARYREF ] ]</A></STRONG><BR> <DD> Adds this customer to the database. If there is an error, returns the error, otherwise returns false. -<P>There is a special insert mode in which you pass a data structure to the insert -method containing FS::cust_pkg and FS::svc_<EM>tablename</EM> objects. When -running under a transactional database, all records are inserted atomicly, or -the transaction is rolled back. There should be a better explanation of this, -but until then, here's an example:</P> +<P>CUST_PKG_HASHREF: If you pass a Tie::RefHash data structure to the insert +method containing FS::cust_pkg and FS::svc_<EM>tablename</EM> objects, all records +are inserted atomicly, or the transaction is rolled back. Passing an empty +hash reference is equivalent to not supplying this parameter. There should be +a better explanation of this, but until then, here's an example:</P> <PRE> use Tie::RefHash; tie %hash, 'Tie::RefHash'; #this part is important @@ -162,6 +167,14 @@ but until then, here's an example:</P> ... ); $cust_main->insert( \%hash );</PRE> +<P>INVOICING_LIST_ARYREF: If you pass an arrarref to the insert method, it will +be set as the invoicing list (see <A HREF="#invoicing_list">invoicing_list</A>). Errors return as +expected and rollback the entire transaction; it is not necessary to call +check_invoicing_list first. The invoicing_list is set after the records in the +CUST_PKG_HASHREF above are inserted, so it is now possible to set an +invoicing_list destination to the newly-created svc_acct. Here's an example:</P> +<PRE> + $cust_main->insert( {}, [ $email, 'POST' ] );</PRE> <P></P> <DT><STRONG><A NAME="item_delete_NEW_CUSTNUM">delete NEW_CUSTNUM</A></STRONG><BR> <DD> @@ -170,15 +183,23 @@ returns false. <P>This will completely remove all traces of the customer record. This is not what you want when a customer cancels service; for that, cancel all of the customer's packages (see <A HREF=".././FS/cust_pkg.html#cancel">cancel in the FS::cust_pkg manpage</A>).</P> -<P>If the customer has any packages, you need to pass a new (valid) customer -number for those packages to be transferred to.</P> +<P>If the customer has any uncancelled packages, you need to pass a new (valid) +customer number for those packages to be transferred to. Cancelled packages +will be deleted. Did I mention that this is NOT what you want when a customer +cancels service and that you really should be looking see <A HREF=".././FS/cust_pkg.html#cancel">cancel in the FS::cust_pkg manpage</A>?</P> <P>You can't delete a customer with invoices (see <A HREF=".././FS/cust_bill.html">the FS::cust_bill manpage</A>), -or credits (see <A HREF=".././FS/cust_credit.html">the FS::cust_credit manpage</A>).</P> +or credits (see <A HREF=".././FS/cust_credit.html">the FS::cust_credit manpage</A>) or payments (see <A HREF=".././FS/cust_pay.html">the FS::cust_pay manpage</A>).</P> <P></P> -<DT><STRONG><A NAME="item_replace_OLD_RECORD">replace OLD_RECORD</A></STRONG><BR> +<DT><STRONG><A NAME="item_replace_OLD_RECORD_%5B_INVOICING_LIST_ARYREF_%5D">replace OLD_RECORD [ INVOICING_LIST_ARYREF ]</A></STRONG><BR> <DD> Replaces the OLD_RECORD with this one in the database. If there is an error, returns the error, otherwise returns false. +<P>INVOICING_LIST_ARYREF: If you pass an arrarref to the insert method, it will +be set as the invoicing list (see <A HREF="#invoicing_list">invoicing_list</A>). Errors return as +expected and rollback the entire transaction; it is not necessary to call +check_invoicing_list first. Here's an example:</P> +<PRE> + $new_cust_main->replace( $old_cust_main, [ $email, 'POST' ] );</PRE> <P></P> <DT><STRONG><A NAME="item_check">check</A></STRONG><BR> <DD> @@ -194,14 +215,49 @@ Returns all packages (see <A HREF=".././FS/cust_pkg.html">the FS::cust_pkg manpa <DD> Returns all non-cancelled packages (see <A HREF=".././FS/cust_pkg.html">the FS::cust_pkg manpage</A>) for this customer. <P></P> +<DT><STRONG><A NAME="item_suspended_pkgs">suspended_pkgs</A></STRONG><BR> +<DD> +Returns all suspended packages (see <A HREF=".././FS/cust_pkg.html">the FS::cust_pkg manpage</A>) for this customer. +<P></P> +<DT><STRONG><A NAME="item_unflagged_suspended_pkgs">unflagged_suspended_pkgs</A></STRONG><BR> +<DD> +Returns all unflagged suspended packages (see <A HREF=".././FS/cust_pkg.html">the FS::cust_pkg manpage</A>) for this +customer (thouse packages without the `manual_flag' set). +<P></P> +<DT><STRONG><A NAME="item_unsuspended_pkgs">unsuspended_pkgs</A></STRONG><BR> +<DD> +Returns all unsuspended (and uncancelled) packages (see <A HREF=".././FS/cust_pkg.html">the FS::cust_pkg manpage</A>) for +this customer. +<P></P> +<DT><STRONG><A NAME="item_unsuspend">unsuspend</A></STRONG><BR> +<DD> +Unsuspends all unflagged suspended packages (see <A HREF="#unflagged_suspended_pkgs">unflagged_suspended_pkgs</A> +and <A HREF=".././FS/cust_pkg.html">the FS::cust_pkg manpage</A>) for this customer. Always returns a list: an empty list +on success or a list of errors. +<P></P> +<DT><STRONG><A NAME="item_suspend">suspend</A></STRONG><BR> +<DD> +Suspends all unsuspended packages (see <A HREF=".././FS/cust_pkg.html">the FS::cust_pkg manpage</A>) for this customer. +Always returns a list: an empty list on success or a list of errors. +<P></P> +<DT><STRONG><A NAME="item_cancel">cancel</A></STRONG><BR> +<DD> +Cancels all uncancelled packages (see <A HREF=".././FS/cust_pkg.html">the FS::cust_pkg manpage</A>) for this customer. +Always returns a list: an empty list on success or a list of errors. +<P></P> <DT><STRONG><A NAME="item_bill">bill OPTIONS</A></STRONG><BR> <DD> Generates invoices (see <A HREF=".././FS/cust_bill.html">the FS::cust_bill manpage</A>) for this customer. Usually used in conjunction with the collect method. +<P>Options are passed as name-value pairs.</P> <P>The only currently available option is `time', which bills the customer as if it were that time. It is specified as a UNIX timestamp; see <EM>perlfunc/``time''</EM>). Also see <A HREF="../Time/Local.html">the Time::Local manpage</A> and <A HREF="../Date/Parse.html">the Date::Parse manpage</A> for conversion -functions.</P> +functions. For example:</P> +<PRE> + use Date::Parse; + ... + $cust_main->bill( 'time' => str2time('April 20th, 2001') );</PRE> <P>If there is an error, returns the error, otherwise returns false.</P> <P></P> <DT><STRONG><A NAME="item_collect">collect OPTIONS</A></STRONG><BR> @@ -211,28 +267,66 @@ functions.</P> <P>Depending on the value of `payby', this may print an invoice (`BILL'), charge a credit card (`CARD'), or just add any necessary (pseudo-)payment (`COMP').</P> <P>If there is an error, returns the error, otherwise returns false.</P> +<P>Options are passed as name-value pairs.</P> <P>Currently available options are:</P> <P>invoice_time - Use this time when deciding when to print invoices and late notices on those invoices. The default is now. It is specified as a UNIX timestamp; see <EM>perlfunc/``time''</EM>). Also see <A HREF="../Time/Local.html">the Time::Local manpage</A> and <A HREF="../Date/Parse.html">the Date::Parse manpage</A> for conversion functions.</P> -<P>batch_card - Set this true to batch cards (see <A HREF=".././FS/cust_pay_batch.html">the cust_pay_batch manpage</A>). By +<P>batch_card - Set this true to batch cards (see <A HREF=".././FS/cust_pay_batch.html">the FS::cust_pay_batch manpage</A>). By default, cards are processed immediately, which will generate an error if CyberCash is not installed.</P> <P>report_badcard - Set this true if you want bad card transactions to return an error. By default, they don't.</P> +<P>force_print - force printing even if invoice has been printed more than once +every 30 days, and don't increment the `printed' field.</P> <P></P> <DT><STRONG><A NAME="item_total_owed">total_owed</A></STRONG><BR> <DD> Returns the total owed for this customer on all invoices -(see <A HREF=".././FS/cust_bill.html">the FS::cust_bill manpage</A>). +(see <A HREF=".././FS/cust_bill.html#owed">owed in the FS::cust_bill manpage</A>). +<P></P> +<DT><STRONG><A NAME="item_total_owed_date_TIME">total_owed_date TIME</A></STRONG><BR> +<DD> +Returns the total owed for this customer on all invoices with date earlier than +TIME. TIME is specified as a UNIX timestamp; see <EM>perlfunc/``time''</EM>). Also +see <A HREF="../Time/Local.html">the Time::Local manpage</A> and <A HREF="../Date/Parse.html">the Date::Parse manpage</A> for conversion functions. +<P></P> +<DT><STRONG><A NAME="item_apply_credits">apply_credits</A></STRONG><BR> +<DD> +Applies (see <A HREF=".././FS/cust_credit_bill.html">the FS::cust_credit_bill manpage</A>) unapplied credits (see <A HREF=".././FS/cust_credit.html">the FS::cust_credit manpage</A>) +to outstanding invoice balances in chronological order and returns the value +of any remaining unapplied credits available for refund +(see <A HREF=".././FS/cust_refund.html">the FS::cust_refund manpage</A>). +<P></P> +<DT><STRONG><A NAME="item_apply_payments">apply_payments</A></STRONG><BR> +<DD> +Applies (see <A HREF=".././FS/cust_bill_pay.html">the FS::cust_bill_pay manpage</A>) unapplied payments (see <A HREF=".././FS/cust_pay.html">the FS::cust_pay manpage</A>) +to outstanding invoice balances in chronological order. +<PRE> + #and returns the value of any remaining unapplied payments.</PRE> <P></P> <DT><STRONG><A NAME="item_total_credited">total_credited</A></STRONG><BR> <DD> -Returns the total credits (see <A HREF=".././FS/cust_credit.html">the FS::cust_credit manpage</A>) for this customer. +Returns the total outstanding credit (see <A HREF=".././FS/cust_credit.html">the FS::cust_credit manpage</A>) for this +customer. See <A HREF=".././FS/cust_credit.html#credited">credited in the FS::cust_credit manpage</A>. +<P></P> +<DT><STRONG><A NAME="item_total_unapplied_payments">total_unapplied_payments</A></STRONG><BR> +<DD> +Returns the total unapplied payments (see <A HREF=".././FS/cust_pay.html">the FS::cust_pay manpage</A>) for this customer. +See <A HREF=".././FS/cust_pay.html#unapplied">unapplied in the FS::cust_pay manpage</A>. <P></P> <DT><STRONG><A NAME="item_balance">balance</A></STRONG><BR> <DD> -Returns the balance for this customer (total owed minus total credited). +Returns the balance for this customer (total_owed minus total_credited +minus total_unapplied_payments). +<P></P> +<DT><STRONG><A NAME="item_balance_date_TIME">balance_date TIME</A></STRONG><BR> +<DD> +Returns the balance for this customer, only considering invoices with date +earlier than TIME (total_owed_date minus total_credited minus +total_unapplied_payments). TIME is specified as a UNIX timestamp; see +<EM>perlfunc/``time''</EM>). Also see <A HREF="../Time/Local.html">the Time::Local manpage</A> and <A HREF="../Date/Parse.html">the Date::Parse manpage</A> for conversion +functions. <P></P> <DT><STRONG><A NAME="item_invoicing_list_%5B_ARRAYREF_%5D">invoicing_list [ ARRAYREF ]</A></STRONG><BR> <DD> @@ -248,11 +342,58 @@ check it without disturbing anything by passing nothing.</P> <DD> Checks these arguements as valid input for the invoicing_list method. If there is an error, returns the error, otherwise returns false. +<P></P> +<DT><STRONG><A NAME="item_default_invoicing_list">default_invoicing_list</A></STRONG><BR> +<DD> +Sets the invoicing list to all accounts associated with this customer. +<P></P> +<DT><STRONG><A NAME="item_invoicing_list_addpost">invoicing_list_addpost</A></STRONG><BR> +<DD> +Adds postal invoicing to this customer. If this customer is already configured +to receive postal invoices, does nothing. +<P></P> +<DT><STRONG><A NAME="item_referral_cust_main_%5B_DEPTH_%5B_EXCLUDE_HASHREF_%">referral_cust_main [ DEPTH [ EXCLUDE_HASHREF ] ]</A></STRONG><BR> +<DD> +Returns an array of customers referred by this customer (referral_custnum set +to this custnum). If DEPTH is given, recurses up to the given depth, returning +customers referred by customers referred by this customer and so on, inclusive. +The default behavior is DEPTH 1 (no recursion). +<P></P> +<DT><STRONG><A NAME="item_referral_cust_pkg_%5B_DEPTH_%5D">referral_cust_pkg [ DEPTH ]</A></STRONG><BR> +<DD> +Like referral_cust_main, except returns a flat list of all unsuspended packages +for each customer. The number of items in this list may be useful for +comission calculations (perhaps after a grep). +<P></P> +<DT><STRONG><A NAME="item_credit">credit AMOUNT, REASON</A></STRONG><BR> +<DD> +Applies a credit to this customer. If there is an error, returns the error, +otherwise returns false. +<P></P> +<DT><STRONG><A NAME="item_charge">charge AMOUNT PKG COMMENT</A></STRONG><BR> +<DD> +Creates a one-time charge for this customer. If there is an error, returns +the error, otherwise returns false. <P></P></DL> <P> <HR> +<H1><A NAME="subroutines">SUBROUTINES</A></H1> +<DL> +<DT><STRONG><A NAME="item_check_and_rebuild_fuzzyfiles">check_and_rebuild_fuzzyfiles</A></STRONG><BR> +<DD> +<DT><STRONG><A NAME="item_rebuild_fuzzyfiles">rebuild_fuzzyfiles</A></STRONG><BR> +<DD> +<DT><STRONG><A NAME="item_all_last">all_last</A></STRONG><BR> +<DD> +<DT><STRONG><A NAME="item_all_company">all_company</A></STRONG><BR> +<DD> +<DT><STRONG><A NAME="item_append_fuzzyfiles_LASTNAME_COMPANY">append_fuzzyfiles LASTNAME COMPANY</A></STRONG><BR> +<DD> +</DL> +<P> +<HR> <H1><A NAME="version">VERSION</A></H1> -<P>$Id: cust_main.html,v 1.1 2001-07-30 07:36:03 ivan Exp $</P> +<P>$Id: cust_main.html,v 1.2 2002-01-29 16:33:15 ivan Exp $</P> <P> <HR> <H1><A NAME="bugs">BUGS</A></H1> @@ -264,7 +405,6 @@ list.</P> <P>CyberCash v2 forces us to define some variables in package main.</P> <P>There should probably be a configuration file with a list of allowed credit card types.</P> -<P>CyberCash is the only processor.</P> <P>No multiple currency support (probably a larger project than just this module).</P> <P> <HR> diff --git a/httemplate/docs/man/FS/cust_main_invoice.html b/httemplate/docs/man/FS/cust_main_invoice.html index 6ab7fa289..a7929a943 100644 --- a/httemplate/docs/man/FS/cust_main_invoice.html +++ b/httemplate/docs/man/FS/cust_main_invoice.html @@ -100,7 +100,7 @@ Returns the literal email address for this record (or `POST'). <P> <HR> <H1><A NAME="version">VERSION</A></H1> -<P>$Id: cust_main_invoice.html,v 1.1 2001-07-30 07:36:03 ivan Exp $</P> +<P>$Id: cust_main_invoice.html,v 1.3 2002-01-29 17:42:46 ivan Exp $</P> <P> <HR> <H1><A NAME="bugs">BUGS</A></H1> diff --git a/httemplate/docs/man/FS/cust_pay.html b/httemplate/docs/man/FS/cust_pay.html index 803376260..ce057f068 100644 --- a/httemplate/docs/man/FS/cust_pay.html +++ b/httemplate/docs/man/FS/cust_pay.html @@ -50,7 +50,7 @@ currently supported:</P> <DL> <DT><STRONG><A NAME="item_key">paynum - primary key (assigned automatically for new payments)</A></STRONG><BR> <DD> -<DT><STRONG><A NAME="item_Invoice">invnum - Invoice (see <A HREF=".././FS/cust_bill.html">the FS::cust_bill manpage</A>)</A></STRONG><BR> +<DT><STRONG><A NAME="item_customer">custnum - customer (see <A HREF=".././FS/cust_main.html">the FS::cust_main manpage</A>)</A></STRONG><BR> <DD> <DT><STRONG><A NAME="item_paid_%2D_Amount_of_this_payment">paid - Amount of this payment</A></STRONG><BR> <DD> @@ -59,10 +59,12 @@ currently supported:</P> <DD> <DT><STRONG><A NAME="item_payby_%2D_%60CARD%27_%28credit_cards%29%2C_%60BILL">payby - `CARD' (credit cards), `BILL' (billing), or `COMP' (free)</A></STRONG><BR> <DD> -<DT><STRONG><A NAME="item_issuer">payinfo - card number, P.O.#, or comp issuer (4-8 lowercase alphanumerics; think username)</A></STRONG><BR> +<DT><STRONG><A NAME="item_issuer">payinfo - card number, check #, or comp issuer (4-8 lowercase alphanumerics; think username), respectively</A></STRONG><BR> <DD> <DT><STRONG><A NAME="item_paybatch_%2D_text_field_for_tracking_card_processi">paybatch - text field for tracking card processing</A></STRONG><BR> <DD> +<DT><STRONG><A NAME="item_closed_%2D_books_closed_flag%2C_empty_or_%60Y%27">closed - books closed flag, empty or `Y'</A></STRONG><BR> +<DD> </DL> <P> <HR> @@ -74,8 +76,10 @@ Creates a new payment. To add the payment to the databse, see <A HREF="#insert" <P></P> <DT><STRONG><A NAME="item_insert">insert</A></STRONG><BR> <DD> -Adds this payment to the databse, and updates the invoice (see -<A HREF=".././FS/cust_bill.html">the FS::cust_bill manpage</A>). +Adds this payment to the database. +<P>For backwards-compatibility and convenience, if the additional field invnum +is defined, an FS::cust_bill_pay record for the full amount of the payment +will be created. In this case, custnum is optional.</P> <P></P> <DT><STRONG><A NAME="item_delete">delete</A></STRONG><BR> <DD> @@ -89,11 +93,21 @@ Currently unimplemented (accounting reasons). <DD> Checks all fields to make sure this is a valid payment. If there is an error, returns the error, otherwise returns false. Called by the insert method. +<P></P> +<DT><STRONG><A NAME="item_cust_bill_pay">cust_bill_pay</A></STRONG><BR> +<DD> +Returns all applications to invoices (see <A HREF=".././FS/cust_bill_pay.html">the FS::cust_bill_pay manpage</A>) for this +payment. +<P></P> +<DT><STRONG><A NAME="item_unapplied">unapplied</A></STRONG><BR> +<DD> +Returns the amount of this payment that is still unapplied; which is +paid minus all payment applications (see <A HREF=".././FS/cust_bill_pay.html">the FS::cust_bill_pay manpage</A>). <P></P></DL> <P> <HR> <H1><A NAME="version">VERSION</A></H1> -<P>$Id: cust_pay.html,v 1.1 2001-07-30 07:36:03 ivan Exp $</P> +<P>$Id: cust_pay.html,v 1.2 2002-01-29 16:33:15 ivan Exp $</P> <P> <HR> <H1><A NAME="bugs">BUGS</A></H1> @@ -101,7 +115,8 @@ returns the error, otherwise returns false. Called by the insert method. <P> <HR> <H1><A NAME="see also">SEE ALSO</A></H1> -<P><A HREF=".././FS/Record.html">the FS::Record manpage</A>, <A HREF=".././FS/cust_bill.html">the FS::cust_bill manpage</A>, schema.html from the base documentation.</P> +<P><A HREF=".././FS/cust_bill_pay.html">the FS::cust_bill_pay manpage</A>, <A HREF=".././FS/cust_bill.html">the FS::cust_bill manpage</A>, <A HREF=".././FS/Record.html">the FS::Record manpage</A>, schema.html from the +base documentation.</P> </BODY> diff --git a/httemplate/docs/man/FS/cust_pay_batch.html b/httemplate/docs/man/FS/cust_pay_batch.html index c1c73c301..052ccac39 100644 --- a/httemplate/docs/man/FS/cust_pay_batch.html +++ b/httemplate/docs/man/FS/cust_pay_batch.html @@ -49,7 +49,7 @@ batched (sent to a processor). FS::cust_pay_batch inherits from FS::Record. Typically called by the collect method of an FS::cust_main object. The following fields are currently supported:</P> <DL> -<DT><STRONG><A NAME="item_trancode_%2D_77_for_charges">trancode - 77 for charges</A></STRONG><BR> +<DT><STRONG><A NAME="item_key">paybatchnum - primary key (automatically assigned)</A></STRONG><BR> <DD> <DT><STRONG><A NAME="item_cardnum">cardnum</A></STRONG><BR> <DD> @@ -116,7 +116,7 @@ and repalce methods. <P> <HR> <H1><A NAME="version">VERSION</A></H1> -<P>$Id: cust_pay_batch.html,v 1.1 2001-07-30 07:36:03 ivan Exp $</P> +<P>$Id: cust_pay_batch.html,v 1.3 2002-01-29 17:42:46 ivan Exp $</P> <P> <HR> <H1><A NAME="bugs">BUGS</A></H1> diff --git a/httemplate/docs/man/FS/cust_pkg.html b/httemplate/docs/man/FS/cust_pkg.html index 459d1297c..9f1005da7 100644 --- a/httemplate/docs/man/FS/cust_pkg.html +++ b/httemplate/docs/man/FS/cust_pkg.html @@ -53,6 +53,8 @@ <PRE> @labels = $record->labels;</PRE> <PRE> + $seconds = $record->seconds_since($timestamp);</PRE> +<PRE> $error = FS::cust_pkg::order( $custnum, \@pkgparts ); $error = FS::cust_pkg::order( $custnum, \@pkgparts, \@remove_pkgnums ] );</PRE> <P> @@ -79,6 +81,9 @@ inherits from FS::Record. The following fields are currently supported:</P> <DD> <DT><STRONG><A NAME="item_taker">otaker - order taker (assigned automatically if null, see <A HREF=".././FS/UID.html">the FS::UID manpage</A>)</A></STRONG><BR> <DD> +<DT><STRONG><A NAME="item_manual_flag_%2D_If_this_field_is_set_to_1%2C_disab">manual_flag - If this field is set to 1, disables the automatic +unsuspension of this package when using the <STRONG>unsuspendauto</STRONG> config file.</A></STRONG><BR> +<DD> </DL> <P>Note: setup, bill, susp, expire and cancel are specified as UNIX timestamps; see <EM>perlfunc/``time''</EM>. Also see <A HREF="../Time/Local.html">the Time::Local manpage</A> and <A HREF="../Date/Parse.html">the Date::Parse manpage</A> for @@ -95,26 +100,12 @@ Create a new billing item. To add the item to the database, see <A HREF="#inser <DD> Adds this billing item to the database (``Orders'' the item). If there is an error, returns the error, otherwise returns false. -<P>sub insert { - my $self = shift;</P> -<PRE> - # custnum might not have have been defined in sub check (for one-shot new - # customers), so check it here instead</PRE> -<PRE> - my $error = $self->ut_number('custnum'); - return $error if $error</PRE> -<PRE> - return "Unknown customer" - unless qsearchs( 'cust_main', { 'custnum' => $self->custnum } );</PRE> -<PRE> - $self->SUPER::insert;</PRE> -<P>}</P> <P></P> <DT><STRONG><A NAME="item_delete">delete</A></STRONG><BR> <DD> -Currently unimplemented. You don't want to delete billing items, because there -would then be no record the customer ever purchased the item. Instead, see -the cancel method. +This method now works but you probably shouldn't use it. +<P>You don't want to delete billing items, because there would then be no record +the customer ever purchased the item. Instead, see the cancel method.</P> <P></P> <DT><STRONG><A NAME="item_replace_OLD_RECORD">replace OLD_RECORD</A></STRONG><BR> <DD> @@ -158,16 +149,32 @@ package, then unsuspends the package itself (clears the susp field). Returns the definition for this billing item, as an FS::part_pkg object (see <A HREF=".././FS/part_pkg.html">the FS::part_pkg manpage</A>). <P></P> +<DT><STRONG><A NAME="item_cust_svc">cust_svc</A></STRONG><BR> +<DD> +Returns the services for this package, as FS::cust_svc objects (see +<A HREF=".././FS/cust_svc.html">the FS::cust_svc manpage</A>) +<P></P> <DT><STRONG><A NAME="item_labels">labels</A></STRONG><BR> <DD> Returns a list of lists, calling the label method for all services (see <A HREF=".././FS/cust_svc.html">the FS::cust_svc manpage</A>) of this billing item. +<P></P> +<DT><STRONG><A NAME="item_cust_main">cust_main</A></STRONG><BR> +<DD> +Returns the parent customer object (see <A HREF=".././FS/cust_main.html">the FS::cust_main manpage</A>). +<P></P> +<DT><STRONG><A NAME="item_seconds_since_TIMESTAMP">seconds_since TIMESTAMP</A></STRONG><BR> +<DD> +Returns the number of seconds all accounts (see <A HREF=".././FS/svc_acct.html">the FS::svc_acct manpage</A>) in this +package have been online since TIMESTAMP. +<P>TIMESTAMP is specified as a UNIX timestamp; see <EM>perlfunc/``time''</EM>. Also see +<A HREF="../Time/Local.html">the Time::Local manpage</A> and <A HREF="../Date/Parse.html">the Date::Parse manpage</A> for conversion functions.</P> <P></P></DL> <P> <HR> <H1><A NAME="subroutines">SUBROUTINES</A></H1> <DL> -<DT><STRONG><A NAME="item_order_CUSTNUM%2C_PKGPARTS_ARYREF%2C_%5B_REMOVE_PKG">order CUSTNUM, PKGPARTS_ARYREF, [ REMOVE_PKGNUMS_ARYREF ]</A></STRONG><BR> +<DT><STRONG><A NAME="item_order_CUSTNUM%2C_PKGPARTS_ARYREF%2C_%5B_REMOVE_PKG">order CUSTNUM, PKGPARTS_ARYREF, [ REMOVE_PKGNUMS_ARYREF [ RETURN_CUST_PKG_ARRAYREF ] ]</A></STRONG><BR> <DD> CUSTNUM is a customer (see <A HREF=".././FS/cust_main.html">the FS::cust_main manpage</A>) <P>PKGPARTS is a list of pkgparts specifying the the billing item definitions (see @@ -176,12 +183,15 @@ permitted.</P> <P>REMOVE_PKGNUMS is an optional list of pkgnums specifying the billing items to remove for this customer. The services (see <A HREF=".././FS/cust_svc.html">the FS::cust_svc manpage</A>) are moved to the new billing items. An error is returned if this is not possible (see -<A HREF=".././FS/pkg_svc.html">the FS::pkg_svc manpage</A>).</P> +<A HREF=".././FS/pkg_svc.html">the FS::pkg_svc manpage</A>). An empty arrayref is equivalent to not specifying this +parameter.</P> +<P>RETURN_CUST_PKG_ARRAYREF, if specified, will be filled in with the +newly-created cust_pkg objects.</P> <P></P></DL> <P> <HR> <H1><A NAME="version">VERSION</A></H1> -<P>$Id: cust_pkg.html,v 1.1 2001-07-30 07:36:03 ivan Exp $</P> +<P>$Id: cust_pkg.html,v 1.2 2002-01-29 16:33:15 ivan Exp $</P> <P> <HR> <H1><A NAME="bugs">BUGS</A></H1> @@ -194,11 +204,13 @@ compile time, rather than via 'require' in sub { setup, suspend, unsuspend, cancel } because they use %FS::UID::callback to load configuration values. Probably need a subroutine which decides what to do based on whether or not we've fetched the user yet, rather than a hash. See FS::UID and the TODO.</P> +<P>Now that things are transactional should the check in the insert method be +moved to check ?</P> <P> <HR> <H1><A NAME="see also">SEE ALSO</A></H1> -<P><A HREF=".././FS/Record.html">the FS::Record manpage</A>, <A HREF=".././FS/cust_main.html">the FS::cust_main manpage</A>, <A HREF=".././FS/part_pkg.html">the FS::part_pkg manpage</A>, <A HREF=".././FS/cust_svc.html">the FS::cust_svc manpage</A> -, <A HREF=".././FS/pkg_svc.html">the FS::pkg_svc manpage</A>, schema.html from the base documentation</P> +<P><A HREF=".././FS/Record.html">the FS::Record manpage</A>, <A HREF=".././FS/cust_main.html">the FS::cust_main manpage</A>, <A HREF=".././FS/part_pkg.html">the FS::part_pkg manpage</A>, <A HREF=".././FS/cust_svc.html">the FS::cust_svc manpage</A>, +<A HREF=".././FS/pkg_svc.html">the FS::pkg_svc manpage</A>, schema.html from the base documentation</P> </BODY> diff --git a/httemplate/docs/man/FS/cust_refund.html b/httemplate/docs/man/FS/cust_refund.html index 39ed14de4..93bb07b2d 100644 --- a/httemplate/docs/man/FS/cust_refund.html +++ b/httemplate/docs/man/FS/cust_refund.html @@ -50,7 +50,7 @@ inherits from FS::Record. The following fields are currently supported:</P> <DL> <DT><STRONG><A NAME="item_key">refundnum - primary key (assigned automatically for new refunds)</A></STRONG><BR> <DD> -<DT><STRONG><A NAME="item_Credit">crednum - Credit (see <A HREF=".././FS/cust_credit.html">the FS::cust_credit manpage</A>)</A></STRONG><BR> +<DT><STRONG><A NAME="item_customer">custnum - customer (see <A HREF=".././FS/cust_main.html">the FS::cust_main manpage</A>)</A></STRONG><BR> <DD> <DT><STRONG><A NAME="item_refund_%2D_Amount_of_the_refund">refund - Amount of the refund</A></STRONG><BR> <DD> @@ -61,8 +61,12 @@ inherits from FS::Record. The following fields are currently supported:</P> <DD> <DT><STRONG><A NAME="item_issuer">payinfo - card number, P.O.#, or comp issuer (4-8 lowercase alphanumerics; think username)</A></STRONG><BR> <DD> +<DT><STRONG><A NAME="item_paybatch_%2D_text_field_for_tracking_card_processi">paybatch - text field for tracking card processing</A></STRONG><BR> +<DD> <DT><STRONG><A NAME="item_taker">otaker - order taker (assigned automatically, see <A HREF=".././FS/UID.html">the FS::UID manpage</A>)</A></STRONG><BR> <DD> +<DT><STRONG><A NAME="item_closed_%2D_books_closed_flag%2C_empty_or_%60Y%27">closed - books closed flag, empty or `Y'</A></STRONG><BR> +<DD> </DL> <P> <HR> @@ -74,8 +78,10 @@ Creates a new refund. To add the refund to the database, see <A HREF="#insert"> <P></P> <DT><STRONG><A NAME="item_insert">insert</A></STRONG><BR> <DD> -Adds this refund to the database, and updates the credit (see -<A HREF=".././FS/cust_credit.html">the FS::cust_credit manpage</A>). +Adds this refund to the database. +<P>For backwards-compatibility and convenience, if the additional field crednum is +defined, an FS::cust_credit_refund record for the full amount of the refund +will be created. In this case, custnum is optional.</P> <P></P> <DT><STRONG><A NAME="item_delete">delete</A></STRONG><BR> <DD> @@ -93,7 +99,7 @@ returns the error, otherwise returns false. Called by the insert method. <P> <HR> <H1><A NAME="version">VERSION</A></H1> -<P>$Id: cust_refund.html,v 1.1 2001-07-30 07:36:03 ivan Exp $</P> +<P>$Id: cust_refund.html,v 1.3 2002-01-29 17:42:46 ivan Exp $</P> <P> <HR> <H1><A NAME="bugs">BUGS</A></H1> diff --git a/httemplate/docs/man/FS/cust_svc.html b/httemplate/docs/man/FS/cust_svc.html index c1ca2d700..97a299c52 100644 --- a/httemplate/docs/man/FS/cust_svc.html +++ b/httemplate/docs/man/FS/cust_svc.html @@ -64,7 +64,7 @@ The following fields are currently supported:</P> <DD> Creates a new service. To add the refund to the database, see <A HREF="#insert">insert</A>. Services are normally created by creating FS::svc_ objects (see -<A HREF=".././FS/svc_acct.html">the FS::svc_acct manpage</A>, <A HREF=".././FS/svc_domain.html">the FS::svc_domain manpage</A>, and <A HREF=".././FS/svc_acct_sm.html">the FS::svc_acct_sm manpage</A>, among others). +<A HREF=".././FS/svc_acct.html">the FS::svc_acct manpage</A>, <A HREF=".././FS/svc_domain.html">the FS::svc_domain manpage</A>, and <A HREF=".././FS/svc_forward.html">the FS::svc_forward manpage</A>, among others). <P></P> <DT><STRONG><A NAME="item_insert">insert</A></STRONG><BR> <DD> @@ -88,17 +88,38 @@ Checks all fields to make sure this is a valid service. If there is an error, returns the error, otehrwise returns false. Called by the insert and replace methods. <P></P> +<DT><STRONG><A NAME="item_part_svc">part_svc</A></STRONG><BR> +<DD> +Returns the definition for this service, as a FS::part_svc object (see +<A HREF=".././FS/part_svc.html">the FS::part_svc manpage</A>). +<P></P> +<DT><STRONG><A NAME="item_cust_pkg">cust_pkg</A></STRONG><BR> +<DD> +Returns the definition for this service, as a FS::part_svc object (see +<A HREF=".././FS/part_svc.html">the FS::part_svc manpage</A>). +<P></P> <DT><STRONG><A NAME="item_label">label</A></STRONG><BR> <DD> Returns a list consisting of: - The name of this service (from part_svc) - A meaningful identifier (username, domain, or mail alias) - The table name (i.e. svc_domain) for this service +<P></P> +<DT><STRONG><A NAME="item_svc_x">svc_x</A></STRONG><BR> +<DD> +Returns the FS::svc_XXX object for this service (i.e. an FS::svc_acct object or +FS::svc_domain object, etc.) +<P></P> +<DT><STRONG><A NAME="item_seconds_since_TIMESTAMP">seconds_since TIMESTAMP</A></STRONG><BR> +<DD> +See <A HREF=".././FS/svc_acct.html#seconds_since">seconds_since in the FS::svc_acct manpage</A>. Equivalent to +$cust_svc->svc_x->seconds_since, but more efficient. Meaningless for records +where <STRONG>svcdb</STRONG> is not ``svc_acct''. <P></P></DL> <P> <HR> <H1><A NAME="version">VERSION</A></H1> -<P>$Id: cust_svc.html,v 1.1 2001-07-30 07:36:03 ivan Exp $</P> +<P>$Id: cust_svc.html,v 1.2 2002-01-29 16:33:16 ivan Exp $</P> <P> <HR> <H1><A NAME="bugs">BUGS</A></H1> diff --git a/httemplate/docs/man/FS/domain_record.html b/httemplate/docs/man/FS/domain_record.html index 7a1bf3e32..0349f7b78 100644 --- a/httemplate/docs/man/FS/domain_record.html +++ b/httemplate/docs/man/FS/domain_record.html @@ -18,7 +18,6 @@ <LI><A HREF="#version">VERSION</A></LI> <LI><A HREF="#bugs">BUGS</A></LI> <LI><A HREF="#see also">SEE ALSO</A></LI> - <LI><A HREF="#history">HISTORY</A></LI> </UL> <!-- INDEX END --> @@ -95,7 +94,7 @@ and replace methods. <P> <HR> <H1><A NAME="version">VERSION</A></H1> -<P>$Id: domain_record.html,v 1.1 2001-07-30 07:36:03 ivan Exp $</P> +<P>$Id: domain_record.html,v 1.3 2002-01-29 17:42:46 ivan Exp $</P> <P> <HR> <H1><A NAME="bugs">BUGS</A></H1> @@ -107,17 +106,6 @@ course, it's still better than editing the zone files directly. :)</P> <HR> <H1><A NAME="see also">SEE ALSO</A></H1> <P><A HREF=".././FS/Record.html">the FS::Record manpage</A>, schema.html from the base documentation.</P> -<P> -<HR> -<H1><A NAME="history">HISTORY</A></H1> -<P>$Log: domain_record.html,v $ -<P>Revision 1.1 2001-07-30 07:36:03 ivan -<P>templates!!! -<P> -Revision 1.2 2001/05/18 14:08:55 ivan -tyop</P> -<P>Revision 1.1 2000/02/03 05:16:52 ivan -beginning of DNS and Apache support</P> </BODY> diff --git a/httemplate/docs/man/FS/part_pkg.html b/httemplate/docs/man/FS/part_pkg.html index 9aeaa3d3d..e1e96b54c 100644 --- a/httemplate/docs/man/FS/part_pkg.html +++ b/httemplate/docs/man/FS/part_pkg.html @@ -60,11 +60,21 @@ inherits from FS::Record. The following fields are currently supported:</P> <DD> <DT><STRONG>comment - Text name of this billing item definition (non-customer-viewable)</STRONG><BR> <DD> -<DT><STRONG><A NAME="item_setup_%2D_Setup_fee">setup - Setup fee</A></STRONG><BR> +<DT><STRONG><A NAME="item_setup_%2D_Setup_fee_expression">setup - Setup fee expression</A></STRONG><BR> <DD> <DT><STRONG><A NAME="item_freq_%2D_Frequency_of_recurring_fee">freq - Frequency of recurring fee</A></STRONG><BR> <DD> -<DT><STRONG><A NAME="item_recur_%2D_Recurring_fee">recur - Recurring fee</A></STRONG><BR> +<DT><STRONG><A NAME="item_recur_%2D_Recurring_fee_expression">recur - Recurring fee expression</A></STRONG><BR> +<DD> +<DT><STRONG><A NAME="item_setuptax_%2D_Setup_fee_tax_exempt_flag%2C_empty_or">setuptax - Setup fee tax exempt flag, empty or `Y'</A></STRONG><BR> +<DD> +<DT><STRONG><A NAME="item_recurtax_%2D_Recurring_fee_tax_exempt_flag%2C_empt">recurtax - Recurring fee tax exempt flag, empty or `Y'</A></STRONG><BR> +<DD> +<DT><STRONG><A NAME="item_plan_%2D_Price_plan">plan - Price plan</A></STRONG><BR> +<DD> +<DT><STRONG><A NAME="item_plandata_%2D_Price_plan_data">plandata - Price plan data</A></STRONG><BR> +<DD> +<DT><STRONG><A NAME="item_disabled_%2D_Disabled_flag%2C_empty_or_%60Y%27">disabled - Disabled flag, empty or `Y'</A></STRONG><BR> <DD> </DL> <P>setup and recur are evaluated as Safe perl expressions. You can use numbers @@ -120,7 +130,7 @@ SVCDB is specified and does not match the svcdb of the service definition, <P> <HR> <H1><A NAME="version">VERSION</A></H1> -<P>$Id: part_pkg.html,v 1.1 2001-07-30 07:36:03 ivan Exp $</P> +<P>$Id: part_pkg.html,v 1.3 2002-01-29 17:42:46 ivan Exp $</P> <P> <HR> <H1><A NAME="bugs">BUGS</A></H1> diff --git a/httemplate/docs/man/FS/part_svc.html b/httemplate/docs/man/FS/part_svc.html index ca0a5dc71..0f5126f81 100644 --- a/httemplate/docs/man/FS/part_svc.html +++ b/httemplate/docs/man/FS/part_svc.html @@ -31,8 +31,8 @@ <PRE> use FS::part_svc;</PRE> <PRE> - $record = new FS::part_referral \%hash - $record = new FS::part_referral { 'column' => 'value' };</PRE> + $record = new FS::part_svc \%hash + $record = new FS::part_svc { 'column' => 'value' };</PRE> <PRE> $error = $record->insert;</PRE> <PRE> @@ -52,11 +52,9 @@ FS::Record. The following fields are currently supported:</P> <DT><STRONG><A NAME="item_svc_%2D_text_name_of_this_service_definition">svc - text name of this service definition</A></STRONG><BR> <DD> <DT><STRONG><A NAME="item_svcdb_%2D_table_used_for_this_service%2E_See_FS%3A">svcdb - table used for this service. See <A HREF=".././FS/svc_acct.html">the FS::svc_acct manpage</A>, -<A HREF=".././FS/svc_domain.html">the FS::svc_domain manpage</A>, and <A HREF=".././FS/svc_acct_sm.html">the FS::svc_acct_sm manpage</A>, among others.</A></STRONG><BR> +<A HREF=".././FS/svc_domain.html">the FS::svc_domain manpage</A>, and <A HREF=".././FS/svc_forward.html">the FS::svc_forward manpage</A>, among others.</A></STRONG><BR> <DD> -<DT><STRONG><A NAME="item_svcdb__field_%2D_Default_or_fixed_value_for_field_"><EM>svcdb</EM>__<EM>field</EM> - Default or fixed value for <EM>field</EM> in <EM>svcdb</EM>.</A></STRONG><BR> -<DD> -<DT><STRONG><A NAME="item_svcdb__field_flag_%2D_defines_svcdb__field_action%"><EM>svcdb</EM>__<EM>field</EM>_flag - defines <EM>svcdb</EM>__<EM>field</EM> action: null, `D' for default, or `F' for fixed</A></STRONG><BR> +<DT><STRONG><A NAME="item_disabled_%2D_Disabled_flag%2C_empty_or_%60Y%27">disabled - Disabled flag, empty or `Y'</A></STRONG><BR> <DD> </DL> <P> @@ -73,6 +71,10 @@ database, see <A HREF="#insert">insert</A>. Adds this service definition to the database. If there is an error, returns the error, otherwise returns false. <P></P> +<DT><STRONG><A NAME="item_svcdb__field_%2D_Default_or_fixed_value_for_field_"><EM>svcdb</EM>__<EM>field</EM> - Default or fixed value for <EM>field</EM> in <EM>svcdb</EM>.</A></STRONG><BR> +<DD> +<DT><STRONG><A NAME="item_svcdb__field_flag_%2D_defines_svcdb__field_action%"><EM>svcdb</EM>__<EM>field</EM>_flag - defines <EM>svcdb</EM>__<EM>field</EM> action: null, `D' for default, or `F' for fixed</A></STRONG><BR> +<DD> <DT><STRONG><A NAME="item_delete">delete</A></STRONG><BR> <DD> Currently unimplemented. @@ -87,11 +89,19 @@ returns the error, otherwise returns false. Checks all fields to make sure this is a valid service definition. If there is an error, returns the error, otherwise returns false. Called by the insert and replace methods. -<P></P></DL> +<P></P> +<DT><STRONG><A NAME="item_part_svc_column_COLUMNNAME">part_svc_column COLUMNNAME</A></STRONG><BR> +<DD> +Returns the part_svc_column object (see <A HREF=".././FS/part_svc_column.html">the FS::part_svc_column manpage</A>) for the given +COLUMNNAME, or a new part_svc_column object if none exists. +<P></P> +<DT><STRONG><A NAME="item_all_part_svc_column">all_part_svc_column</A></STRONG><BR> +<DD> +</DL> <P> <HR> <H1><A NAME="version">VERSION</A></H1> -<P>$Id: part_svc.html,v 1.1 2001-07-30 07:36:03 ivan Exp $</P> +<P>$Id: part_svc.html,v 1.3 2002-01-29 17:42:46 ivan Exp $</P> <P> <HR> <H1><A NAME="bugs">BUGS</A></H1> @@ -101,9 +111,9 @@ should be fixed.</P> <P> <HR> <H1><A NAME="see also">SEE ALSO</A></H1> -<P><A HREF=".././FS/Record.html">the FS::Record manpage</A>, <A HREF=".././FS/part_pkg.html">the FS::part_pkg manpage</A>, <A HREF=".././FS/pkg_svc.html">the FS::pkg_svc manpage</A>, <A HREF=".././FS/cust_svc.html">the FS::cust_svc manpage</A>, -<A HREF=".././FS/svc_acct.html">the FS::svc_acct manpage</A>, <A HREF=".././FS/svc_acct_sm.html">the FS::svc_acct_sm manpage</A>, <A HREF=".././FS/svc_domain.html">the FS::svc_domain manpage</A>, schema.html from the -base documentation.</P> +<P><A HREF=".././FS/Record.html">the FS::Record manpage</A>, <A HREF=".././FS/part_svc_column.html">the FS::part_svc_column manpage</A>, <A HREF=".././FS/part_pkg.html">the FS::part_pkg manpage</A>, <A HREF=".././FS/pkg_svc.html">the FS::pkg_svc manpage</A>, +<A HREF=".././FS/cust_svc.html">the FS::cust_svc manpage</A>, <A HREF=".././FS/svc_acct.html">the FS::svc_acct manpage</A>, <A HREF=".././FS/svc_forward.html">the FS::svc_forward manpage</A>, <A HREF=".././FS/svc_domain.html">the FS::svc_domain manpage</A>, +schema.html from the base documentation.</P> </BODY> diff --git a/httemplate/docs/man/FS/prepay_credit.html b/httemplate/docs/man/FS/prepay_credit.html index 4e77897a3..bb0c281c2 100644 --- a/httemplate/docs/man/FS/prepay_credit.html +++ b/httemplate/docs/man/FS/prepay_credit.html @@ -18,7 +18,6 @@ <LI><A HREF="#version">VERSION</A></LI> <LI><A HREF="#bugs">BUGS</A></LI> <LI><A HREF="#see also">SEE ALSO</A></LI> - <LI><A HREF="#history">HISTORY</A></LI> </UL> <!-- INDEX END --> @@ -93,7 +92,7 @@ and replace methods. <P> <HR> <H1><A NAME="version">VERSION</A></H1> -<P>$Id: prepay_credit.html,v 1.1 2001-07-30 07:36:03 ivan Exp $</P> +<P>$Id: prepay_credit.html,v 1.3 2002-01-29 17:42:46 ivan Exp $</P> <P> <HR> <H1><A NAME="bugs">BUGS</A></H1> @@ -101,17 +100,6 @@ and replace methods. <HR> <H1><A NAME="see also">SEE ALSO</A></H1> <P><A HREF=".././FS/Record.html">the FS::Record manpage</A>, schema.html from the base documentation.</P> -<P> -<HR> -<H1><A NAME="history">HISTORY</A></H1> -<P>$Log: prepay_credit.html,v $ -<P>Revision 1.1 2001-07-30 07:36:03 ivan -<P>templates!!! -<P> -Revision 1.2 2000/02/02 20:22:18 ivan -bugfix prepayment in signup server</P> -<P>Revision 1.1 2000/01/31 05:22:23 ivan -prepaid ``internet cards''</P> </BODY> diff --git a/httemplate/docs/man/FS/svc_Common.html b/httemplate/docs/man/FS/svc_Common.html index 100aee880..ccac5efa0 100644 --- a/httemplate/docs/man/FS/svc_Common.html +++ b/httemplate/docs/man/FS/svc_Common.html @@ -64,6 +64,11 @@ Sets all fields to their defaults (see <A HREF=".././FS/part_svc.html">the FS::p current values. If there is an error, returns the error, otherwise returns the FS::part_svc object (use <CODE>ref()</CODE> to test the return). <P></P> +<DT><STRONG><A NAME="item_cust_svc">cust_svc</A></STRONG><BR> +<DD> +Returns the cust_svc record associated with this svc_ record, as a FS::cust_svc +object (see <A HREF=".././FS/cust_svc.html">the FS::cust_svc manpage</A>). +<P></P> <DT><STRONG><A NAME="item_suspend">suspend</A></STRONG><BR> <DD> <DT><STRONG><A NAME="item_unsuspend">unsuspend</A></STRONG><BR> @@ -76,13 +81,11 @@ methods. Called by the cancel method of FS::cust_pkg (see <A HREF=".././FS/cust <P> <HR> <H1><A NAME="version">VERSION</A></H1> -<P>$Id: svc_Common.html,v 1.1 2001-07-30 07:36:03 ivan Exp $</P> +<P>$Id: svc_Common.html,v 1.3 2002-01-29 17:42:46 ivan Exp $</P> <P> <HR> <H1><A NAME="bugs">BUGS</A></H1> <P>The setfixed method return value.</P> -<P>The new method should set defaults from part_svc (like the check method -sets fixed values)?</P> <P> <HR> <H1><A NAME="see also">SEE ALSO</A></H1> diff --git a/httemplate/docs/man/FS/svc_acct.html b/httemplate/docs/man/FS/svc_acct.html index 81bc118df..9c41db3f0 100644 --- a/httemplate/docs/man/FS/svc_acct.html +++ b/httemplate/docs/man/FS/svc_acct.html @@ -49,6 +49,18 @@ $error = $record->cancel;</PRE> <PRE> %hash = $record->radius;</PRE> +<PRE> + %hash = $record->radius_reply;</PRE> +<PRE> + %hash = $record->radius_check;</PRE> +<PRE> + $domain = $record->domain;</PRE> +<PRE> + $svc_domain = $record->svc_domain;</PRE> +<PRE> + $email = $record->email;</PRE> +<PRE> + $seconds_since = $record->seconds_since($timestamp);</PRE> <P> <HR> <H1><A NAME="description">DESCRIPTION</A></H1> @@ -77,8 +89,14 @@ FS::svc_Common. The following fields are currently supported:</P> <DD> <DT><STRONG><A NAME="item_slipip_%2D_IP_address">slipip - IP address</A></STRONG><BR> <DD> +<DT><STRONG><A NAME="item_seconds_%2D">seconds -</A></STRONG><BR> +<DD> +<DT><STRONG><A NAME="item_domsvc_%2D_svcnum_from_svc_domain">domsvc - svcnum from svc_domain</A></STRONG><BR> +<DD> <DT><STRONG><A NAME="item_radius_Radius_Attribute_%2D_Radius%2DAttribute">radius_<EM>Radius_Attribute</EM> - <EM>Radius-Attribute</EM></A></STRONG><BR> <DD> +<DT><STRONG><A NAME="item_domsvc_%2D_service_number_of_svc_domain_with_which">domsvc - service number of svc_domain with which to associate</A></STRONG><BR> +<DD> </DL> <P> <HR> @@ -96,7 +114,8 @@ otherwise returns false. defined. An FS::cust_svc record will be created and inserted.</P> <P>If the configuration value (see <A HREF=".././FS/Conf.html">the FS::Conf manpage</A>) shellmachine exists, and the username, uid, and dir fields are defined, the <CODE>command(s)</CODE> specified in -the shellmachine-useradd configuration are exectued on shellmachine via ssh. +the shellmachine-useradd configuration are added to the job queue (see +<A HREF=".././FS/queue.html">the FS::queue manpage</A> and <A HREF=".././bin/freeside-queued.html">the freeside-queued manpage</A>) to be exectued on shellmachine via ssh. This behaviour can be surpressed by setting $FS::svc_acct::nossh_hack true. If the shellmachine-useradd configuration file does not exist,</P> <PRE> @@ -108,6 +127,7 @@ it empty,</P> <P>is the default instead. Otherwise the contents of the file are treated as a double-quoted perl string, with the following variables available: $username, $uid, $gid, $dir, and $shell.</P> +<P>(TODOC: cyrus config file, <A HREF=".././FS/queue.html">the FS::queue manpage</A> and <A HREF=".././bin/freeside-queued.html">the freeside-queued manpage</A>)</P> <P></P> <DT><STRONG><A NAME="item_delete">delete</A></STRONG><BR> <DD> @@ -116,7 +136,8 @@ error, otherwise returns false. <P>The corresponding FS::cust_svc record will be deleted as well.</P> <P>If the configuration value (see <A HREF=".././FS/Conf.html">the FS::Conf manpage</A>) shellmachine exists, the <CODE>command(s)</CODE> specified in the shellmachine-userdel configuration file are -executed on shellmachine via ssh. This behavior can be surpressed by setting +added to the job queue (see <A HREF=".././FS/queue.html">the FS::queue manpage</A> and <A HREF=".././bin/freeside-queued.html">the freeside-queued manpage</A>) to be executed +on shellmachine via ssh. This behavior can be surpressed by setting $FS::svc_acct::nossh_hack true. If the shellmachine-userdel configuration file does not exist,</P> <PRE> @@ -128,6 +149,7 @@ is empty,</P> <P>is the default instead. Otherwise the contents of the file are treated as a double-quoted perl string, with the following variables available: $username and $dir.</P> +<P>(TODOC: cyrus config file)</P> <P></P> <DT><STRONG><A NAME="item_replace_OLD_RECORD">replace OLD_RECORD</A></STRONG><BR> <DD> @@ -135,9 +157,10 @@ Replaces OLD_RECORD with this one in the database. If there is an error, returns the error, otherwise returns false. <P>If the configuration value (see <A HREF=".././FS/Conf.html">the FS::Conf manpage</A>) shellmachine exists, and the dir field has changed, the <CODE>command(s)</CODE> specified in the shellmachine-usermod -configuraiton file are executed on shellmachine via ssh. This behavior can +configuraiton file are added to the job queue (see <A HREF=".././FS/queue.html">the FS::queue manpage</A> and +<A HREF=".././bin/freeside-queued.html">the freeside-queued manpage</A>) to be executed on shellmachine via ssh. This behavior can be surpressed by setting $FS::svc-acct::nossh_hack true. If the -shellmachine-userdel configuration file does not exist or is empty, :</P> +shellmachine-userdel configuration file does not exist or is empty,</P> <PRE> [ -d $old_dir ] && mv $old_dir $new_dir || ( chmod u+t $old_dir; @@ -148,8 +171,8 @@ shellmachine-userdel configuration file does not exist or is empty, :</P> chown -R $uid.$gid $new_dir; rm -rf $old_dir )</PRE> -<P>is executed on shellmachine via ssh. This behaviour can be surpressed by -setting $FS::svc_acct::nossh_hack true.</P> +<P>is the default. This behaviour can be surpressed by setting +$FS::svc_acct::nossh_hack true.</P> <P></P> <DT><STRONG><A NAME="item_suspend">suspend</A></STRONG><BR> <DD> @@ -193,11 +216,42 @@ Returns key/value pairs, suitable for assigning to a hash, for any RADIUS check attributes of this record. <P>Accessing RADIUS attributes directly is not supported and will break in the future.</P> -<P></P></DL> +<P></P> +<DT><STRONG><A NAME="item_domain">domain</A></STRONG><BR> +<DD> +Returns the domain associated with this account. +<P></P> +<DT><STRONG><A NAME="item_svc_domain">svc_domain</A></STRONG><BR> +<DD> +Returns the FS::svc_domain record for this account's domain (see +<A HREF=".././FS/svc_domain.html">the FS::svc_domain manpage</A>. +<P></P> +<DT><STRONG><A NAME="item_cust_svc">cust_svc</A></STRONG><BR> +<DD> +Returns the FS::cust_svc record for this account (see <A HREF=".././FS/cust_svc.html">the FS::cust_svc manpage</A>). +<P>sub cust_svc { + my $self = shift; + qsearchs( 'cust_svc', { 'svcnum' => $self->svcnum } ); +}</P> +<P></P> +<DT><STRONG><A NAME="item_email">email</A></STRONG><BR> +<DD> +Returns an email address associated with the account. +<P></P> +<DT><STRONG><A NAME="item_seconds_since_TIMESTAMP">seconds_since TIMESTAMP</A></STRONG><BR> +<DD> +Returns the number of seconds this account has been online since TIMESTAMP. +See <A HREF=".././FS/session.html">the FS::session manpage</A> +<P>TIMESTAMP is specified as a UNIX timestamp; see <EM>perlfunc/``time''</EM>. Also see +<A HREF="../Time/Local.html">the Time::Local manpage</A> and <A HREF="../Date/Parse.html">the Date::Parse manpage</A> for conversion functions.</P> +<P></P> +<DT><STRONG><A NAME="item_ssh">ssh</A></STRONG><BR> +<DD> +</DL> <P> <HR> <H1><A NAME="version">VERSION</A></H1> -<P>$Id: svc_acct.html,v 1.1 2001-07-30 07:36:03 ivan Exp $</P> +<P>$Id: svc_acct.html,v 1.2 2002-01-29 16:33:16 ivan Exp $</P> <P> <HR> <H1><A NAME="bugs">BUGS</A></H1> @@ -210,8 +264,10 @@ counterintuitive.</P> <P> <HR> <H1><A NAME="see also">SEE ALSO</A></H1> -<P><A HREF=".././FS/svc_Common.html">the FS::svc_Common manpage</A>, <A HREF=".././FS/Record.html">the FS::Record manpage</A>, <A HREF=".././FS/Conf.html">the FS::Conf manpage</A>, <A HREF=".././FS/cust_svc.html">the FS::cust_svc manpage</A>, -<A HREF=".././FS/part_svc.html">the FS::part_svc manpage</A>, <A HREF=".././FS/cust_pkg.html">the FS::cust_pkg manpage</A>, <A HREF="../Net/SSH.html">the Net::SSH manpage</A>, <EM>ssh</EM>, <A HREF=".././FS/svc_acct_pop.html">the FS::svc_acct_pop manpage</A>, +<P><A HREF=".././FS/svc_Common.html">the FS::svc_Common manpage</A>, edit/part_svc.cgi from an installed web interface, +export.html from the base documentation, <A HREF=".././FS/Record.html">the FS::Record manpage</A>, <A HREF=".././FS/Conf.html">the FS::Conf manpage</A>, +<A HREF=".././FS/cust_svc.html">the FS::cust_svc manpage</A>, <A HREF=".././FS/part_svc.html">the FS::part_svc manpage</A>, <A HREF=".././FS/cust_pkg.html">the FS::cust_pkg manpage</A>, <A HREF=".././FS/queue.html">the FS::queue manpage</A>, +<A HREF=".././bin/freeside-queued.html">the freeside-queued manpage</A>), <A HREF="../Net/SSH.html">the Net::SSH manpage</A>, <A HREF="#item_ssh">ssh</A>, <A HREF=".././FS/svc_acct_pop.html">the FS::svc_acct_pop manpage</A>, schema.html from the base documentation.</P> </BODY> diff --git a/httemplate/docs/man/FS/svc_acct_pop.html b/httemplate/docs/man/FS/svc_acct_pop.html index d65ca5778..80900627e 100644 --- a/httemplate/docs/man/FS/svc_acct_pop.html +++ b/httemplate/docs/man/FS/svc_acct_pop.html @@ -15,6 +15,7 @@ <LI><A HREF="#synopsis">SYNOPSIS</A></LI> <LI><A HREF="#description">DESCRIPTION</A></LI> <LI><A HREF="#methods">METHODS</A></LI> + <LI><A HREF="#subroutines">SUBROUTINES</A></LI> <LI><A HREF="#version">VERSION</A></LI> <LI><A HREF="#bugs">BUGS</A></LI> <LI><A HREF="#see also">SEE ALSO</A></LI> @@ -41,6 +42,8 @@ $error = $record->delete;</PRE> <PRE> $error = $record->check;</PRE> +<PRE> + $html = FS::svc_acct_pop::popselector( $popnum, $state );</PRE> <P> <HR> <H1><A NAME="description">DESCRIPTION</A></H1> @@ -88,19 +91,34 @@ returns the error, otherwise returns false. Checks all fields to make sure this is a valid point of presence. If there is an error, returns the error, otherwise returns false. Called by the insert and replace methods. +<P></P> +<DT><STRONG><A NAME="item_text">text</A></STRONG><BR> +<DD> +Returns: +<P>``$city, $state ($ac)/$exch''</P> <P></P></DL> <P> <HR> +<H1><A NAME="subroutines">SUBROUTINES</A></H1> +<DL> +<DT><STRONG><A NAME="item_popselector_%5B_POPNUM_%5B_STATE_%5D_%5D">popselector [ POPNUM [ STATE ] ]</A></STRONG><BR> +<DD> +</DL> +<P> +<HR> <H1><A NAME="version">VERSION</A></H1> -<P>$Id: svc_acct_pop.html,v 1.1 2001-07-30 07:36:03 ivan Exp $</P> +<P>$Id: svc_acct_pop.html,v 1.3 2002-01-29 17:42:46 ivan Exp $</P> <P> <HR> <H1><A NAME="bugs">BUGS</A></H1> <P>It should be renamed to part_pop.</P> +<P>popselector? putting web ui components in here? they should probably live +somewhere else...</P> <P> <HR> <H1><A NAME="see also">SEE ALSO</A></H1> -<P><A HREF=".././FS/Record.html">the FS::Record manpage</A>, <A HREF=".././FS/svc_acct.html">the svc_acct manpage</A>, schema.html from the base documentation.</P> +<P><A HREF=".././FS/Record.html">the FS::Record manpage</A>, <A HREF=".././FS/svc_acct.html">the FS::svc_acct manpage</A>, <A HREF=".././FS/part_pop_local.html">the FS::part_pop_local manpage</A>, schema.html from the +base documentation.</P> </BODY> diff --git a/httemplate/docs/man/FS/svc_acct_sm.html b/httemplate/docs/man/FS/svc_acct_sm.html index ca50e7202..86c7b8b3b 100644 --- a/httemplate/docs/man/FS/svc_acct_sm.html +++ b/httemplate/docs/man/FS/svc_acct_sm.html @@ -13,6 +13,7 @@ <LI><A HREF="#name">NAME</A></LI> <LI><A HREF="#synopsis">SYNOPSIS</A></LI> + <LI><A HREF="#warning">WARNING</A></LI> <LI><A HREF="#description">DESCRIPTION</A></LI> <LI><A HREF="#methods">METHODS</A></LI> <LI><A HREF="#version">VERSION</A></LI> @@ -49,9 +50,14 @@ $error = $record->cancel;</PRE> <P> <HR> +<H1><A NAME="warning">WARNING</A></H1> +<P>FS::svc_acct_sm is <STRONG>depreciated</STRONG>. This class is only included for migration +purposes. See <A HREF=".././FS/svc_forward.html">the FS::svc_forward manpage</A>.</P> +<P> +<HR> <H1><A NAME="description">DESCRIPTION</A></H1> -<P>An FS::svc_acct object represents a virtual mail alias. FS::svc_acct inherits -from FS::Record. The following fields are currently supported:</P> +<P>An FS::svc_acct_sm object represents a virtual mail alias. FS::svc_acct_sm +inherits from FS::Record. The following fields are currently supported:</P> <DL> <DT><STRONG><A NAME="item_key">svcnum - primary key (assigned automatcially for new accounts)</A></STRONG><BR> <DD> @@ -77,15 +83,17 @@ Adds this virtual mail alias to the database. If there is an error, returns the error, otherwise returns false. <P>The additional fields pkgnum and svcpart (see <A HREF=".././FS/cust_svc.html">the FS::cust_svc manpage</A>) should be defined. An FS::cust_svc record will be created and inserted.</P> -<P>If the configuration values (see <A HREF=".././FS/Conf.html">the FS::Conf manpage</A>) shellmachine and qmailmachines -exist, and domuser is `*' (meaning a catch-all mailbox), the command:</P> <PRE> - [ -e $dir/.qmail-$qdomain-default ] || { - touch $dir/.qmail-$qdomain-default; - chown $uid:$gid $dir/.qmail-$qdomain-default; - }</PRE> -<P>is executed on shellmachine via ssh (see <EM>dot-qmail/``EXTENSION ADDRESSES''</EM>). -This behaviour can be surpressed by setting $FS::svc_acct_sm::nossh_hack true.</P> + #If the configuration values (see L<FS::Conf>) shellmachine and qmailmachines + #exist, and domuser is `*' (meaning a catch-all mailbox), the command: + # + # [ -e $dir/.qmail-$qdomain-default ] || { + # touch $dir/.qmail-$qdomain-default; + # chown $uid:$gid $dir/.qmail-$qdomain-default; + # } + # + #is executed on shellmachine via ssh (see L<dot-qmail/"EXTENSION ADDRESSES">). + #This behaviour can be surpressed by setting $FS::svc_acct_sm::nossh_hack true.</PRE> <P></P> <DT><STRONG><A NAME="item_delete">delete</A></STRONG><BR> <DD> @@ -123,7 +131,7 @@ replace methods. <P> <HR> <H1><A NAME="version">VERSION</A></H1> -<P>$Id: svc_acct_sm.html,v 1.1 2001-07-30 07:36:03 ivan Exp $</P> +<P>$Id: svc_acct_sm.html,v 1.3 2002-01-29 17:42:46 ivan Exp $</P> <P> <HR> <H1><A NAME="bugs">BUGS</A></H1> @@ -132,6 +140,7 @@ replace methods. <P> <HR> <H1><A NAME="see also">SEE ALSO</A></H1> +<P><A HREF=".././FS/svc_forward.html">the FS::svc_forward manpage</A></P> <P><A HREF=".././FS/Record.html">the FS::Record manpage</A>, <A HREF=".././FS/Conf.html">the FS::Conf manpage</A>, <A HREF=".././FS/cust_svc.html">the FS::cust_svc manpage</A>, <A HREF=".././FS/part_svc.html">the FS::part_svc manpage</A>, <A HREF=".././FS/cust_pkg.html">the FS::cust_pkg manpage</A>, <A HREF=".././FS/svc_acct.html">the FS::svc_acct manpage</A>, <A HREF=".././FS/svc_domain.html">the FS::svc_domain manpage</A>, <A HREF="../Net/SSH.html">the Net::SSH manpage</A>, <EM>ssh</EM>, <EM>dot-qmail</EM>, schema.html from the base documentation.</P> diff --git a/httemplate/docs/man/FS/svc_domain.html b/httemplate/docs/man/FS/svc_domain.html index ace3de154..266e0b355 100644 --- a/httemplate/docs/man/FS/svc_domain.html +++ b/httemplate/docs/man/FS/svc_domain.html @@ -57,6 +57,8 @@ FS::svc_Common. The following fields are currently supported:</P> <DD> <DT><STRONG><A NAME="item_domain">domain</A></STRONG><BR> <DD> +<DT><STRONG><A NAME="item_catchall_%2D_optional_svcnum_of_an_svc_acct_record">catchall - optional svcnum of an svc_acct record, designating an email catchall account.</A></STRONG><BR> +<DD> </DL> <P> <HR> @@ -86,9 +88,18 @@ the domain_record table (see <FS::domain_record>).</P> records are added to the domain_record table (see <A HREF=".././FS/domain_record.html">the FS::domain_record manpage</A>).</P> <P>If any machines are defined in the <EM>mxmachines</EM> configuration file, MX records are added to the domain_record table (see <A HREF=".././FS/domain_record.html">the FS::domain_record manpage</A>).</P> -<P>Any problems adding FS::domain_record records will emit warnings, but will -not return errors from this method. If your configuration files are correct -you shouln't have any problems.</P> +<P>If a machine is defined in the <EM>shellmachine</EM> configuration value, the +<EM>qmailmachines</EM> configuration file exists, and the <EM>catchall</EM> field points +to an an account with a home directory (see <A HREF=".././FS/svc_acct.html">the FS::svc_acct manpage</A>), the command:</P> +<PRE> + [ -e $dir/.qmail-$qdomain-defualt ] || { + touch $dir/.qmail-$qdomain-default; + chown $uid:$gid $dir/.qmail-$qdomain-default; + }</PRE> +<P>is executed on shellmachine via ssh (see <EM>dot-qmail/``EXTENSION ADDRESSES''</EM>). +This behaviour can be supressed by setting $FS::svc_domain::nossh_hack true.</P> +<P>a machine is defined +in the</P> <P></P> <DT><STRONG><A NAME="item_delete">delete</A></STRONG><BR> <DD> @@ -140,7 +151,7 @@ Submits a registration email for this domain. <P> <HR> <H1><A NAME="version">VERSION</A></H1> -<P>$Id: svc_domain.html,v 1.1 2001-07-30 07:36:03 ivan Exp $</P> +<P>$Id: svc_domain.html,v 1.3 2002-01-29 17:42:46 ivan Exp $</P> <P> <HR> <H1><A NAME="bugs">BUGS</A></H1> diff --git a/httemplate/docs/man/FS/svc_www.html b/httemplate/docs/man/FS/svc_www.html index e72b219be..0e7f4f197 100644 --- a/httemplate/docs/man/FS/svc_www.html +++ b/httemplate/docs/man/FS/svc_www.html @@ -18,7 +18,6 @@ <LI><A HREF="#version">VERSION</A></LI> <LI><A HREF="#bugs">BUGS</A></LI> <LI><A HREF="#see also">SEE ALSO</A></LI> - <LI><A HREF="#history">HISTORY</A></LI> </UL> <!-- INDEX END --> @@ -120,7 +119,7 @@ and repalce methods. <P> <HR> <H1><A NAME="version">VERSION</A></H1> -<P>$Id: svc_www.html,v 1.1 2001-07-30 07:36:03 ivan Exp $</P> +<P>$Id: svc_www.html,v 1.3 2002-01-29 17:42:46 ivan Exp $</P> <P> <HR> <H1><A NAME="bugs">BUGS</A></H1> @@ -129,21 +128,6 @@ and repalce methods. <H1><A NAME="see also">SEE ALSO</A></H1> <P><A HREF=".././FS/svc_Common.html">the FS::svc_Common manpage</A>, <A HREF=".././FS/Record.html">the FS::Record manpage</A>, <A HREF=".././FS/domain_record.html">the FS::domain_record manpage</A>, <A HREF=".././FS/cust_svc.html">the FS::cust_svc manpage</A>, <A HREF=".././FS/part_svc.html">the FS::part_svc manpage</A>, <A HREF=".././FS/cust_pkg.html">the FS::cust_pkg manpage</A>, schema.html from the base documentation.</P> -<P> -<HR> -<H1><A NAME="history">HISTORY</A></H1> -<P>$Log: svc_www.html,v $ -<P>Revision 1.1 2001-07-30 07:36:03 ivan -<P>templates!!! -<P> -Revision 1.4 2001/04/22 01:56:15 ivan -get rid of FS::SSH.pm (became Net::SSH and Net::SCP on CPAN)</P> -<P>Revision 1.3 2000/11/22 23:30:51 ivan -tyop</P> -<P>Revision 1.2 2000/03/01 08:13:59 ivan -compilation bugfixes</P> -<P>Revision 1.1 2000/02/03 05:16:52 ivan -beginning of DNS and Apache support</P> </BODY> diff --git a/httemplate/edit/part_bill_event.cgi b/httemplate/edit/part_bill_event.cgi new file mode 100755 index 000000000..41d6666dc --- /dev/null +++ b/httemplate/edit/part_bill_event.cgi @@ -0,0 +1,131 @@ +<!-- $Id: part_bill_event.cgi,v 1.1 2002-01-29 16:33:16 ivan Exp $ --> + +<% + +if ( $cgi->param('eventnum') && $cgi->param('eventnum') =~ /^(\d+)$/ ) { + $cgi->param('eventnum', $1); +} else { + $cgi->param('eventnum', ''); +} + +my ($query) = $cgi->keywords; +my $action = ''; +my $part_bill_event = ''; +if ( $cgi->param('error') ) { + $part_bill_event = new FS::part_bill_event ( { + map { $_, scalar($cgi->param($_)) } fields('part_bill_event') + } ); +} +if ( $query && $query =~ /^(\d+)$/ ) { + $part_bill_event ||= qsearchs('part_bill_event',{'eventpart'=>$1}); +} else { + $part_bill_event ||= new FS::part_bill_event {}; +} +$action ||= $part_bill_event->pkgpart ? 'Edit' : 'Add'; +my $hashref = $part_bill_event->hashref; + +print header("$action Invoice Event Definition", menubar( + 'Main Menu' => popurl(2), + 'View all invoice events' => popurl(2). 'browse/part_bill_event.cgi', +)); + +print qq!<FONT SIZE="+1" COLOR="#ff0000">Error: !, $cgi->param('error'), + "</FONT>" + if $cgi->param('error'); + +print '<FORM ACTION="', popurl(1), 'process/part_bill_event.cgi" METHOD=POST>'; + +print "Invoice Event #", $hashref->{eventpart} ? $hashref->{eventpart} : "(NEW)"; + +print ntable("#cccccc",2), <<END; +<TR><TD ALIGN="right">Payby</TD><TD><SELECT NAME="payby"> +END + +for (qw(CARD BILL COMP)) { + print qq!<OPTION VALUE="$_"!; + if ($part_bill_event->payby eq $_) { + print " SELECTED> $_</OPTION>"; + } else { + print ">$_</OPTION>"; + } +} + +my $days = $hashref->{seconds}/3600; + +print <<END; +</SELECT></TD></TR> +<TR><TD ALIGN="right">Event</TD><TD><INPUT TYPE="text" NAME="event" VALUE="$hashref->{event}"></TD></TR> +<TR><TD ALIGN="right">After</TD><TD><INPUT TYPE="text" NAME="days" VALUE="$days"> days</TD></TR> +END + +print '<TR><TD ALIGN="right">Disabled</TD><TD>'; +print '<INPUT TYPE="checkbox" NAME="disabled" VALUE="Y"'; +print ' CHECKED' if $hashref->{disabled} eq "Y"; +print '>'; +print '</TD></TR>'; + +print '<TR><TD ALIGN="right">Action</TD><TD>'; + +#print ntable(); + +#this is pretty kludgy right here. +tie my %events, 'Tie::IxHash', + + 'Charge a fee' => { + 'code' => '$cust_main->charge( %%%charge%%%, \'%%%reason%%%\' );', + 'html' => 'Amount <INPUT TYPE="text" SIZE="7" NAME="charge"><BR>'. + 'Reason <INPUT TYPE="text" NAME="reason">', + }, + 'Suspend accounts' => { + 'code' => '$cust_main->suspend();', + }, + 'Cancel accounts' => { + 'code' => '$cust_main->cancel();', + }, + + 'Add postal invoicing' => { + 'code' => '$cust_main->invoicing_list_addpost();', + 'pad' => 10, + }, + + 'Generate invoices' => { + 'code' => '$cust_main->bill();', + 'pad' => 20, + }, + + 'Apply unapplied payments and credits' => { + 'code' => '$cust_main->apply_payments; $cust_main->apply_credits;', + 'pad' => 30, + }, + + 'Collect on invoices' => { + 'code' => '$cust_main->collect();', + 'pad' => 40, + }, + +; + +foreach my $event ( keys %events ) { + print ntable( "#cccccc", 2). qq!<TR><TD><INPUT TYPE="radio" NAME="eventcode" VALUE="!. + encode_entities($events{$event}{code}). qq!">$event</TD>!; + print '<TD>'. $events{$event}{html}. '</TD>' if exists $events{$event}{html}; + print qq!</TR>!; + print '</TABLE>'; +} + +#print '</TABLE>'; + +print <<END; +</TD></TR> +</TABLE> +END + +print qq!<INPUT TYPE="submit" VALUE="!, + $hashref->{pkgpart} ? "Apply changes" : "Add invoice event", + qq!">!; +%> + + </FORM> + </BODY> +</HTML> + diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi index 735f4f269..ea3f62aa2 100755 --- a/httemplate/edit/part_pkg.cgi +++ b/httemplate/edit/part_pkg.cgi @@ -1,4 +1,4 @@ -<!-- $Id: part_pkg.cgi,v 1.8 2001-12-28 14:40:35 ivan Exp $ --> +<!-- $Id: part_pkg.cgi,v 1.9 2002-01-29 16:33:16 ivan Exp $ --> <% @@ -158,8 +158,8 @@ unless ( $cgi->param('clone') ) { } # prolly should be in database -my %plans = ( - +use Tie::IxHash; +tie my %plans, 'Tie::IxHash', 'flat' => { 'name' => 'Flat rate', 'fields' => { @@ -170,6 +170,7 @@ my %plans = ( 'default' => 0, }, }, + 'fieldorder' => [ 'setup_fee', 'recur_fee' ], 'setup' => 'what.setup_fee.value', 'recur' => 'what.recur_fee.value', }, @@ -190,11 +191,55 @@ my %plans = ( 'default' => 1, }, }, + 'fieldorder' => [ 'setup_fee', 'recur_fee', 'comission_depth', 'comission_amount' ], 'setup' => 'what.setup_fee.value', 'recur' => '\'my $error = $cust_pkg->cust_main->credit( \' + what.comission_amount.value + \' * scalar($cust_pkg->cust_main->referral_cust_pkg(\' + what.comission_depth.value+ \')), "commission" ); die $error if $error; \' + what.recur_fee.value + \';\'', }, -); + 'sesmon_hour' => { + 'name' => 'Base charge plus charge per-hour from the session monitor', + 'fields' => { + 'setup_fee' => { 'name' => 'Setup fee for this package', + 'default' => 0, + }, + 'recur_flat' => { 'name' => 'Base monthly charge for this package', + 'default' => 0, + }, + 'recur_included_hours' => { 'name' => 'Hours included', + 'default' => 0, + }, + 'recur_hourly_charge' => { 'name' => 'Additional charge per hour', + 'default' => 0, + }, + }, + 'fieldorder' => [ 'setup_fee', 'recur_flat', 'recur_included_hours', 'recur_hourly_charge' ], + 'setup' => 'what.setup_fee.value', + 'recur' => '\'my $hours = $cust_pkg->seconds_since($cust_bkg->bill || 0) / 3600 - \' + what.recur_included_hours.value + \'; $hours = 0 if $hours < 0; \' + what.recur_flat.value + \' + \' + what.recur_hourly_charge.value + \' * $hours;\'', + }, + + 'sesmon_minute' => { + 'name' => 'Base charge plus charge per-minute from the session monitor', + 'fields' => { + 'setup_fee' => { 'name' => 'Setup fee for this package', + 'default' => 0, + }, + 'recur_flat' => { 'name' => 'Base monthly charge for this package', + 'default' => 0, + }, + 'recur_included_min' => { 'name' => 'Minutes included', + 'default' => 0, + }, + 'recur_minly_charge' => { 'name' => 'Additional charge per minute', + 'default' => 0, + }, + }, + 'fieldorder' => [ 'setup_fee', 'recur_flat', 'recur_included_min', 'recur_minly_charge' ], + 'setup' => 'what.setup_fee.value', + 'recur' => '\'my $min = $cust_pkg->seconds_since($cust_bkg->bill || 0) / 60 - \' + what.recur_included_min.value + \'; $min = 0 if $min < 0; \' + what.recur_flat.value + \' + \' + what.recur_minly_charge.value + \' * $min;\'', + + }, + +; %> @@ -295,24 +340,30 @@ if ( $cgi->param('pkgnum') ) { <%= ntable("#cccccc",2) %> <% my $href = $plans{$layer}->{'fields'}; - foreach my $field ( keys %{ $href } ) { %> + foreach my $field ( exists($plans{$layer}->{'fieldorder'}) + ? @{$plans{$layer}->{'fieldorder'}} + : keys %{ $href } + ) { +%> <TR><TD ALIGN="right"><%= $href->{$field}{'name'} %></TD> <TD><INPUT TYPE="text" NAME="<%= $field %>" VALUE="<%= exists($plandata{$field}) ? $plandata{$field} : $href->{$field}{'default'} %>" onChange="fchanged(this)"></TD></TR> <% } %> </TABLE> <INPUT TYPE="hidden" NAME="plandata" VALUE="<%= join(',', keys %{ $href } ) %>"> -<FONT SIZE="1"> <BR><BR> -Setup expression<BR><INPUT TYPE="text" NAME="setup" SIZE="160" VALUE="<%= $hashref->{setup} %>" onLoad="fchanged(this)"><BR> -Recurring espression<BR><INPUT TYPE="text" NAME="recur" SIZE="160" VALUE="<%= $hashref->{recur} %>" onLoad="fchanged(this)"><BR> -</FONT> <% -print qq!<BR><INPUT TYPE="submit" VALUE="!, +print qq!<INPUT TYPE="submit" VALUE="!, $hashref->{pkgpart} ? "Apply changes" : "Add package", qq!" onClick="fchanged(this)">!; %> +<BR><BR>don't edit this unless you know what you're doing <INPUT TYPE="button" VALUE="refresh expressions" onClick="fchanged(this)"><%= ntable("#cccccc",2) %><TR><TD> +<FONT SIZE="1">Setup expression<BR><INPUT TYPE="text" NAME="setup" SIZE="160" VALUE="<%= $hashref->{setup} %>" onLoad="fchanged(this)"></FONT><BR> +<FONT SIZE="1">Recurring espression<BR><INPUT TYPE="text" NAME="recur" SIZE="160" VALUE="<%= $hashref->{recur} %>" onLoad="fchanged(this)"></FONT> +</TR></TD> +</TABLE> + </FORM> <SCRIPT> diff --git a/httemplate/edit/process/part_bill_event.cgi b/httemplate/edit/process/part_bill_event.cgi new file mode 100755 index 000000000..eb7c53e5d --- /dev/null +++ b/httemplate/edit/process/part_bill_event.cgi @@ -0,0 +1,32 @@ +<% + +my $eventpart = $cgi->param('eventpart'); + +my $old = qsearchs('part_bill_event',{'eventpart'=>$eventpart}) if $eventpart; + +#s/days/seconds/ +$cgi->param('seconds', $cgi->param('days') * 3600 ); + +my $new = new FS::part_bill_event ( { + map { + $_, scalar($cgi->param($_)); + } fields('part_bill_event'), +} ); + +my $error; +if ( $eventpart ) { + $error = $new->replace($old); +} else { + $error = $new->insert; + $eventpart = $new->getfield('eventpart'); +} + +if ( $error ) { + $cgi->param('error', $error); + print $cgi->redirect(popurl(2). "part_bill_event.cgi?". $cgi->query_string ); +} else { + print $cgi->redirect(popurl(3)."browse/part_bill_event.cgi"); +} + +%> + diff --git a/httemplate/index.html b/httemplate/index.html index d1abd0d61..35ba8e85e 100644 --- a/httemplate/index.html +++ b/httemplate/index.html @@ -93,6 +93,7 @@ into counties and assign different tax rates to each. <LI><A HREF="browse/svc_acct_pop.cgi">View/Edit POPs</A> - Points of Presence + <LI><A HREF="browse/part_bill_event.cgi">View/Edit invoice events</A> - Actions for overdue invoices </ul> </ul> </BODY> |