[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[6534] trunk/sql/upgrade/sl2.8-1.3.sql
- Subject: SF.net SVN: ledger-smb:[6534] trunk/sql/upgrade/sl2.8-1.3.sql
- From: ..hidden..
- Date: Sat, 18 Jan 2014 23:41:33 +0000
Revision: 6534
http://sourceforge.net/p/ledger-smb/code/6534
Author: ehuelsmann
Date: 2014-01-18 23:41:30 +0000 (Sat, 18 Jan 2014)
Log Message:
-----------
Import projects and departments on sl28 import.
Modified Paths:
--------------
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 2014-01-18 23:23:20 UTC (rev 6533)
+++ trunk/sql/upgrade/sl2.8-1.3.sql 2014-01-18 23:41:30 UTC (rev 6534)
@@ -480,8 +480,6 @@
WHERE project_id > 0;
-
--- ### project_id deleted (need to stick into business units?)
INSERT INTO invoice (id, trans_id, parts_id, description, qty, allocated,
sellprice, fxsellprice, discount, assemblyitem, unit,
deliverydate, serialnumber)
@@ -490,6 +488,21 @@
deliverydate, serialnumber
FROM sl28.invoice;
+INSERT INTO business_unit_inv (entry_id, class_id, bu_id)
+SELECT inv.id, 1, gl.department_id
+ FROM invoice inv
+ JOIN (SELECT id, department_id FROM sl28.ar UNION ALL
+ SELECT id, department_id FROM sl28.ap UNION ALL
+ SELECT id, department_id FROM sl28.gl) gl ON gl.id = inv.trans_id
+ WHERE department_id > 0;
+
+INSERT INTO business_unit_inv (entry_id, class_id, bu_id)
+SELECT id, 2, project_id + 1000 FROM sl28.invoice
+ WHERE project_id > 0 and project_id in (select id from sl28.project);
+
+
+
+
INSERT INTO partstax (parts_id, chart_id)
SELECT parts_id, a.id
FROM sl28.partstax pt
@@ -618,13 +631,12 @@
INSERT INTO recurringprint SELECT * FROM sl28.recurringprint;
--- ### TODO: removed 'project_id'??
INSERT INTO jcitems(id, parts_id, description, qty, allocated,
sellprice, fxsellprice, serialnumber, checkedin, checkedout,
- person_id, notes)
+ person_id, notes, business_unit_id)
SELECT j.id, parts_id, description, qty, allocated,
sellprice, fxsellprice, serialnumber, checkedin, checkedout,
- p.id, j.notes
+ p.id, j.notes, j.project_id+1000
FROM sl28.jcitems j
JOIN sl28.employee e ON j.employee_id = e.id
JOIN person p ON e.entity_id = p.entity_id;
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