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

SF.net SVN: ledger-smb:[5847] branches/1.3



Revision: 5847
          http://sourceforge.net/p/ledger-smb/code/5847
Author:   einhverfr
Date:     2013-05-20 14:41:27 +0000 (Mon, 20 May 2013)
Log Message:
-----------
Fixing taxincluded checkbox missing, bug 832

Modified Paths:
--------------
    branches/1.3/Changelog
    branches/1.3/UI/Contact/contact.html

Added Paths:
-----------
    branches/1.3/sql/upgrade/1.2-1.3-fix-taxincluded.sql

Modified: branches/1.3/Changelog
===================================================================
--- branches/1.3/Changelog	2013-05-20 14:16:11 UTC (rev 5846)
+++ branches/1.3/Changelog	2013-05-20 14:41:27 UTC (rev 5847)
@@ -15,6 +15,7 @@
 * Added secondary partnumber ordering to eca history report (Chris T)
 * Fixed default_reportable not respected for invoices (Chris T, 799)
 * Fixed dropdowns not affecting date range in tax reports (Chris T, 811)
+* Added missing taxincluded handling, added script to populate (Chris T, 832)
 
 Changelog for 1.3.32
 * Fixed em-dash handling for pdfs (Chris T)

Modified: branches/1.3/UI/Contact/contact.html
===================================================================
--- branches/1.3/UI/Contact/contact.html	2013-05-20 14:16:11 UTC (rev 5846)
+++ branches/1.3/UI/Contact/contact.html	2013-05-20 14:41:27 UTC (rev 5847)
@@ -635,14 +635,13 @@
         <div class="listtop"><?lsmb text('Taxes') ?></div>
         <?lsmb FOR tx = all_taxes ?> 
         <div class="inputrow" id="taxrow-<?lsmb tx.chart_id ?>">
-        <span class="lable" id="txlabel-<?lsmb tx.chart_id ?>">
-            <?lsmb tx.accno ?>--<?lsmb tx.description ?></span>
         <span class="input" id="txinput-<?lsmb tx.id ?>">
             <?lsmb checked = "";  
                    IF eca_tax.grep(tx.id).size == 1;
                        checked = "CHECKED";
                    END;
                    INCLUDE input element_data = {
+                           label = tx.accno _ '--' _  tx.description
                            type = "checkbox"
                            checked = checked
                            name = "taxact_$tx.id"
@@ -650,6 +649,23 @@
                    } ?><span></div>
         <?lsmb END # FOR tx ?>
          </div>
+        <div class="inputrow" id="taxincludedrow">
+            <?lsmb 
+
+               checked = '';
+               IF taxincluded;
+                   checked='CHECKED';
+               END;
+               INCLUDE input
+                           element_data = {
+                                 label =  text('Tax Included') #'
+                                  type = "checkbox"
+                               checked = checked
+                                  name = "taxincluded"
+                                 value = '1'
+                            } 
+            ?> 
+         </div>
 		<?lsmb IF credit_id;
 		INCLUDE button element_data = {
 			text = text('Save Changes'),

Added: branches/1.3/sql/upgrade/1.2-1.3-fix-taxincluded.sql
===================================================================
--- branches/1.3/sql/upgrade/1.2-1.3-fix-taxincluded.sql	                        (rev 0)
+++ branches/1.3/sql/upgrade/1.2-1.3-fix-taxincluded.sql	2013-05-20 14:41:27 UTC (rev 5847)
@@ -0,0 +1,13 @@
+BEGIN;
+
+CREATE TEMPORARY VIEW vc AS
+  SELECT credit_id, taxincluded FROM lsmb12.customer
+  UNION
+  SELECT credit_id, taxincluded FROM lsmb12.vendor;
+
+UPDATE entity_credit_account
+   SET taxincluded = (select taxincluded from vc 
+                       WHERE credit_id = entity_credit_account.id)
+ WHERE id IN (select credit_id from vc);
+
+COMMIT;

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