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

SF.net SVN: ledger-smb:[2793] addons/1.3/templatetrans/trunk/scripts/ transtemplate.pl



Revision: 2793
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=2793&view=rev
Author:   einhverfr
Date:     2009-11-11 17:03:24 +0000 (Wed, 11 Nov 2009)

Log Message:
-----------
Adding auto-generation to gl entry in template transactions

Modified Paths:
--------------
    addons/1.3/templatetrans/trunk/scripts/transtemplate.pl

Modified: addons/1.3/templatetrans/trunk/scripts/transtemplate.pl
===================================================================
--- addons/1.3/templatetrans/trunk/scripts/transtemplate.pl	2009-11-11 17:02:26 UTC (rev 2792)
+++ addons/1.3/templatetrans/trunk/scripts/transtemplate.pl	2009-11-11 17:03:24 UTC (rev 2793)
@@ -51,6 +51,9 @@
         $form->{reference} = $trans->{reference};
         $form->{description} = $trans->{description};
         $form->{rowcount} = 0;
+        if (!$form->{reference}){
+             $form->{reference} = $form->update_defaults(\%myconfig,'glnumber');
+        }
         for $row (@{$trans->{line_items}}){
             if ($row->{amount} < 0){
                 $form->{"debit_$form->{rowcount}"} = $row->{amount} * -1;


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