[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[5191] branches/1.3
- Subject: SF.net SVN: ledger-smb:[5191] branches/1.3
- From: ..hidden..
- Date: Tue, 13 Nov 2012 21:59:36 +0000
Revision: 5191
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=5191&view=rev
Author: hasorli
Date: 2012-11-13 21:59:35 +0000 (Tue, 13 Nov 2012)
Log Message:
-----------
Fixed cannot reconcile account with negative balance , 3586757
Removes an unused dependency Try::Tiny
Patch by Nick Prater
Modified Paths:
--------------
branches/1.3/Changelog
branches/1.3/scripts/recon.pl
Modified: branches/1.3/Changelog
===================================================================
--- branches/1.3/Changelog 2012-11-13 14:04:53 UTC (rev 5190)
+++ branches/1.3/Changelog 2012-11-13 21:59:35 UTC (rev 5191)
@@ -17,6 +17,7 @@
* Rebuild modules after upgrade, ensuring upgrade to latest version (Chris T)
* Fixed credit limit usage calculations (Chris T, h/t Erik H)
* Fixes to get LedgerSMB running clearly using FCGI (Chris T)
+* Fixed cannot reconcile account with negative balance(Havard S, Erik H, h/t Nick P,3586757)
Berend T is Berend Tober
Chris T is Chris Travers
@@ -25,6 +26,7 @@
Kevin B is Kevin Bailey
Neil S is Neil Smith
Robert C is Robert James Clay
+Nick P is Nick Prater
Changelog for 1.3.23
* Fixed query string/stdin handling where both stdin and query string are set
Modified: branches/1.3/scripts/recon.pl
===================================================================
--- branches/1.3/scripts/recon.pl 2012-11-13 14:04:53 UTC (rev 5190)
+++ branches/1.3/scripts/recon.pl 2012-11-13 21:59:35 UTC (rev 5191)
@@ -21,8 +21,6 @@
use LedgerSMB::Template;
use LedgerSMB::DBObject::Reconciliation;
use LedgerSMB::Setting;
-use Try::Tiny;
-
use Data::Dumper;
use strict;
@@ -407,11 +405,14 @@
=cut
sub new_report {
my ($request) = @_;
- if ($request->{total} && $request->{total} =~ m|[/-]|){
+
+ # Trap user error: dates accidentally entered in the amount field
+ if ($request->{total} && $request->{total} =~ m|\d[/-]|){
$request->error($request->{_locale}->text(
'Invalid statement balance. Hint: Try entering a number'
));
}
+
$request->{total} = $request->parse_amount(amount => $request->{total});
my $template;
my $return;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.