|
NAMEInterchange6::Schema::Result::TaxDESCRIPTIONThe taxes table contains taxes such as sales tax and VAT. Each tax has a unique tax_name but can contain multiple rows for each tax_name to allow for changes in tax rates over time. When there is more than one row for a single tax_name then the valid_from and valid_to periods may not overlap.ACCESSORStaxes_idPrimary key.tax_nameName of tax, e.g.: vat_fulldescriptionDescription of tax, e.g.: New York sales taxpercentPercent rate of tax, e.g.: 19.9775decimal_placesNumber of decimal_places of precision required for tax cost and reporting.Defaults to 2. roundingDefault rounding is half round up to the number of decimal_places. To use floor or ceiling set rounding to 'f' or 'c' as appropriate. The rounding value is automatically converted to lower case and any invalid value passed in will cause an exception to be thrown.Is nullable. valid_fromDate from which tax is valid. Defaults to time record is created.valid_toFinal date on which tax is valid.Is nullable. country_iso_codeFK on "country_iso_code" in Interchange6::Schema::Result::Country.Is nullable. states_idFK on "states_id" in Interchange6::Schema::Result::State.Is nullable. createdDate and time when this record was created returned as DateTime object. Value is auto-set on insert.last_modifiedDate and time when this record was last modified returned as DateTime object. Value is auto-set on insert and update.RELATIONSstateType: belongs_toRelated object: Interchange6::Schema::Result::State countryType: belongs_toRelated object: Interchange6::Schema::Result::Country METHODScalculateCalculate taxArguments should be a hash ref of the following arguments:
Usage example: my $tax = $taxrecord->caclulate({ price => 13.47, tax_included => 1 }); # with percentage 18 our tax is 2.05 INHERITED METHODSnewWe overload the new method to set default values on certain rows at create time.sqlt_deploy_hookCalled during table creation to add indexes on the following columns:
validateValidity checks that cannot be enforced using primary key, unique or other database methods using Interchange6::Schema::Component::Validation. The validity checks enforce the following rules:
Visit the GSP FreeBSD Man Page Interface. |