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

SF.net SVN: ledger-smb:[6413] trunk/bin/gl.pl



Revision: 6413
          http://sourceforge.net/p/ledger-smb/code/6413
Author:   einhverfr
Date:     2014-01-07 09:39:51 +0000 (Tue, 07 Jan 2014)
Log Message:
-----------
Adding draft deletion to journal entries (how did this get removed?) based on new 1.3 code.

Modified Paths:
--------------
    trunk/bin/gl.pl

Modified: trunk/bin/gl.pl
===================================================================
--- trunk/bin/gl.pl	2014-01-07 09:38:13 UTC (rev 6412)
+++ trunk/bin/gl.pl	2014-01-07 09:39:51 UTC (rev 6413)
@@ -700,6 +700,19 @@
 
 }
 
+sub delete {
+    $form->error($locale->text('Cannot delete posted transaction')) 
+       if ($form->{approved});
+    my $lsmb = LedgerSMB->new();
+    $lsmb->merge($form);
+    my $draft = LedgerSMB::DBObject::Draft->new({base => $lsmb});
+    $draft->delete();
+    delete $form->{id};
+    delete $form->{reference};
+    add();
+}
+
+
 sub check_balanced {
     my ($form) = @_;
     # add up debits and credits

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


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-commits mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-commits