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

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



Revision: 5083
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=5083&view=rev
Author:   einhverfr
Date:     2012-08-02 11:05:18 +0000 (Thu, 02 Aug 2012)
Log Message:
-----------
Merging from branches/1.3

Modified Paths:
--------------
    trunk/Changelog
    trunk/LedgerSMB/Scripts/contact.pm
    trunk/LedgerSMB/Scripts/recon.pm
    trunk/UI/Contact/divs/credit.html
    trunk/sql/Pg-database.sql
    trunk/sql/modules/Company.sql

Property Changed:
----------------
    trunk/
    trunk/LedgerSMB/Scripts/recon.pm


Property changes on: trunk
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3:3711-5065
   + /branches/1.3:3711-5082

Modified: trunk/Changelog
===================================================================
--- trunk/Changelog	2012-08-02 10:57:08 UTC (rev 5082)
+++ trunk/Changelog	2012-08-02 11:05:18 UTC (rev 5083)
@@ -77,6 +77,14 @@
 Initial Release:  Monday, Oct 12 2011
 Supported Presently
 
+Changelog for 1.3.22
+* Fixed error when trying to save multiple make/models for a part (Chris T)
+* Better error handling when date is entered into statement balance (Chris T)
+* Added pricegroup selection back to entity credit account (Chris T, 3550056)
+* Fix for slow performance with Form->all_years (Chris T, h/t Neil S)
+
+Niel S is Neil Smith
+
 Changelog for 1.3.21
 * Added a default numberformat in Form.pm (Chris T)
 * Added a container div for theming saved and/or posted docs (Chris T)
@@ -93,7 +101,7 @@
 * Fixed internal server errors with date parsing (Chris T, 3546698)
 * Fixed "Directory Transversal Not Allowed w/fs_cssdir (Chris T, h/t Robert C)
 * Fixed customer/vendor cleared on ship/receive update (Chris T, 3548104)
-* Fixed insufficient permissions check in System/Defaults (Chris T)
+* SECURITY FIX for System/Defaults denial of service advisory (Chris T)
 * Added missing ap_transaction_all role (Chris T, h/t Erik H)
 * Fixed internal server error setting up user in setup.pl (Chris T)
 * Performance fix for templates and format detection (Chris T)

Modified: trunk/LedgerSMB/Scripts/contact.pm
===================================================================
--- trunk/LedgerSMB/Scripts/contact.pm	2012-08-02 10:57:08 UTC (rev 5082)
+++ trunk/LedgerSMB/Scripts/contact.pm	2012-08-02 11:05:18 UTC (rev 5083)
@@ -130,6 +130,9 @@
     # DIVS contents
     my $entity_id = $company->{entity_id};
     $entity_id ||= $person->{entity_id};
+    my @pricegroups = $company->call_procedure(
+        procname => 'pricegroups__list'
+    );
     my @credit_list = 
        LedgerSMB::Entity::Credit_Account->list_for_entity(
                           $entity_id,
@@ -262,6 +265,7 @@
              country_list => ..hidden..,
                credit_act => $credit_act,
               credit_list => ..hidden..,
+              pricegroups => ..hidden..,
            entity_classes => ..hidden..,
                 locations => ..hidden..,
                  contacts => ..hidden..,

Modified: trunk/LedgerSMB/Scripts/recon.pm
===================================================================
--- trunk/LedgerSMB/Scripts/recon.pm	2012-08-02 10:57:08 UTC (rev 5082)
+++ trunk/LedgerSMB/Scripts/recon.pm	2012-08-02 11:05:18 UTC (rev 5083)
@@ -21,6 +21,7 @@
 use LedgerSMB::Template;
 use LedgerSMB::DBObject::Reconciliation;
 use LedgerSMB::Setting;
+use Try::Tiny;
 
 use Data::Dumper;
 use strict;
@@ -404,7 +405,11 @@
 =cut
 sub new_report {
     my ($request) = @_;
-
+    if ($request->{total} && $request->{total} =~ m|[/-]|){
+        $request->error($request->{_locale}->text(
+           'Invalid statement balance.  Hint: Try entering a number'
+        ));
+    }
     $request->{total} = $request->parse_amount(amount => $request->{total});
     my $template;
     my $return;


Property changes on: trunk/LedgerSMB/Scripts/recon.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/recon.pm:3711-4945
/branches/1.3/scripts/recon.pl:4194-4271,4273-4287,4393-4438
   + /branches/1.3/LedgerSMB/Scripts/recon.pm:3711-4945
/branches/1.3/scripts/recon.pl:4194-4271,4273-4287,4393-4438,5079-5082

Modified: trunk/UI/Contact/divs/credit.html
===================================================================
--- trunk/UI/Contact/divs/credit.html	2012-08-02 10:57:08 UTC (rev 5082)
+++ trunk/UI/Contact/divs/credit.html	2012-08-02 11:05:18 UTC (rev 5083)
@@ -203,7 +203,16 @@
 			size = "20"
 			label = text('Threshold')
 			class = "numeric"
-               } ?>
+               } ?></td>
+          <td><?lsmb pricegroups.unshift({});
+                INCLUDE select element_data = {
+                     default_values = [credit_act.pricegroup_id],
+                               name = 'pricegroup_id'
+                            options = pricegroups
+                              label = text('Pricegroup')
+                         value_attr = 'id'
+                          text_attr = 'pricegroup'
+                } ?></td>
 	</tr>
 
 	<tr id="taxform-threshold-row">

Modified: trunk/sql/Pg-database.sql
===================================================================
--- trunk/sql/Pg-database.sql	2012-08-02 10:57:08 UTC (rev 5082)
+++ trunk/sql/Pg-database.sql	2012-08-02 11:05:18 UTC (rev 5083)
@@ -4773,4 +4773,7 @@
 $$ This view is used by cash basis reports to determine the fraction of a
 transaction to be counted.$$;
 
+-- helpful to keeping the selection of all years fast
+create index ac_transdate_year_idx on acc_trans(EXTRACT ('YEAR' FROM transdate));
+
 commit;

Modified: trunk/sql/modules/Company.sql
===================================================================
--- trunk/sql/modules/Company.sql	2012-08-02 10:57:08 UTC (rev 5082)
+++ trunk/sql/modules/Company.sql	2012-08-02 11:05:18 UTC (rev 5083)
@@ -770,6 +770,14 @@
  ) is
 $$ Saves a company.  Returns the id number of the record stored.$$;
 
+CREATE OR REPLACE FUNCTION pricegroup__list() RETURNS SETOF pricegroup AS
+$$
+SELECT * FROM pricegroup ORDER BY pricegroup;
+$$ LANGUAGE SQL;
+
+COMMENT ON FUNCTION pricegroup__list() IS 
+$$ Returns an alphabetically ordered pricegroup list.$$;
+ 
 DROP FUNCTION IF EXISTS entity_credit_save (
     in_credit_id int, in_entity_class int,
     in_entity_id int, in_description text,

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