[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[5529] trunk



Revision: 5529
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=5529&view=rev
Author:   einhverfr
Date:     2013-01-10 07:46:53 +0000 (Thu, 10 Jan 2013)
Log Message:
-----------
Fixing error calculating taxes when min threshold not met

Modified Paths:
--------------
    trunk/Changelog
    trunk/LedgerSMB/Taxes/Simple.pm

Modified: trunk/Changelog
===================================================================
--- trunk/Changelog	2013-01-10 06:43:40 UTC (rev 5528)
+++ trunk/Changelog	2013-01-10 07:46:53 UTC (rev 5529)
@@ -99,6 +99,7 @@
 * Fixed stylesheet cannot be set on preferences screen (Chris T, 3599804)
 * Moved Fixes.sql to top of LOADORDER to fix some upgrade issues (Chris T)
 * Fixing handling of unknown browsers in logout (Chris T, 3599930)
+* Fixed error generating invoice when mintax threshhold not met Chris T)
 
 Changelog for 1.3.27
 * Detect whether ledgersmb.conf exists during Makefile.PL run and create if

Modified: trunk/LedgerSMB/Taxes/Simple.pm
===================================================================
--- trunk/LedgerSMB/Taxes/Simple.pm	2013-01-10 06:43:40 UTC (rev 5528)
+++ trunk/LedgerSMB/Taxes/Simple.pm	2013-01-10 07:46:53 UTC (rev 5529)
@@ -28,6 +28,7 @@
 
 use Class::Struct;
 use Math::BigFloat;
+use Carp::Always;
 
 struct Taxes::Simple => {
     taxnumber   => '$',
@@ -58,6 +59,7 @@
 sub apply_tax {
     my ( $self, $form, $subtotal ) = @_;
     my $tax = $self->calculate_tax( $form, $subtotal, 0 );
+    $tax = Math::BigFloat->bzero unless $tax;
     $self->value($tax);
     return $tax;
 }

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.