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

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



Revision: 6662
          http://sourceforge.net/p/ledger-smb/code/6662
Author:   einhverfr
Date:     2014-01-27 05:24:37 +0000 (Mon, 27 Jan 2014)
Log Message:
-----------
Restructuring sales invoice code and ensuring that unposted vouchers have the same options as unposted drafts, fixing bug 984

Modified Paths:
--------------
    trunk/bin/ir.pl
    trunk/bin/is.pl

Modified: trunk/bin/ir.pl
===================================================================
--- trunk/bin/ir.pl	2014-01-27 05:15:21 UTC (rev 6661)
+++ trunk/bin/ir.pl	2014-01-27 05:24:37 UTC (rev 6662)
@@ -953,7 +953,7 @@
                 delete $button{$_};
             }
             my $is_draft = 0;
-            if (!$form->{approved} && !$form->{batch_id}){
+            if (!$form->{approved}){
                $is_draft = 1;
                $button{approve} = { 
                        ndx   => 3, 
@@ -965,6 +965,7 @@
                        key   => 'E', 
                        value => $locale->text('Save as Shown') };
               }
+               # Delete these for batches too
                delete $button{$_}
                  for qw(post_as_new post e_mail sales_order void print on_hold); 
             }

Modified: trunk/bin/is.pl
===================================================================
--- trunk/bin/is.pl	2014-01-27 05:15:21 UTC (rev 6661)
+++ trunk/bin/is.pl	2014-01-27 05:24:37 UTC (rev 6662)
@@ -1037,20 +1037,22 @@
             }
             my $is_draft = 0;
             if (!$form->{approved} && !$form->{batch_id}){
-               $is_draft = 1;
-               $button{approve} = { 
+               if (!$form->{batch_id}){
+                   $is_draft = 1;
+                   $button{approve} = { 
                        ndx   => 3, 
                        key   => 'O', 
                        value => $locale->text('Post as Saved') };
-               if (grep /^lsmb_$form->{company}__draft_modify$/, @{$form->{_roles}}){
-                   $button{edit_and_save} = { 
-                       ndx   => 4, 
-                       key   => 'E', 
-                       value => $locale->text('Save as Shown') };
+                   if (grep /^lsmb_$form->{company}__draft_modify$/, @{$form->{_roles}}){
+                       $button{edit_and_save} = { 
+                           ndx   => 4, 
+                           key   => 'E', 
+                           value => $locale->text('Save as Shown') };
+                   }
               }
                delete $button{$_}
                  for qw(post_as_new post e_mail sales_order void print on_hold); 
-            }
+           }
 
             if ( !${LedgerSMB::Sysconfig::latex} ) {
                 for ( "print_and_post", "print_and_post_as_new" ) {

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


------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-commits mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-commits