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

SF.net SVN: ledger-smb:[6531] trunk/LedgerSMB/Scripts/setup.pm



Revision: 6531
          http://sourceforge.net/p/ledger-smb/code/6531
Author:   ehuelsmann
Date:     2014-01-18 21:56:39 +0000 (Sat, 18 Jan 2014)
Log Message:
-----------
If there's only one AR or AP account, don't make the user choose.
Presumably affects the majority of users.

Modified Paths:
--------------
    trunk/LedgerSMB/Scripts/setup.pm

Modified: trunk/LedgerSMB/Scripts/setup.pm
===================================================================
--- trunk/LedgerSMB/Scripts/setup.pm	2014-01-18 21:49:34 UTC (rev 6530)
+++ trunk/LedgerSMB/Scripts/setup.pm	2014-01-18 21:56:39 UTC (rev 6531)
@@ -483,12 +483,14 @@
 
     if (applicable_for_upgrade('default_ar', $upgrade_type)) {
 	@{$request->{ar_accounts}} = _get_linked_accounts($request, "AR");
-	unshift @{$request->{ar_accounts}}, {};
+	unshift @{$request->{ar_accounts}}, {}
+            unless scalar(@{$request->{ar_accounts}}) == 1;
     }
 
     if (applicable_for_upgrade('default_ap', $upgrade_type)) {
 	@{$request->{ap_accounts}} = _get_linked_accounts($request, "AP");
-	unshift @{$request->{ap_accounts}}, {};
+	unshift @{$request->{ap_accounts}}, {}
+            unless scalar(@{$request->{ap_accounts}}) == 1;
     }
 
     if (applicable_for_upgrade('default_country', $upgrade_type)) {

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