X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fdocs%2Fman%2FFS%2Fcust_pkg.html;h=9f1005da7a19d1c8e2f5642f4c251e2eb6a402c1;hp=459d1297c5bd5c144235cdfb495a87e80702df9f;hb=6991d4986df7fb3a6c7c49b5ae1b3713e87a16c4;hpb=f02dd9b0e5042ef000d9338089eed50988d48914 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 @@
   @labels = $record->labels;
+  $seconds = $record->seconds_since($timestamp);
+
   $error = FS::cust_pkg::order( $custnum, \@pkgparts );
   $error = FS::cust_pkg::order( $custnum, \@pkgparts, \@remove_pkgnums ] );

@@ -79,6 +81,9 @@ inherits from FS::Record. The following fields are currently supported:

otaker - order taker (assigned automatically if null, see the FS::UID manpage)
+
manual_flag - If this field is set to 1, disables the automatic +unsuspension of this package when using the unsuspendauto config file.
+

Note: setup, bill, susp, expire and cancel are specified as UNIX timestamps; see perlfunc/``time''. Also see the Time::Local manpage and the Date::Parse manpage for @@ -95,26 +100,12 @@ Create a new billing item. To add the item to the database, see delete

-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. +

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.

replace OLD_RECORD
@@ -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 the FS::part_pkg manpage).

+
cust_svc
+
+Returns the services for this package, as FS::cust_svc objects (see +the FS::cust_svc manpage) +

labels
Returns a list of lists, calling the label method for all services (see the FS::cust_svc manpage) of this billing item. +

+
cust_main
+
+Returns the parent customer object (see the FS::cust_main manpage). +

+
seconds_since TIMESTAMP
+
+Returns the number of seconds all accounts (see the FS::svc_acct manpage) in this +package have been online since TIMESTAMP. +

TIMESTAMP is specified as a UNIX timestamp; see perlfunc/``time''. Also see +the Time::Local manpage and the Date::Parse manpage for conversion functions.


SUBROUTINES

-
order CUSTNUM, PKGPARTS_ARYREF, [ REMOVE_PKGNUMS_ARYREF ]
+
order CUSTNUM, PKGPARTS_ARYREF, [ REMOVE_PKGNUMS_ARYREF [ RETURN_CUST_PKG_ARRAYREF ] ]
CUSTNUM is a customer (see the FS::cust_main manpage)

PKGPARTS is a list of pkgparts specifying the the billing item definitions (see @@ -176,12 +183,15 @@ permitted.

REMOVE_PKGNUMS is an optional list of pkgnums specifying the billing items to remove for this customer. The services (see the FS::cust_svc manpage) are moved to the new billing items. An error is returned if this is not possible (see -the FS::pkg_svc manpage).

+the FS::pkg_svc manpage). An empty arrayref is equivalent to not specifying this +parameter.

+

RETURN_CUST_PKG_ARRAYREF, if specified, will be filled in with the +newly-created cust_pkg objects.


VERSION

-

$Id: cust_pkg.html,v 1.1 2001-07-30 07:36:03 ivan Exp $

+

$Id: cust_pkg.html,v 1.2 2002-01-29 16:33:15 ivan Exp $


BUGS

@@ -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.

+

Now that things are transactional should the check in the insert method be +moved to check ?


SEE ALSO

-

the FS::Record manpage, the FS::cust_main manpage, the FS::part_pkg manpage, the FS::cust_svc manpage -, the FS::pkg_svc manpage, schema.html from the base documentation

+

the FS::Record manpage, the FS::cust_main manpage, the FS::part_pkg manpage, the FS::cust_svc manpage, +the FS::pkg_svc manpage, schema.html from the base documentation