diff options
author | ivan <ivan> | 2001-04-23 12:40:31 +0000 |
---|---|---|
committer | ivan <ivan> | 2001-04-23 12:40:31 +0000 |
commit | f3235d39d083518d47f21cd5585e5f9a13070763 (patch) | |
tree | eb1dbbe21e2bee5b92586c884bfc6025c5d035fe /htdocs/docs/man/FS/cust_pkg.html | |
parent | ece31063b782031e21ba1f57476afab555af5363 (diff) |
documentation and webdemo updates
Diffstat (limited to 'htdocs/docs/man/FS/cust_pkg.html')
-rw-r--r-- | htdocs/docs/man/FS/cust_pkg.html | 371 |
1 files changed, 161 insertions, 210 deletions
diff --git a/htdocs/docs/man/FS/cust_pkg.html b/htdocs/docs/man/FS/cust_pkg.html index d7659f0ce..19c8ff842 100644 --- a/htdocs/docs/man/FS/cust_pkg.html +++ b/htdocs/docs/man/FS/cust_pkg.html @@ -1,253 +1,204 @@ <HTML> <HEAD> <TITLE>FS::cust_pkg - Object methods for cust_pkg objects</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="#METHODS">METHODS</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="#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> <!-- INDEX END --> <HR> <P> -<H1><A NAME="NAME">NAME</A></H1> -<P> -FS::cust_pkg - Object methods for cust_pkg objects - +<H1><A NAME="name">NAME</A></H1> +<P>FS::cust_pkg - Object methods for cust_pkg objects</P> <P> <HR> -<H1><A NAME="SYNOPSIS">SYNOPSIS</A></H1> -<P> -<PRE> use FS::cust_pkg; -</PRE> -<P> -<PRE> $record = new FS::cust_pkg \%hash; - $record = new FS::cust_pkg { 'column' => 'value' }; -</PRE> -<P> -<PRE> $error = $record->insert; -</PRE> -<P> -<PRE> $error = $new_record->replace($old_record); -</PRE> -<P> -<PRE> $error = $record->delete; -</PRE> -<P> -<PRE> $error = $record->check; -</PRE> -<P> -<PRE> $error = $record->cancel; -</PRE> -<P> -<PRE> $error = $record->suspend; -</PRE> -<P> -<PRE> $error = $record->unsuspend; -</PRE> -<P> -<PRE> $part_pkg = $record->part_pkg; -</PRE> -<P> -<PRE> @labels = $record->labels; -</PRE> -<P> -<PRE> $error = FS::cust_pkg::order( $custnum, \@pkgparts ); - $error = FS::cust_pkg::order( $custnum, \@pkgparts, \@remove_pkgnums ] ); -</PRE> +<H1><A NAME="synopsis">SYNOPSIS</A></H1> +<PRE> + use FS::cust_pkg;</PRE> +<PRE> + $record = new FS::cust_pkg \%hash; + $record = new FS::cust_pkg { 'column' => 'value' };</PRE> +<PRE> + $error = $record->insert;</PRE> +<PRE> + $error = $new_record->replace($old_record);</PRE> +<PRE> + $error = $record->delete;</PRE> +<PRE> + $error = $record->check;</PRE> +<PRE> + $error = $record->cancel;</PRE> +<PRE> + $error = $record->suspend;</PRE> +<PRE> + $error = $record->unsuspend;</PRE> +<PRE> + $part_pkg = $record->part_pkg;</PRE> +<PRE> + @labels = $record->labels;</PRE> +<PRE> + $error = FS::cust_pkg::order( $custnum, \@pkgparts ); + $error = FS::cust_pkg::order( $custnum, \@pkgparts, \@remove_pkgnums ] );</PRE> <P> <HR> -<H1><A NAME="DESCRIPTION">DESCRIPTION</A></H1> -<P> -An FS::cust_pkg object represents a customer billing item. FS::cust_pkg -inherits from FS::Record. The following fields are currently supported: - +<H1><A NAME="description">DESCRIPTION</A></H1> +<P>An FS::cust_pkg object represents a customer billing item. FS::cust_pkg +inherits from FS::Record. The following fields are currently supported:</P> <DL> -<DT><STRONG><A NAME="item_pkgnum">pkgnum - primary key (assigned automatically for new billing items)</A></STRONG><DD> -<DT><STRONG><A NAME="item_custnum">custnum - Customer (see FS::cust_main)</A></STRONG><DD> -<DT><STRONG><A NAME="item_pkgpart">pkgpart - Billing item definition (see FS::part_pkg)</A></STRONG><DD> -<DT><STRONG><A NAME="item_setup">setup - date</A></STRONG><DD> -<DT><STRONG><A NAME="item_bill">bill - date</A></STRONG><DD> -<DT><STRONG><A NAME="item_susp">susp - date</A></STRONG><DD> -<DT><STRONG><A NAME="item_expire">expire - date</A></STRONG><DD> -<DT><STRONG><A NAME="item_cancel">cancel - date</A></STRONG><DD> -<DT><STRONG><A NAME="item_otaker">otaker - order taker (assigned automatically if null, see FS::UID)</A></STRONG><DD> +<DT><STRONG><A NAME="item_key">pkgnum - primary key (assigned automatically for new billing items)</A></STRONG><BR> +<DD> +<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_definition">pkgpart - Billing item definition (see <A HREF=".././FS/part_pkg.html">the FS::part_pkg manpage</A>)</A></STRONG><BR> +<DD> +<DT><STRONG><A NAME="item_setup_%2D_date">setup - date</A></STRONG><BR> +<DD> +<DT><STRONG><A NAME="item_bill_%2D_date">bill - date</A></STRONG><BR> +<DD> +<DT><STRONG><A NAME="item_susp_%2D_date">susp - date</A></STRONG><BR> +<DD> +<DT><STRONG><A NAME="item_expire_%2D_date">expire - date</A></STRONG><BR> +<DD> +<DT><STRONG><A NAME="item_cancel_%2D_date">cancel - date</A></STRONG><BR> +<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> </DL> -<P> -Note: setup, bill, susp, expire and cancel are specified as UNIX -timestamps; see <EM>perlfunc</EM>. Also see <A HREF="../Time/Local.html">Time::Local</A> and <A HREF="../Date/Parse.html">Date::Parse</A> for conversion functions. - +<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 +conversion functions.</P> <P> <HR> -<H1><A NAME="METHODS">METHODS</A></H1> +<H1><A NAME="methods">METHODS</A></H1> <DL> -<DT><STRONG><A NAME="item_new">new HASHREF</A></STRONG><DD> -<P> -Create a new billing item. To add the item to the database, see <A HREF="#insert">insert</A>. - -<DT><STRONG><A NAME="item_insert">insert</A></STRONG><DD> -<P> -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 <CODE>$self</CODE> = shift; - -<P> -<PRE> # custnum might not have have been defined in sub check (for one-shot new - # customers), so check it here instead -</PRE> -<P> -<PRE> my $error = $self->ut_number('custnum'); - return $error if $error -</PRE> -<P> -<PRE> return "Unknown customer" - unless qsearchs( 'cust_main', { 'custnum' => $self->custnum } ); -</PRE> -<P> -<PRE> $self->SUPER::insert; -</PRE> -<P> -} - -<DT><STRONG><A NAME="item_delete">delete</A></STRONG><DD> -<P> -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. - -<DT><STRONG><A NAME="item_replace">replace OLD_RECORD</A></STRONG><DD> -<P> -Replaces the OLD_RECORD with this one in the database. If there is an +<DT><STRONG><A NAME="item_new">new HASHREF</A></STRONG><BR> +<DD> +Create a new billing item. To add the item to the database, see <A HREF="#insert">insert</A>. +<P></P> +<DT><STRONG><A NAME="item_insert">insert</A></STRONG><BR> +<DD> +Adds this billing item to the database (``Orders'' the item). If there is an error, returns the error, otherwise returns false. - -<P> -Currently, custnum, setup, bill, susp, expire, and cancel may be changed. - -<P> -Changing pkgpart may have disasterous effects. See the order subroutine. - -<P> -setup and bill are normally updated by calling the bill method of a -customer object (see <A HREF="../FS/cust_main.html">FS::cust_main</A>). - -<P> -suspend is normally updated by the suspend and unsuspend methods. - -<P> -cancel is normally updated by the cancel method (and also the order -subroutine in some cases). - -<DT><STRONG><A NAME="item_check">check</A></STRONG><DD> -<P> -Checks all fields to make sure this is a valid billing item. If there is an -error, returns the error, otherwise returns false. Called by the insert and +<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. +<P></P> +<DT><STRONG><A NAME="item_replace_OLD_RECORD">replace OLD_RECORD</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>Currently, custnum, setup, bill, susp, expire, and cancel may be changed.</P> +<P>Changing pkgpart may have disasterous effects. See the order subroutine.</P> +<P>setup and bill are normally updated by calling the bill method of a customer +object (see <A HREF=".././FS/cust_main.html">the FS::cust_main manpage</A>).</P> +<P>suspend is normally updated by the suspend and unsuspend methods.</P> +<P>cancel is normally updated by the cancel method (and also the order subroutine +in some cases).</P> +<P></P> +<DT><STRONG><A NAME="item_check">check</A></STRONG><BR> +<DD> +Checks all fields to make sure this is a valid billing item. If there is an +error, returns the error, otherwise returns false. Called by the insert and replace methods. - -<DT><STRONG>cancel</STRONG><DD> -<P> -Cancels and removes all services (see <A HREF="../FS/cust_svc.html">FS::cust_svc</A> and <A HREF="../FS/part_svc.html">FS::part_svc</A>) in this package, then cancels the package itself (sets the cancel field -to now). - -<P> -If there is an error, returns the error, otherwise returns false. - -<DT><STRONG><A NAME="item_suspend">suspend</A></STRONG><DD> -<P> -Suspends all services (see <A HREF="../FS/cust_svc.html">FS::cust_svc</A> and <A HREF="../FS/part_svc.html">FS::part_svc</A>) in this package, then suspends the package itself (sets the susp field to +<P></P> +<DT><STRONG><A NAME="item_cancel">cancel</A></STRONG><BR> +<DD> +Cancels and removes all services (see <A HREF=".././FS/cust_svc.html">the FS::cust_svc manpage</A> and <A HREF=".././FS/part_svc.html">the FS::part_svc manpage</A>) +in this package, then cancels the package itself (sets the cancel field to now). - -<P> -If there is an error, returns the error, otherwise returns false. - -<DT><STRONG><A NAME="item_unsuspend">unsuspend</A></STRONG><DD> -<P> -Unsuspends all services (see <A HREF="../FS/cust_svc.html">FS::cust_svc</A> and <A HREF="../FS/part_svc.html">FS::part_svc</A>) in this package, then unsuspends the package itself (clears the susp -field). - -<P> -If there is an error, returns the error, otherwise returns false. - -<DT><STRONG><A NAME="item_part_pkg">part_pkg</A></STRONG><DD> -<P> -Returns the definition for this billing item, as an FS::part_pkg object -(see -<A HREF="../FS/part_pkg.html">FS::part_pkg</A>). - -<DT><STRONG><A NAME="item_labels">labels</A></STRONG><DD> -<P> -Returns a list of lists, calling the label method for all services (see <A HREF="../FS/cust_svc.html">FS::cust_svc</A>) of this billing item. - -</DL> +<P>If there is an error, returns the error, otherwise returns false.</P> +<P></P> +<DT><STRONG><A NAME="item_suspend">suspend</A></STRONG><BR> +<DD> +Suspends all services (see <A HREF=".././FS/cust_svc.html">the FS::cust_svc manpage</A> and <A HREF=".././FS/part_svc.html">the FS::part_svc manpage</A>) in this +package, then suspends the package itself (sets the susp field to now). +<P>If there is an error, returns the error, otherwise returns false.</P> +<P></P> +<DT><STRONG><A NAME="item_unsuspend">unsuspend</A></STRONG><BR> +<DD> +Unsuspends all services (see <A HREF=".././FS/cust_svc.html">the FS::cust_svc manpage</A> and <A HREF=".././FS/part_svc.html">the FS::part_svc manpage</A>) in this +package, then unsuspends the package itself (clears the susp field). +<P>If there is an error, returns the error, otherwise returns false.</P> +<P></P> +<DT><STRONG><A NAME="item_part_pkg">part_pkg</A></STRONG><BR> +<DD> +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_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></DL> <P> <HR> -<H1><A NAME="SUBROUTINES">SUBROUTINES</A></H1> +<H1><A NAME="subroutines">SUBROUTINES</A></H1> <DL> -<DT><STRONG><A NAME="item_order">order CUSTNUM, PKGPARTS_ARYREF, [ REMOVE_PKGNUMS_ARYREF ]</A></STRONG><DD> -<P> -CUSTNUM is a customer (see <A HREF="../FS/cust_main.html">FS::cust_main</A>) - -<P> -PKGPARTS is a list of pkgparts specifying the the billing item definitions -(see -<A HREF="../FS/part_pkg.html">FS::part_pkg</A>) to order for this customer. Duplicates are of course permitted. - -<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">FS::cust_svc</A>) are moved to the new billing items. An error is returned if this is not -possible (see -<A HREF="../FS/pkg_svc.html">FS::pkg_svc</A>). - -</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> +<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 +<A HREF=".././FS/part_pkg.html">the FS::part_pkg manpage</A>) to order for this customer. Duplicates are of course +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> +<P></P></DL> <P> <HR> -<H1><A NAME="VERSION">VERSION</A></H1> -<P> -$Id: cust_pkg.html,v 1.2 2000-03-03 18:22:43 ivan Exp $ - +<H1><A NAME="version">VERSION</A></H1> +<P>$Id: cust_pkg.html,v 1.3 2001-04-23 12:40:31 ivan Exp $</P> <P> <HR> -<H1><A NAME="BUGS">BUGS</A></H1> -<P> -sub order is not OO. Perhaps it should be moved to FS::cust_main and made -so? - -<P> -In sub order, the <CODE>@pkgparts</CODE> array (passed by reference) is -clobbered. - -<P> -Also in sub order, no money is adjusted. Once FS::part_pkg defines a -standard method to pass dates to the recur_prog expression, it should do -so. - -<P> -FS::svc_acct, FS::svc_acct_sm, and FS::svc_domain are loaded via 'use' at +<H1><A NAME="bugs">BUGS</A></H1> +<P>sub order is not OO. Perhaps it should be moved to FS::cust_main and made so?</P> +<P>In sub order, the @pkgparts array (passed by reference) is clobbered.</P> +<P>Also in sub order, no money is adjusted. Once FS::part_pkg defines a standard +method to pass dates to the recur_prog expression, it should do so.</P> +<P>FS::svc_acct, FS::svc_acct_sm, and FS::svc_domain are loaded via 'use' at 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. - +we've fetched the user yet, rather than a hash. See FS::UID and the TODO.</P> <P> <HR> -<H1><A NAME="SEE_ALSO">SEE ALSO</A></H1> -<P> -<A HREF="../FS/Record.html">FS::Record</A>, <A HREF="../FS/cust_main.html">FS::cust_main</A>, <A HREF="../FS/part_pkg.html">FS::part_pkg</A>, <A HREF="../FS/cust_svc.html">FS::cust_svc</A> -, <A HREF="../FS/pkg_svc.html">FS::pkg_svc</A>, schema.html from the base documentation +<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> </BODY> |