[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[4323] branches/1.3
- Subject: SF.net SVN: ledger-smb:[4323] branches/1.3
- From: ..hidden..
- Date: Fri, 17 Feb 2012 09:31:56 +0000
Revision: 4323
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4323&view=rev
Author: einhverfr
Date: 2012-02-17 09:31:56 +0000 (Fri, 17 Feb 2012)
Log Message:
-----------
Tag processing corrected for prefix/suffix for invoice numbers, etc
Modified Paths:
--------------
branches/1.3/Changelog
branches/1.3/LedgerSMB/Form.pm
Modified: branches/1.3/Changelog
===================================================================
--- branches/1.3/Changelog 2012-02-17 01:37:49 UTC (rev 4322)
+++ branches/1.3/Changelog 2012-02-17 09:31:56 UTC (rev 4323)
@@ -2,6 +2,9 @@
Initial Release: Monday, Oct 12 2011
Supported Presently
+Changelog for 1.3.12
+* Corrected processing of <?lsmb tags in order/invoice numbers (Chris T)
+
Changelog for 1.3.11
* Fixed outstanding report for payment reversal and partial payments (Chris T)
* Fixed handling of non-existing roles in menu grants (Chris T)
Modified: branches/1.3/LedgerSMB/Form.pm
===================================================================
--- branches/1.3/LedgerSMB/Form.pm 2012-02-17 01:37:49 UTC (rev 4322)
+++ branches/1.3/LedgerSMB/Form.pm 2012-02-17 09:31:56 UTC (rev 4323)
@@ -3408,7 +3408,7 @@
# <?lsmb PHONE ?> for customer and vendors
my $num = $_;
- ($num) = $num =~ /(\d+)/;
+ ($num) = $num =~ /\D*(\d+)\D*$/;
if ( defined $num ) {
my $incnum;
@@ -3491,7 +3491,7 @@
}
if ( $param =~ /<\?lsmb (yy|mm|dd)/i ) {
-
+ my $test_param = $1;
# SC: XXX Does this even work anymore?
my $p = $param;
$p =~ s/(<|>|%)//g;
@@ -3503,13 +3503,15 @@
my @a = $self->split_date( $myconfig->{dateformat},
$self->{transdate} );
- for ( sort keys %d ) { push @p, $a[ $d{$_} ] if ( $p =~ /$_/ ) }
+ for my $k( sort keys %d ) { push @p, $a[ $d{$k} ]
+ if ( $param =~ /$k/i ) }
$str = join $spc, @p;
- $var =~ s/$param/$str/;
+ $var =~ s/<\?lsmb $test_param \?>/$str/i;
}
if ( $param =~ /<\?lsmb curr/i ) {
- $var =~ s/$param/$self->{currency}/;
+ my $curr = $self->{currency} || $self->{curr};
+ $var =~ s/<\?lsmb curr \?>/$curr/i;
}
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.