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

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



Revision: 5384
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=5384&view=rev
Author:   einhverfr
Date:     2012-12-19 08:17:39 +0000 (Wed, 19 Dec 2012)
Log Message:
-----------
Merging from branches/1.3

Modified Paths:
--------------
    trunk/Changelog
    trunk/LedgerSMB/File.pm
    trunk/dists/rpm/ledgersmb.spec
    trunk/sql/modules/Files.sql

Property Changed:
----------------
    trunk/


Property changes on: trunk
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3:3711-5335
   + /branches/1.3:3711-5383

Modified: trunk/Changelog
===================================================================
--- trunk/Changelog	2012-12-19 08:13:20 UTC (rev 5383)
+++ trunk/Changelog	2012-12-19 08:17:39 UTC (rev 5384)
@@ -92,6 +92,8 @@
 * Dropped seconds/subsecs from password expiration notice (Chris T, 3593963)
 * Fixed parts images not available from template. (Chris T, h/t Brian W)
 * Fixed fs_cssdir not handling trailing / properly (Chris T, h/t Nigel T)
+* Fixed file attachments not retrieving for all invoice parts (Chris T)
+* fixed file attachements for invoices not handling _ properly (Chris T)
 
 Chris T is Chris Travers
 Havard S is Havard Sorli

Modified: trunk/LedgerSMB/File.pm
===================================================================
--- trunk/LedgerSMB/File.pm	2012-12-19 08:13:20 UTC (rev 5383)
+++ trunk/LedgerSMB/File.pm	2012-12-19 08:17:39 UTC (rev 5384)
@@ -240,7 +240,7 @@
     $self->file_path($LedgerSMB::Sysconfig::tempdir . '/' . $$);
     
     for my $result (@results) {
-        warn "File found: $result->{file_name}";
+        $result->{file_name} =~ s/\_//g;
         open FILE, '>', $self->file_path . "/$result->{file_name}";
         binmode FILE, ':bytes';
         print FILE $result->{content};

Modified: trunk/dists/rpm/ledgersmb.spec
===================================================================
--- trunk/dists/rpm/ledgersmb.spec	2012-12-19 08:13:20 UTC (rev 5383)
+++ trunk/dists/rpm/ledgersmb.spec	2012-12-19 08:17:39 UTC (rev 5384)
@@ -84,9 +84,9 @@
     s[Directory WORKING_DIR/users>][Directory %{_datadir}/%{name}/users>]g;
     s[Directory WORKING_DIR/bin>][Directory %{_datadir}/%{name}/bin>]g;
     s[Directory WORKING_DIR/utils>][Directory %{_datadir}/%{name}/utils>]g;
-    s[Directory WORKING_DIR/spool>][Directory {_localstatedir}/spool/%{name}>]g;
-    s[Directory WORKING_DIR/templates>][Directory {_localstatedir}/lib/%{name}/templates>]g;
-    s[Directory WORKING_DIR/LedgerSMB>][Directory {_localstatedir}/lib/%{name}/LedgerSMB>]g;
+    s[Directory WORKING_DIR/spool>][Directory %{_localstatedir}/spool/%{name}>]g;
+    s[Directory WORKING_DIR/templates>][Directory %{_localstatedir}/lib/%{name}/templates>]g;
+    s[Directory WORKING_DIR/LedgerSMB>][Directory %{_localstatedir}/lib/%{name}/LedgerSMB>]g;
 }
 continue {
     print $_;

Modified: trunk/sql/modules/Files.sql
===================================================================
--- trunk/sql/modules/Files.sql	2012-12-19 08:13:20 UTC (rev 5383)
+++ trunk/sql/modules/Files.sql	2012-12-19 08:17:39 UTC (rev 5384)
@@ -248,7 +248,8 @@
                         AND m.mime_type ilike 'image%'
                    JOIN invoice i ON i.trans_id = $1
                         AND i.parts_id = fb.ref_key
-                  WHERE fb.file_class = 3)
+                  WHERE fb.file_class = 3
+               GROUP BY ref_key)
 $$ language sql;
 
 

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