removing files from import mistake
authorivan <ivan>
Tue, 16 Nov 2004 22:13:05 +0000 (22:13 +0000)
committerivan <ivan>
Tue, 16 Nov 2004 22:13:05 +0000 (22:13 +0000)
845 files changed:
sql-ledger/old/sql-ledger/SL/AM.pm [deleted file]
sql-ledger/old/sql-ledger/SL/AP.pm [deleted file]
sql-ledger/old/sql-ledger/SL/AR.pm [deleted file]
sql-ledger/old/sql-ledger/SL/CA.pm [deleted file]
sql-ledger/old/sql-ledger/SL/CP.pm [deleted file]
sql-ledger/old/sql-ledger/SL/CT.pm [deleted file]
sql-ledger/old/sql-ledger/SL/Form.pm [deleted file]
sql-ledger/old/sql-ledger/SL/GL.pm [deleted file]
sql-ledger/old/sql-ledger/SL/IC.pm [deleted file]
sql-ledger/old/sql-ledger/SL/IR.pm [deleted file]
sql-ledger/old/sql-ledger/SL/IS.pm [deleted file]
sql-ledger/old/sql-ledger/SL/Inifile.pm [deleted file]
sql-ledger/old/sql-ledger/SL/Mailer.pm [deleted file]
sql-ledger/old/sql-ledger/SL/Menu.pm [deleted file]
sql-ledger/old/sql-ledger/SL/Num2text.pm [deleted file]
sql-ledger/old/sql-ledger/SL/OE.pm [deleted file]
sql-ledger/old/sql-ledger/SL/PE.pm [deleted file]
sql-ledger/old/sql-ledger/SL/RC.pm [deleted file]
sql-ledger/old/sql-ledger/SL/RP.pm [deleted file]
sql-ledger/old/sql-ledger/SL/User.pm [deleted file]
sql-ledger/old/sql-ledger/VERSION [deleted file]
sql-ledger/old/sql-ledger/am.pl [deleted file]
sql-ledger/old/sql-ledger/bin/lynx/menu.pl [deleted file]
sql-ledger/old/sql-ledger/bin/mozilla/admin.pl [deleted file]
sql-ledger/old/sql-ledger/bin/mozilla/am.pl [deleted file]
sql-ledger/old/sql-ledger/bin/mozilla/ap.pl [deleted file]
sql-ledger/old/sql-ledger/bin/mozilla/ar.pl [deleted file]
sql-ledger/old/sql-ledger/bin/mozilla/arap.pl [deleted file]
sql-ledger/old/sql-ledger/bin/mozilla/ca.pl [deleted file]
sql-ledger/old/sql-ledger/bin/mozilla/cp.pl [deleted file]
sql-ledger/old/sql-ledger/bin/mozilla/ct.pl [deleted file]
sql-ledger/old/sql-ledger/bin/mozilla/gl.pl [deleted file]
sql-ledger/old/sql-ledger/bin/mozilla/ic.pl [deleted file]
sql-ledger/old/sql-ledger/bin/mozilla/io.pl [deleted file]
sql-ledger/old/sql-ledger/bin/mozilla/ir.pl [deleted file]
sql-ledger/old/sql-ledger/bin/mozilla/is.pl [deleted file]
sql-ledger/old/sql-ledger/bin/mozilla/login.pl [deleted file]
sql-ledger/old/sql-ledger/bin/mozilla/menu.pl [deleted file]
sql-ledger/old/sql-ledger/bin/mozilla/oe.pl [deleted file]
sql-ledger/old/sql-ledger/bin/mozilla/pe.pl [deleted file]
sql-ledger/old/sql-ledger/bin/mozilla/rc.pl [deleted file]
sql-ledger/old/sql-ledger/bin/mozilla/rp.pl [deleted file]
sql-ledger/old/sql-ledger/css/sql-ledger.css [deleted file]
sql-ledger/old/sql-ledger/doc/COPYING [deleted file]
sql-ledger/old/sql-ledger/doc/README [deleted file]
sql-ledger/old/sql-ledger/doc/UPGRADE-1.6-1.8 [deleted file]
sql-ledger/old/sql-ledger/doc/UPGRADE-1.8-1.8.3 [deleted file]
sql-ledger/old/sql-ledger/doc/UPGRADE-1.8.3-1.8.4 [deleted file]
sql-ledger/old/sql-ledger/doc/UPGRADE-1.8.4-1.8.5 [deleted file]
sql-ledger/old/sql-ledger/doc/UPGRADE-1.8.5-1.8.7 [deleted file]
sql-ledger/old/sql-ledger/doc/UPGRADE-1.8.7-2.0.0 [deleted file]
sql-ledger/old/sql-ledger/doc/UPGRADE-2.0-2.0.8 [deleted file]
sql-ledger/old/sql-ledger/doc/copyright [deleted file]
sql-ledger/old/sql-ledger/doc/faq.html [deleted file]
sql-ledger/old/sql-ledger/favicon.ico [deleted file]
sql-ledger/old/sql-ledger/locale/br/COPYING [deleted file]
sql-ledger/old/sql-ledger/locale/br/LANGUAGE [deleted file]
sql-ledger/old/sql-ledger/locale/br/admin [deleted file]
sql-ledger/old/sql-ledger/locale/br/all [deleted file]
sql-ledger/old/sql-ledger/locale/br/am [deleted file]
sql-ledger/old/sql-ledger/locale/br/ap [deleted file]
sql-ledger/old/sql-ledger/locale/br/ar [deleted file]
sql-ledger/old/sql-ledger/locale/br/arap [deleted file]
sql-ledger/old/sql-ledger/locale/br/ca [deleted file]
sql-ledger/old/sql-ledger/locale/br/cp [deleted file]
sql-ledger/old/sql-ledger/locale/br/ct [deleted file]
sql-ledger/old/sql-ledger/locale/br/gl [deleted file]
sql-ledger/old/sql-ledger/locale/br/ic [deleted file]
sql-ledger/old/sql-ledger/locale/br/io [deleted file]
sql-ledger/old/sql-ledger/locale/br/ir [deleted file]
sql-ledger/old/sql-ledger/locale/br/is [deleted file]
sql-ledger/old/sql-ledger/locale/br/login [deleted file]
sql-ledger/old/sql-ledger/locale/br/menu [deleted file]
sql-ledger/old/sql-ledger/locale/br/oe [deleted file]
sql-ledger/old/sql-ledger/locale/br/pe [deleted file]
sql-ledger/old/sql-ledger/locale/br/rc [deleted file]
sql-ledger/old/sql-ledger/locale/br/rp [deleted file]
sql-ledger/old/sql-ledger/locale/cn/COPYING [deleted file]
sql-ledger/old/sql-ledger/locale/cn/LANGUAGE [deleted file]
sql-ledger/old/sql-ledger/locale/cn/admin [deleted file]
sql-ledger/old/sql-ledger/locale/cn/all [deleted file]
sql-ledger/old/sql-ledger/locale/cn/am [deleted file]
sql-ledger/old/sql-ledger/locale/cn/ap [deleted file]
sql-ledger/old/sql-ledger/locale/cn/ar [deleted file]
sql-ledger/old/sql-ledger/locale/cn/arap [deleted file]
sql-ledger/old/sql-ledger/locale/cn/ca [deleted file]
sql-ledger/old/sql-ledger/locale/cn/cp [deleted file]
sql-ledger/old/sql-ledger/locale/cn/ct [deleted file]
sql-ledger/old/sql-ledger/locale/cn/gl [deleted file]
sql-ledger/old/sql-ledger/locale/cn/ic [deleted file]
sql-ledger/old/sql-ledger/locale/cn/io [deleted file]
sql-ledger/old/sql-ledger/locale/cn/ir [deleted file]
sql-ledger/old/sql-ledger/locale/cn/is [deleted file]
sql-ledger/old/sql-ledger/locale/cn/login [deleted file]
sql-ledger/old/sql-ledger/locale/cn/menu [deleted file]
sql-ledger/old/sql-ledger/locale/cn/oe [deleted file]
sql-ledger/old/sql-ledger/locale/cn/pe [deleted file]
sql-ledger/old/sql-ledger/locale/cn/rc [deleted file]
sql-ledger/old/sql-ledger/locale/cn/rp [deleted file]
sql-ledger/old/sql-ledger/locale/ct/COPYING [deleted file]
sql-ledger/old/sql-ledger/locale/ct/LANGUAGE [deleted file]
sql-ledger/old/sql-ledger/locale/ct/admin [deleted file]
sql-ledger/old/sql-ledger/locale/ct/all [deleted file]
sql-ledger/old/sql-ledger/locale/ct/am [deleted file]
sql-ledger/old/sql-ledger/locale/ct/ap [deleted file]
sql-ledger/old/sql-ledger/locale/ct/ar [deleted file]
sql-ledger/old/sql-ledger/locale/ct/arap [deleted file]
sql-ledger/old/sql-ledger/locale/ct/ca [deleted file]
sql-ledger/old/sql-ledger/locale/ct/cp [deleted file]
sql-ledger/old/sql-ledger/locale/ct/ct [deleted file]
sql-ledger/old/sql-ledger/locale/ct/gl [deleted file]
sql-ledger/old/sql-ledger/locale/ct/ic [deleted file]
sql-ledger/old/sql-ledger/locale/ct/io [deleted file]
sql-ledger/old/sql-ledger/locale/ct/ir [deleted file]
sql-ledger/old/sql-ledger/locale/ct/is [deleted file]
sql-ledger/old/sql-ledger/locale/ct/login [deleted file]
sql-ledger/old/sql-ledger/locale/ct/menu [deleted file]
sql-ledger/old/sql-ledger/locale/ct/oe [deleted file]
sql-ledger/old/sql-ledger/locale/ct/pe [deleted file]
sql-ledger/old/sql-ledger/locale/ct/rc [deleted file]
sql-ledger/old/sql-ledger/locale/ct/rp [deleted file]
sql-ledger/old/sql-ledger/locale/cz/COPYING [deleted file]
sql-ledger/old/sql-ledger/locale/cz/LANGUAGE [deleted file]
sql-ledger/old/sql-ledger/locale/cz/admin [deleted file]
sql-ledger/old/sql-ledger/locale/cz/all [deleted file]
sql-ledger/old/sql-ledger/locale/cz/am [deleted file]
sql-ledger/old/sql-ledger/locale/cz/ap [deleted file]
sql-ledger/old/sql-ledger/locale/cz/ar [deleted file]
sql-ledger/old/sql-ledger/locale/cz/arap [deleted file]
sql-ledger/old/sql-ledger/locale/cz/ca [deleted file]
sql-ledger/old/sql-ledger/locale/cz/cp [deleted file]
sql-ledger/old/sql-ledger/locale/cz/ct [deleted file]
sql-ledger/old/sql-ledger/locale/cz/gl [deleted file]
sql-ledger/old/sql-ledger/locale/cz/ic [deleted file]
sql-ledger/old/sql-ledger/locale/cz/io [deleted file]
sql-ledger/old/sql-ledger/locale/cz/ir [deleted file]
sql-ledger/old/sql-ledger/locale/cz/is [deleted file]
sql-ledger/old/sql-ledger/locale/cz/login [deleted file]
sql-ledger/old/sql-ledger/locale/cz/menu [deleted file]
sql-ledger/old/sql-ledger/locale/cz/oe [deleted file]
sql-ledger/old/sql-ledger/locale/cz/pe [deleted file]
sql-ledger/old/sql-ledger/locale/cz/rc [deleted file]
sql-ledger/old/sql-ledger/locale/cz/rp [deleted file]
sql-ledger/old/sql-ledger/locale/de/COPYING [deleted file]
sql-ledger/old/sql-ledger/locale/de/LANGUAGE [deleted file]
sql-ledger/old/sql-ledger/locale/de/Num2text [deleted file]
sql-ledger/old/sql-ledger/locale/de/admin [deleted file]
sql-ledger/old/sql-ledger/locale/de/all [deleted file]
sql-ledger/old/sql-ledger/locale/de/am [deleted file]
sql-ledger/old/sql-ledger/locale/de/ap [deleted file]
sql-ledger/old/sql-ledger/locale/de/ar [deleted file]
sql-ledger/old/sql-ledger/locale/de/arap [deleted file]
sql-ledger/old/sql-ledger/locale/de/ca [deleted file]
sql-ledger/old/sql-ledger/locale/de/cp [deleted file]
sql-ledger/old/sql-ledger/locale/de/ct [deleted file]
sql-ledger/old/sql-ledger/locale/de/gl [deleted file]
sql-ledger/old/sql-ledger/locale/de/ic [deleted file]
sql-ledger/old/sql-ledger/locale/de/io [deleted file]
sql-ledger/old/sql-ledger/locale/de/ir [deleted file]
sql-ledger/old/sql-ledger/locale/de/is [deleted file]
sql-ledger/old/sql-ledger/locale/de/locales.pl [deleted file]
sql-ledger/old/sql-ledger/locale/de/login [deleted file]
sql-ledger/old/sql-ledger/locale/de/menu [deleted file]
sql-ledger/old/sql-ledger/locale/de/oe [deleted file]
sql-ledger/old/sql-ledger/locale/de/pe [deleted file]
sql-ledger/old/sql-ledger/locale/de/rc [deleted file]
sql-ledger/old/sql-ledger/locale/de/rp [deleted file]
sql-ledger/old/sql-ledger/locale/dk/COPYING [deleted file]
sql-ledger/old/sql-ledger/locale/dk/LANGUAGE [deleted file]
sql-ledger/old/sql-ledger/locale/dk/admin [deleted file]
sql-ledger/old/sql-ledger/locale/dk/all [deleted file]
sql-ledger/old/sql-ledger/locale/dk/am [deleted file]
sql-ledger/old/sql-ledger/locale/dk/ap [deleted file]
sql-ledger/old/sql-ledger/locale/dk/ar [deleted file]
sql-ledger/old/sql-ledger/locale/dk/arap [deleted file]
sql-ledger/old/sql-ledger/locale/dk/ca [deleted file]
sql-ledger/old/sql-ledger/locale/dk/cp [deleted file]
sql-ledger/old/sql-ledger/locale/dk/ct [deleted file]
sql-ledger/old/sql-ledger/locale/dk/gl [deleted file]
sql-ledger/old/sql-ledger/locale/dk/ic [deleted file]
sql-ledger/old/sql-ledger/locale/dk/io [deleted file]
sql-ledger/old/sql-ledger/locale/dk/ir [deleted file]
sql-ledger/old/sql-ledger/locale/dk/is [deleted file]
sql-ledger/old/sql-ledger/locale/dk/login [deleted file]
sql-ledger/old/sql-ledger/locale/dk/menu [deleted file]
sql-ledger/old/sql-ledger/locale/dk/oe [deleted file]
sql-ledger/old/sql-ledger/locale/dk/pe [deleted file]
sql-ledger/old/sql-ledger/locale/dk/rc [deleted file]
sql-ledger/old/sql-ledger/locale/dk/rp [deleted file]
sql-ledger/old/sql-ledger/locale/ee/COPYING [deleted file]
sql-ledger/old/sql-ledger/locale/ee/LANGUAGE [deleted file]
sql-ledger/old/sql-ledger/locale/ee/admin [deleted file]
sql-ledger/old/sql-ledger/locale/ee/all [deleted file]
sql-ledger/old/sql-ledger/locale/ee/am [deleted file]
sql-ledger/old/sql-ledger/locale/ee/ap [deleted file]
sql-ledger/old/sql-ledger/locale/ee/ar [deleted file]
sql-ledger/old/sql-ledger/locale/ee/arap [deleted file]
sql-ledger/old/sql-ledger/locale/ee/ca [deleted file]
sql-ledger/old/sql-ledger/locale/ee/cp [deleted file]
sql-ledger/old/sql-ledger/locale/ee/ct [deleted file]
sql-ledger/old/sql-ledger/locale/ee/gl [deleted file]
sql-ledger/old/sql-ledger/locale/ee/ic [deleted file]
sql-ledger/old/sql-ledger/locale/ee/io [deleted file]
sql-ledger/old/sql-ledger/locale/ee/ir [deleted file]
sql-ledger/old/sql-ledger/locale/ee/is [deleted file]
sql-ledger/old/sql-ledger/locale/ee/login [deleted file]
sql-ledger/old/sql-ledger/locale/ee/menu [deleted file]
sql-ledger/old/sql-ledger/locale/ee/oe [deleted file]
sql-ledger/old/sql-ledger/locale/ee/pe [deleted file]
sql-ledger/old/sql-ledger/locale/ee/rc [deleted file]
sql-ledger/old/sql-ledger/locale/ee/rp [deleted file]
sql-ledger/old/sql-ledger/locale/en_GB/COPYING [deleted file]
sql-ledger/old/sql-ledger/locale/en_GB/LANGUAGE [deleted file]
sql-ledger/old/sql-ledger/locale/en_GB/admin [deleted file]
sql-ledger/old/sql-ledger/locale/en_GB/all [deleted file]
sql-ledger/old/sql-ledger/locale/en_GB/am [deleted file]
sql-ledger/old/sql-ledger/locale/en_GB/ap [deleted file]
sql-ledger/old/sql-ledger/locale/en_GB/ar [deleted file]
sql-ledger/old/sql-ledger/locale/en_GB/arap [deleted file]
sql-ledger/old/sql-ledger/locale/en_GB/bp [deleted file]
sql-ledger/old/sql-ledger/locale/en_GB/ca [deleted file]
sql-ledger/old/sql-ledger/locale/en_GB/cp [deleted file]
sql-ledger/old/sql-ledger/locale/en_GB/ct [deleted file]
sql-ledger/old/sql-ledger/locale/en_GB/gl [deleted file]
sql-ledger/old/sql-ledger/locale/en_GB/ic [deleted file]
sql-ledger/old/sql-ledger/locale/en_GB/io [deleted file]
sql-ledger/old/sql-ledger/locale/en_GB/ir [deleted file]
sql-ledger/old/sql-ledger/locale/en_GB/is [deleted file]
sql-ledger/old/sql-ledger/locale/en_GB/login [deleted file]
sql-ledger/old/sql-ledger/locale/en_GB/menu [deleted file]
sql-ledger/old/sql-ledger/locale/en_GB/oe [deleted file]
sql-ledger/old/sql-ledger/locale/en_GB/pe [deleted file]
sql-ledger/old/sql-ledger/locale/en_GB/rc [deleted file]
sql-ledger/old/sql-ledger/locale/en_GB/rp [deleted file]
sql-ledger/old/sql-ledger/locale/es/COPYING [deleted file]
sql-ledger/old/sql-ledger/locale/es/LANGUAGE [deleted file]
sql-ledger/old/sql-ledger/locale/es/Num2text [deleted file]
sql-ledger/old/sql-ledger/locale/es/admin [deleted file]
sql-ledger/old/sql-ledger/locale/es/all [deleted file]
sql-ledger/old/sql-ledger/locale/es/am [deleted file]
sql-ledger/old/sql-ledger/locale/es/ap [deleted file]
sql-ledger/old/sql-ledger/locale/es/ar [deleted file]
sql-ledger/old/sql-ledger/locale/es/arap [deleted file]
sql-ledger/old/sql-ledger/locale/es/ca [deleted file]
sql-ledger/old/sql-ledger/locale/es/cp [deleted file]
sql-ledger/old/sql-ledger/locale/es/ct [deleted file]
sql-ledger/old/sql-ledger/locale/es/gl [deleted file]
sql-ledger/old/sql-ledger/locale/es/ic [deleted file]
sql-ledger/old/sql-ledger/locale/es/io [deleted file]
sql-ledger/old/sql-ledger/locale/es/ir [deleted file]
sql-ledger/old/sql-ledger/locale/es/is [deleted file]
sql-ledger/old/sql-ledger/locale/es/login [deleted file]
sql-ledger/old/sql-ledger/locale/es/menu [deleted file]
sql-ledger/old/sql-ledger/locale/es/oe [deleted file]
sql-ledger/old/sql-ledger/locale/es/pe [deleted file]
sql-ledger/old/sql-ledger/locale/es/rc [deleted file]
sql-ledger/old/sql-ledger/locale/es/rp [deleted file]
sql-ledger/old/sql-ledger/locale/fi/COPYING [deleted file]
sql-ledger/old/sql-ledger/locale/fi/LANGUAGE [deleted file]
sql-ledger/old/sql-ledger/locale/fi/admin [deleted file]
sql-ledger/old/sql-ledger/locale/fi/all [deleted file]
sql-ledger/old/sql-ledger/locale/fi/am [deleted file]
sql-ledger/old/sql-ledger/locale/fi/ap [deleted file]
sql-ledger/old/sql-ledger/locale/fi/ar [deleted file]
sql-ledger/old/sql-ledger/locale/fi/arap [deleted file]
sql-ledger/old/sql-ledger/locale/fi/ca [deleted file]
sql-ledger/old/sql-ledger/locale/fi/cp [deleted file]
sql-ledger/old/sql-ledger/locale/fi/ct [deleted file]
sql-ledger/old/sql-ledger/locale/fi/gl [deleted file]
sql-ledger/old/sql-ledger/locale/fi/ic [deleted file]
sql-ledger/old/sql-ledger/locale/fi/io [deleted file]
sql-ledger/old/sql-ledger/locale/fi/ir [deleted file]
sql-ledger/old/sql-ledger/locale/fi/is [deleted file]
sql-ledger/old/sql-ledger/locale/fi/login [deleted file]
sql-ledger/old/sql-ledger/locale/fi/menu [deleted file]
sql-ledger/old/sql-ledger/locale/fi/oe [deleted file]
sql-ledger/old/sql-ledger/locale/fi/pe [deleted file]
sql-ledger/old/sql-ledger/locale/fi/rc [deleted file]
sql-ledger/old/sql-ledger/locale/fi/rp [deleted file]
sql-ledger/old/sql-ledger/locale/fr/COPYING [deleted file]
sql-ledger/old/sql-ledger/locale/fr/LANGUAGE [deleted file]
sql-ledger/old/sql-ledger/locale/fr/admin [deleted file]
sql-ledger/old/sql-ledger/locale/fr/all [deleted file]
sql-ledger/old/sql-ledger/locale/fr/am [deleted file]
sql-ledger/old/sql-ledger/locale/fr/ap [deleted file]
sql-ledger/old/sql-ledger/locale/fr/ar [deleted file]
sql-ledger/old/sql-ledger/locale/fr/arap [deleted file]
sql-ledger/old/sql-ledger/locale/fr/ca [deleted file]
sql-ledger/old/sql-ledger/locale/fr/cp [deleted file]
sql-ledger/old/sql-ledger/locale/fr/ct [deleted file]
sql-ledger/old/sql-ledger/locale/fr/gl [deleted file]
sql-ledger/old/sql-ledger/locale/fr/ic [deleted file]
sql-ledger/old/sql-ledger/locale/fr/io [deleted file]
sql-ledger/old/sql-ledger/locale/fr/ir [deleted file]
sql-ledger/old/sql-ledger/locale/fr/is [deleted file]
sql-ledger/old/sql-ledger/locale/fr/login [deleted file]
sql-ledger/old/sql-ledger/locale/fr/menu [deleted file]
sql-ledger/old/sql-ledger/locale/fr/oe [deleted file]
sql-ledger/old/sql-ledger/locale/fr/pe [deleted file]
sql-ledger/old/sql-ledger/locale/fr/rc [deleted file]
sql-ledger/old/sql-ledger/locale/fr/rp [deleted file]
sql-ledger/old/sql-ledger/locale/hu/COPYING [deleted file]
sql-ledger/old/sql-ledger/locale/hu/LANGUAGE [deleted file]
sql-ledger/old/sql-ledger/locale/hu/admin [deleted file]
sql-ledger/old/sql-ledger/locale/hu/all [deleted file]
sql-ledger/old/sql-ledger/locale/hu/am [deleted file]
sql-ledger/old/sql-ledger/locale/hu/ap [deleted file]
sql-ledger/old/sql-ledger/locale/hu/ar [deleted file]
sql-ledger/old/sql-ledger/locale/hu/arap [deleted file]
sql-ledger/old/sql-ledger/locale/hu/ca [deleted file]
sql-ledger/old/sql-ledger/locale/hu/cp [deleted file]
sql-ledger/old/sql-ledger/locale/hu/ct [deleted file]
sql-ledger/old/sql-ledger/locale/hu/gl [deleted file]
sql-ledger/old/sql-ledger/locale/hu/ic [deleted file]
sql-ledger/old/sql-ledger/locale/hu/io [deleted file]
sql-ledger/old/sql-ledger/locale/hu/ir [deleted file]
sql-ledger/old/sql-ledger/locale/hu/is [deleted file]
sql-ledger/old/sql-ledger/locale/hu/login [deleted file]
sql-ledger/old/sql-ledger/locale/hu/menu [deleted file]
sql-ledger/old/sql-ledger/locale/hu/oe [deleted file]
sql-ledger/old/sql-ledger/locale/hu/pe [deleted file]
sql-ledger/old/sql-ledger/locale/hu/rc [deleted file]
sql-ledger/old/sql-ledger/locale/hu/rp [deleted file]
sql-ledger/old/sql-ledger/locale/is/COPYING [deleted file]
sql-ledger/old/sql-ledger/locale/is/LANGUAGE [deleted file]
sql-ledger/old/sql-ledger/locale/is/admin [deleted file]
sql-ledger/old/sql-ledger/locale/is/all [deleted file]
sql-ledger/old/sql-ledger/locale/is/am [deleted file]
sql-ledger/old/sql-ledger/locale/is/ap [deleted file]
sql-ledger/old/sql-ledger/locale/is/ar [deleted file]
sql-ledger/old/sql-ledger/locale/is/arap [deleted file]
sql-ledger/old/sql-ledger/locale/is/ca [deleted file]
sql-ledger/old/sql-ledger/locale/is/cp [deleted file]
sql-ledger/old/sql-ledger/locale/is/ct [deleted file]
sql-ledger/old/sql-ledger/locale/is/gl [deleted file]
sql-ledger/old/sql-ledger/locale/is/ic [deleted file]
sql-ledger/old/sql-ledger/locale/is/io [deleted file]
sql-ledger/old/sql-ledger/locale/is/ir [deleted file]
sql-ledger/old/sql-ledger/locale/is/is [deleted file]
sql-ledger/old/sql-ledger/locale/is/login [deleted file]
sql-ledger/old/sql-ledger/locale/is/menu [deleted file]
sql-ledger/old/sql-ledger/locale/is/oe [deleted file]
sql-ledger/old/sql-ledger/locale/is/pe [deleted file]
sql-ledger/old/sql-ledger/locale/is/rc [deleted file]
sql-ledger/old/sql-ledger/locale/is/rp [deleted file]
sql-ledger/old/sql-ledger/locale/it/COPYING [deleted file]
sql-ledger/old/sql-ledger/locale/it/LANGUAGE [deleted file]
sql-ledger/old/sql-ledger/locale/it/Num2text [deleted file]
sql-ledger/old/sql-ledger/locale/it/admin [deleted file]
sql-ledger/old/sql-ledger/locale/it/all [deleted file]
sql-ledger/old/sql-ledger/locale/it/am [deleted file]
sql-ledger/old/sql-ledger/locale/it/ap [deleted file]
sql-ledger/old/sql-ledger/locale/it/ar [deleted file]
sql-ledger/old/sql-ledger/locale/it/arap [deleted file]
sql-ledger/old/sql-ledger/locale/it/ca [deleted file]
sql-ledger/old/sql-ledger/locale/it/cp [deleted file]
sql-ledger/old/sql-ledger/locale/it/ct [deleted file]
sql-ledger/old/sql-ledger/locale/it/gl [deleted file]
sql-ledger/old/sql-ledger/locale/it/ic [deleted file]
sql-ledger/old/sql-ledger/locale/it/io [deleted file]
sql-ledger/old/sql-ledger/locale/it/ir [deleted file]
sql-ledger/old/sql-ledger/locale/it/is [deleted file]
sql-ledger/old/sql-ledger/locale/it/login [deleted file]
sql-ledger/old/sql-ledger/locale/it/menu [deleted file]
sql-ledger/old/sql-ledger/locale/it/oe [deleted file]
sql-ledger/old/sql-ledger/locale/it/pe [deleted file]
sql-ledger/old/sql-ledger/locale/it/qe [deleted file]
sql-ledger/old/sql-ledger/locale/it/rc [deleted file]
sql-ledger/old/sql-ledger/locale/it/rp [deleted file]
sql-ledger/old/sql-ledger/locale/lt/COPYING [deleted file]
sql-ledger/old/sql-ledger/locale/lt/LANGUAGE [deleted file]
sql-ledger/old/sql-ledger/locale/lt/admin [deleted file]
sql-ledger/old/sql-ledger/locale/lt/all [deleted file]
sql-ledger/old/sql-ledger/locale/lt/am [deleted file]
sql-ledger/old/sql-ledger/locale/lt/ap [deleted file]
sql-ledger/old/sql-ledger/locale/lt/ar [deleted file]
sql-ledger/old/sql-ledger/locale/lt/arap [deleted file]
sql-ledger/old/sql-ledger/locale/lt/ca [deleted file]
sql-ledger/old/sql-ledger/locale/lt/cp [deleted file]
sql-ledger/old/sql-ledger/locale/lt/ct [deleted file]
sql-ledger/old/sql-ledger/locale/lt/gl [deleted file]
sql-ledger/old/sql-ledger/locale/lt/ic [deleted file]
sql-ledger/old/sql-ledger/locale/lt/io [deleted file]
sql-ledger/old/sql-ledger/locale/lt/ir [deleted file]
sql-ledger/old/sql-ledger/locale/lt/is [deleted file]
sql-ledger/old/sql-ledger/locale/lt/login [deleted file]
sql-ledger/old/sql-ledger/locale/lt/menu [deleted file]
sql-ledger/old/sql-ledger/locale/lt/oe [deleted file]
sql-ledger/old/sql-ledger/locale/lt/pe [deleted file]
sql-ledger/old/sql-ledger/locale/lt/rc [deleted file]
sql-ledger/old/sql-ledger/locale/lt/rp [deleted file]
sql-ledger/old/sql-ledger/locale/mx/COPYING [deleted file]
sql-ledger/old/sql-ledger/locale/mx/LANGUAGE [deleted file]
sql-ledger/old/sql-ledger/locale/mx/admin [deleted file]
sql-ledger/old/sql-ledger/locale/mx/all [deleted file]
sql-ledger/old/sql-ledger/locale/mx/am [deleted file]
sql-ledger/old/sql-ledger/locale/mx/ap [deleted file]
sql-ledger/old/sql-ledger/locale/mx/ar [deleted file]
sql-ledger/old/sql-ledger/locale/mx/arap [deleted file]
sql-ledger/old/sql-ledger/locale/mx/ca [deleted file]
sql-ledger/old/sql-ledger/locale/mx/cp [deleted file]
sql-ledger/old/sql-ledger/locale/mx/ct [deleted file]
sql-ledger/old/sql-ledger/locale/mx/gl [deleted file]
sql-ledger/old/sql-ledger/locale/mx/ic [deleted file]
sql-ledger/old/sql-ledger/locale/mx/io [deleted file]
sql-ledger/old/sql-ledger/locale/mx/ir [deleted file]
sql-ledger/old/sql-ledger/locale/mx/is [deleted file]
sql-ledger/old/sql-ledger/locale/mx/login [deleted file]
sql-ledger/old/sql-ledger/locale/mx/menu [deleted file]
sql-ledger/old/sql-ledger/locale/mx/oe [deleted file]
sql-ledger/old/sql-ledger/locale/mx/pe [deleted file]
sql-ledger/old/sql-ledger/locale/mx/rc [deleted file]
sql-ledger/old/sql-ledger/locale/mx/rp [deleted file]
sql-ledger/old/sql-ledger/locale/nl/COPYING [deleted file]
sql-ledger/old/sql-ledger/locale/nl/LANGUAGE [deleted file]
sql-ledger/old/sql-ledger/locale/nl/Num2text [deleted file]
sql-ledger/old/sql-ledger/locale/nl/admin [deleted file]
sql-ledger/old/sql-ledger/locale/nl/all [deleted file]
sql-ledger/old/sql-ledger/locale/nl/am [deleted file]
sql-ledger/old/sql-ledger/locale/nl/ap [deleted file]
sql-ledger/old/sql-ledger/locale/nl/ar [deleted file]
sql-ledger/old/sql-ledger/locale/nl/arap [deleted file]
sql-ledger/old/sql-ledger/locale/nl/ca [deleted file]
sql-ledger/old/sql-ledger/locale/nl/cp [deleted file]
sql-ledger/old/sql-ledger/locale/nl/ct [deleted file]
sql-ledger/old/sql-ledger/locale/nl/gl [deleted file]
sql-ledger/old/sql-ledger/locale/nl/ic [deleted file]
sql-ledger/old/sql-ledger/locale/nl/io [deleted file]
sql-ledger/old/sql-ledger/locale/nl/ir [deleted file]
sql-ledger/old/sql-ledger/locale/nl/is [deleted file]
sql-ledger/old/sql-ledger/locale/nl/login [deleted file]
sql-ledger/old/sql-ledger/locale/nl/menu [deleted file]
sql-ledger/old/sql-ledger/locale/nl/oe [deleted file]
sql-ledger/old/sql-ledger/locale/nl/pe [deleted file]
sql-ledger/old/sql-ledger/locale/nl/rc [deleted file]
sql-ledger/old/sql-ledger/locale/nl/rp [deleted file]
sql-ledger/old/sql-ledger/locale/no/COPYING [deleted file]
sql-ledger/old/sql-ledger/locale/no/LANGUAGE [deleted file]
sql-ledger/old/sql-ledger/locale/no/admin [deleted file]
sql-ledger/old/sql-ledger/locale/no/all [deleted file]
sql-ledger/old/sql-ledger/locale/no/am [deleted file]
sql-ledger/old/sql-ledger/locale/no/ap [deleted file]
sql-ledger/old/sql-ledger/locale/no/ar [deleted file]
sql-ledger/old/sql-ledger/locale/no/arap [deleted file]
sql-ledger/old/sql-ledger/locale/no/ca [deleted file]
sql-ledger/old/sql-ledger/locale/no/cp [deleted file]
sql-ledger/old/sql-ledger/locale/no/ct [deleted file]
sql-ledger/old/sql-ledger/locale/no/gl [deleted file]
sql-ledger/old/sql-ledger/locale/no/ic [deleted file]
sql-ledger/old/sql-ledger/locale/no/io [deleted file]
sql-ledger/old/sql-ledger/locale/no/ir [deleted file]
sql-ledger/old/sql-ledger/locale/no/is [deleted file]
sql-ledger/old/sql-ledger/locale/no/login [deleted file]
sql-ledger/old/sql-ledger/locale/no/menu [deleted file]
sql-ledger/old/sql-ledger/locale/no/oe [deleted file]
sql-ledger/old/sql-ledger/locale/no/pe [deleted file]
sql-ledger/old/sql-ledger/locale/no/rc [deleted file]
sql-ledger/old/sql-ledger/locale/no/rp [deleted file]
sql-ledger/old/sql-ledger/locale/pa/COPYING [deleted file]
sql-ledger/old/sql-ledger/locale/pa/LANGUAGE [deleted file]
sql-ledger/old/sql-ledger/locale/pa/admin [deleted file]
sql-ledger/old/sql-ledger/locale/pa/all [deleted file]
sql-ledger/old/sql-ledger/locale/pa/am [deleted file]
sql-ledger/old/sql-ledger/locale/pa/ap [deleted file]
sql-ledger/old/sql-ledger/locale/pa/ar [deleted file]
sql-ledger/old/sql-ledger/locale/pa/arap [deleted file]
sql-ledger/old/sql-ledger/locale/pa/ca [deleted file]
sql-ledger/old/sql-ledger/locale/pa/cp [deleted file]
sql-ledger/old/sql-ledger/locale/pa/ct [deleted file]
sql-ledger/old/sql-ledger/locale/pa/gl [deleted file]
sql-ledger/old/sql-ledger/locale/pa/ic [deleted file]
sql-ledger/old/sql-ledger/locale/pa/io [deleted file]
sql-ledger/old/sql-ledger/locale/pa/ir [deleted file]
sql-ledger/old/sql-ledger/locale/pa/is [deleted file]
sql-ledger/old/sql-ledger/locale/pa/login [deleted file]
sql-ledger/old/sql-ledger/locale/pa/menu [deleted file]
sql-ledger/old/sql-ledger/locale/pa/oe [deleted file]
sql-ledger/old/sql-ledger/locale/pa/pe [deleted file]
sql-ledger/old/sql-ledger/locale/pa/rc [deleted file]
sql-ledger/old/sql-ledger/locale/pa/rp [deleted file]
sql-ledger/old/sql-ledger/locale/pl/COPYING [deleted file]
sql-ledger/old/sql-ledger/locale/pl/LANGUAGE [deleted file]
sql-ledger/old/sql-ledger/locale/pl/admin [deleted file]
sql-ledger/old/sql-ledger/locale/pl/all [deleted file]
sql-ledger/old/sql-ledger/locale/pl/am [deleted file]
sql-ledger/old/sql-ledger/locale/pl/ap [deleted file]
sql-ledger/old/sql-ledger/locale/pl/ar [deleted file]
sql-ledger/old/sql-ledger/locale/pl/arap [deleted file]
sql-ledger/old/sql-ledger/locale/pl/ca [deleted file]
sql-ledger/old/sql-ledger/locale/pl/cp [deleted file]
sql-ledger/old/sql-ledger/locale/pl/ct [deleted file]
sql-ledger/old/sql-ledger/locale/pl/gl [deleted file]
sql-ledger/old/sql-ledger/locale/pl/ic [deleted file]
sql-ledger/old/sql-ledger/locale/pl/io [deleted file]
sql-ledger/old/sql-ledger/locale/pl/ir [deleted file]
sql-ledger/old/sql-ledger/locale/pl/is [deleted file]
sql-ledger/old/sql-ledger/locale/pl/login [deleted file]
sql-ledger/old/sql-ledger/locale/pl/menu [deleted file]
sql-ledger/old/sql-ledger/locale/pl/oe [deleted file]
sql-ledger/old/sql-ledger/locale/pl/pe [deleted file]
sql-ledger/old/sql-ledger/locale/pl/rc [deleted file]
sql-ledger/old/sql-ledger/locale/pl/rp [deleted file]
sql-ledger/old/sql-ledger/locale/pt/COPYING [deleted file]
sql-ledger/old/sql-ledger/locale/pt/LANGUAGE [deleted file]
sql-ledger/old/sql-ledger/locale/pt/admin [deleted file]
sql-ledger/old/sql-ledger/locale/pt/all [deleted file]
sql-ledger/old/sql-ledger/locale/pt/am [deleted file]
sql-ledger/old/sql-ledger/locale/pt/ap [deleted file]
sql-ledger/old/sql-ledger/locale/pt/ar [deleted file]
sql-ledger/old/sql-ledger/locale/pt/arap [deleted file]
sql-ledger/old/sql-ledger/locale/pt/ca [deleted file]
sql-ledger/old/sql-ledger/locale/pt/cp [deleted file]
sql-ledger/old/sql-ledger/locale/pt/ct [deleted file]
sql-ledger/old/sql-ledger/locale/pt/gl [deleted file]
sql-ledger/old/sql-ledger/locale/pt/ic [deleted file]
sql-ledger/old/sql-ledger/locale/pt/io [deleted file]
sql-ledger/old/sql-ledger/locale/pt/ir [deleted file]
sql-ledger/old/sql-ledger/locale/pt/is [deleted file]
sql-ledger/old/sql-ledger/locale/pt/login [deleted file]
sql-ledger/old/sql-ledger/locale/pt/menu [deleted file]
sql-ledger/old/sql-ledger/locale/pt/oe [deleted file]
sql-ledger/old/sql-ledger/locale/pt/pe [deleted file]
sql-ledger/old/sql-ledger/locale/pt/rc [deleted file]
sql-ledger/old/sql-ledger/locale/pt/rp [deleted file]
sql-ledger/old/sql-ledger/locale/ru/COPYING [deleted file]
sql-ledger/old/sql-ledger/locale/ru/LANGUAGE [deleted file]
sql-ledger/old/sql-ledger/locale/ru/admin [deleted file]
sql-ledger/old/sql-ledger/locale/ru/all [deleted file]
sql-ledger/old/sql-ledger/locale/ru/am [deleted file]
sql-ledger/old/sql-ledger/locale/ru/ap [deleted file]
sql-ledger/old/sql-ledger/locale/ru/ar [deleted file]
sql-ledger/old/sql-ledger/locale/ru/arap [deleted file]
sql-ledger/old/sql-ledger/locale/ru/ca [deleted file]
sql-ledger/old/sql-ledger/locale/ru/cp [deleted file]
sql-ledger/old/sql-ledger/locale/ru/ct [deleted file]
sql-ledger/old/sql-ledger/locale/ru/gl [deleted file]
sql-ledger/old/sql-ledger/locale/ru/ic [deleted file]
sql-ledger/old/sql-ledger/locale/ru/io [deleted file]
sql-ledger/old/sql-ledger/locale/ru/ir [deleted file]
sql-ledger/old/sql-ledger/locale/ru/is [deleted file]
sql-ledger/old/sql-ledger/locale/ru/login [deleted file]
sql-ledger/old/sql-ledger/locale/ru/menu [deleted file]
sql-ledger/old/sql-ledger/locale/ru/oe [deleted file]
sql-ledger/old/sql-ledger/locale/ru/pe [deleted file]
sql-ledger/old/sql-ledger/locale/ru/rc [deleted file]
sql-ledger/old/sql-ledger/locale/ru/rp [deleted file]
sql-ledger/old/sql-ledger/locale/se/COPYING [deleted file]
sql-ledger/old/sql-ledger/locale/se/LANGUAGE [deleted file]
sql-ledger/old/sql-ledger/locale/se/admin [deleted file]
sql-ledger/old/sql-ledger/locale/se/all [deleted file]
sql-ledger/old/sql-ledger/locale/se/am [deleted file]
sql-ledger/old/sql-ledger/locale/se/ap [deleted file]
sql-ledger/old/sql-ledger/locale/se/ar [deleted file]
sql-ledger/old/sql-ledger/locale/se/arap [deleted file]
sql-ledger/old/sql-ledger/locale/se/ca [deleted file]
sql-ledger/old/sql-ledger/locale/se/cp [deleted file]
sql-ledger/old/sql-ledger/locale/se/ct [deleted file]
sql-ledger/old/sql-ledger/locale/se/gl [deleted file]
sql-ledger/old/sql-ledger/locale/se/ic [deleted file]
sql-ledger/old/sql-ledger/locale/se/io [deleted file]
sql-ledger/old/sql-ledger/locale/se/ir [deleted file]
sql-ledger/old/sql-ledger/locale/se/is [deleted file]
sql-ledger/old/sql-ledger/locale/se/login [deleted file]
sql-ledger/old/sql-ledger/locale/se/menu [deleted file]
sql-ledger/old/sql-ledger/locale/se/oe [deleted file]
sql-ledger/old/sql-ledger/locale/se/pe [deleted file]
sql-ledger/old/sql-ledger/locale/se/rc [deleted file]
sql-ledger/old/sql-ledger/locale/se/rp [deleted file]
sql-ledger/old/sql-ledger/locale/tr/COPYING [deleted file]
sql-ledger/old/sql-ledger/locale/tr/LANGUAGE [deleted file]
sql-ledger/old/sql-ledger/locale/tr/admin [deleted file]
sql-ledger/old/sql-ledger/locale/tr/all [deleted file]
sql-ledger/old/sql-ledger/locale/tr/am [deleted file]
sql-ledger/old/sql-ledger/locale/tr/ap [deleted file]
sql-ledger/old/sql-ledger/locale/tr/ar [deleted file]
sql-ledger/old/sql-ledger/locale/tr/arap [deleted file]
sql-ledger/old/sql-ledger/locale/tr/ca [deleted file]
sql-ledger/old/sql-ledger/locale/tr/cp [deleted file]
sql-ledger/old/sql-ledger/locale/tr/ct [deleted file]
sql-ledger/old/sql-ledger/locale/tr/gl [deleted file]
sql-ledger/old/sql-ledger/locale/tr/ic [deleted file]
sql-ledger/old/sql-ledger/locale/tr/io [deleted file]
sql-ledger/old/sql-ledger/locale/tr/ir [deleted file]
sql-ledger/old/sql-ledger/locale/tr/is [deleted file]
sql-ledger/old/sql-ledger/locale/tr/login [deleted file]
sql-ledger/old/sql-ledger/locale/tr/menu [deleted file]
sql-ledger/old/sql-ledger/locale/tr/oe [deleted file]
sql-ledger/old/sql-ledger/locale/tr/pe [deleted file]
sql-ledger/old/sql-ledger/locale/tr/rc [deleted file]
sql-ledger/old/sql-ledger/locale/tr/rp [deleted file]
sql-ledger/old/sql-ledger/locale/tw/COPYING [deleted file]
sql-ledger/old/sql-ledger/locale/tw/LANGUAGE [deleted file]
sql-ledger/old/sql-ledger/locale/tw/admin [deleted file]
sql-ledger/old/sql-ledger/locale/tw/all [deleted file]
sql-ledger/old/sql-ledger/locale/tw/am [deleted file]
sql-ledger/old/sql-ledger/locale/tw/ap [deleted file]
sql-ledger/old/sql-ledger/locale/tw/ar [deleted file]
sql-ledger/old/sql-ledger/locale/tw/arap [deleted file]
sql-ledger/old/sql-ledger/locale/tw/ca [deleted file]
sql-ledger/old/sql-ledger/locale/tw/cp [deleted file]
sql-ledger/old/sql-ledger/locale/tw/ct [deleted file]
sql-ledger/old/sql-ledger/locale/tw/gl [deleted file]
sql-ledger/old/sql-ledger/locale/tw/ic [deleted file]
sql-ledger/old/sql-ledger/locale/tw/io [deleted file]
sql-ledger/old/sql-ledger/locale/tw/ir [deleted file]
sql-ledger/old/sql-ledger/locale/tw/is [deleted file]
sql-ledger/old/sql-ledger/locale/tw/login [deleted file]
sql-ledger/old/sql-ledger/locale/tw/menu [deleted file]
sql-ledger/old/sql-ledger/locale/tw/oe [deleted file]
sql-ledger/old/sql-ledger/locale/tw/pe [deleted file]
sql-ledger/old/sql-ledger/locale/tw/rc [deleted file]
sql-ledger/old/sql-ledger/locale/tw/rp [deleted file]
sql-ledger/old/sql-ledger/locale/ua/COPYING [deleted file]
sql-ledger/old/sql-ledger/locale/ua/LANGUAGE [deleted file]
sql-ledger/old/sql-ledger/locale/ua/admin [deleted file]
sql-ledger/old/sql-ledger/locale/ua/all [deleted file]
sql-ledger/old/sql-ledger/locale/ua/am [deleted file]
sql-ledger/old/sql-ledger/locale/ua/ap [deleted file]
sql-ledger/old/sql-ledger/locale/ua/ar [deleted file]
sql-ledger/old/sql-ledger/locale/ua/arap [deleted file]
sql-ledger/old/sql-ledger/locale/ua/ca [deleted file]
sql-ledger/old/sql-ledger/locale/ua/cp [deleted file]
sql-ledger/old/sql-ledger/locale/ua/ct [deleted file]
sql-ledger/old/sql-ledger/locale/ua/gl [deleted file]
sql-ledger/old/sql-ledger/locale/ua/ic [deleted file]
sql-ledger/old/sql-ledger/locale/ua/io [deleted file]
sql-ledger/old/sql-ledger/locale/ua/ir [deleted file]
sql-ledger/old/sql-ledger/locale/ua/is [deleted file]
sql-ledger/old/sql-ledger/locale/ua/login [deleted file]
sql-ledger/old/sql-ledger/locale/ua/menu [deleted file]
sql-ledger/old/sql-ledger/locale/ua/oe [deleted file]
sql-ledger/old/sql-ledger/locale/ua/pe [deleted file]
sql-ledger/old/sql-ledger/locale/ua/rc [deleted file]
sql-ledger/old/sql-ledger/locale/ua/rp [deleted file]
sql-ledger/old/sql-ledger/locale/ve/COPYING [deleted file]
sql-ledger/old/sql-ledger/locale/ve/LANGUAGE [deleted file]
sql-ledger/old/sql-ledger/locale/ve/admin [deleted file]
sql-ledger/old/sql-ledger/locale/ve/all [deleted file]
sql-ledger/old/sql-ledger/locale/ve/am [deleted file]
sql-ledger/old/sql-ledger/locale/ve/ap [deleted file]
sql-ledger/old/sql-ledger/locale/ve/ar [deleted file]
sql-ledger/old/sql-ledger/locale/ve/arap [deleted file]
sql-ledger/old/sql-ledger/locale/ve/ca [deleted file]
sql-ledger/old/sql-ledger/locale/ve/cp [deleted file]
sql-ledger/old/sql-ledger/locale/ve/ct [deleted file]
sql-ledger/old/sql-ledger/locale/ve/gl [deleted file]
sql-ledger/old/sql-ledger/locale/ve/ic [deleted file]
sql-ledger/old/sql-ledger/locale/ve/io [deleted file]
sql-ledger/old/sql-ledger/locale/ve/ir [deleted file]
sql-ledger/old/sql-ledger/locale/ve/is [deleted file]
sql-ledger/old/sql-ledger/locale/ve/login [deleted file]
sql-ledger/old/sql-ledger/locale/ve/menu [deleted file]
sql-ledger/old/sql-ledger/locale/ve/oe [deleted file]
sql-ledger/old/sql-ledger/locale/ve/pe [deleted file]
sql-ledger/old/sql-ledger/locale/ve/rc [deleted file]
sql-ledger/old/sql-ledger/locale/ve/rp [deleted file]
sql-ledger/old/sql-ledger/login.pl [deleted file]
sql-ledger/old/sql-ledger/menu.ini [deleted file]
sql-ledger/old/sql-ledger/setup.pl [deleted file]
sql-ledger/old/sql-ledger/sql-ledger.conf.default [deleted file]
sql-ledger/old/sql-ledger/sql-ledger.png [deleted file]
sql-ledger/old/sql-ledger/sql/Austria-chart.sql [deleted file]
sql-ledger/old/sql-ledger/sql/Austria-gifi.sql [deleted file]
sql-ledger/old/sql-ledger/sql/Brazil_General-chart.sql [deleted file]
sql-ledger/old/sql-ledger/sql/Canada-gifi.sql [deleted file]
sql-ledger/old/sql-ledger/sql/Canada_General-chart.sql [deleted file]
sql-ledger/old/sql-ledger/sql/Czech_Republic-chart.sql [deleted file]
sql-ledger/old/sql-ledger/sql/Danish_Default-chart.sql [deleted file]
sql-ledger/old/sql-ledger/sql/Default-chart.sql [deleted file]
sql-ledger/old/sql-ledger/sql/Dutch_Default-chart.sql [deleted file]
sql-ledger/old/sql-ledger/sql/Dutch_Standard-chart.sql [deleted file]
sql-ledger/old/sql-ledger/sql/France-chart.sql [deleted file]
sql-ledger/old/sql-ledger/sql/German-Sample-chart.sql [deleted file]
sql-ledger/old/sql-ledger/sql/German-Sample-gifi.sql [deleted file]
sql-ledger/old/sql-ledger/sql/Germany-DATEV-SKR03-chart.sql [deleted file]
sql-ledger/old/sql-ledger/sql/Germany-DATEV-SKR03-gifi.sql [deleted file]
sql-ledger/old/sql-ledger/sql/Germany-SKR03-chart.sql [deleted file]
sql-ledger/old/sql-ledger/sql/Germany-SKR03-gifi.sql [deleted file]
sql-ledger/old/sql-ledger/sql/Italy-chart.sql [deleted file]
sql-ledger/old/sql-ledger/sql/Oracle-indices.sql [deleted file]
sql-ledger/old/sql-ledger/sql/Oracle-tables.sql [deleted file]
sql-ledger/old/sql-ledger/sql/Oracle-upgrade-1.8.0-1.8.4.sql [deleted file]
sql-ledger/old/sql-ledger/sql/Oracle-upgrade-1.8.4-1.8.5.sql [deleted file]
sql-ledger/old/sql-ledger/sql/Oracle-upgrade-1.8.5-2.0.0.sql [deleted file]
sql-ledger/old/sql-ledger/sql/Oracle-upgrade-2.0.0-2.0.8.sql [deleted file]
sql-ledger/old/sql-ledger/sql/Pg-indices.sql [deleted file]
sql-ledger/old/sql-ledger/sql/Pg-tables.sql [deleted file]
sql-ledger/old/sql-ledger/sql/Pg-upgrade-1.2.6-1.2.7.sql [deleted file]
sql-ledger/old/sql-ledger/sql/Pg-upgrade-1.2.7-1.4.0.sql [deleted file]
sql-ledger/old/sql-ledger/sql/Pg-upgrade-1.4.0-1.6.0.sql [deleted file]
sql-ledger/old/sql-ledger/sql/Pg-upgrade-1.6.0-1.8.0.sql [deleted file]
sql-ledger/old/sql-ledger/sql/Pg-upgrade-1.8.0-1.8.4.sql [deleted file]
sql-ledger/old/sql-ledger/sql/Pg-upgrade-1.8.4-1.8.5.sql [deleted file]
sql-ledger/old/sql-ledger/sql/Pg-upgrade-1.8.5-2.0.0.sql [deleted file]
sql-ledger/old/sql-ledger/sql/Pg-upgrade-2.0.0-2.0.8.sql [deleted file]
sql-ledger/old/sql-ledger/sql/Poland-chart.sql [deleted file]
sql-ledger/old/sql-ledger/sql/Simplified_Chinese_Default-chart.sql [deleted file]
sql-ledger/old/sql-ledger/sql/Spain-chart.sql [deleted file]
sql-ledger/old/sql-ledger/sql/Swiss-German-chart.sql [deleted file]
sql-ledger/old/sql-ledger/sql/Swiss-German-gifi.sql [deleted file]
sql-ledger/old/sql-ledger/sql/Traditional_Chinese_Default-chart.sql [deleted file]
sql-ledger/old/sql-ledger/sql/US_General-chart.sql [deleted file]
sql-ledger/old/sql-ledger/templates/Brazilian_Portuguese-balance_sheet.html [deleted file]
sql-ledger/old/sql-ledger/templates/Brazilian_Portuguese-check.tex [deleted file]
sql-ledger/old/sql-ledger/templates/Brazilian_Portuguese-income_statement.html [deleted file]
sql-ledger/old/sql-ledger/templates/Brazilian_Portuguese-invoice.html [deleted file]
sql-ledger/old/sql-ledger/templates/Brazilian_Portuguese-invoice.tex [deleted file]
sql-ledger/old/sql-ledger/templates/Brazilian_Portuguese-packing_list.html [deleted file]
sql-ledger/old/sql-ledger/templates/Brazilian_Portuguese-packing_list.tex [deleted file]
sql-ledger/old/sql-ledger/templates/Brazilian_Portuguese-purchase_order.html [deleted file]
sql-ledger/old/sql-ledger/templates/Brazilian_Portuguese-purchase_order.tex [deleted file]
sql-ledger/old/sql-ledger/templates/Brazilian_Portuguese-receipt.tex [deleted file]
sql-ledger/old/sql-ledger/templates/Brazilian_Portuguese-sales_order.html [deleted file]
sql-ledger/old/sql-ledger/templates/Brazilian_Portuguese-sales_order.tex [deleted file]
sql-ledger/old/sql-ledger/templates/Brazilian_Portuguese-statement.html [deleted file]
sql-ledger/old/sql-ledger/templates/Brazilian_Portuguese-statement.tex [deleted file]
sql-ledger/old/sql-ledger/templates/Danish-balance_sheet.html [deleted file]
sql-ledger/old/sql-ledger/templates/Danish-check.tex [deleted file]
sql-ledger/old/sql-ledger/templates/Danish-income_statement.html [deleted file]
sql-ledger/old/sql-ledger/templates/Danish-invoice.html [deleted file]
sql-ledger/old/sql-ledger/templates/Danish-invoice.tex [deleted file]
sql-ledger/old/sql-ledger/templates/Danish-packing_list.html [deleted file]
sql-ledger/old/sql-ledger/templates/Danish-packing_list.tex [deleted file]
sql-ledger/old/sql-ledger/templates/Danish-purchase_order.html [deleted file]
sql-ledger/old/sql-ledger/templates/Danish-purchase_order.tex [deleted file]
sql-ledger/old/sql-ledger/templates/Danish-receipt.tex [deleted file]
sql-ledger/old/sql-ledger/templates/Danish-sales_order.html [deleted file]
sql-ledger/old/sql-ledger/templates/Danish-sales_order.tex [deleted file]
sql-ledger/old/sql-ledger/templates/Danish-statement.html [deleted file]
sql-ledger/old/sql-ledger/templates/Danish-statement.tex [deleted file]
sql-ledger/old/sql-ledger/templates/Default-balance_sheet.html [deleted file]
sql-ledger/old/sql-ledger/templates/Default-check.tex [deleted file]
sql-ledger/old/sql-ledger/templates/Default-income_statement.html [deleted file]
sql-ledger/old/sql-ledger/templates/Default-invoice.html [deleted file]
sql-ledger/old/sql-ledger/templates/Default-invoice.tex [deleted file]
sql-ledger/old/sql-ledger/templates/Default-packing_list.html [deleted file]
sql-ledger/old/sql-ledger/templates/Default-packing_list.tex [deleted file]
sql-ledger/old/sql-ledger/templates/Default-purchase_order.html [deleted file]
sql-ledger/old/sql-ledger/templates/Default-purchase_order.tex [deleted file]
sql-ledger/old/sql-ledger/templates/Default-receipt.tex [deleted file]
sql-ledger/old/sql-ledger/templates/Default-sales_order.html [deleted file]
sql-ledger/old/sql-ledger/templates/Default-sales_order.tex [deleted file]
sql-ledger/old/sql-ledger/templates/Default-statement.html [deleted file]
sql-ledger/old/sql-ledger/templates/Default-statement.tex [deleted file]
sql-ledger/old/sql-ledger/templates/Dutch-balance_sheet.html [deleted file]
sql-ledger/old/sql-ledger/templates/Dutch-check.tex [deleted file]
sql-ledger/old/sql-ledger/templates/Dutch-income_statement.html [deleted file]
sql-ledger/old/sql-ledger/templates/Dutch-invoice.html [deleted file]
sql-ledger/old/sql-ledger/templates/Dutch-invoice.tex [deleted file]
sql-ledger/old/sql-ledger/templates/Dutch-packing_list.html [deleted file]
sql-ledger/old/sql-ledger/templates/Dutch-packing_list.tex [deleted file]
sql-ledger/old/sql-ledger/templates/Dutch-purchase_order.html [deleted file]
sql-ledger/old/sql-ledger/templates/Dutch-purchase_order.tex [deleted file]
sql-ledger/old/sql-ledger/templates/Dutch-receipt.tex [deleted file]
sql-ledger/old/sql-ledger/templates/Dutch-sales_order.html [deleted file]
sql-ledger/old/sql-ledger/templates/Dutch-sales_order.tex [deleted file]
sql-ledger/old/sql-ledger/templates/Dutch-statement.html [deleted file]
sql-ledger/old/sql-ledger/templates/Dutch-statement.tex [deleted file]
sql-ledger/old/sql-ledger/templates/Estonian-balance_sheet.html [deleted file]
sql-ledger/old/sql-ledger/templates/Estonian-check.tex [deleted file]
sql-ledger/old/sql-ledger/templates/Estonian-income_statement.html [deleted file]
sql-ledger/old/sql-ledger/templates/Estonian-invoice.html [deleted file]
sql-ledger/old/sql-ledger/templates/Estonian-invoice.tex [deleted file]
sql-ledger/old/sql-ledger/templates/Estonian-packing_list.html [deleted file]
sql-ledger/old/sql-ledger/templates/Estonian-packing_list.tex [deleted file]
sql-ledger/old/sql-ledger/templates/Estonian-purchase_order.html [deleted file]
sql-ledger/old/sql-ledger/templates/Estonian-purchase_order.tex [deleted file]
sql-ledger/old/sql-ledger/templates/Estonian-receipt.tex [deleted file]
sql-ledger/old/sql-ledger/templates/Estonian-sales_order.html [deleted file]
sql-ledger/old/sql-ledger/templates/Estonian-sales_order.tex [deleted file]
sql-ledger/old/sql-ledger/templates/Estonian-statement.html [deleted file]
sql-ledger/old/sql-ledger/templates/Estonian-statement.tex [deleted file]
sql-ledger/old/sql-ledger/templates/French-balance_sheet.html [deleted file]
sql-ledger/old/sql-ledger/templates/French-check.tex [deleted file]
sql-ledger/old/sql-ledger/templates/French-income_statement.html [deleted file]
sql-ledger/old/sql-ledger/templates/French-invoice.html [deleted file]
sql-ledger/old/sql-ledger/templates/French-invoice.tex [deleted file]
sql-ledger/old/sql-ledger/templates/French-packing_list.html [deleted file]
sql-ledger/old/sql-ledger/templates/French-packing_list.tex [deleted file]
sql-ledger/old/sql-ledger/templates/French-purchase_order.html [deleted file]
sql-ledger/old/sql-ledger/templates/French-purchase_order.tex [deleted file]
sql-ledger/old/sql-ledger/templates/French-receipt.tex [deleted file]
sql-ledger/old/sql-ledger/templates/French-sales_order.html [deleted file]
sql-ledger/old/sql-ledger/templates/French-sales_order.tex [deleted file]
sql-ledger/old/sql-ledger/templates/French-statement.html [deleted file]
sql-ledger/old/sql-ledger/templates/French-statement.tex [deleted file]
sql-ledger/old/sql-ledger/templates/German-balance_sheet.html [deleted file]
sql-ledger/old/sql-ledger/templates/German-check.tex [deleted file]
sql-ledger/old/sql-ledger/templates/German-income_statement.html [deleted file]
sql-ledger/old/sql-ledger/templates/German-invoice.html [deleted file]
sql-ledger/old/sql-ledger/templates/German-invoice.tex [deleted file]
sql-ledger/old/sql-ledger/templates/German-packing_list.html [deleted file]
sql-ledger/old/sql-ledger/templates/German-packing_list.tex [deleted file]
sql-ledger/old/sql-ledger/templates/German-purchase_order.html [deleted file]
sql-ledger/old/sql-ledger/templates/German-purchase_order.tex [deleted file]
sql-ledger/old/sql-ledger/templates/German-receipt.tex [deleted file]
sql-ledger/old/sql-ledger/templates/German-sales_order.html [deleted file]
sql-ledger/old/sql-ledger/templates/German-sales_order.tex [deleted file]
sql-ledger/old/sql-ledger/templates/German-statement.html [deleted file]
sql-ledger/old/sql-ledger/templates/German-statement.tex [deleted file]
sql-ledger/old/sql-ledger/templates/Service-balance_sheet.html [deleted file]
sql-ledger/old/sql-ledger/templates/Service-check.tex [deleted file]
sql-ledger/old/sql-ledger/templates/Service-income_statement.html [deleted file]
sql-ledger/old/sql-ledger/templates/Service-invoice.html [deleted file]
sql-ledger/old/sql-ledger/templates/Service-invoice.tex [deleted file]
sql-ledger/old/sql-ledger/templates/Service-packing_list.html [deleted file]
sql-ledger/old/sql-ledger/templates/Service-packing_list.tex [deleted file]
sql-ledger/old/sql-ledger/templates/Service-purchase_order.html [deleted file]
sql-ledger/old/sql-ledger/templates/Service-purchase_order.tex [deleted file]
sql-ledger/old/sql-ledger/templates/Service-receipt.tex [deleted file]
sql-ledger/old/sql-ledger/templates/Service-sales_order.html [deleted file]
sql-ledger/old/sql-ledger/templates/Service-sales_order.tex [deleted file]
sql-ledger/old/sql-ledger/templates/Service-statement.html [deleted file]
sql-ledger/old/sql-ledger/templates/Service-statement.tex [deleted file]
sql-ledger/old/sql-ledger/templates/Spanish_A4-balance_sheet.html [deleted file]
sql-ledger/old/sql-ledger/templates/Spanish_A4-check.tex [deleted file]
sql-ledger/old/sql-ledger/templates/Spanish_A4-income_statement.html [deleted file]
sql-ledger/old/sql-ledger/templates/Spanish_A4-invoice.html [deleted file]
sql-ledger/old/sql-ledger/templates/Spanish_A4-invoice.tex [deleted file]
sql-ledger/old/sql-ledger/templates/Spanish_A4-packing_list.html [deleted file]
sql-ledger/old/sql-ledger/templates/Spanish_A4-packing_list.tex [deleted file]
sql-ledger/old/sql-ledger/templates/Spanish_A4-purchase_order.html [deleted file]
sql-ledger/old/sql-ledger/templates/Spanish_A4-purchase_order.tex [deleted file]
sql-ledger/old/sql-ledger/templates/Spanish_A4-receipt.tex [deleted file]
sql-ledger/old/sql-ledger/templates/Spanish_A4-sales_order.html [deleted file]
sql-ledger/old/sql-ledger/templates/Spanish_A4-sales_order.tex [deleted file]
sql-ledger/old/sql-ledger/templates/Spanish_A4-statement.html [deleted file]
sql-ledger/old/sql-ledger/templates/Spanish_A4-statement.tex [deleted file]
sql-ledger/old/sql-ledger/templates/Spanish_Letter-balance_sheet.html [deleted file]
sql-ledger/old/sql-ledger/templates/Spanish_Letter-check.tex [deleted file]
sql-ledger/old/sql-ledger/templates/Spanish_Letter-income_statement.html [deleted file]
sql-ledger/old/sql-ledger/templates/Spanish_Letter-invoice.html [deleted file]
sql-ledger/old/sql-ledger/templates/Spanish_Letter-invoice.tex [deleted file]
sql-ledger/old/sql-ledger/templates/Spanish_Letter-packing_list.html [deleted file]
sql-ledger/old/sql-ledger/templates/Spanish_Letter-packing_list.tex [deleted file]
sql-ledger/old/sql-ledger/templates/Spanish_Letter-purchase_order.html [deleted file]
sql-ledger/old/sql-ledger/templates/Spanish_Letter-purchase_order.tex [deleted file]
sql-ledger/old/sql-ledger/templates/Spanish_Letter-receipt.tex [deleted file]
sql-ledger/old/sql-ledger/templates/Spanish_Letter-sales_order.html [deleted file]
sql-ledger/old/sql-ledger/templates/Spanish_Letter-sales_order.tex [deleted file]
sql-ledger/old/sql-ledger/templates/Spanish_Letter-statement.html [deleted file]
sql-ledger/old/sql-ledger/templates/Spanish_Letter-statement.tex [deleted file]
sql-ledger/old/sql-ledger/users/members.default [deleted file]
sql-ledger/sql-ledger-2.0.8.tar.gz [deleted file]
sql-ledger/sql-ledger-2.4.4.tar.gz [deleted file]

diff --git a/sql-ledger/old/sql-ledger/SL/AM.pm b/sql-ledger/old/sql-ledger/SL/AM.pm
deleted file mode 100644 (file)
index d691b3c..0000000
+++ /dev/null
@@ -1,694 +0,0 @@
-#=====================================================================
-# SQL-Ledger Accounting
-# Copyright (C) 2001
-#
-#  Author: Dieter Simader
-#   Email: dsimader@sql-ledger.org
-#     Web: http://www.sql-ledger.org
-#
-#  Contributors:
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#======================================================================
-#
-# Administration module
-#    Chart of Accounts
-#    template routines
-#    preferences
-#
-#======================================================================
-
-package AM;
-
-
-sub get_account {
-  my ($self, $myconfig, $form) = @_;
-
-  # connect to database
-  my $dbh = $form->dbconnect($myconfig);
-
-  my $query = qq|SELECT accno, description, charttype, gifi_accno,
-                 category, link
-                 FROM chart
-                WHERE id = $form->{id}|;
-  my $sth = $dbh->prepare($query);
-  $sth->execute || $form->dberror($query);
-
-  my $ref = $sth->fetchrow_hashref(NAME_lc);
-  
-  foreach my $key (keys %$ref) {
-    $form->{"$key"} = $ref->{"$key"};
-  }
-
-  $sth->finish;
-
-
-  # get default accounts
-  $query = qq|SELECT inventory_accno_id, income_accno_id, expense_accno_id
-              FROM defaults|;
-  $sth = $dbh->prepare($query);
-  $sth->execute || $form->dberror($query);
-
-  $ref = $sth->fetchrow_hashref(NAME_lc);
-
-  map { $form->{$_} = $ref->{$_} } keys %ref;
-
-  $sth->finish;
-  $dbh->disconnect;
-
-}
-
-
-sub save_account {
-  my ($self, $myconfig, $form) = @_;
-
-  # connect to database, turn off AutoCommit
-  my $dbh = $form->dbconnect_noauto($myconfig);
-
-  # sanity check, can't have AR with AR_...
-  if ($form->{AR} || $form->{AP} || $form->{IC}) {
-    map { delete $form->{$_} } qw(AR_amount AR_tax AR_paid AP_amount AP_tax AP_paid IC_sale IC_cogs IC_taxpart IC_income IC_expense IC_taxservice);
-  }
-  
-  $form->{link} = "";
-  foreach my $item ($form->{AR},
-                   $form->{AR_amount},
-                    $form->{AR_tax},
-                    $form->{AR_paid},
-                    $form->{AP},
-                   $form->{AP_amount},
-                   $form->{AP_tax},
-                   $form->{AP_paid},
-                   $form->{IC},
-                   $form->{IC_sale},
-                   $form->{IC_cogs},
-                   $form->{IC_taxpart},
-                   $form->{IC_income},
-                   $form->{IC_expense},
-                   $form->{IC_taxservice},
-                   $form->{CT_tax}
-                   ) {
-     $form->{link} .= "${item}:" if ($item);
-  }
-  chop $form->{link};
-
-  # if we have an id then replace the old record
-  $form->{description} =~ s/'/''/g;
-
-  # strip blanks from accno
-  map { $form->{$_} =~ s/ //g; } qw(accno gifi_accno);
-  
-  my ($query, $sth);
-  
-  if ($form->{id}) {
-    $query = qq|UPDATE chart SET
-                accno = '$form->{accno}',
-               description = '$form->{description}',
-               charttype = '$form->{charttype}',
-               gifi_accno = '$form->{gifi_accno}',
-               category = '$form->{category}',
-               link = '$form->{link}'
-               WHERE id = $form->{id}|;
-  } else {
-    $query = qq|INSERT INTO chart 
-                (accno, description, charttype, gifi_accno, category, link)
-                VALUES ('$form->{accno}', '$form->{description}',
-               '$form->{charttype}', '$form->{gifi_accno}',
-               '$form->{category}', '$form->{link}')|;
-  }
-  $dbh->do($query) || $form->dberror($query);
-  
-
-  if ($form->{IC_taxpart} || $form->{IC_taxservice} || $form->{CT_tax}) {
-
-    my $chart_id = $form->{id};
-    
-    unless ($form->{id}) {
-      # get id from chart
-      $query = qq|SELECT id
-                  FROM chart
-                 WHERE accno = '$form->{accno}'|;
-      $sth = $dbh->prepare($query);
-      $sth->execute || $form->dberror($query);
-
-      ($chart_id) = $sth->fetchrow_array;
-      $sth->finish;
-    }
-    
-    # add account if it doesn't exist in tax
-    $query = qq|SELECT chart_id
-                FROM tax
-               WHERE chart_id = $chart_id|;
-    $sth = $dbh->prepare($query);
-    $sth->execute || $form->dberror($query);
-
-    my ($tax_id) = $sth->fetchrow_array;
-    $sth->finish;
-    
-    # add tax if it doesn't exist
-    unless ($tax_id) {
-      $query = qq|INSERT INTO tax (chart_id, rate)
-                  VALUES ($chart_id, 0)|;
-      $dbh->do($query) || $form->dberror($query);
-    }
-  } else {
-    # remove tax
-    if ($form->{id}) {
-      $query = qq|DELETE FROM tax
-                 WHERE chart_id = $form->{id}|;
-      $dbh->do($query) || $form->dberror($query);
-    }
-  }
-
-
-  # commit
-  my $rc = $dbh->commit;
-  $dbh->disconnect;
-
-  $rc;
-  
-}
-
-
-
-sub delete_account {
-  my ($self, $myconfig, $form) = @_;
-
-  # connect to database, turn off AutoCommit
-  my $dbh = $form->dbconnect_noauto($myconfig);
-
-  # delete chart of account record
-  $query = qq|DELETE FROM chart
-              WHERE id = $form->{id}|;
-  $dbh->do($query) || $form->dberror($query);
-
-  # set inventory_accno_id, income_accno_id, expense_accno_id to defaults
-  $query = qq|UPDATE parts
-              SET inventory_accno_id = 
-                        (SELECT inventory_accno_id FROM defaults)
-             WHERE inventory_accno_id = $form->{id}|;
-  $dbh->do($query) || $form->dberror($query);
-  
-  $query = qq|UPDATE parts
-              SET income_accno_id =
-                        (SELECT income_accno_id FROM defaults)
-             WHERE income_accno_id = $form->{id}|;
-  $dbh->do($query) || $form->dberror($query);
-  
-  $query = qq|UPDATE parts
-              SET expense_accno_id =
-                        (SELECT expense_accno_id FROM defaults)
-             WHERE expense_accno_id = $form->{id}|;
-  $dbh->do($query) || $form->dberror($query);
-  
-  foreach my $table (qw(partstax customertax vendortax tax)) {
-    $query = qq|DELETE FROM $table
-               WHERE chart_id = $form->{id}|;
-    $dbh->do($query) || $form->dberror($query);
-  }
-
-  # commit and redirect
-  my $rc = $dbh->commit;
-  $dbh->disconnect;
-  
-  $rc;
-
-}
-
-
-sub gifi_accounts {
-  my ($self, $myconfig, $form) = @_;
-  
-  # connect to database
-  my $dbh = $form->dbconnect($myconfig);
-
-  my $query = qq|SELECT accno, description
-                 FROM gifi
-                ORDER BY accno|;
-
-  $sth = $dbh->prepare($query);
-  $sth->execute || $form->dberror($query);
-
-  while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
-    push @{ $form->{ALL} }, $ref;
-  }
-
-  $sth->finish;
-  $dbh->disconnect;
-  
-}
-
-
-
-sub get_gifi {
-  my ($self, $myconfig, $form) = @_;
-
-  # connect to database
-  my $dbh = $form->dbconnect($myconfig);
-  
-  my $query = qq|SELECT accno, description
-                 FROM gifi
-                WHERE accno = '$form->{accno}'|;
-  my $sth = $dbh->prepare($query);
-  $sth->execute || $form->dberror($query);
-
-  my $ref = $sth->fetchrow_hashref(NAME_lc);
-  
-  map { $form->{$_} = $ref->{$_} } keys %$ref;
-
-  $sth->finish;
-  $dbh->disconnect;
-
-}
-
-
-sub save_gifi {
-  my ($self, $myconfig, $form) = @_;
-  
-  # connect to database
-  my $dbh = $form->dbconnect($myconfig);
-  
-  $form->{description} =~ s/'/''/g;
-  $form->{accno} =~ s/ //g;
-
-  # id is the old account number!
-  if ($form->{id}) {
-    $query = qq|UPDATE gifi SET
-                accno = '$form->{accno}',
-               description = '$form->{description}'
-               WHERE accno = '$form->{id}'|;
-  } else {
-    $query = qq|INSERT INTO gifi 
-                (accno, description)
-                VALUES ('$form->{accno}', '$form->{description}')|;
-  }
-  $dbh->do($query) || $form->dberror($query);
-  
-  $dbh->disconnect;
-
-}
-
-
-sub delete_gifi {
-  my ($self, $myconfig, $form) = @_;
-  
-  # connect to database
-  my $dbh = $form->dbconnect($myconfig);
-  
-  # id is the old account number!
-  $query = qq|DELETE FROM gifi
-             WHERE accno = '$form->{id}'|;
-  $dbh->do($query) || $form->dberror($query);
-  
-  $dbh->disconnect;
-
-}
-
-
-sub load_template {
-  my ($self, $form) = @_;
-  
-  open(TEMPLATE, "$form->{file}") or $form->error("$form->{file} : $!");
-
-  while (<TEMPLATE>) {
-    $form->{body} .= $_;
-  }
-
-  close(TEMPLATE);
-
-}
-
-
-sub save_template {
-  my ($self, $form) = @_;
-  
-  open(TEMPLATE, ">$form->{file}") or $form->error("$form->{file} : $!");
-  
-  # strip \r
-  $form->{body} =~ s/\r\n/\n/g;
-  print TEMPLATE $form->{body};
-
-  close(TEMPLATE);
-
-}
-
-
-
-sub save_preferences {
-  my ($self, $myconfig, $form, $memberfile, $userspath) = @_;
-
-  map { ($form->{$_}) = split /--/, $form->{$_} } qw(inventory_accno income_accno expense_accno fxgain_accno fxloss_accno);
-  
-  my @a;
-  $form->{curr} =~ s/ //g;
-  map { push(@a, uc pack "A3", $_) if $_ } split /:/, $form->{curr};
-  $form->{curr} = join ':', @a;
-    
-  # connect to database
-  my $dbh = $form->dbconnect_noauto($myconfig);
-  
-  # these defaults are database wide
-  # user specific variables are in myconfig
-  # save defaults
-  my $query = qq|UPDATE defaults SET
-                 inventory_accno_id = 
-                    (SELECT id FROM chart
-                               WHERE accno = '$form->{inventory_accno}'),
-                 income_accno_id =
-                    (SELECT id FROM chart
-                               WHERE accno = '$form->{income_accno}'),
-                expense_accno_id =
-                    (SELECT id FROM chart
-                               WHERE accno = '$form->{expense_accno}'),
-                fxgain_accno_id =
-                    (SELECT id FROM chart
-                               WHERE accno = '$form->{fxgain_accno}'),
-                fxloss_accno_id =
-                    (SELECT id FROM chart
-                               WHERE accno = '$form->{fxloss_accno}'),
-                invnumber = '$form->{invnumber}',
-                sonumber = '$form->{sonumber}',
-                ponumber = '$form->{ponumber}',
-                yearend = '$form->{yearend}',
-                curr = '$form->{curr}',
-                weightunit = '$form->{weightunit}',
-                businessnumber = '$form->{businessnumber}'
-               |;
-  $dbh->do($query) || $form->dberror($query);
-
-  # update name
-  my $name = $form->{name};
-  $name =~ s/'/''/g;
-  $query = qq|UPDATE employee
-              SET name = '$name'
-             WHERE login = '$form->{login}'|;
-  $dbh->do($query) || $form->dberror($query);
-  
-  foreach my $item (split / /, $form->{taxaccounts}) {
-    $query = qq|UPDATE tax
-               SET rate = |.($form->{$item} / 100).qq|,
-               taxnumber = '$form->{"taxnumber_$item"}'
-               WHERE chart_id = $item|;
-    $dbh->do($query) || $form->dberror($query);
-  }
-
-  my $rc = $dbh->commit;
-  $dbh->disconnect;
-
-  # save first currency in myconfig
-  $form->{currency} = substr($form->{curr},0,3);
-  
-  my $myconfig = new User "$memberfile", "$form->{login}";
-  
-  foreach my $item (keys %$form) {
-    $myconfig->{$item} = $form->{$item};
-  }
-
-  $myconfig->save_member($memberfile, $userspath);
-
-  $rc;
-  
-}
-
-
-sub defaultaccounts {
-  my ($self, $myconfig, $form) = @_;
-  
-  # connect to database
-  my $dbh = $form->dbconnect($myconfig);
-  
-  # get defaults from defaults table
-  my $query = qq|SELECT * FROM defaults|;
-  my $sth = $dbh->prepare($query);
-  $sth->execute || $form->dberror($query);
-  
-  $form->{defaults} = $sth->fetchrow_hashref(NAME_lc);
-  $form->{defaults}{IC} = $form->{defaults}{inventory_accno_id};
-  $form->{defaults}{IC_income} = $form->{defaults}{income_accno_id};
-  $form->{defaults}{IC_expense} = $form->{defaults}{expense_accno_id};
-  $form->{defaults}{FX_gain} = $form->{defaults}{fxgain_accno_id};
-  $form->{defaults}{FX_loss} = $form->{defaults}{fxloss_accno_id};
-  
-  
-  $sth->finish;
-
-
-  $query = qq|SELECT id, accno, description, link
-              FROM chart
-              WHERE link LIKE '%IC%'
-              ORDER BY accno|;
-  $sth = $dbh->prepare($query);
-  $sth->execute || $self->dberror($query);
-
-  while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
-    foreach my $key (split(/:/, $ref->{link})) {
-      if ($key =~ /IC/) {
-       $nkey = $key;
-       if ($key =~ /cogs/) {
-         $nkey = "IC_expense";
-       }
-       if ($key =~ /sale/) {
-         $nkey = "IC_income";
-       }
-        %{ $form->{IC}{$nkey}{$ref->{accno}} } = ( id => $ref->{id},
-                                        description => $ref->{description} );
-      }
-    }
-  }
-  $sth->finish;
-
-
-  $query = qq|SELECT id, accno, description
-              FROM chart
-             WHERE category = 'I'
-             AND charttype = 'A'
-              ORDER BY accno|;
-  $sth = $dbh->prepare($query);
-  $sth->execute || $self->dberror($query);
-
-  while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
-    %{ $form->{IC}{FX_gain}{$ref->{accno}} } = ( id => $ref->{id},
-                                      description => $ref->{description} );
-  }
-  $sth->finish;
-
-  $query = qq|SELECT id, accno, description
-              FROM chart
-             WHERE category = 'E'
-             AND charttype = 'A'
-              ORDER BY accno|;
-  $sth = $dbh->prepare($query);
-  $sth->execute || $self->dberror($query);
-
-  while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
-    %{ $form->{IC}{FX_loss}{$ref->{accno}} } = ( id => $ref->{id},
-                                      description => $ref->{description} );
-  }
-  $sth->finish;
-
-
-  # now get the tax rates and numbers
-  $query = qq|SELECT chart.id, chart.accno, chart.description,
-              tax.rate * 100 AS rate, tax.taxnumber
-              FROM chart, tax
-             WHERE chart.id = tax.chart_id|;
-
-  $sth = $dbh->prepare($query);
-  $sth->execute || $form->dberror($query);
-
-  while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
-    $form->{taxrates}{$ref->{accno}}{id} = $ref->{id};
-    $form->{taxrates}{$ref->{accno}}{description} = $ref->{description};
-    $form->{taxrates}{$ref->{accno}}{taxnumber} = $ref->{taxnumber} if $ref->{taxnumber};
-    $form->{taxrates}{$ref->{accno}}{rate} = $ref->{rate} if $ref->{rate};
-  }
-
-  $sth->finish;
-  $dbh->disconnect;
-  
-}
-
-
-sub backup {
-  my ($self, $myconfig, $form, $userspath) = @_;
-  
-  my ($tmpfile, $out, $mail);
-  
-  if ($form->{media} eq 'email') {
-
-    my $boundary = time;
-    $tmpfile = "$userspath/$boundary.$myconfig->{dbname}-$form->{dbversion}.sql";
-    $out = $form->{OUT};
-    $form->{OUT} = ">$tmpfile";
-    
-    use SL::Mailer;
-    $mail = new Mailer;
-
-    $mail->{to} = qq|"$myconfig->{name}" <$myconfig->{email}>|;
-    $mail->{from} = qq|"$myconfig->{name}" <$myconfig->{email}>|;
-    $mail->{subject} = "SQL-Ledger Backup / $myconfig->{dbname}-$form->{dbversion}.sql";
-    @{ $mail->{attachments} } = ($tmpfile);
-    $mail->{version} = $form->{version};
-    $mail->{fileid} = "$boundary.";
-
-    $myconfig->{signature} =~ s/\\n/\r\n/g;
-    $mail->{message} = "--\n$myconfig->{signature}";
-    
-  }
-    
-  if ($form->{OUT}) {
-    open(OUT, "$form->{OUT}") or $form->error("$form->{OUT} : $!");
-  } else {
-    open(OUT, ">-") or $form->error("STDOUT : $!");
-  }
-
-  if ($form->{media} eq 'file') {
-    print OUT qq|Content-Type: Application/File;
-Content-Disposition: filename="$myconfig->{dbname}-$form->{dbversion}.sql"\n\n|;
-  }
-
-  # connect to database
-  my $dbh = $form->dbconnect($myconfig);
-
-  # get all the tables
-  my @tables = $dbh->tables;
-  
-  my $today = scalar localtime;
-  
-
-  $myconfig->{dbhost} = 'localhost' unless $myconfig->{dbhost};
-  
-  print OUT qq|-- SQL-Ledger Backup
--- Dataset: $myconfig->{dbname}
--- Version: $form->{dbversion}
--- Host: $myconfig->{dbhost}
--- Login: $form->{login}
--- User: $myconfig->{name}
--- Date: $today
---
--- set options
-$myconfig->{dboptions};
---
-|;
-
-  foreach $table (@tables) {
-    my $query = qq|SELECT * FROM $table|;
-    
-    my $sth = $dbh->prepare($query);
-    $sth->execute || $form->dberror($query);
-
-    $query = qq|INSERT INTO $table (|;
-    map { $query .= qq|$sth->{NAME}->[$_],| } (0 .. $sth->{NUM_OF_FIELDS} - 1);
-    chop $query;
-
-    $query .= qq|) VALUES|;
-    
-    print OUT qq|--
-DELETE FROM $table;
-|;
-    while (my @arr = $sth->fetchrow_array) {
-
-      $fields = "(";
-      foreach my $item (@arr) {
-       if (defined $item) {
-         $item =~ s/'/''/g;
-         $fields .= qq|'$item',|;
-       } else {
-         $fields .= 'NULL,';
-       }
-      }
-       
-      chop $fields;
-      $fields .= ")";
-       
-      print OUT qq|$query $fields;\n|;
-    }
-    
-    $sth->finish;
-  }
-
-  $query = qq|SELECT last_value FROM id|;
-  $sth = $dbh->prepare($query);
-  $sth->execute || $form->dberror($query);
-
-  my ($id) = $sth->fetchrow_array;
-  $sth->finish;
-  
-  print OUT qq|--
-DROP SEQUENCE id;
-CREATE SEQUENCE id START $id;
-|;
-  
-  close(OUT);
-  
-  $dbh->disconnect;
-
-  if ($form->{media} eq 'email') {
-    my $err = $mail->send($out);
-    $_ = $tmpfile;
-    unlink;
-  }
-    
-}
-
-
-sub closedto {
-  my ($self, $myconfig, $form) = @_;
-
-  my $dbh = $form->dbconnect($myconfig);
-
-  my $query = qq|SELECT closedto, revtrans FROM defaults|;
-  my $sth = $dbh->prepare($query);
-  $sth->execute || $form->dberror($query);
-
-  ($form->{closedto}, $form->{revtrans}) = $sth->fetchrow_array;
-  
-  $sth->finish;
-  
-  $dbh->disconnect;
-
-}
-
-sub closebooks {
-  my ($self, $myconfig, $form) = @_;
-
-  my $dbh = $form->dbconnect($myconfig);
-
-  if ($form->{revtrans}) {
-   
-    $query = qq|UPDATE defaults SET closedto = NULL,
-                                   revtrans = '1'|;
-  } else {
-    if ($form->{closedto}) {
-    
-      $query = qq|UPDATE defaults SET closedto = '$form->{closedto}',
-                                     revtrans = '0'|;
-    } else {
-      
-      $query = qq|UPDATE defaults SET closedto = NULL,
-                                     revtrans = '0'|;
-    }
-  }
-
-  # set close in defaults
-  $dbh->do($query) || $form->dberror($query);
-  
-  $dbh->disconnect;
-  
-}
-
-
-1;
-
diff --git a/sql-ledger/old/sql-ledger/SL/AP.pm b/sql-ledger/old/sql-ledger/SL/AP.pm
deleted file mode 100644 (file)
index e1870f8..0000000
+++ /dev/null
@@ -1,381 +0,0 @@
-#=====================================================================
-# SQL-Ledger Accounting
-# Copyright (C) 2001
-#
-#  Author: Dieter Simader
-#   Email: dsimader@sql-ledger.org
-#     Web: http://www.sql-ledger.org
-#
-#  Contributors:
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#======================================================================
-#
-# Accounts Payables database backend routines
-#
-#======================================================================
-
-
-package AP;
-
-
-sub post_transaction {
-  my ($self, $myconfig, $form) = @_;
-
-  # connect to database
-  my $dbh = $form->dbconnect_noauto($myconfig);
-  
-  my ($null, $taxrate, $amount);
-  my $exchangerate = 0;
-  
-  # split and store id numbers in link accounts
-  ($form->{AP}{payables}) = split(/--/, $form->{AP});
-  map { ($form->{AP}{"amount_$_"}) = split(/--/, $form->{"AP_amount_$_"}) } (1 .. $form->{rowcount});
-
-  if ($form->{currency} eq $form->{defaultcurrency}) {
-    $form->{exchangerate} = 1;
-  } else {
-    $exchangerate = $form->check_exchangerate($myconfig, $form->{currency}, $form->{transdate}, 'sell');
-
-    $form->{exchangerate} = ($exchangerate) ? $exchangerate : $form->parse_amount($myconfig, $form->{exchangerate});
-  }
-  
-  # reverse and parse amounts
-  for my $i (1 .. $form->{rowcount}) {
-    $form->{"amount_$i"} = $form->round_amount($form->parse_amount($myconfig, $form->{"amount_$i"}) * $form->{exchangerate} * -1, 2);
-    $amount += ($form->{"amount_$i"} * -1);
-  }
-
-  # this is for ap
-  $form->{amount} = $amount;
-  
-  # taxincluded doesn't make sense if there is no amount
-  $form->{taxincluded} = 0 if ($form->{amount} == 0);
-
-  for my $item (split / /, $form->{taxaccounts}) {
-    $form->{AP}{"tax_$item"} = $item;
-
-    $amount = $form->round_amount($form->parse_amount($myconfig, $form->{"tax_$item"}), 2);
-    
-    $form->{"tax_$item"} = $form->round_amount($amount * $form->{exchangerate}, 2) * -1;
-    $form->{total_tax} += ($form->{"tax_$item"} * -1);
-  }
-
-  # adjust paidaccounts if there is no date in the last row
-  $form->{paidaccounts}-- unless ($form->{"datepaid_$form->{paidaccounts}"});
-  
-  $form->{invpaid} = 0;
-  # add payments
-  for my $i (1 .. $form->{paidaccounts}) {
-    $form->{"paid_$i"} = $form->round_amount($form->parse_amount($myconfig, $form->{"paid_$i"}), 2);
-    
-    $form->{invpaid} += $form->{"paid_$i"};
-    $form->{datepaid} = $form->{"datepaid_$i"};
-
-  }
-  
-  $form->{invpaid} = $form->round_amount($form->{invpaid} * $form->{exchangerate}, 2);
-  
-  if ($form->{taxincluded} *= 1) {
-    for $i (1 .. $form->{rowcount}) {
-      $tax = $form->{total_tax} * $form->{"amount_$i"} / $form->{amount};
-      $amount = $form->{"amount_$i"} - $tax;
-      $form->{"amount_$i"} = $form->round_amount($amount, 2);
-      $diff += $amount - $form->{"amount_$i"};
-    }
-
-    # deduct taxes from amount
-    $form->{amount} -= $form->{total_tax};
-    # deduct difference from amount_1
-    $form->{amount_1} += $form->round_amount($diff, 2);
-  }
-
-  $form->{netamount} = $form->{amount};
-  
-  # store invoice total, this goes into ap table
-  $form->{invtotal} = $form->{amount} + $form->{total_tax};
-  
-  # amount for total AP
-  $form->{payables} = $form->{invtotal};
-
-  my ($query, $sth);
-
-  # if we have an id delete old records
-  if ($form->{id}) {
-
-    # delete detail records
-    $query = qq|DELETE FROM acc_trans WHERE trans_id = $form->{id}|;
-
-    $dbh->do($query) || $form->dberror($query);
-    
-  } else {
-    my $uid = time;
-    $uid .= $form->{login};
-
-    $query = qq|INSERT INTO ap (invnumber, employee_id)
-                VALUES ('$uid', (SELECT id FROM employee
-                                WHERE login = '$form->{login}') )|;
-    $dbh->do($query) || $form->dberror($query);
-    
-    $query = qq|SELECT id FROM ap
-                WHERE invnumber = '$uid'|;
-    $sth = $dbh->prepare($query);
-    $sth->execute || $form->dberror($query);
-
-    ($form->{id}) = $sth->fetchrow_array;
-    $sth->finish;
-   
-  }
-
-  # escape '
-  $form->{notes} =~ s/'/''/g;
-    
-  $form->{datepaid} = $form->{transdate} unless ($form->{datepaid});
-  my $datepaid = ($form->{invpaid} != 0) ? qq|'$form->{datepaid}'| : 'NULL';
-
-  $query = qq|UPDATE ap SET
-             invnumber = '$form->{invnumber}',
-             transdate = '$form->{transdate}',
-             ordnumber = '$form->{ordnumber}',
-             vendor_id = $form->{vendor_id},
-             taxincluded = '$form->{taxincluded}',
-             amount = $form->{invtotal},
-             duedate = '$form->{duedate}',
-             paid = $form->{invpaid},
-             datepaid = $datepaid,
-             netamount = $form->{netamount},
-             curr = '$form->{currency}',
-             notes = '$form->{notes}'
-             WHERE id = $form->{id}
-            |;
-  $dbh->do($query) || $form->dberror($query);
-
-
-  # update exchangerate
-  if (($form->{currency} ne $form->{defaultcurrency}) && !$exchangerate) {
-    $form->update_exchangerate($dbh, $form->{currency}, $form->{transdate}, 0, $form->{exchangerate});
-  }
-
-  # add individual transactions
-  foreach my $item (keys %{ $form->{AP} }) {
-    if ($form->{$item} != 0) {
-      $project_id = 'NULL';
-      if ($item =~ /amount_/) {
-       if ($form->{"project_id_$'"} && $form->{"projectnumber_$'"}) { 
-         $project_id = $form->{"project_id_$'"};
-       }
-      }
-
-      # insert detail records in acc_trans
-      $query = qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate,
-                                         project_id)
-                  VALUES ($form->{id}, (SELECT id FROM chart
-                                       WHERE accno = '$form->{AP}{$item}'),
-                 $form->{$item}, '$form->{transdate}', $project_id)|;
-      $dbh->do($query) || $form->dberror($query);
-    }
-  }
-
-  # if there is no amount but a payment record a payable
-  if ($form->{amount} == 0 && $form->{invtotal} == 0) {
-    $form->{payables} = $form->{invpaid};
-  }
-  # add paid transactions
-  for my $i (1 .. $form->{paidaccounts}) {
-    if ($form->{"paid_$i"} != 0) {
-
-      $exchangerate = 0;
-      if ($form->{currency} eq $form->{defaultcurrency}) {
-       $form->{"exchangerate_$i"} = 1;
-      } else {
-       $exchangerate = $form->check_exchangerate($myconfig, $form->{currency}, $form->{"datepaid_$i"}, 'sell');
-
-       $form->{"exchangerate_$i"} = ($exchangerate) ? $exchangerate : $form->parse_amount($myconfig, $form->{"exchangerate_$i"});
-      }
-      
-      
-      # get paid account
-      ($form->{AP}{"paid_$i"}) = split(/--/, $form->{"AP_paid_$i"});
-      $form->{"datepaid_$i"} = $form->{transdate} unless ($form->{"datepaid_$i"});
-
-      # if there is no amount and invtotal is zero there is no exchangerate
-      if ($form->{amount} == 0 && $form->{invtotal} == 0) {
-       $form->{exchangerate} = $form->{"exchangerate_$i"};
-      }
-      
-      $amount = $form->round_amount($form->{"paid_$i"} * $form->{exchangerate} * -1, 2);
-      if ($form->{payables}) {
-       $query = qq|INSERT INTO acc_trans (trans_id, chart_id, amount,
-                   transdate)
-                   VALUES ($form->{id},
-                          (SELECT id FROM chart
-                           WHERE accno = '$form->{AP}{payables}'),
-                   $amount, '$form->{"datepaid_$i"}')|;
-       $dbh->do($query) || $form->dberror($query);
-      }
-      $form->{payables} = $amount;
-
-      # add payment
-      $query = qq|INSERT INTO acc_trans (trans_id, chart_id, amount,
-                  transdate, source)
-                  VALUES ($form->{id},
-                        (SELECT id FROM chart
-                         WHERE accno = '$form->{AP}{"paid_$i"}'),
-                 $form->{"paid_$i"}, '$form->{"datepaid_$i"}',
-                 '$form->{"source_$i"}')|;
-      $dbh->do($query) || $form->dberror($query);
-      
-      # add exchange rate difference
-      $amount = $form->round_amount($form->{"paid_$i"} * ($form->{"exchangerate_$i"} - 1), 2);
-      if ($amount != 0) {
-       $query = qq|INSERT INTO acc_trans (trans_id, chart_id, amount,
-                   transdate, fx_transaction, cleared)
-                   VALUES ($form->{id},
-                          (SELECT id FROM chart
-                           WHERE accno = '$form->{AP}{"paid_$i"}'),
-                   $amount, '$form->{"datepaid_$i"}', '1', '0')|;
-
-       $dbh->do($query) || $form->dberror($query);
-      }
-
-      # exchangerate gain/loss
-      $amount = $form->round_amount($form->{"paid_$i"} * ($form->{exchangerate} - $form->{"exchangerate_$i"}), 2);
-
-      if ($amount != 0) {
-       $accno = ($amount > 0) ? $form->{fxgain_accno} : $form->{fxloss_accno};
-       $query = qq|INSERT INTO acc_trans (trans_id, chart_id, amount,
-                   transdate, fx_transaction, cleared)
-                   VALUES ($form->{id}, (SELECT id FROM chart
-                                         WHERE accno = '$accno'),
-                   $amount, '$form->{"datepaid_$i"}', '1', '0')|;
-       $dbh->do($query) || $form->dberror($query);
-      }
-
-      # update exchange rate record
-      if (($form->{currency} ne $form->{defaultcurrency}) && !$exchangerate) {
-       $form->update_exchangerate($dbh, $form->{currency}, $form->{"datepaid_$i"}, 0, $form->{"exchangerate_$i"});
-      }
-    }
-  }
-  
-  my $rc = $dbh->commit;
-  $dbh->disconnect;
-
-  $rc;
-  
-}
-
-
-
-
-sub delete_transaction {
-  my ($self, $myconfig, $form) = @_;
-
-  # connect to database
-  my $dbh = $form->dbconnect_noauto($myconfig);
-
-  # check for other foreign currency transactions
-  $form->delete_exchangerate($dbh) if ($form->{currency} ne $form->{defaultcurrency});
-  
-  my $query = qq|DELETE FROM ap WHERE id = $form->{id}|;
-  $dbh->do($query) || $form->dberror($query);
-
-  $query = qq|DELETE FROM acc_trans WHERE trans_id = $form->{id}|;
-  $dbh->do($query) || $form->dberror($query);
-  
-  # commit and redirect
-  my $rc = $dbh->commit;
-  $dbh->disconnect;
-
-  $rc;
-
-}
-
-
-
-
-sub ap_transactions {
-  my ($self, $myconfig, $form) = @_;
-
-  # connect to database
-  my $dbh = $form->dbconnect($myconfig);
-
-  my $incemp = qq|, (SELECT e.name FROM employee e
-                   WHERE a.employee_id = e.id) AS employee
-                | if ($form->{l_employee});
-                   
-  my $query = qq|SELECT a.id, a.invnumber, a.transdate, a.duedate,
-                 a.amount, a.paid, a.ordnumber, v.name, a.invoice,
-                a.netamount, a.datepaid, a.notes
-                
-                $incemp
-                
-                FROM ap a, vendor v
-                WHERE a.vendor_id = v.id|;
-
-  if ($form->{vendor_id}) {
-    $query .= " AND a.vendor_id = $form->{vendor_id}";
-  } else {
-    if ($form->{vendor}) {
-      my $vendor = $form->like(lc $form->{vendor});
-      $query .= " AND lower(v.name) LIKE '$vendor'";
-    }
-  }
-  if ($form->{invnumber}) {
-    my $invnumber = $form->like(lc $form->{invnumber});
-    $query .= " AND lower(a.invnumber) LIKE '$invnumber'";
-  }
-  if ($form->{ordnumber}) {
-    my $ordnumber = $form->like(lc $form->{ordnumber});
-    $query .= " AND lower(a.ordnumber) LIKE '$ordnumber'";
-  }
-  if ($form->{notes}) {
-    my $notes = $form->like(lc $form->{notes});
-    $query .= " AND lower(a.notes) LIKE '$notes'";
-  }
-
-  $query .= " AND a.transdate >= '$form->{transdatefrom}'" if $form->{transdatefrom};
-  $query .= " AND a.transdate <= '$form->{transdateto}'" if $form->{transdateto};
-  if ($form->{open} || $form->{closed}) {
-    unless ($form->{open} && $form->{closed}) {
-      $query .= " AND a.amount <> a.paid" if ($form->{open});
-      $query .= " AND a.amount = a.paid" if ($form->{closed});
-    }
-  }
-
-  my @a = (transdate, invnumber, name);
-  push @a, "employee" if $self->{l_employee};
-  my $sortorder = join ', ', $form->sort_columns(@a);
-  $sortorder = $form->{sort} unless $sortorder;
-
-  $query .= " ORDER by $sortorder";
-
-  my $sth = $dbh->prepare($query);
-  $sth->execute || $form->dberror($query);
-
-  while (my $ap = $sth->fetchrow_hashref(NAME_lc)) {
-    push @{ $form->{AP} }, $ap;
-  }
-  
-  $sth->finish;
-  $dbh->disconnect;
-  
-}
-
-
-1;
-
diff --git a/sql-ledger/old/sql-ledger/SL/AR.pm b/sql-ledger/old/sql-ledger/SL/AR.pm
deleted file mode 100644 (file)
index 4ea3d82..0000000
+++ /dev/null
@@ -1,381 +0,0 @@
-#=====================================================================
-# SQL-Ledger Accounting
-# Copyright (C) 2001
-#
-#  Author: Dieter Simader
-#   Email: dsimader@sql-ledger.org
-#     Web: http://www.sql-ledger.org
-#
-#  Contributors:
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#======================================================================
-#
-# Accounts Receivable module backend routines
-#
-#======================================================================
-
-package AR;
-
-
-sub post_transaction {
-  my ($self, $myconfig, $form) = @_;
-
-  my ($null, $taxrate, $amount, $tax, $diff);
-  my $exchangerate = 0;
-  my $i;
-
-  # split and store id numbers in link accounts
-  map { ($form->{AR}{"amount_$_"}) = split(/--/, $form->{"AR_amount_$_"}) } (1 .. $form->{rowcount});
-  ($form->{AR}{receivables}) = split(/--/, $form->{AR});
-
-  if ($form->{currency} eq $form->{defaultcurrency}) {
-    $form->{exchangerate} = 1;
-  } else {
-    $exchangerate = $form->check_exchangerate($myconfig, $form->{currency}, $form->{transdate}, 'buy');
-  }
-  
-  $form->{exchangerate} = ($exchangerate) ? $exchangerate : $form->parse_amount($myconfig, $form->{exchangerate}); 
-
-  for $i (1 .. $form->{rowcount}) {
-    $form->{"amount_$i"} = $form->round_amount($form->parse_amount($myconfig, $form->{"amount_$i"}) * $form->{exchangerate}, 2);
-    $amount += $form->{"amount_$i"};
-  }
-  
-  # this is for ar
-  $form->{amount} = $amount;
-
-  # taxincluded doesn't make sense if there is no amount
-  $form->{taxincluded} = 0 if ($form->{amount} == 0);
-
-  foreach my $item (split / /, $form->{taxaccounts}) {
-    $form->{AR}{"tax_$item"} = $item;
-
-    $amount = $form->round_amount($form->parse_amount($myconfig, $form->{"tax_$item"}), 2);
-    
-    $form->{"tax_$item"} = $form->round_amount($amount * $form->{exchangerate}, 2);
-    $form->{total_tax} += $form->{"tax_$item"};
-
-  }
-
-  # adjust paidaccounts if there is no date in the last row
-  $form->{paidaccounts}-- unless ($form->{"datepaid_$form->{paidaccounts}"});
-
-  $form->{invpaid} = 0;
-  # add payments
-  for $i (1 .. $form->{paidaccounts}) {
-    $form->{"paid_$i"} = $form->round_amount($form->parse_amount($myconfig, $form->{"paid_$i"}), 2);
-    
-    $form->{invpaid} += $form->{"paid_$i"};
-    $form->{datepaid} = $form->{"datepaid_$i"};
-
-    # reverse payment
-    $form->{"paid_$i"} *= -1;
-
-  }
-  
-  $form->{invpaid} = $form->round_amount($form->{invpaid} * $form->{exchangerate}, 2);
-  if ($form->{taxincluded} *= 1) {
-    for $i (1 .. $form->{rowcount}) {
-      $tax = $form->{total_tax} * $form->{"amount_$i"} / $form->{amount};
-      $amount = $form->{"amount_$i"} - $tax;
-      $form->{"amount_$i"} = $form->round_amount($amount, 2);
-      $diff += $amount - $form->{"amount_$i"};
-    }
-    
-    $form->{amount} -= $form->{total_tax};
-    # deduct difference from amount_1
-    $form->{amount_1} += $form->round_amount($diff, 2);
-  }
-
-  # store invoice total, this goes into ar table
-  $form->{invtotal} = $form->{amount} + $form->{total_tax};
-  
-  # connect to database
-  my $dbh = $form->dbconnect_noauto($myconfig);
-
-  my ($query, $sth);
-  
-  # if we have an id delete old records
-  if ($form->{id}) {
-
-    # delete detail records
-    $query = qq|DELETE FROM acc_trans WHERE trans_id = $form->{id}|;
-    $dbh->do($query) || $form->dberror($query);
-    
-  } else {
-    my $uid = time;
-    $uid .= $form->{login};
-
-    $query = qq|INSERT INTO ar (invnumber, employee_id)
-                VALUES ('$uid', (SELECT id FROM employee
-                                WHERE login = '$form->{login}') )|;
-    $dbh->do($query) || $form->dberror($query);
-    
-    $query = qq|SELECT id FROM ar
-                WHERE invnumber = '$uid'|;
-    $sth = $dbh->prepare($query);
-    $sth->execute || $form->dberror($query);
-
-    ($form->{id}) = $sth->fetchrow_array;
-    $sth->finish;
-
-  }
-
-  # escape '
-  $form->{notes} =~ s/'/''/g;
-
-  # record last payment date in ar table
-  $form->{datepaid} = $form->{transdate} unless $form->{datepaid};
-  my $datepaid = ($form->{invpaid} != 0) ? qq|'$form->{datepaid}'| : 'NULL';
-  
-  $query = qq|UPDATE ar set
-             invnumber = '$form->{invnumber}',
-             ordnumber = '$form->{ordnumber}',
-             transdate = '$form->{transdate}',
-             customer_id = $form->{customer_id},
-             taxincluded = '$form->{taxincluded}',
-             amount = $form->{invtotal},
-             duedate = '$form->{duedate}',
-             paid = $form->{invpaid},
-             datepaid = $datepaid,
-             netamount = $form->{amount},
-             curr = '$form->{currency}',
-             notes = '$form->{notes}'
-             WHERE id = $form->{id}|;
-  $dbh->do($query) || $form->dberror($query);
-
-  
-  # amount for AR account
-  $form->{receivables} = $form->round_amount($form->{invtotal} * -1, 2);
-  
-
-  # update exchangerate
-  if (($form->{currency} ne $form->{defaultcurrency}) && !$exchangerate) {
-    $form->update_exchangerate($dbh, $form->{currency}, $form->{transdate}, $form->{exchangerate}, 0);
-  }
-  
-  # add individual transactions for AR, amount and taxes
-  foreach my $item (keys %{ $form->{AR} }) {
-    if ($form->{$item} != 0) {
-      $project_id = 'NULL';
-      if ($item =~ /amount_/) {
-       if ($form->{"project_id_$'"} && $form->{"projectnumber_$'"}) {
-         $project_id = $form->{"project_id_$'"};
-       }
-      }
-      
-      # insert detail records in acc_trans
-      $query = qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate,
-                                         project_id)
-                 VALUES ($form->{id}, (SELECT id FROM chart
-                                       WHERE accno = '$form->{AR}{$item}'),
-                 $form->{$item}, '$form->{transdate}', $project_id)|;
-      $dbh->do($query) || $form->dberror($query);
-    }
-  }
-
-  # if there is no amount but a payment record a receivables
-  if ($form->{amount} == 0 && $form->{invtotal} == 0) {
-    $form->{receivables} = $form->{invpaid} * -1;
-  }
-  
-  # add paid transactions
-  for my $i (1 .. $form->{paidaccounts}) {
-    if ($form->{"paid_$i"} != 0) {
-      
-       ($form->{AR}{"paid_$i"}) = split(/--/, $form->{"AR_paid_$i"});
-      $form->{"datepaid_$i"} = $form->{transdate} unless ($form->{"datepaid_$i"});
-     
-      $exchangerate = 0;
-      if ($form->{currency} eq $form->{defaultcurrency}) {
-       $form->{"exchangerate_$i"} = 1;
-      } else {
-       $exchangerate = $form->check_exchangerate($myconfig, $form->{currency}, $form->{"datepaid_$i"}, 'buy');
-       
-       $form->{"exchangerate_$i"} = ($exchangerate) ? $exchangerate : $form->parse_amount($myconfig, $form->{"exchangerate_$i"}); 
-      }
-      
-
-      # if there is no amount and invtotal is zero there is no exchangerate
-      if ($form->{amount} == 0 && $form->{invtotal} == 0) {
-       $form->{exchangerate} = $form->{"exchangerate_$i"};
-      }
-      
-      # receivables amount
-      $amount = $form->round_amount($form->{"paid_$i"} * $form->{exchangerate} * -1, 2);
-      
-      if ($form->{receivables} != 0) {
-       # add receivable
-       $query = qq|INSERT INTO acc_trans (trans_id, chart_id, amount,
-                   transdate)
-                   VALUES ($form->{id},
-                          (SELECT id FROM chart
-                           WHERE accno = '$form->{AR}{receivables}'),
-                   $amount, '$form->{"datepaid_$i"}')|;
-       $dbh->do($query) || $form->dberror($query);
-      }
-      $form->{receivables} = $amount;
-      
-      # add payment
-      $query = qq|INSERT INTO acc_trans (trans_id, chart_id, amount,
-                 transdate, source)
-                 VALUES ($form->{id},
-                        (SELECT id FROM chart
-                         WHERE accno = '$form->{AR}{"paid_$i"}'),
-                 $form->{"paid_$i"}, '$form->{"datepaid_$i"}',
-                 '$form->{"source_$i"}')|;
-      $dbh->do($query) || $form->dberror($query);
-      
-      
-      # exchangerate difference for payment
-      $amount = $form->round_amount($form->{"paid_$i"} * ($form->{"exchangerate_$i"} - 1), 2);
-       
-      if ($amount != 0) {
-       $query = qq|INSERT INTO acc_trans (trans_id, chart_id, amount,
-                   transdate, fx_transaction, cleared)
-                   VALUES ($form->{id},
-                          (SELECT id FROM chart
-                           WHERE accno = '$form->{AR}{"paid_$i"}'),
-                   $amount, '$form->{"datepaid_$i"}', '1', '0')|;
-       $dbh->do($query) || $form->dberror($query);
-      }
-       
-      # exchangerate gain/loss
-      $amount = $form->round_amount($form->{"paid_$i"} * ($form->{exchangerate} - $form->{"exchangerate_$i"}), 2);
-      
-      if ($amount != 0) {
-       $accno = ($amount > 0) ? $form->{fxgain_accno} : $form->{fxloss_accno};
-       $query = qq|INSERT INTO acc_trans (trans_id, chart_id, amount,
-                   transdate, fx_transaction, cleared)
-                   VALUES ($form->{id}, (SELECT id FROM chart
-                                         WHERE accno = '$accno'),
-                   $amount, '$form->{"datepaid_$i"}', '1', '0')|;
-       $dbh->do($query) || $form->dberror($query);
-      }
-      
-      # update exchangerate record
-      if (($form->{currency} ne $form->{defaultcurrency}) && !$exchangerate) {
-       $form->update_exchangerate($dbh, $form->{currency}, $form->{"datepaid_$i"}, $form->{"exchangerate_$i"}, 0);
-      }
-    }
-  }
-
-
-  my $rc = $dbh->commit;
-  $dbh->disconnect;
-
-  $rc;
-  
-}
-
-
-
-sub delete_transaction {
-  my ($self, $myconfig, $form) = @_;
-
-  # connect to database, turn AutoCommit off
-  my $dbh = $form->dbconnect_noauto($myconfig);
-
-  # check for other foreign currency transactions
-  $form->delete_exchangerate($dbh) if ($form->{currency} ne $form->{defaultcurrency});
-
-  my $query = qq|DELETE FROM ar WHERE id = $form->{id}|;
-  $dbh->do($query) || $form->dberror($query);
-
-  $query = qq|DELETE FROM acc_trans WHERE trans_id = $form->{id}|;
-  $dbh->do($query) || $form->dberror($query);
-  
-  # commit
-  my $rc = $dbh->commit;
-  $dbh->disconnect;
-  
-  $rc;
-
-}
-
-
-
-sub ar_transactions {
-  my ($self, $myconfig, $form) = @_;
-
-  # connect to database
-  my $dbh = $form->dbconnect($myconfig);
-
-  my $incemp = qq|, (SELECT e.name FROM employee e
-                   WHERE a.employee_id = e.id) AS employee
-                  | if ($form->{l_employee});
-                  
-  my $query = qq|SELECT a.id, a.invnumber, a.ordnumber, a.transdate,
-                 a.duedate, a.netamount, a.amount, a.paid, c.name,
-                a.invoice, a.datepaid, a.terms, a.notes, a.shippingpoint
-                
-                $incemp
-                
-                FROM ar a, customer c
-                WHERE a.customer_id = c.id|;
-  
-  if ($form->{customer_id}) {
-    $query .= " AND a.customer_id = $form->{customer_id}";
-  } else {
-    if ($form->{customer}) {
-      my $customer = $form->like(lc $form->{customer});
-      $query .= " AND lower(c.name) LIKE '$customer'";
-    }
-  }
-  if ($form->{invnumber}) {
-    my $invnumber = $form->like(lc $form->{invnumber});
-    $query .= " AND lower(a.invnumber) LIKE '$invnumber'";
-  }
-  if ($form->{ordnumber}) {
-    my $ordnumber = $form->like(lc $form->{ordnumber});
-    $query .= " AND lower(a.ordnumber) LIKE '$ordnumber'";
-  }
-  if ($form->{notes}) {
-    my $notes = $form->like(lc $form->{notes});
-    $query .= " AND lower(a.notes) LIKE '$notes'";
-  }
-  
-  $query .= " AND a.transdate >= '$form->{transdatefrom}'" if $form->{transdatefrom};
-  $query .= " AND a.transdate <= '$form->{transdateto}'" if $form->{transdateto};
-  if ($form->{open} || $form->{closed}) {
-    unless ($form->{open} && $form->{closed}) {
-    $query .= " AND a.amount <> a.paid" if ($form->{open});
-    $query .= " AND a.amount = a.paid" if ($form->{closed});
-    }
-  }
-
-  my @a = (transdate, invnumber, name);
-  push @a, "employee" if $form->{l_employee};
-  my $sortorder = join ', ', $form->sort_columns(@a);
-  $sortorder = $form->{sort} unless $sortorder;
-  
-  $query .= " ORDER by $sortorder";
-  
-  my $sth = $dbh->prepare($query);
-  $sth->execute || $form->dberror($query);
-
-  while (my $ar = $sth->fetchrow_hashref(NAME_lc)) {
-    push @{ $form->{AR} }, $ar;
-  }
-  
-  $sth->finish;
-  $dbh->disconnect;
-
-}
-
-
-1;
-
diff --git a/sql-ledger/old/sql-ledger/SL/CA.pm b/sql-ledger/old/sql-ledger/SL/CA.pm
deleted file mode 100644 (file)
index b71749d..0000000
+++ /dev/null
@@ -1,262 +0,0 @@
-#=====================================================================
-# SQL-Ledger Accounting
-# Copyright (C) 2001
-#
-#  Author: Dieter Simader
-#   Email: dsimader@sql-ledger.org
-#     Web: http://www.sql-ledger.org
-#
-#  Contributors:
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#======================================================================
-# chart of accounts
-#
-# CHANGE LOG:
-#   DS. 2000-07-04  Created
-#
-#======================================================================
-
-
-package CA;
-
-
-sub all_accounts {
-  my ($self, $myconfig, $form) = @_;
-
-  my $amount = ();
-  # connect to database
-  my $dbh = $form->dbconnect($myconfig);
-
-  my $query = qq|SELECT accno,
-                 SUM(acc_trans.amount) AS amount
-                 FROM chart, acc_trans
-                WHERE chart.id = acc_trans.chart_id
-                GROUP BY accno|;
-  my $sth = $dbh->prepare($query);
-  $sth->execute || $form->dberror($query);
-
-  while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
-    $amount{$ref->{accno}} = $ref->{amount}
-  }
-  $sth->finish;
-  $query = qq|SELECT accno, description
-              FROM gifi|;
-  $sth = $dbh->prepare($query);
-  $sth->execute || $form->dberror($query);
-
-  my $gifi = ();
-  while (my ($accno, $description) = $sth->fetchrow_array) {
-    $gifi{$accno} = $description;
-  }
-  $sth->finish;
-
-  $query = qq|SELECT c.id, c.accno, c.description, c.charttype, c.gifi_accno,
-              c.category, c.link
-              FROM chart c
-             ORDER BY accno|;
-  $sth = $dbh->prepare($query);
-  $sth->execute || $form->dberror($query);
-  while (my $ca = $sth->fetchrow_hashref(NAME_lc)) {
-    $ca->{amount} = $amount{$ca->{accno}};
-    $ca->{gifi_description} = $gifi{$ca->{gifi_accno}};
-    if ($ca->{amount} < 0) {
-      $ca->{debit} = $ca->{amount} * -1;
-    } else {
-      $ca->{credit} = $ca->{amount};
-    }
-    push @{ $form->{CA} }, $ca;
-  }
-
-  $sth->finish;
-  $dbh->disconnect;
-
-}
-
-
-sub all_transactions {
-  my ($self, $myconfig, $form) = @_;
-
-  # connect to database
-  my $dbh = $form->dbconnect($myconfig);
-
-  # get chart_id
-  my $query = qq|SELECT id FROM chart
-                 WHERE accno = '$form->{accno}'|;
-  if ($form->{accounttype} eq 'gifi') {
-    $query = qq|SELECT id FROM chart
-                WHERE gifi_accno = '$form->{gifi_accno}'|;
-  }
-  my $sth = $dbh->prepare($query);
-  $sth->execute || $form->dberror($query);
-
-  my @id = ();
-  while (my ($id) = $sth->fetchrow_array) {
-    push @id, $id;
-  }
-
-  $sth->finish;
-
-  my $where = '1 = 1';
-  # build WHERE clause from dates if any
-  if ($form->{fromdate}) {
-    $where .= " AND ac.transdate >= '$form->{fromdate}'";
-  }
-  if ($form->{todate}) {
-    $where .= " AND ac.transdate <= '$form->{todate}'";
-  }
-
-  my $sortorder = join ', ', $form->sort_columns(qw(transdate reference description));
-  my $false = ($myconfig->{dbdriver} eq 'Pg') ? FALSE : q|'0'|;
-  
-  # Oracle workaround, use ordinal positions
-  my %ordinal = ( transdate => 4,
-                 reference => 2,
-                 description => 3 );
-  map { $sortorder =~ s/$_/$ordinal{$_}/ } keys %ordinal;
-
-   
-  if ($form->{accno}) {
-    # get category for account
-    $query = qq|SELECT category
-                FROM chart
-               WHERE accno = '$form->{accno}'|;
-    $sth = $dbh->prepare($query);
-
-    $sth->execute || $form->dberror($query);
-    ($form->{category}) = $sth->fetchrow_array;
-    $sth->finish;
-    
-    if ($form->{fromdate}) {
-      # get beginning balance
-      $query = qq|SELECT SUM(ac.amount)
-                 FROM acc_trans ac, chart c
-                 WHERE ac.chart_id = c.id
-                 AND c.accno = '$form->{accno}'
-                 AND ac.transdate < date '$form->{fromdate}'
-                 |;
-      $sth = $dbh->prepare($query);
-
-      $sth->execute || $form->dberror($query);
-      ($form->{balance}) = $sth->fetchrow_array;
-      $sth->finish;
-    }
-  }
-  
-  if ($form->{accounttype} eq 'gifi' && $form->{gifi_accno}) {
-    # get category for account
-    $query = qq|SELECT category
-                FROM chart
-               WHERE gifi_accno = '$form->{gifi_accno}'|;
-    $sth = $dbh->prepare($query);
-
-    $sth->execute || $form->dberror($query);
-    ($form->{category}) = $sth->fetchrow_array;
-    $sth->finish;
-    if ($form->{fromdate}) {
-      # get beginning balance
-      $query = qq|SELECT SUM(ac.amount)
-                 FROM acc_trans ac, chart c
-                 WHERE ac.chart_id = c.id
-                 AND c.gifi_accno = '$form->{gifi_accno}'
-                 AND ac.transdate < date '$form->{fromdate}'
-                 |;
-      $sth = $dbh->prepare($query);
-
-      $sth->execute || $form->dberror($query);
-      ($form->{balance}) = $sth->fetchrow_array;
-      $sth->finish;
-    }
-  }
-  $query = "";
-  
-  foreach my $id (@id) {
-    
-    # get all transactions
-    $query .= qq|
-      SELECT g.id, g.reference, g.description, ac.transdate,
-               $false AS invoice,
-               ac.amount, 'gl' as charttype
-               FROM gl g, acc_trans ac
-               WHERE $where
-               AND ac.chart_id = $id
-               AND ac.trans_id = g.id
-      UNION ALL
-      SELECT a.id, a.invnumber, c.name, ac.transdate,
-               a.invoice,
-               ac.amount, 'ar' as charttype
-               FROM ar a, acc_trans ac, customer c
-               WHERE $where
-               AND ac.chart_id = $id
-               AND ac.trans_id = a.id
-               AND a.customer_id = c.id
-      UNION ALL
-      SELECT a.id, a.invnumber, v.name, ac.transdate,
-               a.invoice,
-               ac.amount, 'ap' as charttype
-               FROM ap a, acc_trans ac, vendor v
-               WHERE $where
-               AND ac.chart_id = $id
-               AND ac.trans_id = a.id
-               AND a.vendor_id = v.id
-      UNION ALL|;
-  }
-
-  $query =~ s/UNION ALL$//;
-  $query .= qq|
-      ORDER BY $sortorder|;
-
-  $sth = $dbh->prepare($query);
-  $sth->execute || $form->dberror($query);
-
-  while (my $ca = $sth->fetchrow_hashref(NAME_lc)) {
-
-    # gl
-    if ($ca->{charttype} eq "gl") {
-      $ca->{module} = "gl";
-    }
-
-    # ap
-    if ($ca->{charttype} eq "ap") {
-      $ca->{module} = ($ca->{invoice}) ? 'ir' : 'ap';
-    }
-
-    # ar
-    if ($ca->{charttype} eq "ar") {
-      $ca->{module} = ($ca->{invoice}) ? 'is' : 'ar';
-    }
-
-    if ($ca->{amount} < 0) {
-      $ca->{debit} = $ca->{amount} * -1;
-      $ca->{credit} = 0;
-    } else {
-      $ca->{credit} = $ca->{amount};
-      $ca->{debit} = 0;
-    }
-
-    push @{ $form->{CA} }, $ca;
-
-  }
-  $sth->finish;
-  $dbh->disconnect;
-
-}
-
-1;
-
diff --git a/sql-ledger/old/sql-ledger/SL/CP.pm b/sql-ledger/old/sql-ledger/SL/CP.pm
deleted file mode 100644 (file)
index f84bd15..0000000
+++ /dev/null
@@ -1,308 +0,0 @@
-#=====================================================================
-# SQL-Ledger Accounting
-# Copyright (C) 2002
-#
-#  Author: Dieter Simader
-#   Email: dsimader@sql-ledger.org
-#     Web: http://www.sql-ledger.org
-#
-#  Contributors:
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#======================================================================
-#
-# Check and receipt printing payment module backend routines
-# Number to text conversion routines are in
-# locale/{countrycode}/Num2text
-#
-#======================================================================
-
-package CP;
-
-
-sub new {
-  my ($type, $countrycode) = @_;
-
-  $self = {};
-
-  if ($countrycode) {
-    if (-f "locale/$countrycode/Num2text") {
-      require "locale/$countrycode/Num2text";
-    } else {
-      use SL::Num2text;
-    }
-  } else {
-    use SL::Num2text;
-  }
-
-  bless $self, $type;
-
-}
-
-
-sub paymentaccounts {
-  my ($self, $myconfig, $form) = @_;
-
-  # connect to database
-  my $dbh = $form->dbconnect($myconfig);
-  
-  my $query = qq|SELECT accno, description
-                 FROM chart
-                WHERE link LIKE '%$form->{arap}_paid%'
-                ORDER BY accno|;
-  my $sth = $dbh->prepare($query);
-  $sth->execute || $form->dberror($query);
-
-  while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
-    push @{ $form->{PR} }, $ref;
-  }
-  $sth->finish;
-  
-  # get currencies and closedto
-  $query = qq|SELECT curr, closedto
-              FROM defaults|;
-  $sth = $dbh->prepare($query);
-  $sth->execute || $form->dberror($query);
-  
-  ($form->{currencies}, $form->{closedto}) = $sth->fetchrow_array;
-  $sth->finish;
-
-  $dbh->disconnect;
-
-}
-
-
-sub get_openvc {
-  my ($self, $myconfig, $form) = @_;
-
-  my $dbh = $form->dbconnect($myconfig);
-
-  my $arap = ($form->{vc} eq 'customer') ? 'ar' : 'ap';
-  
-  my $query = qq|SELECT count(*)
-                 FROM $form->{vc} ct, $arap a
-                WHERE a.$form->{vc}_id = ct.id
-                 AND a.amount != a.paid|;
-  my $sth = $dbh->prepare($query);
-  $sth->execute || $form->dberror($query);
-  my ($count) = $sth->fetchrow_array;
-  $sth->finish;
-
-  # build selection list
-  if ($count < $myconfig->{vclimit}) {
-    $query = qq|SELECT DISTINCT ct.id, ct.name
-                FROM $form->{vc} ct, $arap a
-               WHERE a.$form->{vc}_id = ct.id
-               AND a.amount != a.paid
-               ORDER BY name|;
-    $sth = $dbh->prepare($query);
-    $sth->execute || $form->dberror($query);
-
-    while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
-      push @{ $form->{"all_$form->{vc}"} }, $ref;
-    }
-
-    $sth->finish;
-
-  }
-
-  $dbh->disconnect;
-
-}
-
-
-sub get_openinvoices {
-  my ($self, $myconfig, $form) = @_;
-
-  return unless $form->{"$form->{vc}_id"};
-
-  # connect to database
-  my $dbh = $form->dbconnect($myconfig);
-
-  my $where = qq|WHERE $form->{vc}_id = $form->{"$form->{vc}_id"}
-                 AND curr = '$form->{currency}'
-                AND NOT amount = paid|;
-  
-  if ($form->{transdatefrom}) {
-    $where .= " AND transdate >= '$form->{transdatefrom}'";
-  }
-  if ($form->{transdateto}) {
-    $where .= " AND transdate <= '$form->{transdateto}'";
-  }
-  
-  my ($arap, $buysell);
-  if ($form->{vc} eq 'customer') {
-    $arap = "ar";
-    $buysell = "buy";
-  } else {
-    $arap = "ap";
-    $buysell = "sell";
-  }
-  
-  my $query = qq|SELECT id, invnumber, transdate, amount, paid, curr
-                FROM $arap
-                $where
-                ORDER BY id|;
-  my $sth = $dbh->prepare($query);
-  $sth->execute || $form->dberror($query);
-
-  while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
-    # if this is a foreign currency transaction get exchangerate
-    $ref->{exchangerate} = $form->get_exchangerate($dbh, $ref->{curr}, $ref->{transdate}, $buysell) if ($form->{currency} ne $form->{defaultcurrency});
-    push @{ $form->{PR} }, $ref;
-  }
-  
-  $sth->finish;
-  $dbh->disconnect;
-
-}
-
-
-
-sub process_payment {
-  my ($self, $myconfig, $form) = @_;
-    
-  # connect to database, turn AutoCommit off
-  my $dbh = $form->dbconnect_noauto($myconfig);
-
-  my ($paymentaccno) = split /--/, $form->{account};
-  
-  # if currency ne defaultcurrency update exchangerate
-  if ($form->{currency} ne $form->{defaultcurrency}) {
-    $form->{exchangerate} = $form->parse_amount($myconfig, $form->{exchangerate});
-
-    if ($form->{vc} eq 'customer') {
-      $form->update_exchangerate($dbh, $form->{currency}, $form->{datepaid}, $form->{exchangerate}, 0);
-    } else {
-      $form->update_exchangerate($dbh, $form->{currency}, $form->{datepaid}, 0, $form->{exchangerate});
-    }
-  } else {
-    $form->{exchangerate} = 1;
-  }
-
-  my $query = qq|SELECT fxgain_accno_id, fxloss_accno_id
-                 FROM defaults|;
-  my $sth = $dbh->prepare($query);
-  $sth->execute || $form->dberror($query);
-
-  my ($fxgain_accno_id, $fxloss_accno_id) = $sth->fetchrow_array;
-  $sth->finish;
-
-  my ($ARAP, $arap, $buysell);
-  
-  if ($form->{vc} eq 'customer') {
-    $ARAP = "AR";
-    $arap = "ar";
-    $buysell = "buy";
-  } else {
-    $ARAP = "AP";
-    $arap = "ap";
-    $buysell = "sell";
-  }
-  
-  # go through line by line
-  for my $i (1 .. $form->{rowcount}) {
-
-    if ($form->{"paid_$i"}) {
-
-      $form->{"paid_$i"} = $form->parse_amount($myconfig, $form->{"paid_$i"});
-      
-      # get exchangerate for original 
-      $query = qq|SELECT $buysell FROM exchangerate e, $arap a
-                 WHERE e.curr = '$form->{currency}'
-                 AND a.transdate = e.transdate
-                 AND a.id = $form->{"id_$i"}|;
-      $sth = $dbh->prepare($query);
-      $sth->execute || $form->dberror($query);
-
-      my ($exchangerate) = $sth->fetchrow_array;
-      $sth->finish;
-
-      $exchangerate = 1 unless $exchangerate;
-
-      $query = qq|SELECT c.id FROM chart c, acc_trans a
-                  WHERE a.chart_id = c.id
-                 AND c.link = '$ARAP'
-                 AND a.trans_id = $form->{"id_$i"}|;
-      $sth = $dbh->prepare($query);
-      $sth->execute || $form->dberror($query);
-
-      my ($id) = $sth->fetchrow_array;
-      $sth->finish;
-
-      my $amount = $form->round_amount($form->{"paid_$i"} * $exchangerate * -1, 2);
-      $ml = ($ARAP eq 'AR') ? -1 : 1;
-      # add AR/AP
-      $query = qq|INSERT INTO acc_trans (trans_id, chart_id, transdate, amount)
-                  VALUES ($form->{"id_$i"}, $id,
-                 '$form->{datepaid}', $amount * $ml)|;
-      $dbh->do($query) || $form->dberror($query);
-      
-      # add payment
-      $query = qq|INSERT INTO acc_trans (trans_id, chart_id, transdate, amount,
-                  source)
-                  VALUES ($form->{"id_$i"},
-                        (SELECT id FROM chart
-                         WHERE accno = '$paymentaccno'),
-                 '$form->{datepaid}', $form->{"paid_$i"} * $ml,
-                 '$form->{source}')|;
-      $dbh->do($query) || $form->dberror($query);
-
-      # add exchangerate difference if currency ne defaultcurrency
-      $amount = $form->round_amount($form->{"paid_$i"} * ($form->{exchangerate} - 1), 2);
-
-      if ($amount != 0) {
-        # exchangerate difference
-       $query = qq|INSERT INTO acc_trans (trans_id, chart_id, transdate,
-                   amount, cleared, fx_transaction)
-                   VALUES ($form->{"id_$i"},
-                          (SELECT id FROM chart
-                           WHERE accno = '$paymentaccno'),
-                 '$form->{datepaid}', $amount * $ml, '0', '1')|;
-       $dbh->do($query) || $form->dberror($query);
-
-        # gain/loss
-        
-       $amount = $form->round_amount($form->{"paid_$i"} * ($exchangerate - $form->{exchangerate}) * $ml, 2);
-       if ($amount != 0) {
-         my $accno_id = ($amount > 0) ? $fxgain_accno_id : $fxloss_accno_id;
-         $query = qq|INSERT INTO acc_trans (trans_id, chart_id, transdate,
-                     amount, cleared, fx_transaction)
-                     VALUES ($form->{"id_$i"}, $accno_id,
-                     '$form->{datepaid}', $amount, '0', '1')|;
-         $dbh->do($query) || $form->dberror($query);
-       }
-      }
-
-      $form->{"paid_$i"} = $form->round_amount($form->{"paid_$i"} * $exchangerate, 2);
-
-      # update AR/AP transaction
-      $query = qq|UPDATE $arap set
-                 paid = paid + $form->{"paid_$i"},
-                 datepaid = '$form->{datepaid}'
-                 WHERE id = $form->{"id_$i"}|;
-      $dbh->do($query) || $form->dberror($query);
-    }
-  }
-  
-  my $rc = $dbh->commit;
-  $dbh->disconnect;
-
-  $rc;
-
-}
-
-
-1;
-
diff --git a/sql-ledger/old/sql-ledger/SL/CT.pm b/sql-ledger/old/sql-ledger/SL/CT.pm
deleted file mode 100644 (file)
index 7c42cb8..0000000
+++ /dev/null
@@ -1,447 +0,0 @@
-#=====================================================================
-# SQL-Ledger Accounting
-# Copyright (C) 2001
-#
-#  Author: Dieter Simader
-#   Email: dsimader@sql-ledger.org
-#     Web: http://www.sql-ledger.org
-#
-#  Contributors:
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#======================================================================
-#
-# backend code for customers and vendors
-#
-# CHANGE LOG:
-#   DS. 2000-07-04  Created
-#
-#======================================================================
-
-package CT;
-
-
-sub get_tuple {
-  my ($self, $myconfig, $form) = @_;
-
-  my $dbh = $form->dbconnect($myconfig);
-  my $query = qq|SELECT *
-                 FROM $form->{db}
-                 WHERE id = $form->{id}|;
-  my $sth = $dbh->prepare($query);
-  $sth->execute || $form->dberror($query);
-  
-  my $ref = $sth->fetchrow_hashref(NAME_lc);
-  
-  map { $form->{$_} = $ref->{$_} } keys %$ref;
-
-  $sth->finish;
-
-
-  # get ship to
-  $query = qq|SELECT *
-              FROM shipto
-             WHERE trans_id = $form->{id}|;
-  $sth = $dbh->prepare($query);
-  $sth->execute || $form->dberror($query);
-
-  $ref = $sth->fetchrow_hashref(NAME_lc);
-
-  map { $form->{$_} = $ref->{$_} } keys %$ref;
-
-  $sth->finish;
-
-
-  # get tax labels
-  $query = qq|SELECT accno, description
-              FROM chart, tax
-             WHERE link LIKE '%CT_tax%'
-             AND chart.id = tax.chart_id
-             ORDER BY accno|;
-  $sth = $dbh->prepare($query);
-  $sth->execute || $form->dberror($query);
-
-  while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
-    $form->{taxaccounts} .= "$ref->{accno} ";
-    $form->{tax}{$ref->{accno}}{description} = $ref->{description};
-  }
-  $sth->finish;
-  chop $form->{taxaccounts};
-
-  # get taxes for customer/vendor
-  $query = qq|SELECT chart_id, accno
-              FROM $form->{db}tax, chart
-              WHERE chart_id = chart.id
-              AND $form->{db}_id = $form->{id}|;
-  $sth = $dbh->prepare($query);
-  $sth->execute || $form->dberror($query);
-
-  while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
-    $form->{tax}{$ref->{accno}}{taxable} = 1;
-  }
-  $sth->finish;
-
-  
-  $dbh->disconnect;
-
-}
-
-
-sub taxaccounts {
-  my ($self, $myconfig, $form) = @_;
-
-  my $dbh = $form->dbconnect($myconfig);
-
-  # get tax labels
-  my $query = qq|SELECT accno, description
-                 FROM chart, tax
-                WHERE link LIKE '%CT_tax%'
-                AND chart.id = tax.chart_id
-                ORDER BY accno|;
-  $sth = $dbh->prepare($query);
-  $sth->execute || $form->dberror($query);
-
-  while (my $taxref = $sth->fetchrow_hashref(NAME_lc)) {
-    $form->{taxaccounts} .= "$taxref->{accno} ";
-    $form->{tax}{$taxref->{accno}}{description} = $taxref->{description};
-  }
-  $sth->finish;
-  chop $form->{taxaccounts};
-
-  $dbh->disconnect;
-
-}
-
-
-sub delete_customer {
-  my ($self, $myconfig, $form) = @_;
-
-  # connect to database, turn AutoCommit off
-  my $dbh = $form->dbconnect_noauto($myconfig);
-
-  my $query = qq|SELECT id FROM ar
-                 WHERE customer_id = $form->{id}
-                UNION
-                SELECT id FROM oe
-                WHERE customer_id = $form->{id}|;
-  my $sth = $dbh->prepare($query) || $form->dberror($query);
-  $sth->execute;
-
-  my ($rc) = $sth->fetchrow_array;
-  $sth->finish;
-
-  if ($rc) {
-    $dbh->disconnect;
-    $rc = -1;
-  } else {
-    
-    # delete customer
-    $query = qq|DELETE FROM customer
-                WHERE id = $form->{id}|;
-    $dbh->do($query) || $form->dberror($query);
-
-    $query = qq|DELETE FROM shipto
-                WHERE trans_id = $form->{id}|;
-    $dbh->do($query) || $form->dberror($query);
-    
-    $query = qq|DELETE FROM customertax
-                WHERE customer_id = $form->{id}|;
-    $dbh->do($query) || $form->dberror($query);
-
-    # commit and redirect
-    $rc = $dbh->commit;
-    $dbh->disconnect;
-    
-  }
-
-  $rc;
-  
-}
-
-
-sub save_customer {
-  my ($self, $myconfig, $form) = @_;
-
-  # connect to database
-  my $dbh = $form->dbconnect($myconfig);
-
-  # escape '
-  map { $form->{$_} =~ s/'/''/g } qw(customernumber name addr1 addr2 addr3 addr4 contact notes);
-
-  # assign value discount, terms, creditlimit
-  $form->{discount} /= 100;
-  $form->{terms} *= 1;
-  $form->{taxincluded} *= 1;
-  $form->{creditlimit} = $form->parse_amount($myconfig, $form->{creditlimit});
-  
-  my ($query, $sth);
-
-  if ($form->{id}) {
-    $query = qq|DELETE FROM customertax
-                WHERE customer_id = $form->{id}|;
-    $dbh->do($query) || $form->dberror($query);
-
-    $query = qq|DELETE FROM shipto
-                WHERE trans_id = $form->{id}|;
-    $dbh->do($query) || $form->dberror($query);
-  } else {
-    my $uid = time;
-    $uid .= $form->{login};
-
-    $query = qq|INSERT INTO customer (name)
-                VALUES ('$uid')|;
-    $dbh->do($query) || $form->dberror($query);
-    
-    $query = qq|SELECT id FROM customer
-                WHERE name = '$uid'|;
-    $sth = $dbh->prepare($query);
-    $sth->execute || $form->dberror($query);
-
-    ($form->{id}) = $sth->fetchrow_array;
-    $sth->finish;
-
-  }
-               
-  $query = qq|UPDATE customer SET
-              customernumber = '$form->{customernumber}',
-             name = '$form->{name}',
-             addr1 = '$form->{addr1}',
-             addr2 = '$form->{addr2}',
-             addr3 = '$form->{addr3}',
-             addr4 = '$form->{addr4}',
-             contact = '$form->{contact}',
-             phone = '$form->{phone}',
-             fax = '$form->{fax}',
-             email = '$form->{email}',
-             cc = '$form->{cc}',
-             bcc = '$form->{bcc}',
-             notes = '$form->{notes}',
-             discount = $form->{discount},
-             creditlimit = $form->{creditlimit},
-             terms = $form->{terms},
-             taxincluded = '$form->{taxincluded}'
-             WHERE id = $form->{id}|;
-  $dbh->do($query) || $form->dberror($query);
-
-  # save taxes
-  foreach $item (split / /, $form->{taxaccounts}) {
-    if ($form->{"tax_$item"}) {
-      $query = qq|INSERT INTO customertax (customer_id, chart_id)
-                 VALUES ($form->{id}, (SELECT id
-                                       FROM chart
-                                       WHERE accno = '$item'))|;
-      $dbh->do($query) || $form->dberror($query);
-    }
-  }
-  
-  # add shipto
-  $form->add_shipto($dbh, $form->{id});
-
-  $dbh->disconnect;
-
-}
-
-
-sub save_vendor {
-  my ($self, $myconfig, $form) = @_;
-
-  # connect to database
-  my $dbh = $form->dbconnect($myconfig);
-
-  # escape '
-  map { $form->{$_} =~ s/'/''/g } qw(vendornumber name addr1 addr2 addr3 addr4 contact notes);
-
-  $form->{terms} *= 1;
-  $form->{taxincluded} *= 1;
-  
-  my $query;
-  
-  if ($form->{id}) {
-    $query = qq|DELETE FROM vendortax
-                WHERE vendor_id = $form->{id}|;
-    $dbh->do($query) || $form->dberror($query);
-
-    $query = qq|DELETE FROM shipto
-                WHERE trans_id = $form->{id}|;
-    $dbh->do($query) || $form->dberror($query);
-  } else {
-    my $uid = time;
-    $uid .= $form->{login};
-    
-    $query = qq|INSERT INTO vendor (name)
-                VALUES ('$uid')|;
-    $dbh->do($query) || $form->dberror($query);
-   
-    $query = qq|SELECT id FROM vendor
-                WHERE name = '$uid'|;
-    $sth = $dbh->prepare($query);
-    $sth->execute || $form->dberror($query);
-
-    ($form->{id}) = $sth->fetchrow_array;
-    $sth->finish;
-
-  }
-   
-
-  $query = qq|UPDATE vendor SET
-              vendornumber = '$form->{vendornumber}',
-             name = '$form->{name}',
-             addr1 = '$form->{addr1}',
-             addr2 = '$form->{addr2}',
-             addr3 = '$form->{addr3}',
-             addr4 = '$form->{addr4}',
-             contact = '$form->{contact}',
-             phone = '$form->{phone}',
-             fax = '$form->{fax}',
-             email = '$form->{email}',
-             cc = '$form->{cc}',
-             bcc = '$form->{bcc}',
-             notes = '$form->{notes}',
-             terms = $form->{terms},
-             taxincluded = '$form->{taxincluded}'
-             WHERE id = $form->{id}|;
-  $dbh->do($query) || $form->dberror($query);
-
-  # save taxes
-  foreach $item (split / /, $form->{taxaccounts}) {
-    if ($form->{"tax_$item"}) {
-      $query = qq|INSERT INTO vendortax (vendor_id, chart_id)
-                 VALUES ($form->{id}, (SELECT id
-                                       FROM chart
-                                       WHERE accno = '$item'))|;
-      $dbh->do($query) || $form->dberror($query);
-    }
-  }
-
-  # add shipto
-  $form->add_shipto($dbh, $form->{id});
-
-  $dbh->disconnect;
-
-}
-
-
-
-sub delete_vendor {
-  my ($self, $myconfig, $form) = @_;
-
-  # connect to database, turn AutoCommit off
-  my $dbh = $form->dbconnect_noauto($myconfig);
-
-  # check if there are any transactions on file
-  my $query = qq|SELECT id FROM ap
-                 WHERE vendor_id = $form->{id}
-                UNION
-                SELECT id FROM oe
-                WHERE vendor_id = $form->{id}|;
-  my $sth = $dbh->prepare($query) || $form->dberror($query);
-  $sth->execute;
-  
-  my ($rc) = $sth->fetchrow_array;
-  $sth->finish;
-  
-  if ($rc) {
-    $dbh->disconnect;
-    $rc = -1;
-  } else {
-    
-    # delete vendor
-    $query = qq|DELETE FROM vendor
-                WHERE id = $form->{id}|;
-    $dbh->do($query) || $form->dberror($query);
-
-    $query = qq|DELETE FROM shipto
-                WHERE trans_id = $form->{id}|;
-    $dbh->do($query) || $form->dberror($query);
-
-    $query = qq|DELETE FROM vendortax
-                WHERE vendor_id = $form->{id}|;
-    $dbh->do($query) || $form->dberror($query);
-
-    # commit and redirect
-    $rc = $dbh->commit;
-    $dbh->disconnect;
-
-  }
-
-  $rc;
-
-}
-
-
-sub search {
-  my ($self, $myconfig, $form) = @_;
-
-  # connect to database
-  my $dbh = $form->dbconnect($myconfig);
-
-  my $where = "1 = 1";
-  $form->{sort} = "name" unless ($form->{sort});
-  
-  if ($form->{"$form->{db}number"}) {
-    my $companynumber = $form->like(lc $form->{"$form->{db}number"});
-    $where .= " AND lower($form->{db}number) LIKE '$companynumber'";
-  }
-  if ($form->{name}) {
-    my $name = $form->like(lc $form->{name});
-    $where .= " AND lower(name) LIKE '$name'";
-  }
-  if ($form->{contact}) {
-    my $contact = $form->like(lc $form->{contact});
-    $where .= " AND lower(contact) LIKE '$contact'";
-  }
-  if ($form->{email}) {
-    my $email = $form->like(lc $form->{email});
-    $where .= " AND lower(email) LIKE '$email'";
-  }
-
-  if ($form->{status} eq 'orphaned') {
-    $where .= qq| AND id NOT IN (SELECT o.$form->{db}_id
-                                 FROM oe o, $form->{db} ct
-                                WHERE ct.id = o.$form->{db}_id)|;
-    if ($form->{db} eq 'customer') {
-      $where .= qq| AND id NOT IN (SELECT a.customer_id
-                                   FROM ar a, customer ct
-                                  WHERE ct.id = a.customer_id)|;
-    }
-    if ($form->{db} eq 'vendor') {
-      $where .= qq| AND id NOT IN (SELECT a.vendor_id
-                                   FROM ap a, vendor ct
-                                  WHERE ct.id = a.vendor_id)|;
-    }
-  }
-  
-  my $query = qq~SELECT id, name, $form->{db}number, 
-                 addr1 || ' ' || addr2 || ' ' || addr3 || ' ' || addr4 AS address,
-                 contact, phone, fax, email, cc, terms
-                 FROM $form->{db}
-                 WHERE $where
-                ORDER BY $form->{sort}~;
-
-  my $sth = $dbh->prepare($query);
-  $sth->execute || $form->dberror($query);
-
-
-  while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
-    push @{ $form->{CT} }, $ref;
-  }
-
-  $sth->finish;
-  $dbh->disconnect;
-
-}
-
-
-1;
-
diff --git a/sql-ledger/old/sql-ledger/SL/Form.pm b/sql-ledger/old/sql-ledger/SL/Form.pm
deleted file mode 100644 (file)
index ef5f2ca..0000000
+++ /dev/null
@@ -1,1397 +0,0 @@
-#=====================================================================
-# SQL-Ledger Accounting
-# Copyright (C) 1998-2003
-#
-#  Author: Dieter Simader
-#   Email: dsimader@sql-ledger.org
-#     Web: http://www.sql-ledger.org
-#
-# Contributors: Thomas Bayen <bayen@gmx.de>
-#               Antti Kaihola <akaihola@siba.fi>
-#               Moritz Bunkus (tex code)
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#======================================================================
-# Utilities for parsing forms
-# and supporting routines for linking account numbers
-# used in AR, AP and IS, IR modules
-#
-#======================================================================
-
-package Form;
-
-
-sub new {
-  my $type = shift;
-  
-  my $self = {};
-
-  read(STDIN, $_, $ENV{CONTENT_LENGTH});
-  
-  if ($ENV{QUERY_STRING}) {
-    $_ = $ENV{QUERY_STRING};
-  }
-
-  if ($ARGV[0]) {
-    $_ = $ARGV[0];
-  }
-
-  foreach $item (split(/&/)) {
-    ($key, $value) = split(/=/, $item);
-    $self->{$key} = &unescape("",$value);
-  }
-
-  $self->{action} = lc $self->{action};
-  $self->{action} =~ s/( |-|,)/_/g;
-
-  $self->{version} = "2.0.8";
-  $self->{dbversion} = "2.0.8";
-
-  bless $self, $type;
-  
-}
-
-
-sub debug {
-  my ($self) = @_;
-  
-  print "\n";
-  
-  map { print "$_ = $self->{$_}\n" } (sort keys %{$self});
-  
-} 
-
-  
-sub escape {
-  my ($self, $str, $beenthere) = @_;
-
-  # for Apache 2 we escape strings twice
-  if (($ENV{SERVER_SOFTWARE} =~ /Apache\/2/) && !$beenthere) {
-    $str = $self->escape($str, 1);
-  }
-           
-  $str =~ s/([^a-zA-Z0-9_.-])/sprintf("%%%02x", ord($1))/ge;
-  $str;
-
-}
-
-
-sub unescape {
-  my ($self, $str) = @_;
-  
-  $str =~ tr/+/ /;
-  $str =~ s/\\$//;
-
-  $str =~ s/%([0-9a-fA-Z]{2})/pack("c",hex($1))/eg;
-
-  $str;
-
-}
-
-
-sub error {
-  my ($self, $msg) = @_;
-
-  if ($ENV{HTTP_USER_AGENT}) {
-    $msg =~ s/\n/<br>/g;
-
-    print qq|Content-Type: text/html
-
-    <body bgcolor=ffffff>
-
-    <h2><font color=red>Error!</font></h2>
-
-    <p><b>$msg</b>
-    
-    </body>
-    </html>
-    |;
-
-    die "Error: $msg\n";
-
-  } else {
-  
-    if ($self->{error_function}) {
-      &{ $self->{error_function} }($msg);
-    } else {
-      die "Error: $msg\n";
-    }
-  }
-  
-}
-
-
-
-sub info {
-  my ($self, $msg) = @_;
-
-  if ($ENV{HTTP_USER_AGENT}) {
-    $msg =~ s/\n/<br>/g;
-
-    if (!$self->{header}) {
-      $self->header;
-      print qq|
-      <body>|;
-    }
-
-    print qq|
-
-    <p><b>$msg</b>
-    |;
-    
-  } else {
-  
-    if ($self->{info_function}) {
-      &{ $self->{info_function} }($msg);
-    } else {
-      print "$msg\n";
-    }
-  }
-  
-}
-
-
-sub numtextrows {
-  my ($self, $str, $cols, $maxrows) = @_;
-
-  my $rows;
-
-  map { $rows += int ((length $_)/$cols) + 1 } (split /\r/, $str);
-
-  $rows = $maxrows if (defined $maxrows && ($rows > $maxrows));
-  
-  $rows;
-
-}
-
-
-sub dberror {
-  my ($self, $msg) = @_;
-
-  $self->error("$msg\n".$DBI::errstr);
-  
-}
-
-
-sub isblank {
-  my ($self, $name, $msg) = @_;
-
-  if ($self->{$name} =~ /^\s*$/) {
-    $self->error($msg);
-  }
-}
-  
-
-sub header {
-  my ($self) = @_;
-
-  my ($nocache, $stylesheet, $charset);
-  
-  # use expire tag to prevent caching
-#  $nocache = qq|<META HTTP-EQUIV="Expires" CONTENT="Tue, 01 Jan 1980 1:00:00 GMT">
-#  <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
-#|;
-
-  if ($self->{stylesheet} && (-f "css/$self->{stylesheet}")) {
-    $stylesheet = qq|<LINK REL="stylesheet" HREF="css/$self->{stylesheet}" TYPE="text/css" TITLE="SQL-Ledger style sheet">
-|;
-  }
-
-  if ($self->{charset}) {
-    $charset = qq|<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=$self->{charset}">
-|;
-  }
-
-  $self->{titlebar} = ($self->{title}) ? "$self->{title} - $self->{titlebar}" : $self->{titlebar};
-  
-  print qq|Content-Type: text/html
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<head>
-  <title>$self->{titlebar}</title>
-  $nocache
-  $stylesheet
-  $charset
-</head>
-
-|;
-
-}
-
-
-sub redirect {
-  my ($self, $msg) = @_;
-
-  if ($self->{callback}) {
-
-    ($script, $argv) = split(/\?/, $self->{callback});
-
-    exec ("perl", "$script", $argv);
-   
-  } else {
-    
-    if ($ENV{HTTP_USER_AGENT}) {
-      $msg =~ s/\n/<br>/g;
-
-      print qq|Content-Type: text/html
-
-<body bgcolor=ffffff>
-
-<h2>$msg</h2>
-
-</body>
-</html>
-|;
-
-    } else {
-      print "$msg\n";
-    }
-
-    exit;
-    
-  }
-
-}
-
-
-sub sort_columns {
-  my ($self, @columns) = @_;
-
-  @columns = grep !/^$self->{sort}$/, @columns;
-  splice @columns, 0, 0, $self->{sort};
-
-  @columns;
-  
-}
-
-
-sub format_amount {
-  my ($self, $myconfig, $amount, $places, $dash) = @_;
-
-  if ($places =~ /\d/) {
-    $amount = $self->round_amount($amount, $places);
-  }
-
-  # is the amount negative
-  my $negative = ($amount < 0);
-  
-  if ($amount != 0) {
-    if ($myconfig->{numberformat} && ($myconfig->{numberformat} ne '1000.00')) {
-      my ($whole, $dec) = split /\./, "$amount";
-      $whole =~ s/-//;
-      $amount = join '', reverse split //, $whole;
-      
-      if ($myconfig->{numberformat} eq '1,000.00') {
-       $amount =~ s/\d{3,}?/$&,/g;
-       $amount =~ s/,$//;
-       $amount = join '', reverse split //, $amount;
-       $amount .= "\.$dec" if ($dec ne "");
-      }
-      
-      if ($myconfig->{numberformat} eq '1.000,00') {
-       $amount =~ s/\d{3,}?/$&./g;
-       $amount =~ s/\.$//;
-       $amount = join '', reverse split //, $amount;
-       $amount .= ",$dec" if ($dec ne "");
-      }
-      
-      if ($myconfig->{numberformat} eq '1000,00') {
-       $amount = "$whole";
-       $amount .= ",$dec" if ($dec ne "");
-      }
-
-      if ($dash =~ /-/) {
-       $amount = ($negative) ? "($amount)" : "$amount";
-      } elsif ($dash =~ /DRCR/) {
-       $amount = ($negative) ? "$amount DR" : "$amount CR";
-      } else {
-       $amount = ($negative) ? "-$amount" : "$amount";
-      }
-    }
-  } else {
-    if ($dash eq "0" && $places) {
-      if ($myconfig->{numberformat} eq '1.000,00') {
-       $amount = "0".","."0" x $places;
-      } else {
-       $amount = "0"."."."0" x $places;
-      }
-    } else {
-      $amount = ($dash ne "") ? "$dash" : "";
-    }
-  }
-
-  $amount;
-
-}
-
-
-sub parse_amount {
-  my ($self, $myconfig, $amount) = @_;
-
-  if (($myconfig->{numberformat} eq '1.000,00') ||
-      ($myconfig->{numberformat} eq '1000,00')) {
-    $amount =~ s/\.//g;
-    $amount =~ s/,/\./;
-  }
-
-  $amount =~ s/,//g;
-  
-  return ($amount * 1);
-
-}
-
-
-sub round_amount {
-  my ($self, $amount, $places) = @_;
-
-#  $places = 3 if $places == 2;
-  
-  if (($places * 1) >= 0) {
-    # compensate for perl behaviour, add 1/10^$places+3
-    sprintf("%.${places}f", $amount + (1 / (10 ** ($places + 3))) * (($amount > 0) ? 1 : -1));
-  } else {
-    $places *= -1;
-    sprintf("%.f", $amount / (10 ** $places) + (($amount > 0) ? 0.1 : -0.1)) * (10 ** $places);
-  }
-
-}
-
-
-sub parse_template {
-  my ($self, $myconfig, $userspath) = @_;
-
-  # { Moritz Bunkus
-  # Some variables used for page breaks
-  my ($chars_per_line, $lines_on_first_page, $lines_on_second_page) = (0, 0, 0);
-  my ($current_page, $current_line) = (1, 1);
-  my $pagebreak = "";
-  my $sum = 0;
-  # } Moritz Bunkus
-
-  open(IN, "$self->{templates}/$self->{IN}") or $self->error("$self->{IN} : $!");
-
-  @_ = <IN>;
-  close(IN);
-  
-  $self->{copies} = 1 if (($self->{copies} *= 1) <= 0);
-  
-  # OUT is used for the media, screen, printer, email
-  # for postscript we store a copy in a temporary file
-  my $fileid = time;
-  $self->{tmpfile} = "$userspath/${fileid}.$self->{IN}";
-  if ($self->{format} =~ /(postscript|pdf)/ || $self->{media} eq 'email') {
-    $out = $self->{OUT};
-    $self->{OUT} = ">$self->{tmpfile}";
-  }
-  
-  
-  if ($self->{OUT}) {
-    open(OUT, "$self->{OUT}") or $self->error("$self->{OUT} : $!");
-  } else {
-    open(OUT, ">-") or $self->error("STDOUT : $!");
-    $self->header;
-  }
-
-
-  # first we generate a tmpfile
-  # read file and replace <%variable%>
-  while ($_ = shift) {
-      
-    $par = "";
-    $var = $_;
-
-
-    # { Moritz Bunkus
-    # detect pagebreak block and its parameters
-    if (/<%pagebreak ([0-9]+) ([0-9]+) ([0-9]+)%>/) {
-      $chars_per_line = $1;
-      $lines_on_first_page = $2;
-      $lines_on_second_page = $3;
-      
-      while ($_ = shift) {
-        last if (/<\%end pagebreak%>/);
-        $pagebreak .= $_;
-      }
-    }
-    # } Moritz Bunkus
-
-    
-    if (/<%foreach /) {
-      
-      # this one we need for the count
-      chomp $var;
-      $var =~ s/<%foreach (.+?)%>/$1/;
-      while ($_ = shift) {
-       last if (/<%end /);
-
-       # store line in $par
-       $par .= $_;
-      }
-      
-      # display contents of $self->{number}[] array
-      for $i (0 .. $#{ $self->{$var} }) {
-
-        # { Moritz Bunkus
-        # Try to detect whether a manual page break is necessary
-        # but only if there was a <%pagebreak ...%> block before
-       
-        if ($chars_per_line) {
-          my $lines = int(length($self->{"description"}[$i]) / $chars_per_line + 0.95);
-          my $lpp;
-         
-          if ($current_page == 1) {
-            $lpp = $lines_on_first_page;
-          } else {
-            $lpp = $lines_on_second_page;
-          }
-
-          # Yes we need a manual page break
-          if (($current_line + $lines) > $lpp) {
-            my $pb = $pagebreak;
-           
-            # replace the special variables <%sumcarriedforward%>
-            # and <%lastpage%>
-           
-            my $psum = $self->format_amount($myconfig, $sum, 2);
-            $pb =~ s/<%sumcarriedforward%>/$psum/g;
-            $pb =~ s/<%lastpage%>/$current_page/g;
-            
-           # only "normal" variables are supported here
-            # (no <%if, no <%foreach, no <%include)
-            
-           $pb =~ s/<%(.+?)%>/$self->{$1}/g;
-            
-           # page break block is ready to rock
-            print(OUT $pb);
-            $current_page++;
-            $current_line = 1;
-          }
-          $current_line += $lines;
-        }
-        $sum += $self->parse_amount($myconfig, $self->{"linetotal"}[$i]);
-        # } Moritz Bunkus
-
-
-       # don't parse par, we need it for each line
-       $_ = $par;
-       s/<%(.+?)%>/$self->{$1}[$i]/mg;
-       print OUT;
-      }
-      next;
-    }
-
-    # if not comes before if!
-    if (/<%if not /) {
-      # check if it is not set and display
-      chop;
-      s/<%if not (.+?)%>/$1/;
-
-      unless ($self->{$_}) {
-       while ($_ = shift) {
-         last if (/<%end /);
-
-         # store line in $par
-         $par .= $_;
-       }
-       
-       $_ = $par;
-       
-      } else {
-       while ($_ = shift) {
-         last if (/<%end /);
-       }
-       next;
-      }
-    }
-    if (/<%if /) {
-      # check if it is set and display
-      chop;
-      s/<%if (.+?)%>/$1/;
-
-      if ($self->{$_}) {
-       while ($_ = shift) {
-         last if (/<%end /);
-
-         # store line in $par
-         $par .= $_;
-       }
-       
-       $_ = $par;
-       
-      } else {
-       while ($_ = shift) {
-         last if (/<%end /);
-       }
-       next;
-      }
-    }
-   
-    # check for <%include filename%>
-    if (/<%include /) {
-      
-      # get the filename
-      chomp $var;
-      $var =~ s/<%include (.+?)%>/$1/;
-
-      # mangle filename if someone tries to be cute
-      $var =~ s/\///g;
-
-      # prevent the infinite loop!
-      next if ($self->{"$var"});
-
-      open(INC, "$self->{templates}/$var") or $self->error($self->cleanup."$self->{templates}/$var : $!");
-      unshift(@_, <INC>);
-      close(INC);
-
-      $self->{"$var"} = 1;
-
-      next;
-    }
-    
-    s/<%(.+?)%>/$self->{$1}/g;
-    print OUT;
-  }
-
-  close(OUT);
-
-
-  # { Moritz Bunkus
-  # Convert the tex file to postscript
-  if ($self->{format} =~ /(postscript|pdf)/) {
-
-    use Cwd;
-    $self->{cwd} = cwd();
-    chdir("$userspath") or $self->error($self->cleanup."chdir : $!");
-
-    $self->{tmpfile} =~ s/$userspath\///g;
-
-    # DS. added screen and email option in addition to printer
-    # screen
-    if ($self->{format} eq 'postscript') {
-      system("latex --interaction=nonstopmode $self->{tmpfile} > $self->{tmpfile}.err");
-      $self->error($self->cleanup) if ($?);
-      
-      $self->{tmpfile} =~ s/tex$/dvi/;
-
-      system("dvips $self->{tmpfile} -o -q > /dev/null");
-      $self->error($self->cleanup."dvips : $!") if ($?);
-      $self->{tmpfile} =~ s/dvi$/ps/;
-    }
-    if ($self->{format} eq 'pdf') {
-      system("pdflatex --interaction=nonstopmode $self->{tmpfile} > $self->{tmpfile}.err");
-      $self->error($self->cleanup) if ($?);
-      $self->{tmpfile} =~ s/tex$/pdf/;
-    }
-
-  }
-
-  if ($self->{format} =~ /(postscript|pdf)/ || $self->{media} eq 'email') {
-
-    if ($self->{media} eq 'email') {
-      
-      use SL::Mailer;
-
-      my $mail = new Mailer;
-      
-      $self->{email} =~ s/,/>,</g;
-      
-      map { $mail->{$_} = $self->{$_} } qw(cc bcc subject message version format charset);
-      $mail->{to} = qq|"$self->{name}" <$self->{email}>|;
-      $mail->{from} = qq|"$myconfig->{name}" <$myconfig->{email}>|;
-      $mail->{fileid} = "$fileid.";
-
-      # if we send html or plain text inline
-      if (($self->{format} eq 'html') && ($self->{sendmode} eq 'inline')) {
-       $mail->{contenttype} = "text/html";
-
-        $mail->{message} =~ s/\r\n/<br>\n/g;
-       $myconfig->{signature} =~ s/\\n/<br>\n/g;
-       $mail->{message} .= "<br>\n--<br>\n$myconfig->{signature}\n<br>";
-       
-       open(IN, $self->{tmpfile}) or $self->error($self->cleanup."$self->{tmpfile} : $!");
-       while (<IN>) {
-         $mail->{message} .= $_;
-       }
-
-       close(IN);
-
-      } else {
-       
-       @{ $mail->{attachments} } = ($self->{tmpfile});
-
-       $myconfig->{signature} =~ s/\\n/\r\n/g;
-       $mail->{message} .= "\r\n--\r\n$myconfig->{signature}";
-
-      }
-      my $err = $mail->send($out);
-      $self->error($self->cleanup."$err") if ($err);
-      
-    } else {
-      
-      $self->{OUT} = $out;
-      open(IN, $self->{tmpfile}) or $self->error($self->cleanup."$self->{tmpfile} : $!");
-
-      $self->{copies} = 1 unless $self->{media} eq 'printer';
-      
-      for my $i (1 .. $self->{copies}) {
-         
-       if ($self->{OUT}) {
-         open(OUT, $self->{OUT}) or $self->error($self->cleanup."$self->{OUT} : $!");
-       } else {
-         open(OUT, ">-") or $self->error($self->cleanup."$!: STDOUT");
-         
-         # launch application
-         print qq|Content-Type: application/$self->{format}; name="$self->{tmpfile}"
-  Content-Disposition: filename="$self->{tmpfile}"
-
-  |;
-       }
-       
-       while (<IN>) {
-         print OUT $_;
-       }
-       close(OUT);
-       seek IN, 0, 0;
-      }
-
-      close(IN);
-    }
-
-    $self->cleanup;
-
-  }
-  # } Moritz Bunkus
-
-}
-
-
-sub cleanup {
-  my $self = shift;
-
-  my @err = ();
-  if (-f "$self->{tmpfile}.err") {
-    open(FH, "$self->{tmpfile}.err");
-    @err = <FH>;
-    close(FH);
-  }
-  
-  if ($self->{tmpfile}) {
-    # strip extension
-    $self->{tmpfile} =~ s/\.\w+$//g;
-    my $tmpfile = $self->{tmpfile};
-    unlink(<$tmpfile.*>);
-  }
-
-
-  chdir("$self->{cwd}");
-  
-  "@err";
-  
-}
-
-
-sub format_string {
-  my ($self, @fields) = @_;
-
-  my $format = $self->{format};
-  if ($self->{format} =~ /(postscript|pdf)/) {
-    $format = 'tex';
-  }
-
-  my %replace = ( 'order' => { 'html' => [ quotemeta('\n'), '\r' ],
-                               'tex'  => [ '&', quotemeta('\n'), '\r',
-                                          '\$', '%', '_', '#', quotemeta('^'),
-                                          '{', '}', '<', '>', '£' ] },
-                  'html' => {
-                quotemeta('\n') => '<br>', '\r' => '<br>'
-                           },
-                  'tex' => {
-               '&' => '\&', '\$' => '\$', '%' => '\%', '_' => '\_',
-               '#' => '\#', quotemeta('^') => '\^\\', '{' => '\{', '}' => '\}',
-               '<' => '$<$', '>' => '$>$',
-               quotemeta('\n') => '\newline ', '\r' => '\newline ',
-               '£' => '\pounds ',
-                            }
-               );
-
-  foreach my $key (@{ $replace{order}{$format} }) {
-    map { $self->{$_} =~ s/$key/$replace{$format}{$key}/g; } @fields;
-  }
-
-}
-
-
-sub datetonum {
-  my ($self, $date, $myconfig) = @_;
-
-  if ($date) {
-    # get separator
-    my $spc = $myconfig->{dateformat};
-    $spc =~ s/\w//g;
-    $spc = substr($spc, 1, 1);
-
-    if ($spc eq '.') {
-      $spc = '\.';
-    }
-    if ($spc eq '/') {
-      $spc = '\/';
-    }
-
-    if ($myconfig->{dateformat} =~ /^yy/) {
-      ($yy, $mm, $dd) = split /$spc/, $date;
-    }
-    if ($myconfig->{dateformat} =~ /^mm/) {
-      ($mm, $dd, $yy) = split /$spc/, $date;
-    }
-    if ($myconfig->{dateformat} =~ /^dd/) {
-      ($dd, $mm, $yy) = split /$spc/, $date;
-    }
-    
-    $dd *= 1;
-    $mm *= 1;
-    $yy = ($yy < 70) ? $yy + 2000 : $yy;
-    $yy = ($yy >= 70 && $yy <= 99) ? $yy + 1900 : $yy;
-
-    $dd = "0$dd" if ($dd < 10);
-    $mm = "0$mm" if ($mm < 10);
-    
-    $date = "$yy$mm$dd";
-  }
-
-  $date;
-  
-}
-
-
-
-# Database routines used throughout
-
-sub dbconnect {
-  my ($self, $myconfig) = @_;
-
-  # connect to database
-  my $dbh = DBI->connect($myconfig->{dbconnect}, $myconfig->{dbuser}, $myconfig->{dbpasswd}) or $self->dberror;
-
-  # set db options
-  if ($myconfig->{dboptions}) {
-    $dbh->do($myconfig->{dboptions}) || $self->dberror($myconfig->{dboptions});
-  }
-
-  $dbh;
-
-}
-
-
-sub dbconnect_noauto {
-  my ($self, $myconfig) = @_;
-
-  # connect to database
-  $dbh = DBI->connect($myconfig->{dbconnect}, $myconfig->{dbuser}, $myconfig->{dbpasswd}, {AutoCommit => 0}) or $self->dberror;
-
-  # set db options
-  if ($myconfig->{dboptions}) {
-    $dbh->do($myconfig->{dboptions}) || $self->dberror($myconfig->{dboptions});
-  }
-
-  $dbh;
-
-}
-
-
-sub update_balance {
-  my ($self, $dbh, $table, $field, $where, $value) = @_;
-
-  # if we have a value, go do it
-  if ($value != 0) {
-    # retrieve balance from table
-    my $query = "SELECT $field FROM $table WHERE $where";
-    my $sth = $dbh->prepare($query);
-
-    $sth->execute || $self->dberror($query);
-    my ($balance) = $sth->fetchrow_array;
-    $sth->finish;
-
-    $balance += $value;
-    # update balance
-    $query = "UPDATE $table SET $field = $balance WHERE $where";
-    $dbh->do($query) || $self->dberror($query);
-  }
-}
-
-
-
-sub update_exchangerate {
-  my ($self, $dbh, $curr, $transdate, $buy, $sell) = @_;
-
-  # some sanity check for currency
-  return if ($curr eq '');
-
-  my $query = qq|SELECT curr FROM exchangerate
-                 WHERE curr = '$curr'
-                AND transdate = '$transdate'|;
-  my $sth = $dbh->prepare($query);
-  $sth->execute || $self->dberror($query);
-  
-  my $set;
-  if ($buy != 0 && $sell != 0) {
-    $set = "buy = $buy, sell = $sell";
-  } elsif ($buy != 0) {
-    $set = "buy = $buy";
-  } elsif ($sell != 0) {
-    $set = "sell = $sell";
-  }
-  
-  if ($sth->fetchrow_array) {
-    $query = qq|UPDATE exchangerate
-                SET $set
-               WHERE curr = '$curr'
-               AND transdate = '$transdate'|;
-  } else {
-    $query = qq|INSERT INTO exchangerate (curr, buy, sell, transdate)
-                VALUES ('$curr', $buy, $sell, '$transdate')|;
-  }
-  $sth->finish;
-  $dbh->do($query) || $self->dberror($query);
-  
-}
-
-
-sub get_exchangerate {
-  my ($self, $dbh, $curr, $transdate, $fld) = @_;
-  
-  my $query = qq|SELECT $fld FROM exchangerate
-                 WHERE curr = '$curr'
-                AND transdate = '$transdate'|;
-  my $sth = $dbh->prepare($query);
-  $sth->execute || $self->dberror($query);
-
-  my ($exchangerate) = $sth->fetchrow_array;
-  $sth->finish;
-
-  $exchangerate;
-
-}
-
-
-sub delete_exchangerate {
-  my ($self, $dbh) = @_;
-
-  my @transdate = ();
-  my $transdate;
-
-  my $query = qq|SELECT DISTINCT transdate
-                 FROM acc_trans
-                WHERE trans_id = $self->{id}|;
-  my $sth = $dbh->prepare($query);
-  $sth->execute || $self->dberror($query);
-
-  while ($transdate = $sth->fetchrow_array) {
-    push @transdate, $transdate;
-  }
-  $sth->finish;
-
-  $query = qq|SELECT transdate FROM acc_trans
-              WHERE ar.id = trans_id
-             AND ar.curr = '$self->{currency}'
-             AND transdate IN
-                 (SELECT transdate FROM acc_trans
-                 WHERE trans_id = $self->{id})
-              AND trans_id != $self->{id}
-        UNION SELECT transdate FROM acc_trans
-             WHERE ap.id = trans_id
-             AND ap.curr = '$self->{currency}'
-             AND transdate IN
-                 (SELECT transdate FROM acc_trans
-                 WHERE trans_id = $self->{id})
-              AND trans_id != $self->{id}
-        UNION SELECT transdate FROM oe
-               WHERE oe.curr = '$self->{currency}'
-               AND transdate IN
-                   (SELECT transdate FROM acc_trans
-                   WHERE trans_id = $self->{id})|;
-  $sth = $dbh->prepare($query);
-  $sth->execute || $self->dberror($query);
-
-  while ($transdate = $sth->fetchrow_array) {
-    @transdate = grep !/^$transdate$/, @transdate;
-  }
-  $sth->finish;
-
-  foreach $transdate (@transdate) {
-    $query = qq|DELETE FROM exchangerate
-                WHERE curr = '$self->{currency}'
-               AND transdate = '$transdate'|;
-    $dbh->do($query) || $self->dberror($query);
-  }
-  
-}
-
-
-sub check_exchangerate {
-  my ($self, $myconfig, $currency, $transdate, $fld) = @_;
-
-  return "" unless $transdate;
-  
-  my $dbh = $self->dbconnect($myconfig);
-
-  my $query = qq|SELECT $fld FROM exchangerate
-                 WHERE curr = '$currency'
-                AND transdate = '$transdate'|;
-  my $sth = $dbh->prepare($query);
-  $sth->execute || $self->dberror($query);
-
-  my ($exchangerate) = $sth->fetchrow_array;
-  $sth->finish;
-  $dbh->disconnect;
-  
-  $exchangerate;
-  
-}
-
-
-sub add_shipto {
-  my ($self, $dbh, $id) = @_;
-
-  my $shipto;
-  foreach my $item (qw(name addr1 addr2 addr3 addr4 contact phone fax email)) {
-    if ($self->{"shipto$item"}) {
-      $shipto = 1 if ($self->{$item} ne $self->{"shipto$item"});
-    }
-    $self->{"shipto$item"} =~ s/'/''/g;
-  }
-
-  if ($shipto) {
-    my $query = qq|INSERT INTO shipto (trans_id, shiptoname, shiptoaddr1,
-                   shiptoaddr2, shiptoaddr3, shiptoaddr4, shiptocontact,
-                  shiptophone, shiptofax, shiptoemail) VALUES ($id,
-                  '$self->{shiptoname}', '$self->{shiptoaddr1}',
-                  '$self->{shiptoaddr2}', '$self->{shiptoaddr3}',
-                  '$self->{shiptoaddr4}', '$self->{shiptocontact}',
-                  '$self->{shiptophone}', '$self->{shiptofax}',
-                  '$self->{shiptoemail}')|;
-    $dbh->do($query) || $self->dberror($query);
-  }
-
-}
-
-
-sub get_employee {
-  my ($self, $dbh) = @_;
-
-  my $query = qq|SELECT name FROM employee 
-                 WHERE login = '$self->{login}'|; 
-  my $sth = $dbh->prepare($query); 
-  $sth->execute || $self->dberror($query); 
-
-  ($self->{employee}) = $sth->fetchrow_array;
-  $sth->finish; 
-
-}
-
-
-# this sub gets the id and name from $table
-sub get_name {
-  my ($self, $myconfig, $table) = @_;
-
-  # connect to database
-  my $dbh = $self->dbconnect($myconfig);
-  
-  my $name = $self->like(lc $self->{$table});
-  my $query = qq~SELECT id, name,
-                 addr1 || ' ' || addr2 || ' ' || addr3 || ' ' || addr4 AS address
-                 FROM $table
-                WHERE lower(name) LIKE '$name'
-                ORDER BY name~;
-  my $sth = $dbh->prepare($query);
-
-  $sth->execute || $self->dberror($query);
-
-  my $i = 0;
-  while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
-    push(@{ $self->{name_list} }, $ref);
-    $i++;
-  }
-  $sth->finish;
-  $dbh->disconnect;
-
-  $i;
-  
-}
-
-
-# the selection sub is used in the AR, AP, IS, IR and OE module
-#
-sub all_vc {
-  my ($self, $myconfig, $table) = @_;
-  
-  my $dbh = $self->dbconnect($myconfig);
-  
-  my $query = qq|SELECT count(*) FROM $table|;
-  my $sth = $dbh->prepare($query);
-  $sth->execute || $self->dberror($query);
-  my ($count) = $sth->fetchrow_array;
-  $sth->finish;
-  
-  # build selection list
-  if ($count < $myconfig->{vclimit}) {
-    $query = qq|SELECT id, name
-               FROM $table
-               ORDER BY name|;
-    $sth = $dbh->prepare($query);
-    $sth->execute || $self->dberror($query);
-
-    while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
-      push @{ $self->{"all_$table"} }, $ref;
-    }
-    
-    $sth->finish;
-    
-  }
-
-  $dbh->disconnect;
-
-}
-
-
-sub create_links {
-  my ($self, $module, $myconfig, $table) = @_;
-
-  $self->all_vc($myconfig, $table);
-  
-  # get last customers or vendors
-  my ($query, $sth);
-  
-  my $dbh = $self->dbconnect($myconfig);
-  
-  my %xkeyref = ();
-
-
-  # now get the account numbers
-  $query = qq|SELECT accno, description, link
-              FROM chart
-             WHERE link LIKE '%$module%'
-             ORDER BY accno|;
-  $sth = $dbh->prepare($query);
-  $sth->execute || $self->dberror($query);
-
-  $self->{accounts} = "";
-  while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
-    
-    foreach my $key (split(/:/, $ref->{link})) {
-      if ($key =~ /$module/) {
-       # cross reference for keys
-       $xkeyref{$ref->{accno}} = $key;
-       
-       push @{ $self->{"${module}_links"}{$key} }, { accno => $ref->{accno},
-                                       description => $ref->{description} };
-
-        $self->{accounts} .= "$ref->{accno} " unless $key =~ /tax/;
-      }
-    }
-  }
-  $sth->finish;
-  
-  if ($self->{id}) {
-    my $arap = ($table eq 'customer') ? 'ar' : 'ap';
-    
-    $query = qq|SELECT a.invnumber, a.transdate,
-                a.${table}_id, a.datepaid, a.duedate, a.ordnumber,
-               a.taxincluded, a.curr AS currency, a.notes, c.name AS $table,
-               a.amount AS oldinvtotal, a.paid AS oldtotalpaid
-               FROM $arap a, $table c
-               WHERE a.${table}_id = c.id
-               AND a.id = $self->{id}|;
-    $sth = $dbh->prepare($query);
-    $sth->execute || $self->dberror($query);
-    
-    $ref = $sth->fetchrow_hashref(NAME_lc);
-    foreach $key (keys %$ref) {
-      $self->{$key} = $ref->{$key};
-    }
-    $sth->finish;
-
-    # get amounts from individual entries
-    $query = qq|SELECT c.accno, c.description, a.source, a.amount,
-                a.transdate, a.cleared, a.project_id, p.projectnumber
-               FROM acc_trans a
-               JOIN chart c ON (c.id = a.chart_id)
-               LEFT JOIN project p ON (a.project_id = p.id)
-               WHERE a.trans_id = $self->{id}
-               AND a.fx_transaction = '0'
-               ORDER BY transdate|;
-    $sth = $dbh->prepare($query);
-    $sth->execute || $self->dberror($query);
-
-    my $fld = ($table eq 'customer') ? 'buy' : 'sell';
-    # get exchangerate for currency
-    $self->{exchangerate} = $self->get_exchangerate($dbh, $self->{currency}, $self->{transdate}, $fld);
-    
-    # store amounts in {acc_trans}{$key} for multiple accounts
-    while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
-      $ref->{exchangerate} = $self->get_exchangerate($dbh, $self->{currency}, $ref->{transdate}, $fld);
-
-      push @{ $self->{acc_trans}{$xkeyref{$ref->{accno}}} }, $ref;
-    }
-
-    $sth->finish;
-
-    $query = qq|SELECT d.curr AS currencies, d.closedto, d.revtrans,
-                  (SELECT c.accno FROM chart c
-                  WHERE d.fxgain_accno_id = c.id) AS fxgain_accno,
-                  (SELECT c.accno FROM chart c
-                  WHERE d.fxloss_accno_id = c.id) AS fxloss_accno
-               FROM defaults d|;
-    $sth = $dbh->prepare($query);
-    $sth->execute || $self->dberror($query);
-
-    $ref = $sth->fetchrow_hashref(NAME_lc);
-    map { $self->{$_} = $ref->{$_} } keys %$ref;
-    $sth->finish;
-
-  } else {
-   
-    # get date
-    $query = qq|SELECT current_date AS transdate,
-                d.curr AS currencies, d.closedto, d.revtrans,
-                  (SELECT c.accno FROM chart c
-                  WHERE d.fxgain_accno_id = c.id) AS fxgain_accno,
-                  (SELECT c.accno FROM chart c
-                  WHERE d.fxloss_accno_id = c.id) AS fxloss_accno
-               FROM defaults d|;
-    $sth = $dbh->prepare($query);
-    $sth->execute || $self->dberror($query);
-
-    $ref = $sth->fetchrow_hashref(NAME_lc);
-    map { $self->{$_} = $ref->{$_} } keys %$ref;
-    $sth->finish;
-
-    if ($self->{"$self->{vc}_id"}) {
-      # only setup currency
-      ($self->{currency}) = split /:/, $self->{currencies};
-      
-    } else {
-      
-      $self->lastname_used($dbh, $myconfig, $table, $module);
-    
-      my $fld = ($table eq 'customer') ? 'buy' : 'sell';
-      # get exchangerate for currency
-      $self->{exchangerate} = $self->get_exchangerate($dbh, $self->{currency}, $self->{transdate}, $fld);
-   
-    }
-
-  }
-
-  $dbh->disconnect;
-
-}
-
-
-sub lastname_used {
-  my ($self, $dbh, $myconfig, $table, $module) = @_;
-
-  my $arap = ($table eq 'customer') ? "ar" : "ap";
-  $arap = 'oe' if ($self->{type} =~ /_order/);
-
-  my $query = qq|SELECT id FROM $arap
-                 WHERE id IN (SELECT MAX(id) FROM $arap
-                             WHERE ${table}_id > 0)|;
-  my $sth = $dbh->prepare($query);
-  $sth->execute || $self->dberror($query);
-  
-  my ($trans_id) = $sth->fetchrow_array;
-  $sth->finish;
-  
-  $trans_id *= 1;
-  $query = qq|SELECT ct.name, a.curr, a.${table}_id,
-              current_date + ct.terms AS duedate
-             FROM $arap a
-             JOIN $table ct ON (a.${table}_id = ct.id)
-             WHERE a.id = $trans_id|;
-  $sth = $dbh->prepare($query);
-  $sth->execute || $self->dberror($query);
-
-  ($self->{$table}, $self->{currency}, $self->{"${table}_id"}, $self->{duedate}) = $sth->fetchrow_array;
-  $sth->finish;
-
-}
-
-
-
-sub current_date {
-  my ($self, $myconfig, $thisdate, $days) = @_;
-  
-  my $dbh = $self->dbconnect($myconfig);
-  my ($sth, $query);
-
-  $days *= 1;
-  if ($thisdate) {
-    my $dateformat = $myconfig->{dateformat};
-    $dateformat .= "yy" if $myconfig->{dateformat} !~ /^y/;
-    
-    $query = qq|SELECT to_date('$thisdate', '$dateformat') + $days AS thisdate
-                FROM defaults|;
-     $sth = $dbh->prepare($query);
-     $sth->execute || $self->dberror($query);
-  } else {
-    $query = qq|SELECT current_date AS thisdate
-                FROM defaults|;
-     $sth = $dbh->prepare($query);
-     $sth->execute || $self->dberror($query);
-  }
-
-  ($thisdate) = $sth->fetchrow_array;
-  $sth->finish;
-
-  $dbh->disconnect;
-
-  $thisdate;
-
-}
-
-
-sub like {
-  my ($self, $string) = @_;
-  
-  unless ($string =~ /%/) {
-    $string = "%$string%";
-  }
-
-  $string =~ s/'/''/g;
-  $string;
-  
-}
-
-
-sub redo_rows {
-  my ($self, $flds, $new, $count, $numrows) = @_;
-
-  my @ndx = ();
-
-  map { push @ndx, { num => $new->[$_-1]->{runningnumber}, ndx => $_ } } (1 .. $count);
-
-  my $i = 0;
-  # fill rows
-  foreach my $item (sort { $a->{num} <=> $b->{num} } @ndx) {
-    $i++;
-    $j = $item->{ndx} - 1;
-    map { $self->{"${_}_$i"} = $new->[$j]->{$_} } @{$flds};
-  }
-
-  # delete empty rows
-  for $i ($count + 1 .. $numrows) {
-    map { delete $self->{"${_}_$i"} } @{$flds}; 
-  }
-
-}
-
-  
-package Locale;
-
-
-sub new {
-  my ($type, $country, $NLS_file) = @_;
-  my $self = {};
-
-  %self = ();
-  if ($country && -d "locale/$country") {
-    $self->{countrycode} = $country;
-    eval { require "locale/$country/$NLS_file"; };
-  }
-
-  $self->{NLS_file} = $NLS_file;
-  
-  push @{ $self->{LONG_MONTH} }, ("January", "February", "March", "April", "May ", "June", "July", "August", "September", "October", "November", "December");
-  push @{ $self->{SHORT_MONTH} }, (qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec));
-  
-  bless $self, $type;
-
-}
-
-
-sub text {
-  my ($self, $text) = @_;
-  
-  return (exists $self{texts}{$text}) ? $self{texts}{$text} : $text;
-  
-}
-
-
-sub findsub {
-  my ($self, $text) = @_;
-
-  if (exists $self{subs}{$text}) {
-    $text = $self{subs}{$text};
-  } else {
-    if ($self->{countrycode} && $self->{NLS_file}) {
-      Form->error("$text not defined in locale/$self->{countrycode}/$self->{NLS_file}");
-    }
-  }
-
-  $text;
-
-}
-
-
-sub date {
-  my ($self, $myconfig, $date, $longformat) = @_;
-
-  my $longdate = "";
-  my $longmonth = ($longformat) ? 'LONG_MONTH' : 'SHORT_MONTH';
-
-  if ($date) {
-    # get separator
-    $spc = $myconfig->{dateformat};
-    $spc =~ s/\w//g;
-    $spc = substr($spc, 1, 1);
-
-    if ($spc eq '.') {
-      $spc = '\.';
-    }
-    if ($spc eq '/') {
-      $spc = '\/';
-    }
-
-    if ($myconfig->{dateformat} =~ /^yy/) {
-      ($yy, $mm, $dd) = split /$spc/, $date;
-    }
-    if ($myconfig->{dateformat} =~ /^mm/) {
-      ($mm, $dd, $yy) = split /$spc/, $date;
-    }
-    if ($myconfig->{dateformat} =~ /^dd/) {
-      ($dd, $mm, $yy) = split /$spc/, $date;
-    }
-    
-    $dd *= 1;
-    $mm--;
-    $yy = ($yy < 70) ? $yy + 2000 : $yy;
-    $yy = ($yy >= 70 && $yy <= 99) ? $yy + 1900 : $yy;
-
-    if ($myconfig->{dateformat} =~ /^dd/) {
-      $longdate = "$dd. ".&text($self, $self->{$longmonth}[$mm])." $yy";
-    } else {
-      $longdate = &text($self, $self->{$longmonth}[$mm])." $dd, $yy";
-    }
-
-  }
-
-  $longdate;
-
-}
-
-
-1;
-
diff --git a/sql-ledger/old/sql-ledger/SL/GL.pm b/sql-ledger/old/sql-ledger/SL/GL.pm
deleted file mode 100644 (file)
index 5bceb07..0000000
+++ /dev/null
@@ -1,462 +0,0 @@
-#=====================================================================
-# SQL-Ledger Accounting
-# Copyright (C) 2001
-#
-#  Author: Dieter Simader
-#   Email: dsimader@sql-ledger.org
-#     Web: http://www.sql-ledger.org
-#
-#  Contributors:
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#======================================================================
-#
-# General ledger backend code
-#
-# CHANGE LOG:
-#   DS. 2000-07-04  Created
-#   DS. 2001-06-12  Changed relations from accno to chart_id
-#
-#======================================================================
-
-package GL;
-
-
-sub delete_transaction {
-  my ($self, $myconfig, $form) = @_;
-  
-  # connect to database
-  my $dbh = $form->dbconnect_noauto($myconfig);
-
-  my $query = qq|DELETE FROM gl WHERE id = $form->{id}|;
-  $dbh->