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

SF.net SVN: ledger-smb:[2820] trunk/bin



Revision: 2820
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=2820&view=rev
Author:   einhverfr
Date:     2009-12-13 01:42:30 +0000 (Sun, 13 Dec 2009)

Log Message:
-----------
Options for printing now display in sales invoice and order entry screens but printing bugs remain

Modified Paths:
--------------
    trunk/bin/io.pl
    trunk/bin/is.pl
    trunk/bin/oe.pl

Modified: trunk/bin/io.pl
===================================================================
--- trunk/bin/io.pl	2009-12-11 17:05:11 UTC (rev 2819)
+++ trunk/bin/io.pl	2009-12-13 01:42:30 UTC (rev 2820)
@@ -1401,6 +1401,22 @@
     \%options;
 }
 
+sub print_select { # Needed to print new printoptions output from non-template
+                   # screens --CT
+    my ($form, $select) = @_;
+    my $name = $select->{name};
+    my $id = $name;
+    $id =~ s/\_/-/;
+    print qq|<select id="$id" name=$name" class="$select->{class}">\n|;
+    for my $opt (@{$select->{options}}){
+        print qq|<option value="$opt->{value}" |;
+        if ($form->{$select->{name}} eq $opt->{value}){
+            print qq|SELECTED="SELECTED"|;
+        }
+        print qq|>$opt->{text}</option>\n|;
+    }
+    print "</select>";
+}
 sub print {
 
     # if this goes to the printer pass through

Modified: trunk/bin/is.pl
===================================================================
--- trunk/bin/is.pl	2009-12-11 17:05:11 UTC (rev 2819)
+++ trunk/bin/is.pl	2009-12-13 01:42:30 UTC (rev 2820)
@@ -415,7 +415,7 @@
 |;
 
     $form->hide_form(
-        qw(id type media format printed emailed queued title vc terms discount 
+        qw(id type printed emailed queued title vc terms discount 
            creditlimit creditremaining tradediscount business closedto locked 
            shipped oldtransdate recurring reverse batch_id subtype)
     );
@@ -726,8 +726,15 @@
     <td>
 |;
 
-    &print_options;
-
+    my $printops = &print_options;
+    my $formname = { name => 'formname',
+                     options => [
+                                  {text=> 'Sales Invoice', value => 'invoice'},
+                                ]
+                   };
+    print_select($form, $formname);
+    print_select($form, $printops->{format});
+    print_select($form, $printops->{media});
     print qq|
     </td>
   </tr>

Modified: trunk/bin/oe.pl
===================================================================
--- trunk/bin/oe.pl	2009-12-11 17:05:11 UTC (rev 2819)
+++ trunk/bin/oe.pl	2009-12-13 01:42:30 UTC (rev 2820)
@@ -758,8 +758,10 @@
     <td>
 |;
 
-    &print_options;
-
+    $printops = &print_options;
+    print_select($form, $printops->{formname});
+    print_select($form, $printops->{format});
+    print_select($form, $printops->{media});
     print qq|
     </td>
   </tr>


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