<% include( '/elements/header.html', 'Developer Documentation' ) %> <& /elements/menubar.html, 'Freeside Perl Modules' => $fsurl.'docs/library/FS.html', 'Complete Index' => $fsurl.'docs/library/index.html', &>

FS::TaxEngine::cch

SUMMARY

FS::TaxEngine::cch - CCH published tax tables. Uses multiple tables: - tax_rate: definition of specific taxes, based on tax class and geocode. - cust_tax_location: definition of geocodes, using zip+4 codes. - tax_class: definition of tax classes. - part_pkg_taxproduct: definition of taxable products (foreign key in part_pkg.taxproductnum and the "usage_taxproductnum_*" part_pkg options). The 'taxproduct' string in this table can implicitly include other taxproducts. - part_pkg_taxrate: links (geocode, taxproductnum) of a sold product to a tax class. Many records here have partial-length geocodes which act as wildcards. - part_pkg_taxoverride: manual link from a part_pkg to a specific tax class.

add_sale LINEITEM

Takes LINEITEM (a FS::cust_bill_pkg object) and adds it to three internal data structures:

- items, an arrayref of all items on this invoice. - taxes, a hashref of taxnum => arrayref containing the items that are taxable under that tax definition. - taxclass, a hashref of taxnum => arrayref containing the tax class names parallel to the taxes array for the same tax.

The item will appear on taxes once for each tax class (setup, recur, or a usage class number) that's taxable under that class and appears on the item.

add_sale will also determine any exemptions that apply to the item and attach them to LINEITEM.

POD ERRORS

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

Around line 31:

'=item' outside of any '=over'

=over without closing =back

<% include ('/elements/footer.html' ) %>