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

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



Revision: 6165
          http://sourceforge.net/p/ledger-smb/code/6165
Author:   einhverfr
Date:     2013-10-23 12:43:03 +0000 (Wed, 23 Oct 2013)
Log Message:
-----------
GL transactions now respect series

Modified Paths:
--------------
    trunk/LedgerSMB/GL.pm
    trunk/LedgerSMB/Scripts/configuration.pm
    trunk/UI/journal/journal_entry.html
    trunk/bin/gl.pl

Modified: trunk/LedgerSMB/GL.pm
===================================================================
--- trunk/LedgerSMB/GL.pm	2013-10-23 12:16:04 UTC (rev 6164)
+++ trunk/LedgerSMB/GL.pm	2013-10-23 12:43:03 UTC (rev 6165)
@@ -69,7 +69,7 @@
     my ( $self, $myconfig, $form, $locale) = @_;
     $form->all_business_units;
     $form->{reference} = $form->update_defaults( $myconfig, 'glnumber', $dbh )
-      unless $form->{reference};
+      if $form->should_update_defaults('glnumber');
     my $null;
     my $project_id;
     my $department_id;

Modified: trunk/LedgerSMB/Scripts/configuration.pm
===================================================================
--- trunk/LedgerSMB/Scripts/configuration.pm	2013-10-23 12:16:04 UTC (rev 6164)
+++ trunk/LedgerSMB/Scripts/configuration.pm	2013-10-23 12:43:03 UTC (rev 6165)
@@ -93,7 +93,6 @@
      { name => 'glnumber', label => $locale->text('GL Reference Number') },
      { name => 'sinumber', 
       label => $locale->text('Sales Invoice/AR Transaction Number'), },
-     { name => 'vclimit', label => $locale->text('Max per dropdown') },
      { name => 'sonumber', label => $locale->text('Sales Order Number') },
      { name => 'vinumber' , 
       label => $locale->text('Vendor Invoice/AP Transaction Number')},
@@ -111,6 +110,7 @@
          type => 'SELECT_ONE',
         label => $locale->text('Widgit Themes') },
        { name => 'check_prefix', label => $locale->text('Check Prefix') },
+     { name => 'vclimit', label => $locale->text('Max per dropdown') },
        { name => 'check_max_invoices',
         label =>  $locale->text('Max Invoices per Check Stub') },
        { name => 'decimal_places',

Modified: trunk/UI/journal/journal_entry.html
===================================================================
--- trunk/UI/journal/journal_entry.html	2013-10-23 12:16:04 UTC (rev 6164)
+++ trunk/UI/journal/journal_entry.html	2013-10-23 12:43:03 UTC (rev 6165)
@@ -25,8 +25,17 @@
 			size = "20",
 			class = 'reference'
 			id = "ref_1"
-		} ?>
-
+		};
+             IF form.sequences;
+                 form.sequences.unshift({});
+                 PROCESS select element_data = {
+                    name = 'setting_sequence'
+          default_values = [form.setting_sequence]
+                 options = form.sequences
+               text_attr = 'label'
+              value_attr = 'label'
+                 }; 
+             END; ?>
          </td>          
 	  <th align="right"><?lsmb text('Date') ?></th>
 	  <td>

Modified: trunk/bin/gl.pl
===================================================================
--- trunk/bin/gl.pl	2013-10-23 12:16:04 UTC (rev 6164)
+++ trunk/bin/gl.pl	2013-10-23 12:43:03 UTC (rev 6165)
@@ -49,6 +49,7 @@
 use LedgerSMB::GL;
 use LedgerSMB::PE;
 use LedgerSMB::Template;
+use LedgerSMB::Setting::Sequence;
 
 require 'bin/bridge.pl'; # needed for voucher dispatches
 require "bin/arap.pl";
@@ -164,7 +165,6 @@
       unless $form->{callback};
 
     &create_links;
-    $form->{reference} = $form->update_defaults(\%myconfig, 'glnumber');
     if (!$form->{rowcount}){
         $form->{rowcount} = ( $form->{transfer} ) ? 3 : 9;
     }
@@ -182,6 +182,8 @@
 {
     #Add General Ledger Transaction
     $form->all_business_units($form->{transdate}, undef, 'GL');
+    @{$form->{sequences}} = LedgerSMB::Setting::Sequence->list('glnumber')
+         unless $form->{id};
     $form->close_form;
     $form->open_form; 
     $form->{dbh}->commit;

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


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-commits mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-commits