Reorganized

This commit is contained in:
Tanshu 2012-10-30 13:35:52 +05:30
parent 3f32344334
commit 56f2892c0f
7 changed files with 1 additions and 155 deletions

1
.gitignore vendored
View File

@ -1,4 +1,5 @@
*.pyc
env
.project
.pydevproject
*/__pycache__/

Binary file not shown.

View File

@ -1,34 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net"/>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="Converter.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</sectionGroup>
</configSections>
<log4net>
<appender name="RollingFile" type="log4net.Appender.RollingFileAppender">
<file value="Logs/converter.log"/>
<appendToFile value="false"/>
<maximumFileSize value="1000KB"/>
<maxSizeRollBackups value="4"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%5level %date (%file:%line) - %message%newline"/>
</layout>
</appender>
<root>
<level value="DEBUG"/>
<appender-ref ref="RollingFile"/>
</root>
</log4net>
<applicationSettings>
<Converter.Properties.Settings>
<setting name="SQLServerAddress" serializeAs="String">
<value />
</setting>
<setting name="DatabasePath" serializeAs="String">
<value />
</setting>
</Converter.Properties.Settings>
</applicationSettings>
</configuration>

Binary file not shown.

View File

@ -1,121 +0,0 @@
--update entities_ledgers set code = code + 60 where type = 13; -- to prevent duplicate code when converting
UPDATE entities_ledgers SET type = 11 WHERE type = 13;
DROP TABLE Entities_Taxes;
UPDATE entities_vouchers SET date = date || ".000000", lasteditdate = lasteditdate || ".000000", creationdate = creationdate || ".000000";
UPDATE entities_attendances SET date = date || ".000000", creationdate = creationdate || ".000000";
UPDATE entities_fingerprints SET date = date || ".000000";
ALTER TABLE "Entities_Batches" RENAME TO "Entities_Batches_old";
CREATE TABLE "Entities_Batches" ("BatchID" guid NOT NULL ,"Name" nvarchar(50) NOT NULL ,"ProductID" guid,"QuantityRemaining" numeric NOT NULL ,"Rate" numeric NOT NULL ,"Tax" numeric NOT NULL ,"Discount" numeric NOT NULL, PRIMARY KEY ([BatchID]));
INSERT INTO "Entities_Batches" SELECT "BatchID","Name","ProductID","QuantityRemaining","Rate","Tax","Discount" FROM "Entities_Batches_old";
DROP TABLE "Entities_Batches_old";
ALTER TABLE "Entities_Ledgers" RENAME TO "Entities_Ledgers_old";
CREATE TABLE "Entities_Ledgers" ("LedgerID" guid NOT NULL, "Code" integer NOT NULL, "Name" nvarchar(255) NOT NULL COLLATE NOCASE, "Type" integer NOT NULL, "ledger_type" nvarchar(50) NOT NULL, "IsActive" bit NOT NULL, "CostCenterID" guid,
PRIMARY KEY ([LedgerID]),
FOREIGN KEY ([CostCenterID]) REFERENCES [Entities_CostCenters]([CostCenterID])
);
INSERT INTO "Entities_Ledgers" SELECT "LedgerID", "Code", "Name", "Type", '', "IsActive", "CostCenterID" FROM "Entities_Ledgers_old";
UPDATE "Entities_Ledgers" SET ledger_type = 'employees' where type = 10;
DROP TABLE "Entities_Ledgers_old";
ALTER TABLE "Entities_Products" RENAME TO "Entities_Products_old";
CREATE TABLE [Entities_Products] (
"ProductID" guid NOT NULL,
"Code" integer NOT NULL,
"Name" nvarchar(150) NOT NULL COLLATE NOCASE,
"Units" nvarchar(50) NOT NULL COLLATE NOCASE,
"Fraction" numeric NOT NULL,
"FractionUnits" nvarchar(255) NOT NULL COLLATE NOCASE,
"Yeild" numeric NOT NULL,
"ShowForPurchase" bit NOT NULL,
"Price" numeric,
"Discontinued" bit NOT NULL,
"ProductGroupID" guid,
"LedgerID" guid,
PRIMARY KEY ([ProductID])
,
FOREIGN KEY ([LedgerID])
REFERENCES [Entities_Ledgers]([LedgerID]),
FOREIGN KEY ([ProductGroupID])
REFERENCES [Entities_ProductGroups]([ProductGroupID])
);
INSERT INTO "Entities_Products" SELECT "ProductID", "Code", "Name", "Units", "Fraction", "FractionUnits", "Yeild", "ShowForPurchase", "PurchasePrice", "Discontinued", "ProductGroupID", "PurchaseLedgerID" FROM "Entities_Products_old";
DROP TABLE "Entities_Products_old";
---------------------
Roles -- Run one line at a time, not all at once
-- Accounts
UPDATE Auth_Roles Set Name = 'Users' WHERE Name = 'CreateUser';
UPDATE Auth_Roles SET Name = 'Accounts' WHERE RoleID = X'F438262F72DD2F4E91865ABC3AF44FBA';
DELETE FROM Auth_RoleGroups WHERE RoleID IN (X'7117853BD6A1F44FAA7919195338C857', X'4DC8B2094C33114F9656D91F62999F6B', X'A5174D3F2D5B3B40AA1FD20D1BB292E5', X'457143A70A4E4C4CBB2DA65BF608624E');
DELETE FROM Auth_Roles WHERE RoleID IN (X'7117853BD6A1F44FAA7919195338C857', X'4DC8B2094C33114F9656D91F62999F6B', X'A5174D3F2D5B3B40AA1FD20D1BB292E5', X'457143A70A4E4C4CBB2DA65BF608624E');
-- Check for attendance
-- Backdated Vouchers
UPDATE Auth_Roles SET Name = 'Backdated Vouchers' WHERE RoleID = X'B67B20625CA7134F82585D284DD92426';
-- Check for Cash Flow
-- Closing Stock
UPDATE Auth_Roles SET Name = 'Closing Stock' WHERE RoleID = X'9751573224E4C94D9585D4BD7F6C7891';
-- Cost Centers
UPDATE Auth_Roles SET Name = 'Cost Centers' WHERE RoleID = X'6FCC1A206AECE840B3341632B34AEAB8';
DELETE FROM Auth_RoleGroups WHERE RoleID IN (X'652E18DBE591764C8F6FC92301BBE550', X'F106324728D8EA41AD3F3BC36A2D6AF8', X'98E29DA602182040B603FD5B2EB0D047', X'14B9761096BB394890898CD14C07EE2E');
DELETE FROM Auth_Roles WHERE RoleID IN (X'652E18DBE591764C8F6FC92301BBE550', X'F106324728D8EA41AD3F3BC36A2D6AF8', X'98E29DA602182040B603FD5B2EB0D047', X'14B9761096BB394890898CD14C07EE2E');
-- Daybook
UPDATE Auth_Roles SET Name = 'Daybook' WHERE RoleID = X'C3EDB554A0578942803037B8E926D583';
-- Edit Other User's Vouchers
UPDATE Auth_Roles SET Name = "Edit Other User's Vouchers" WHERE RoleID = X'A83288917CE2A9438C292EABC1FFEEA3';
-- Edit Posted Vouchers
UPDATE Auth_Roles SET Name = 'Edit Posted Vouchers' WHERE RoleID = X'D6675817DDF5BF409DE6FA223EB4AAA6';
-- Employees
DELETE FROM Auth_RoleGroups WHERE RoleID IN (X'70143ACE40D913488A120B199DD7F8AC', X'82D53E90D6840C45808BBD5A13C061C3', X'D2C5437D4E32DC4CA6AEAA621A581EFE', X'6C68900DFE11FC468E67F30E120D4418');
DELETE FROM Auth_Roles WHERE RoleID IN (X'70143ACE40D913488A120B199DD7F8AC', X'82D53E90D6840C45808BBD5A13C061C3', X'D2C5437D4E32DC4CA6AEAA621A581EFE', X'6C68900DFE11FC468E67F30E120D4418');
-- Fingerprints
UPDATE Auth_Roles SET Name = 'Fingerprints' WHERE RoleID = X'D9C45323F997BA4694078A7145F0828B';
-- Issue
DELETE FROM Auth_RoleGroups WHERE RoleID IN (X'3B1155DBF0440B44ADF34E36285F59FF', X'469E180D83B6E64DB8B399A9AEFB5E67', X'5E767672AFE51D4DBD3F5C57F498BE60', X'35849AACC5E87C428C287C2D134B3289');
DELETE FROM Auth_Roles WHERE RoleID IN (X'3B1155DBF0440B44ADF34E36285F59FF', X'469E180D83B6E64DB8B399A9AEFB5E67', X'5E767672AFE51D4DBD3F5C57F498BE60', X'35849AACC5E87C428C287C2D134B3289');
-- Journal
DELETE FROM Auth_RoleGroups WHERE RoleID IN (X'3497E69B62BA4A41941446DC05772A39', X'500AC902EDB4CA4E8323DB0B16D6BE8E', X'C75E6DBA274FC74182218361BC7F50E0', X'AF56518AC9BB63489E60A087CC8CECBE');
DELETE FROM Auth_Roles WHERE RoleID IN (X'3497E69B62BA4A41941446DC05772A39', X'500AC902EDB4CA4E8323DB0B16D6BE8E', X'C75E6DBA274FC74182218361BC7F50E0', X'AF56518AC9BB63489E60A087CC8CECBE');
-- Ledger
UPDATE Auth_Roles SET Name = 'Ledger' WHERE RoleID = X'A2120944243F3F49BE570AD633CE4801';
-- Payment
DELETE FROM Auth_RoleGroups WHERE RoleID IN (X'0517A2C862F8124BA916E00B70EF4523', X'BF4DC51A98CA8D4BA70CB376814FEF35', X'ED4CA3AFF0FC71458749F765DF6AC9BA', X'E66BD1AD2C60774EA6D1D113F4CB2EFE');
DELETE FROM Auth_Roles WHERE RoleID IN (X'0517A2C862F8124BA916E00B70EF4523', X'BF4DC51A98CA8D4BA70CB376814FEF35', X'ED4CA3AFF0FC71458749F765DF6AC9BA', X'E66BD1AD2C60774EA6D1D113F4CB2EFE');
-- Post Vouchers
UPDATE Auth_Roles SET Name = 'Post Vouchers' WHERE RoleID = X'36E741DA1A57B047A59EDCD58FCF4338';
-- Product Groups
UPDATE Auth_Roles SET Name = 'Product Groups' WHERE RoleID = X'08413A22CF88FD43B2B7365D2951D99F';
-- Product Ledger
UPDATE Auth_Roles SET Name = 'Product Ledger' WHERE RoleID = X'62612AF1F7ED3347A7483C0884B070F3';
-- Products
DELETE FROM Auth_RoleGroups WHERE RoleID IN (X'62612AF1F7ED3347A7483C0884B070F3', X'42930329038355469C0042FD15BDD280', X'0945BC32E25D244EB3204DFFAFEC945E');
DELETE FROM Auth_Roles WHERE RoleID IN (X'62612AF1F7ED3347A7483C0884B070F3', X'42930329038355469C0042FD15BDD280', X'0945BC32E25D244EB3204DFFAFEC945E');
-- Profit & Loss
UPDATE Auth_Roles SET Name = 'Profit & Loss' WHERE RoleID = X'0492EBB376F3204EAB94BBFE880F0691';
-- Purchase
DELETE FROM Auth_RoleGroups WHERE RoleID IN (X'73290D72B106F04B86696A3EA4E3DE4A', X'FEC8D32F048ED241AE781BCCE84B00FC', X'E18D34283E474F499205315C283A9E4F');
DELETE FROM Auth_Roles WHERE RoleID IN (X'73290D72B106F04B86696A3EA4E3DE4A', X'FEC8D32F048ED241AE781BCCE84B00FC', X'E18D34283E474F499205315C283A9E4F');
-- Purchase Entries
UPDATE Auth_Roles SET Name = 'Purchase Entries' WHERE RoleID = X'78A6422BAA11174C9DFA412A99E87E02';
-- Purchase Return
UPDATE Auth_Roles SET Name = 'Purchase Return' WHERE RoleID = X'AB33196ED9E4114CAC8C997954363756';
DELETE FROM Auth_RoleGroups WHERE RoleID IN (X'FC33E7F759745547A9FD7C411A896695', X'A35451B7502F8B4E9808F739225BEA93', X'9C4A3C81E60CAA4199D0C9571FA25512', X'F522EB8B20745648887DC63A54F683B3');
DELETE FROM Auth_Roles WHERE RoleID IN (X'FC33E7F759745547A9FD7C411A896695', X'A35451B7502F8B4E9808F739225BEA93', X'9C4A3C81E60CAA4199D0C9571FA25512', X'F522EB8B20745648887DC63A54F683B3');
-- Raw Material Cost
UPDATE Auth_Roles SET Name = 'Raw Material Cost' WHERE RoleID = X'D462842BBAF1234395E5FFDBA9BBC163';
-- Receipt
DELETE FROM Auth_RoleGroups WHERE RoleID IN (X'9E02EEC8D498F844AB83EF2017BEE919', X'0385EC9182A5FD42B9BBD2BD8201C566', X'AFB0C2EF72657B49A0A7431A08347779', X'92D70E801C32384D959EABF84B804696');
DELETE FROM Auth_Roles WHERE RoleID IN (X'9E02EEC8D498F844AB83EF2017BEE919', X'0385EC9182A5FD42B9BBD2BD8201C566', X'AFB0C2EF72657B49A0A7431A08347779', X'92D70E801C32384D959EABF84B804696');
-- Trial Balance
UPDATE Auth_Roles SET Name = 'Trial Balance' WHERE RoleID = X'3B099FECDDC54243B30EAFB78D9CA14A';
-- Users
UPDATE Auth_Roles SET Name = 'Users' WHERE RoleID = X'C5B7D9D7F1780E458EA4BF4E08EC901B'
-- Product Ledger
UPDATE Auth_Roles SET Name = 'Product Ledger' WHERE RoleID = X'018A2408E804144690C5B015829DA6BA'
-- Cleanup
DELETE FROM Auth_RoleGroups WHERE RoleID IN (X'CFAD44F0F2A9704589D79019CF0F371A');
DELETE FROM Auth_Roles WHERE RoleID IN (X'CFAD44F0F2A9704589D79019CF0F371A');

Binary file not shown.

Binary file not shown.