[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[6535] trunk/sql/upgrade/sl2.8-1.3.sql
- Subject: SF.net SVN: ledger-smb:[6535] trunk/sql/upgrade/sl2.8-1.3.sql
- From: ..hidden..
- Date: Sat, 18 Jan 2014 23:46:59 +0000
Revision: 6535
http://sourceforge.net/p/ledger-smb/code/6535
Author: ehuelsmann
Date: 2014-01-18 23:46:58 +0000 (Sat, 18 Jan 2014)
Log Message:
-----------
Import orderitem 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:41:30 UTC (rev 6534)
+++ trunk/sql/upgrade/sl2.8-1.3.sql 2014-01-18 23:46:58 UTC (rev 6535)
@@ -533,7 +533,6 @@
-- JOIN sl28.chart ON chart.id = pt.chart_id
-- JOIN account a ON chart.accno = a.accno;
--- ### TODO: deleted department_id here. to be moved to business units.
INSERT
INTO oe(id, ordnumber, transdate, amount, netamount, reqdate, taxincluded,
shippingpoint, notes, curr, person_id, closed, quotation, quonumber,
@@ -555,13 +554,22 @@
LEFT JOIN sl28.employee e ON oe.employee_id = e.id
LEFT JOIN person p ON e.entity_id = p.id;
--- ### TODO Deleted project_id here, to be moved to business units!
INSERT INTO orderitems(id, trans_id, parts_id, description, qty, sellprice,
discount, unit, reqdate, ship, serialnumber)
SELECT id, trans_id, parts_id, description, qty, sellprice,
discount, unit, reqdate, ship, serialnumber
FROM sl28.orderitems;
+INSERT INTO business_unit_oitem (entry_id, class_id, bu_id)
+SELECT oi.id, 1, oe.department_id
+ FROM orderitems oi
+ JOIN sl28.oe ON oi.trans_id = oe.id AND department_id > 0;
+
+INSERT INTO business_unit_oitem (entry_id, class_id, bu_id)
+SELECT id, 2, project_id + 1000 FROM sl28.orderitems
+ WHERE project_id > 0 and project_id in (select id from sl28.project);
+
+
INSERT INTO exchangerate select * from sl28.exchangerate;
-- ### TODO: Move to business units!
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