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

SF.net SVN: ledger-smb:[5667] trunk/sql/upgrade/sl2.8-1.3.sql



Revision: 5667
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=5667&view=rev
Author:   einhverfr
Date:     2013-02-21 09:35:30 +0000 (Thu, 21 Feb 2013)
Log Message:
-----------
Merging this from 1.3, accidently committed there

Modified Paths:
--------------
    trunk/sql/upgrade/sl2.8-1.3.sql

Property Changed:
----------------
    trunk/sql/upgrade/sl2.8-1.3.sql

Modified: trunk/sql/upgrade/sl2.8-1.3.sql
===================================================================
--- trunk/sql/upgrade/sl2.8-1.3.sql	2013-02-21 08:32:00 UTC (rev 5666)
+++ trunk/sql/upgrade/sl2.8-1.3.sql	2013-02-21 09:35:30 UTC (rev 5667)
@@ -19,6 +19,9 @@
 
 
 --Accounts
+
+insert into account_link_description values ('CT_tax', false, false);
+
 INSERT INTO account_heading(id, accno, description)
 SELECT id, accno, description
   FROM sl28.chart WHERE charttype = 'H';
@@ -28,6 +31,9 @@
                     string_to_array(link,':'))
   FROM sl28.chart 
  WHERE charttype = 'A';
+
+delete from account_link where description = 'CT_tax';
+
 --Entity
 
 INSERT INTO entity (name, control_code, entity_class, country_id)
@@ -164,7 +170,7 @@
     min(location_save(NULL,
 
     case 
-        when oa.address1 = '' then 'Null' 
+        when oa.address1 !~ '[[:alnum:]_]' then 'Null'
         when oa.address1 is null then 'Null'
         else oa.address1 
     end,
@@ -208,7 +214,7 @@
     min(location_save(NULL,
 
     case 
-        when oa.shiptoaddress1 = '' then 'Null' 
+        when oa.shiptoaddress1 !~ '[[:alnum:]_]' then 'Null'
         when oa.shiptoaddress1 is null then 'Null'
         else oa.shiptoaddress1 
     end,
@@ -383,10 +389,10 @@
 
 INSERT INTO invoice (id, trans_id, parts_id, description, qty, allocated,
             sellprice, fxsellprice, discount, assemblyitem, unit, project_id,
-            deliverydate, serialnumber, notes)
+            deliverydate, serialnumber)
     SELECT  id, trans_id, parts_id, description, qty, allocated,
             sellprice, fxsellprice, discount, assemblyitem, unit, project_id,
-            deliverydate, serialnumber, notes
+            deliverydate, serialnumber
        FROM sl28.invoice;
 
 INSERT INTO partstax (parts_id, chart_id)
@@ -452,9 +458,9 @@
        FROM sl28.project p
        JOIN sl28.customer c ON p.customer_id = c.id;
 
-INSERT INTO partsgroup SELECT * FROM sl28.partsgroup;
+INSERT INTO partsgroup (id, partsgroup) SELECT id, partsgroup FROM sl28.partsgroup;
 
-INSERT INTO status SELECT * FROM sl28.status;
+INSERT INTO status SELECT * FROM sl28.status; -- may need to comment this one out sometimes
 
 INSERT INTO department SELECT * FROM sl28.department;
 


Property changes on: trunk/sql/upgrade/sl2.8-1.3.sql
___________________________________________________________________
Added: svn:mergeinfo
   + /branches/1.3/sql/upgrade/sl2.8-1.3.sql:3711-5420,5549,5551-5552,5557,5666

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