summaryrefslogtreecommitdiff
path: root/LedgerSMB/Taxes
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-04-26 18:00:56 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-04-26 18:00:56 +0000
commit666fd833584fe2e3618a397fe9d9a9bdf4c5b94b (patch)
tree19c4444705fd7f7803e0d7b597659c11d7e85b73 /LedgerSMB/Taxes
parent2edd2e4de0f08a0a5f23647ea715f279671a0b89 (diff)
Doing a simple Perltidy commit so that I can evaluate differences between the branches and make sure patches are up to date
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1103 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB/Taxes')
-rwxr-xr-xLedgerSMB/Taxes/Simple.pm48
1 files changed, 24 insertions, 24 deletions
diff --git a/LedgerSMB/Taxes/Simple.pm b/LedgerSMB/Taxes/Simple.pm
index 57777be4..bbcf539b 100755
--- a/LedgerSMB/Taxes/Simple.pm
+++ b/LedgerSMB/Taxes/Simple.pm
@@ -4,15 +4,15 @@
# Taxes::Simple
# Default simple tax application
#
-# LedgerSMB
+# LedgerSMB
# Small Medium Business Accounting software
# http://www.ledgersmb.org/
-#
+#
#
# Copyright (C) 2006
# This work contains copyrighted information from a number of sources all used
-# with permission. It is released under the GNU General Public License
-# Version 2 or, at your option, any later version. See COPYRIGHT file for
+# with permission. It is released under the GNU General Public License
+# Version 2 or, at your option, any later version. See COPYRIGHT file for
# details.
#
#
@@ -30,35 +30,35 @@ use Class::Struct;
use Math::BigFloat;
struct Taxes::Simple => {
- taxnumber => '$',
- description => '$',
- rate => 'Math::BigFloat',
- chart => '$',
- account => '$',
- value => 'Math::BigFloat',
- pass => '$'
+ taxnumber => '$',
+ description => '$',
+ rate => 'Math::BigFloat',
+ chart => '$',
+ account => '$',
+ value => 'Math::BigFloat',
+ pass => '$'
};
sub calculate_tax {
- my ($self, $form, $subtotal, $extract, $passrate) = @_;
- my $rate = $self->rate;
- my $tax = $subtotal * $rate / (Math::BigFloat->bone() + $passrate);
- $tax = $subtotal * $rate if not $extract;
- return $tax;
+ my ( $self, $form, $subtotal, $extract, $passrate ) = @_;
+ my $rate = $self->rate;
+ my $tax = $subtotal * $rate / ( Math::BigFloat->bone() + $passrate );
+ $tax = $subtotal * $rate if not $extract;
+ return $tax;
}
sub apply_tax {
- my ($self, $form, $subtotal) = @_;
- my $tax = $self->calculate_tax($form, $subtotal, 0);
- $self->value($tax);
- return $tax;
+ my ( $self, $form, $subtotal ) = @_;
+ my $tax = $self->calculate_tax( $form, $subtotal, 0 );
+ $self->value($tax);
+ return $tax;
}
sub extract_tax {
- my ($self, $form, $subtotal, $passrate) = @_;
- my $tax = $self->calculate_tax($form, $subtotal, 1, $passrate);
- $self->value($tax);
- return $tax;
+ my ( $self, $form, $subtotal, $passrate ) = @_;
+ my $tax = $self->calculate_tax( $form, $subtotal, 1, $passrate );
+ $self->value($tax);
+ return $tax;
}
1;