Difference between revisions of "Freeside:3:Documentation:Developer/FS/TemplateItem Mixin"

From Freeside
Jump to: navigation, search
m (Edit via perl MediaWiki framework (1.13))
m (Edit via perl MediaWiki framework (1.13))
 
Line 3: Line 3:
 
; part_pkg
 
; part_pkg
 
:Returns the package definition for this invoice line item.
 
:Returns the package definition for this invoice line item.
 +
; part_fee
 +
:Returns the fee definition for this line item, if there is one.
 +
; part_X
 +
:Returns [[#part_pkg|"part_pkg"]] or [[#part_fee|"part_fee"]], whichever is applicable (or nothing, if called on a tax line item).
 
; desc LOCALE
 
; desc LOCALE
 
:Returns a description for this line item. For typical line items, this is the ''pkg'' field of the corresponding '''FS::part_pkg''' object (see [[Freeside:3:Documentation:Developer/FS/part pkg|FS::part_pkg]]). For one-shot line items and named taxes, it is the ''itemdesc'' field of this line item, and for generic taxes, simply returns "Tax".
 
:Returns a description for this line item. For typical line items, this is the ''pkg'' field of the corresponding '''FS::part_pkg''' object (see [[Freeside:3:Documentation:Developer/FS/part pkg|FS::part_pkg]]). For one-shot line items and named taxes, it is the ''itemdesc'' field of this line item, and for generic taxes, simply returns "Tax".

Latest revision as of 07:46, 24 March 2015

cust_pkg
Returns the package (see FS::cust_pkg) for this invoice line item.
part_pkg
Returns the package definition for this invoice line item.
part_fee
Returns the fee definition for this line item, if there is one.
part_X
Returns "part_pkg" or "part_fee", whichever is applicable (or nothing, if called on a tax line item).
desc LOCALE
Returns a description for this line item. For typical line items, this is the pkg field of the corresponding FS::part_pkg object (see FS::part_pkg). For one-shot line items and named taxes, it is the itemdesc field of this line item, and for generic taxes, simply returns "Tax".
time_period_pretty PART_PKG, AGENTNUM
Returns a formatted time period for this line item.
details [ OPTION => VALUE ... ]
Returns an array of detail information for the invoice line item.
Options may include:
format: set to 'html' or 'latex' to have the detail lines formatted for inclusion in an HTML table (wrapped in <tr> and <td> elements) or LaTeX table (delimited with & and \\ operators).
escape_function: if present, then the array elements are processed by this function before being returned.
format_function: overrides the normal HTML or LaTeX function for returning formatted CDRs.
no_usage: excludes call detail records. The method will still return some special-case records like prorate details, and manually created package details.
details_header [ OPTION => VALUE ... ]
Returns a list representing an invoice line item detail header, if any. This relies on the behavior of voip_cdr in that it expects the header to be the first CSV formatted detail (as is expected by invoice generation routines). Returns the empty list otherwise.
quantity; unitsetup; unitrecur; cust_bill_pkg_display [ type => TYPE ]
Returns an array of display information for the invoice line item optionally limited to 'TYPE'.
cust_bill_pkg_detail [ CLASSNUM ]
Returns the list of associated cust_bill_pkg_detail objects The optional CLASSNUM argument will limit the details to the specified usage class.
pkg_discount
Returns the list of associated cust_bill_pkg_discount or quotation_pkg_discount objects.

POD ERRORS

Hey! The above document had some coding errors, which are explained below:

Around line 20:
'=item' outside of any '=over'