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

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



Revision: 3193
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3193&view=rev
Author:   einhverfr
Date:     2011-05-31 17:16:14 +0000 (Tue, 31 May 2011)

Log Message:
-----------
John Locke's patch for email fields not populated

Modified Paths:
--------------
    trunk/UI/io-email.html
    trunk/bin/io.pl

Modified: trunk/UI/io-email.html
===================================================================
--- trunk/UI/io-email.html	2011-05-31 17:14:46 UTC (rev 3192)
+++ trunk/UI/io-email.html	2011-05-31 17:16:14 UTC (rev 3193)
@@ -21,12 +21,8 @@
         <tr>
           <th align="right"><?lsmb text('Subject') ?></th>
           <td><?lsmb PROCESS input element_data={name => 'subject', size => 30, value => form.subject} ?></td>
-<?lsmb IF user.role == 'admin' OR user.role == 'manager' ?>
           <th align="right"><?lsmb text('Bcc') ?></th>
           <td><?lsmb PROCESS input element_data={name => 'bcc', size => 30, value => form.bcc} ?></td>
-<?lsmb ELSE ?>
-          <td colspan="2"> </td>
-<?lsmb END ?>
         </tr>
       </table>
     </td>

Modified: trunk/bin/io.pl
===================================================================
--- trunk/bin/io.pl	2011-05-31 17:14:46 UTC (rev 3192)
+++ trunk/bin/io.pl	2011-05-31 17:16:14 UTC (rev 3193)
@@ -1181,7 +1181,7 @@
 
     my %hiddens;
     if ( $myconfig{role} !~ /(admin|manager)/ ) {
-        $hiddens{bcc} = $form->{bcc};
+      #  $hiddens{bcc} = $form->{bcc};
     }
 
     if ( $form->{formname} =~ /(pick|packing|bin)_list/ ) {
@@ -1195,7 +1195,7 @@
     my $print_options = &print_options(\%hiddens);
 
     for (
-        qw(email cc bcc subject message sendmode format language_code action nextsub)
+        qw(subject message sendmode format language_code action nextsub)
       )
     {
         delete $form->{$_};
@@ -1266,6 +1266,12 @@
         };
     
     # SC: Option values extracted from other bin/ scripts
+    if ($form->{type} eq 'invoice') {
+	push @{$options{formname}{options}}, {
+	    text => $locale->text('Invoice'),
+	    value => 'invoice',
+	    };
+    }
     if ($form->{type} eq 'sales_quotation') {
         push @{$options{formname}{options}}, {
             text => $locale->text('Quotation'),
@@ -1720,6 +1726,9 @@
 	##SC: XXX the from address needs fixing
         $output_options{from} = $myconfig{email};
         $output_options{notify} = 1 if $form->{read_receipt};
+	$output_options{message} = $form->{message};
+	$output_options{filename} = $form->{formname} . '_'. $form->{"${inv}number"};
+	$output_options{filename} .= '.'. $form->{format}; # assuming pdf or html
 
         if ( %$old_form ) {
             $old_form->{intnotes} = qq|$old_form->{intnotes}\n\n|
@@ -1802,6 +1811,7 @@
         user => \%myconfig, 
         template => $form->{'formname'},
         format => uc $form->{format},
+        no_escape => true,
         method => $form->{media},
         output_options => \%output_options,
         );


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