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

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



Revision: 4699
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4699&view=rev
Author:   einhverfr
Date:     2012-05-07 02:47:09 +0000 (Mon, 07 May 2012)
Log Message:
-----------
Merging from branches/1.3

Modified Paths:
--------------
    trunk/Changelog
    trunk/LedgerSMB/Form.pm
    trunk/LedgerSMB/Taxes/Simple.pm
    trunk/bin/arap.pl
    trunk/doc/manual/LedgerSMB-manual.tex
    trunk/doc/release_notes

Property Changed:
----------------
    trunk/
    trunk/LedgerSMB/Scripts/account.pm
    trunk/LedgerSMB/Scripts/admin.pm
    trunk/LedgerSMB/Scripts/customer.pm
    trunk/LedgerSMB/Scripts/employee.pm
    trunk/LedgerSMB/Scripts/file.pm
    trunk/LedgerSMB/Scripts/journal.pm
    trunk/LedgerSMB/Scripts/login.pm
    trunk/LedgerSMB/Scripts/menu.pm
    trunk/LedgerSMB/Scripts/payment.pm
    trunk/LedgerSMB/Scripts/recon.pm
    trunk/LedgerSMB/Scripts/setup.pm
    trunk/LedgerSMB/Scripts/taxform.pm
    trunk/LedgerSMB/Scripts/vendor.pm
    trunk/sql/upgrade/1.2-1.3-manual.sql


Property changes on: trunk
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3:3711-4693
   + /branches/1.3:3711-4698

Modified: trunk/Changelog
===================================================================
--- trunk/Changelog	2012-05-07 02:28:13 UTC (rev 4698)
+++ trunk/Changelog	2012-05-07 02:47:09 UTC (rev 4699)
@@ -49,6 +49,10 @@
 Initial Release:  Monday, Oct 12 2011
 Supported Presently
 
+Changelog for 1.3.17
+* Address now shows on ECA selection screen (Erik H)
+* Taxes::Simple now respects min/max values based on subtotal (Chris T)
+
 Changelog for 1.3.16
 
 * Changes in <head> element for non-Latin characters, HTML invoices (Erik H)

Modified: trunk/LedgerSMB/Form.pm
===================================================================
--- trunk/LedgerSMB/Form.pm	2012-05-07 02:28:13 UTC (rev 4698)
+++ trunk/LedgerSMB/Form.pm	2012-05-07 02:47:09 UTC (rev 4699)
@@ -1760,9 +1760,16 @@
 
     # Vendor and Customer are now views into entity_credit_account.
     my $query = qq/
-		SELECT c.*, e.name, e.control_code, ctf.default_reportable
+		SELECT c.*, ecl.*, e.name, e.control_code, ctf.default_reportable
                   FROM entity_credit_account c
 		  JOIN entity e ON (c.entity_id = e.id)
+             LEFT JOIN (SELECT coalesce(line_one, '')
+                               || ' ' || coalesce(line_two, '') as address,
+                               l.city, etl.credit_id
+                          FROM eca_to_location etl
+                          JOIN location l ON etl.location_id = l.id
+                          WHERE etl.location_class = 2) ecl
+                        ON (c.id = ecl.credit_id)
              LEFT JOIN country_tax_form ctf ON (c.taxform_id = ctf.id)
 		 WHERE (lower(e.name) LIKE ?
 		       OR c.meta_number ILIKE ?)


Property changes on: trunk/LedgerSMB/Scripts/account.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/account.pm:4369-4693
/branches/1.3/scripts/account.pl:3711-4368
   + /branches/1.3/LedgerSMB/Scripts/account.pm:4369-4698
/branches/1.3/scripts/account.pl:3711-4368


Property changes on: trunk/LedgerSMB/Scripts/admin.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/admin.pm:3901-4693
/branches/1.3/scripts/admin.pl:3711-4678
   + /branches/1.3/LedgerSMB/Scripts/admin.pm:3901-4698
/branches/1.3/scripts/admin.pl:3711-4678


Property changes on: trunk/LedgerSMB/Scripts/customer.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/customer.pm:4288-4693
/branches/1.3/scripts/customer.pl:4273-4287
   + /branches/1.3/LedgerSMB/Scripts/customer.pm:4288-4698
/branches/1.3/scripts/customer.pl:4273-4287


Property changes on: trunk/LedgerSMB/Scripts/employee.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/employee.pm:3712-4693
/branches/1.3/scripts/employee.pl:3842-3843,4273-4287,4289-4310
   + /branches/1.3/LedgerSMB/Scripts/employee.pm:3712-4698
/branches/1.3/scripts/employee.pl:3842-3843,4273-4287,4289-4310


Property changes on: trunk/LedgerSMB/Scripts/file.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/file.pm:3711-4693
/branches/1.3/scripts/file.pl:3711-4138
   + /branches/1.3/LedgerSMB/Scripts/file.pm:3711-4698
/branches/1.3/scripts/file.pl:3711-4138


Property changes on: trunk/LedgerSMB/Scripts/journal.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/journal.pm:4288-4693
/branches/1.3/scripts/journal.pl:3711-4328
   + /branches/1.3/LedgerSMB/Scripts/journal.pm:4288-4698
/branches/1.3/scripts/journal.pl:3711-4328


Property changes on: trunk/LedgerSMB/Scripts/login.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/login.pm:4193-4693
/branches/1.3/scripts/login.pl:3711-4192
   + /branches/1.3/LedgerSMB/Scripts/login.pm:4193-4698
/branches/1.3/scripts/login.pl:3711-4192


Property changes on: trunk/LedgerSMB/Scripts/menu.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/menu.pm:4155-4693
/branches/1.3/scripts/menu.pl:3711-4192,4273-4287
   + /branches/1.3/LedgerSMB/Scripts/menu.pm:4155-4698
/branches/1.3/scripts/menu.pl:3711-4192,4273-4287


Property changes on: trunk/LedgerSMB/Scripts/payment.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/payment.pm:4010-4693
/branches/1.3/scripts/payment.pl:3711-4680
   + /branches/1.3/LedgerSMB/Scripts/payment.pm:4010-4698
/branches/1.3/scripts/payment.pl:3711-4680


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


Property changes on: trunk/LedgerSMB/Scripts/setup.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/setup.pm:3937-4693
/branches/1.3/scripts/setup.pl:3711-4550
   + /branches/1.3/LedgerSMB/Scripts/setup.pm:3937-4698
/branches/1.3/scripts/setup.pl:3711-4550


Property changes on: trunk/LedgerSMB/Scripts/taxform.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/taxform.pm:4193-4693
/branches/1.3/scripts/taxform.pl:3711-4192,4273-4287
   + /branches/1.3/LedgerSMB/Scripts/taxform.pm:4193-4698
/branches/1.3/scripts/taxform.pl:3711-4192,4273-4287


Property changes on: trunk/LedgerSMB/Scripts/vendor.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/vendor.pm:4288-4693
/branches/1.3/scripts/vendor.pl:4273-4287
   + /branches/1.3/LedgerSMB/Scripts/vendor.pm:4288-4698
/branches/1.3/scripts/vendor.pl:4273-4287

Modified: trunk/LedgerSMB/Taxes/Simple.pm
===================================================================
--- trunk/LedgerSMB/Taxes/Simple.pm	2012-05-07 02:28:13 UTC (rev 4698)
+++ trunk/LedgerSMB/Taxes/Simple.pm	2012-05-07 02:47:09 UTC (rev 4699)
@@ -44,6 +44,12 @@
 sub calculate_tax {
     my ( $self, $form, $subtotal, $extract, $passrate ) = @_;
     my $rate = $self->rate;
+    if ($form->{subtotal} && (abs($form->{subtotal}) < $self->minvalue 
+                            || ($self->maxvalue && 
+                               abs($form->{subtotal}) > $self->maxvalue))
+    ){
+         return 0;
+    }
     my $tax = $subtotal * $rate / ( Math::BigFloat->bone() + $passrate );
     $tax = $subtotal * $rate if not $extract;
     return $tax;

Modified: trunk/bin/arap.pl
===================================================================
--- trunk/bin/arap.pl	2012-05-07 02:28:13 UTC (rev 4698)
+++ trunk/bin/arap.pl	2012-05-07 02:47:09 UTC (rev 4699)
@@ -156,7 +156,7 @@
 sub select_name {
     my ($table) = @_;
 
-    @column_index = qw(ndx name control_code meta_number);
+    @column_index = qw(ndx name control_code meta_number address city);
 
     $label = ucfirst $table;
     %column_data = (ndx => qq|<th>&nbsp;</th>|,
@@ -165,7 +165,11 @@
            control_code => qq|<th class=listheading>| .
                                $locale->text('Control Code') . qq|</th>|,
             meta_number => qq|<th class=listheading>| .
-                               $locale->text('[_1] Number', $label) . qq|</th>|
+                               $locale->text('[_1] Number', $label) . qq|</th>|,
+            address => qq|<th class=listheading>| .
+                               $locale->text('Address') . '</th>',
+            city => qq|<th class=listheading>| .
+	                       $locale->text('City') . '</th>',
     );
     
 
@@ -195,13 +199,13 @@
 	</tr>
 |;
 
-    @column_index = qw(ndx name control_code meta_number);
-
     my $i = 0;
     foreach $ref ( @{ $form->{name_list} } ) {
         $checked = ( $i++ ) ? "" : "checked";
 
-        $ref->{name} = $form->quote( $ref->{name} );
+        foreach (qw(name address city state zipcode country)) {
+        	$ref->{$_} = $form->quote( $ref->{$_} );
+	}
 
         $column_data{ndx} =
 qq|<td><input name=ndx class=radio type=radio value=$i $checked></td>|;
@@ -211,8 +215,7 @@
 qq|<td><input name="new_control_code_$i" type=hidden value="$ref->{control_code}">$ref->{control_code}</td>|;
         $column_data{meta_number} =
 qq|<td><input name="new_meta_number_$i" type=hidden value="$ref->{meta_number}">$ref->{meta_number}</td>|;
-        $column_data{address} = qq|<td>$ref->{address1} $ref->{address2}</td>|;
-        $column_data{address} = qq|<td>$ref->{address1} $ref->{address2}</td>|;
+        $column_data{address} = qq|<td>$ref->{address}</td>|;
         for (qw(city state zipcode country)) {
             $column_data{$_} = qq|<td>$ref->{$_}&nbsp;</td>|;
         }

Modified: trunk/doc/manual/LedgerSMB-manual.tex
===================================================================
--- trunk/doc/manual/LedgerSMB-manual.tex	2012-05-07 02:28:13 UTC (rev 4698)
+++ trunk/doc/manual/LedgerSMB-manual.tex	2012-05-07 02:47:09 UTC (rev 4699)
@@ -1102,8 +1102,7 @@
 any rules with lower entries in this box.  This allows for compounding of sales tax (for example, when PST applies to the total and GST as well).
 
 As in 1.3.16, new API's have been added to allow one to pass info to tax modules
-as to minimum and maximum taxable values.  These values are not currently used
-by the simple tax module, but this behavior may change in the future.
+as to minimum and maximum taxable values.  These values are used by the Simple tax module as applying to the subtotal of the invoice.
 
 \subsubsection{Adding A Sales Tax Account}
 

Modified: trunk/doc/release_notes
===================================================================
--- trunk/doc/release_notes	2012-05-07 02:28:13 UTC (rev 4698)
+++ trunk/doc/release_notes	2012-05-07 02:47:09 UTC (rev 4699)
@@ -116,8 +116,8 @@
 As of LedgerSMB 1.3.16, a few changes were made to the Sales Tax API so that it 
 is easier to implement local tax rules.  This includes a minimum tax value, 
 exposed through  the user interface, and a maximum value which is not yet
-exposed.  The handling of these are module-specific and they are ignored by the
-Simple tax module included.
+exposed.  The handling of these are module-specific.  The Simple tax module 
+treats these as operating on the subtotal of the invoice.
 
 3:  Known Issues
 


Property changes on: trunk/sql/upgrade/1.2-1.3-manual.sql
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/sql/upgrade/1.2-1.3-manual.sql:3712-4693
/branches/1.3/sql/upgrade/1.2-1.3.sql:3711-3851
/trunk/sql/upgrade/1.2-1.3.sql:858-3710
   + /branches/1.3/sql/upgrade/1.2-1.3-manual.sql:3712-4698
/branches/1.3/sql/upgrade/1.2-1.3.sql:3711-3851
/trunk/sql/upgrade/1.2-1.3.sql:858-3710

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