summaryrefslogtreecommitdiff
path: root/doc/faq.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/faq.html')
0 files changed, 0 insertions, 0 deletions
i>
  • # This package contains tax related functions:
  • #
  • # apply_taxes - applies taxes to the given subtotal
  • # extract_taxes - extracts taxes from the given total
  • # initialize_taxes - loads taxes from the database
  • # calculate_taxes - calculates taxes
  • #
  • #====================================================================
  • package Tax;
  • use Math::BigFloat;
  • sub init_taxes {
  • my ( $form, $taxaccounts, $taxaccounts2 ) = @_;
  • my $dbh = $form->{dbh};
  • @taxes = ();
  • my @accounts = split / /, $taxaccounts;
  • if ( defined $taxaccounts2 ) {
  • my @tmpaccounts = @accounts;
  • $#accounts = -1;
  • for my $acct ( split / /, $taxaccounts2 ) {
  • if ( $taxaccounts =~ /\b$acct\b/ ) {
  • push @accounts, $acct;
  • }
  • }
  • }