summaryrefslogtreecommitdiff
path: root/bin/mozilla/ic.pl
diff options
context:
space:
mode:
authortetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46>2006-10-08 20:47:38 +0000
committertetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46>2006-10-08 20:47:38 +0000
commit68399771603d9a2d084a9eaca480f17016801fe6 (patch)
tree02859ae3e2743f8b141a9837f703c21d77651759 /bin/mozilla/ic.pl
parent7376ef357ac4dce6bf30548c773774dddd2ea033 (diff)
First round of tax code replacement, adds cumulative tax support
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@195 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'bin/mozilla/ic.pl')
-rwxr-xr-xbin/mozilla/ic.pl4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/mozilla/ic.pl b/bin/mozilla/ic.pl
index 99eb7f5c..16e67d24 100755
--- a/bin/mozilla/ic.pl
+++ b/bin/mozilla/ic.pl
@@ -42,6 +42,7 @@
use LedgerSMB::IC;
+use LedgerSMB::Tax;
require "$form->{path}/io.pl";
@@ -2981,7 +2982,8 @@ sub save {
$amount = $form->{"sellprice_$i"} * (1 - $form->{"discount_$i"} / 100) * $form->{"qty_$i"};
for (split / /, $form->{"taxaccounts_$i"}) { $form->{"${_}_base"} += $amount }
if (!$form->{taxincluded}) {
- for (split / /, $form->{"taxaccounts_$i"}) { $amount += ($form->{"${_}_base"} * $form->{"${_}_rate"}) }
+ my @taxlist= Tax::init_taxes($form, $form->{"taxaccounts_$i"});
+ $amount += Tax::calculate_taxes(\@taxlist, $form, $amount, 0);
}
$ml = 1;