From d319704a66e9be64da837ccea10af6774c2b0838 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Tue, 13 Sep 2005 13:30:29 +0000 Subject: [PATCH] Alle Dateien durch Perltidy laufen lassen. Die verwendeten Optionen sind am Ende der neu hinzugefuegten Datei doc/programmierstilrichtlinien.txt zu finden. --- SL/AM.pm | 1359 +++++++++ SL/AP.pm | 443 +++ SL/AR.pm | 432 +++ SL/BP.pm | 292 ++ SL/CA.pm | 454 +++ SL/CP.pm | 405 +++ SL/CT.pm | 630 +++++ SL/DATEV.pm | 905 ++++++ SL/Form.pm | 2214 +++++++++++++++ SL/GL.pm | 725 +++++ SL/IC.pm | 1290 +++++++++ SL/IR.pm | 1223 ++++++++ SL/IS.pm | 1556 +++++++++++ SL/Inifile.pm | 95 + SL/LICENSES.pm | 221 ++ SL/LXDebug.pm | 155 + SL/Mailer.pm | 182 ++ SL/Menu.pm | 130 + SL/Num2text.pm | 165 ++ SL/OE.pm | 1343 +++++++++ SL/OP.pm | 112 + SL/PE.pm | 294 ++ SL/RC.pm | 204 ++ SL/RP.pm | 2620 +++++++++++++++++ SL/USTVA.pm | 560 ++++ SL/User.pm | 874 ++++++ SL/XIII.pm | 95 + VERSION | 1 + am.pl | 126 + bin/lynx/menu.pl | 155 + bin/mozilla/admin.pl | 1704 +++++++++++ bin/mozilla/am.pl | 2202 +++++++++++++++ bin/mozilla/ap.pl | 1520 ++++++++++ bin/mozilla/ar.pl | 1562 +++++++++++ bin/mozilla/arap.pl | 448 +++ bin/mozilla/bp.pl | 594 ++++ bin/mozilla/ca.pl | 516 ++++ bin/mozilla/cp.pl | 784 ++++++ bin/mozilla/ct.pl | 1174 ++++++++ bin/mozilla/datev.pl | 353 +++ bin/mozilla/gl.pl | 1891 +++++++++++++ bin/mozilla/ic.pl | 3047 ++++++++++++++++++++ bin/mozilla/io.pl | 1708 +++++++++++ bin/mozilla/ir.pl | 952 +++++++ bin/mozilla/is.pl | 1104 ++++++++ bin/mozilla/kopf.pl | 120 + bin/mozilla/licenses.pl | 681 +++++ bin/mozilla/login.pl | 241 ++ bin/mozilla/menu.pl | 179 ++ bin/mozilla/oe.pl | 2722 ++++++++++++++++++ bin/mozilla/pe.pl | 614 ++++ bin/mozilla/rc.pl | 433 +++ bin/mozilla/rp.pl | 3264 ++++++++++++++++++++++ bin/mozilla/ustva.pl | 2150 ++++++++++++++ css/lx-office-erp.css | 233 ++ css/mn_hauptmenu.png | Bin 0 -> 177 bytes css/px_3.gif | Bin 0 -> 148 bytes doc/COPYING | 355 +++ doc/INSTALL | 116 + doc/changelog | 27 + doc/copyright | 21 + doc/dbschema.dia | Bin 0 -> 16534 bytes doc/installation-erp_01.pdf | Bin 0 -> 47600 bytes doc/latex-template-variablen.html | 744 +++++ doc/programmierstilrichtlinien.txt | 197 ++ doc/ustva.html | 365 +++ favicon.ico | Bin 0 -> 2238 bytes image/AP.png | Bin 0 -> 507 bytes image/AR.png | Bin 0 -> 358 bytes image/Backup.png | Bin 0 -> 511 bytes image/Batch Printing.png | Bin 0 -> 472 bytes image/Cash.png | Bin 0 -> 761 bytes image/General Ledger.png | Bin 0 -> 363 bytes image/Master Data.png | Bin 0 -> 257 bytes image/Programm.png | Bin 0 -> 535 bytes image/Reports.png | Bin 0 -> 453 bytes image/System.png | Bin 0 -> 735 bytes image/bench_computer.png | Bin 0 -> 754 bytes image/bg_titel.gif | Bin 0 -> 144 bytes image/fade.png | Bin 0 -> 344 bytes image/fade2.png | Bin 0 -> 10138 bytes image/fade_short.png | Bin 0 -> 213 bytes image/lx-office-erp.png | Bin 0 -> 25067 bytes image/px_3.gif | Bin 0 -> 43 bytes image/rechnung_anlegen.png | Bin 0 -> 383 bytes image/tux.gif | Bin 0 -> 1946 bytes image/tux.png | Bin 0 -> 4731 bytes image/unterpunkt.png | Bin 0 -> 347 bytes image/unterpunkt2.png | Bin 0 -> 351 bytes image/weblogo.gif | Bin 0 -> 13411 bytes js/jscalendar/calendar-setup.js | 181 ++ js/jscalendar/calendar-win2k-1.css | 270 ++ js/jscalendar/calendar.js | 1765 ++++++++++++ js/jscalendar/lang/calendar-af.js | 39 + js/jscalendar/lang/calendar-br.js | 45 + js/jscalendar/lang/calendar-ca.js | 45 + js/jscalendar/lang/calendar-cs-win.js | 34 + js/jscalendar/lang/calendar-da.js | 63 + js/jscalendar/lang/calendar-de.js | 109 + js/jscalendar/lang/calendar-du.js | 45 + js/jscalendar/lang/calendar-el.js | 89 + js/jscalendar/lang/calendar-en.js | 123 + js/jscalendar/lang/calendar-es.js | 114 + js/jscalendar/lang/calendar-fi.js | 98 + js/jscalendar/lang/calendar-fr.js | 86 + js/jscalendar/lang/calendar-hr-utf8.js | 49 + js/jscalendar/lang/calendar-hr.js | Bin 0 -> 3088 bytes js/jscalendar/lang/calendar-hu.js | 45 + js/jscalendar/lang/calendar-it.js | 79 + js/jscalendar/lang/calendar-jp.js | 45 + js/jscalendar/lang/calendar-ko-utf8.js | 120 + js/jscalendar/lang/calendar-ko.js | 120 + js/jscalendar/lang/calendar-lt-utf8.js | 114 + js/jscalendar/lang/calendar-lt.js | 114 + js/jscalendar/lang/calendar-nl.js | 45 + js/jscalendar/lang/calendar-no.js | 45 + js/jscalendar/lang/calendar-pl-utf8.js | 93 + js/jscalendar/lang/calendar-pl.js | 56 + js/jscalendar/lang/calendar-pt.js | 45 + js/jscalendar/lang/calendar-ro.js | 66 + js/jscalendar/lang/calendar-ru.js | 45 + js/jscalendar/lang/calendar-si.js | 94 + js/jscalendar/lang/calendar-sk.js | 99 + js/jscalendar/lang/calendar-sp.js | 63 + js/jscalendar/lang/calendar-sv.js | 93 + js/jscalendar/lang/calendar-tr.js | 58 + js/jscalendar/lang/calendar-zh.js | 45 + js/jscalendar/menuarrow.gif | Bin 0 -> 68 bytes js/jscalendar/menuarrow2.gif | Bin 0 -> 49 bytes kopf.pl | 17 + locale/de/COPYING | 22 + locale/de/LANGUAGE | 1 + locale/de/Num2text | 185 ++ locale/de/admin | 137 + locale/de/all | 825 ++++++ locale/de/am | 206 ++ locale/de/ap | 142 + locale/de/ar | 141 + locale/de/arap | 30 + locale/de/bp | 60 + locale/de/ca | 52 + locale/de/cp | 85 + locale/de/ct | 129 + locale/de/datev | 53 + locale/de/fa | 80 + locale/de/gl | 162 ++ locale/de/ic | 253 ++ locale/de/io | 131 + locale/de/ir | 217 ++ locale/de/is | 228 ++ locale/de/kopf | 8 + locale/de/licenses | 57 + locale/de/locales.pl | 303 ++ locale/de/login | 25 + locale/de/menu | 101 + locale/de/oe | 292 ++ locale/de/pe | 49 + locale/de/rc | 43 + locale/de/rp | 175 ++ locale/de/ustva | 158 ++ locale/en_GB/COPYING | 23 + locale/en_GB/LANGUAGE | 1 + locale/en_GB/admin | 124 + locale/en_GB/all | 499 ++++ locale/en_GB/am | 139 + locale/en_GB/ap | 133 + locale/en_GB/ar | 134 + locale/en_GB/arap | 30 + locale/en_GB/bp | 54 + locale/en_GB/ca | 50 + locale/en_GB/cp | 77 + locale/en_GB/ct | 71 + locale/en_GB/gl | 124 + locale/en_GB/ic | 216 ++ locale/en_GB/io | 108 + locale/en_GB/ir | 180 ++ locale/en_GB/is | 187 ++ locale/en_GB/login | 27 + locale/en_GB/menu | 73 + locale/en_GB/oe | 202 ++ locale/en_GB/pe | 45 + locale/en_GB/rc | 37 + locale/en_GB/rp | 119 + locale/fr/COPYING | 27 + locale/fr/LANGUAGE | 1 + locale/fr/admin | 125 + locale/fr/all | 500 ++++ locale/fr/am | 139 + locale/fr/ap | 133 + locale/fr/ar | 134 + locale/fr/arap | 30 + locale/fr/ca | 50 + locale/fr/cp | 77 + locale/fr/ct | 71 + locale/fr/gl | 124 + locale/fr/ic | 205 ++ locale/fr/io | 108 + locale/fr/ir | 180 ++ locale/fr/is | 187 ++ locale/fr/login | 27 + locale/fr/menu | 73 + locale/fr/oe | 202 ++ locale/fr/pe | 45 + locale/fr/rc | 37 + locale/fr/rp | 119 + login.pl | 130 + lx-erp.conf | 50 + lx-erp.conf.default | 46 + makesymlinks | 13 + members.default | 5 + menu.ini | 612 ++++ sql/Austria-chart.sql | 143 + sql/Austria-gifi.sql | 334 +++ sql/Belgium-gifi.sql | 68 + sql/Canada-gifi.sql | 754 +++++ sql/France-chart.sql | 951 +++++++ sql/Germany-DATEV-SKR03EU-chart.sql | 388 +++ sql/Germany-DATEV-SKR03EU-gifi.sql | 947 +++++++ sql/Pg-upgrade-1.0.0-2.1.0.sql | 94 + sql/Pg-upgrade-2.1.0-2.1.1.sql | 848 ++++++ sql/Pg-upgrade-2.1.1-2.1.2.sql | 185 ++ sql/Swiss-German-chart.sql | 160 ++ sql/Swiss-German-gifi.sql | 55 + sql/datevautomatik.sql | 99 + sql/liste.sql | 378 +++ sql/lx-office.sql | 1623 +++++++++++ sql/update.sh | 43 + sql/update100-200.sql | 70 + sql/update10x-200.sql | 383 +++ sql/updateLedger-200.sql | 242 ++ templates/Default-balance_sheet.html | 100 + templates/Default-bin_list.html | 181 ++ templates/Default-bin_list.tex | 128 + templates/Default-check.tex | 71 + templates/Default-income_statement.html | 82 + templates/Default-invoice.html | 309 ++ templates/Default-invoice.tex | 231 ++ templates/Default-packing_list.html | 148 + templates/Default-packing_list.tex | 122 + templates/Default-pick_list.html | 154 + templates/Default-pick_list.tex | 142 + templates/Default-purchase_order.html | 224 ++ templates/Default-purchase_order.tex | 198 ++ templates/Default-receipt.tex | 71 + templates/Default-request_quotation.html | 194 ++ templates/Default-request_quotation.tex | 174 ++ templates/Default-sales_order.html | 212 ++ templates/Default-sales_order.tex | 146 + templates/Default-sales_quotation.html | 221 ++ templates/Default-sales_quotation.tex | 160 ++ templates/Default-statement.html | 121 + templates/Default-statement.tex | 107 + templates/French-balance_sheet.html | 109 + templates/French-check.tex | 71 + templates/French-income_statement.html | 86 + templates/French-invoice.html | 309 ++ templates/French-invoice.tex | 151 + templates/French-packing_list.html | 152 + templates/French-packing_list.tex | 125 + templates/French-purchase_order.html | 207 ++ templates/French-purchase_order.tex | 143 + templates/French-receipt.tex | 71 + templates/French-sales_order.html | 229 ++ templates/French-sales_order.tex | 147 + templates/French-statement.html | 133 + templates/French-statement.tex | 137 + templates/German-balance_sheet.html | 100 + templates/German-bin_list.html | 180 ++ templates/German-bin_list.tex | 128 + templates/German-bwa.html | 565 ++++ templates/German-check.tex | 71 + templates/German-income_statement.html | 291 ++ templates/German-invoice.html | 265 ++ templates/German-invoice.tex | 155 + templates/German-packing_list.html | 146 + templates/German-packing_list.tex | 118 + templates/German-pick_list.html | 154 + templates/German-pick_list.tex | 139 + templates/German-purchase_order.html | 188 ++ templates/German-purchase_order.tex | 143 + templates/German-receipt.tex | 71 + templates/German-request_quotation.html | 194 ++ templates/German-request_quotation.tex | 174 ++ templates/German-sales_order.html | 213 ++ templates/German-sales_order.tex | 145 + templates/German-sales_quotation.html | 221 ++ templates/German-sales_quotation.tex | 129 + templates/German-statement.html | 121 + templates/German-statement.tex | 137 + templates/German-ustva-2004.tex | 120 + templates/German-ustva-2005.tex | 120 + templates/German-ustva.html | 205 ++ templates/German-ustva.tex | 120 + templates/Service-balance_sheet.html | 100 + templates/Service-check.tex | 71 + templates/Service-income_statement.html | 82 + templates/Service-invoice.html | 226 ++ templates/Service-invoice.tex | 151 + templates/Service-packing_list.html | 148 + templates/Service-packing_list.tex | 120 + templates/Service-purchase_order.html | 194 ++ templates/Service-purchase_order.tex | 143 + templates/Service-receipt.tex | 71 + templates/Service-sales_order.html | 198 ++ templates/Service-sales_order.tex | 142 + templates/Service-statement.html | 121 + templates/Service-statement.tex | 137 + templates/lsletter.sty | 42 + users/finanzamt.ini | 0 users/ustva-2004-1.pdf | Bin 0 -> 59023 bytes users/ustva-2004-2.pdf | Bin 0 -> 67051 bytes users/ustva-2005-1.pdf | Bin 0 -> 26365 bytes users/ustva-2005-2.pdf | Bin 0 -> 25568 bytes users/ustva1.pdf | Bin 0 -> 59023 bytes users/ustva2.pdf | Bin 0 -> 67051 bytes 315 files changed, 86280 insertions(+) create mode 100644 SL/AM.pm create mode 100644 SL/AP.pm create mode 100644 SL/AR.pm create mode 100644 SL/BP.pm create mode 100644 SL/CA.pm create mode 100644 SL/CP.pm create mode 100644 SL/CT.pm create mode 100644 SL/DATEV.pm create mode 100644 SL/Form.pm create mode 100644 SL/GL.pm create mode 100644 SL/IC.pm create mode 100644 SL/IR.pm create mode 100644 SL/IS.pm create mode 100644 SL/Inifile.pm create mode 100644 SL/LICENSES.pm create mode 100644 SL/LXDebug.pm create mode 100644 SL/Mailer.pm create mode 100644 SL/Menu.pm create mode 100644 SL/Num2text.pm create mode 100644 SL/OE.pm create mode 100644 SL/OP.pm create mode 100644 SL/PE.pm create mode 100644 SL/RC.pm create mode 100644 SL/RP.pm create mode 100644 SL/USTVA.pm create mode 100644 SL/User.pm create mode 100644 SL/XIII.pm create mode 100644 VERSION create mode 100755 am.pl create mode 100644 bin/lynx/menu.pl create mode 100644 bin/mozilla/admin.pl create mode 100644 bin/mozilla/am.pl create mode 100644 bin/mozilla/ap.pl create mode 100644 bin/mozilla/ar.pl create mode 100644 bin/mozilla/arap.pl create mode 100644 bin/mozilla/bp.pl create mode 100644 bin/mozilla/ca.pl create mode 100644 bin/mozilla/cp.pl create mode 100644 bin/mozilla/ct.pl create mode 100644 bin/mozilla/datev.pl create mode 100644 bin/mozilla/gl.pl create mode 100644 bin/mozilla/ic.pl create mode 100644 bin/mozilla/io.pl create mode 100644 bin/mozilla/ir.pl create mode 100644 bin/mozilla/is.pl create mode 100644 bin/mozilla/kopf.pl create mode 100644 bin/mozilla/licenses.pl create mode 100644 bin/mozilla/login.pl create mode 100644 bin/mozilla/menu.pl create mode 100644 bin/mozilla/oe.pl create mode 100644 bin/mozilla/pe.pl create mode 100644 bin/mozilla/rc.pl create mode 100644 bin/mozilla/rp.pl create mode 100644 bin/mozilla/ustva.pl create mode 100644 css/lx-office-erp.css create mode 100755 css/mn_hauptmenu.png create mode 100644 css/px_3.gif create mode 100644 doc/COPYING create mode 100644 doc/INSTALL create mode 100644 doc/changelog create mode 100644 doc/copyright create mode 100644 doc/dbschema.dia create mode 100644 doc/installation-erp_01.pdf create mode 100644 doc/latex-template-variablen.html create mode 100644 doc/programmierstilrichtlinien.txt create mode 100755 doc/ustva.html create mode 100644 favicon.ico create mode 100644 image/AP.png create mode 100644 image/AR.png create mode 100644 image/Backup.png create mode 100644 image/Batch Printing.png create mode 100644 image/Cash.png create mode 100644 image/General Ledger.png create mode 100644 image/Master Data.png create mode 100644 image/Programm.png create mode 100644 image/Reports.png create mode 100644 image/System.png create mode 100644 image/bench_computer.png create mode 100644 image/bg_titel.gif create mode 100644 image/fade.png create mode 100644 image/fade2.png create mode 100644 image/fade_short.png create mode 100644 image/lx-office-erp.png create mode 100644 image/px_3.gif create mode 100644 image/rechnung_anlegen.png create mode 100644 image/tux.gif create mode 100644 image/tux.png create mode 100644 image/unterpunkt.png create mode 100644 image/unterpunkt2.png create mode 100644 image/weblogo.gif create mode 100644 js/jscalendar/calendar-setup.js create mode 100644 js/jscalendar/calendar-win2k-1.css create mode 100644 js/jscalendar/calendar.js create mode 100644 js/jscalendar/lang/calendar-af.js create mode 100644 js/jscalendar/lang/calendar-br.js create mode 100644 js/jscalendar/lang/calendar-ca.js create mode 100644 js/jscalendar/lang/calendar-cs-win.js create mode 100644 js/jscalendar/lang/calendar-da.js create mode 100644 js/jscalendar/lang/calendar-de.js create mode 100644 js/jscalendar/lang/calendar-du.js create mode 100644 js/jscalendar/lang/calendar-el.js create mode 100644 js/jscalendar/lang/calendar-en.js create mode 100644 js/jscalendar/lang/calendar-es.js create mode 100644 js/jscalendar/lang/calendar-fi.js create mode 100644 js/jscalendar/lang/calendar-fr.js create mode 100644 js/jscalendar/lang/calendar-hr-utf8.js create mode 100644 js/jscalendar/lang/calendar-hr.js create mode 100644 js/jscalendar/lang/calendar-hu.js create mode 100644 js/jscalendar/lang/calendar-it.js create mode 100644 js/jscalendar/lang/calendar-jp.js create mode 100644 js/jscalendar/lang/calendar-ko-utf8.js create mode 100644 js/jscalendar/lang/calendar-ko.js create mode 100644 js/jscalendar/lang/calendar-lt-utf8.js create mode 100644 js/jscalendar/lang/calendar-lt.js create mode 100644 js/jscalendar/lang/calendar-nl.js create mode 100644 js/jscalendar/lang/calendar-no.js create mode 100644 js/jscalendar/lang/calendar-pl-utf8.js create mode 100644 js/jscalendar/lang/calendar-pl.js create mode 100644 js/jscalendar/lang/calendar-pt.js create mode 100644 js/jscalendar/lang/calendar-ro.js create mode 100644 js/jscalendar/lang/calendar-ru.js create mode 100644 js/jscalendar/lang/calendar-si.js create mode 100644 js/jscalendar/lang/calendar-sk.js create mode 100644 js/jscalendar/lang/calendar-sp.js create mode 100644 js/jscalendar/lang/calendar-sv.js create mode 100644 js/jscalendar/lang/calendar-tr.js create mode 100644 js/jscalendar/lang/calendar-zh.js create mode 100644 js/jscalendar/menuarrow.gif create mode 100644 js/jscalendar/menuarrow2.gif create mode 100755 kopf.pl create mode 100644 locale/de/COPYING create mode 100644 locale/de/LANGUAGE create mode 100644 locale/de/Num2text create mode 100644 locale/de/admin create mode 100644 locale/de/all create mode 100644 locale/de/am create mode 100644 locale/de/ap create mode 100644 locale/de/ar create mode 100644 locale/de/arap create mode 100644 locale/de/bp create mode 100644 locale/de/ca create mode 100644 locale/de/cp create mode 100644 locale/de/ct create mode 100644 locale/de/datev create mode 100644 locale/de/fa create mode 100644 locale/de/gl create mode 100644 locale/de/ic create mode 100644 locale/de/io create mode 100644 locale/de/ir create mode 100644 locale/de/is create mode 100644 locale/de/kopf create mode 100644 locale/de/licenses create mode 100755 locale/de/locales.pl create mode 100644 locale/de/login create mode 100644 locale/de/menu create mode 100644 locale/de/oe create mode 100644 locale/de/pe create mode 100644 locale/de/rc create mode 100644 locale/de/rp create mode 100644 locale/de/ustva create mode 100644 locale/en_GB/COPYING create mode 100644 locale/en_GB/LANGUAGE create mode 100644 locale/en_GB/admin create mode 100644 locale/en_GB/all create mode 100644 locale/en_GB/am create mode 100644 locale/en_GB/ap create mode 100644 locale/en_GB/ar create mode 100644 locale/en_GB/arap create mode 100644 locale/en_GB/bp create mode 100644 locale/en_GB/ca create mode 100644 locale/en_GB/cp create mode 100644 locale/en_GB/ct create mode 100644 locale/en_GB/gl create mode 100644 locale/en_GB/ic create mode 100644 locale/en_GB/io create mode 100644 locale/en_GB/ir create mode 100644 locale/en_GB/is create mode 100644 locale/en_GB/login create mode 100644 locale/en_GB/menu create mode 100644 locale/en_GB/oe create mode 100644 locale/en_GB/pe create mode 100644 locale/en_GB/rc create mode 100644 locale/en_GB/rp create mode 100644 locale/fr/COPYING create mode 100644 locale/fr/LANGUAGE create mode 100644 locale/fr/admin create mode 100644 locale/fr/all create mode 100644 locale/fr/am create mode 100644 locale/fr/ap create mode 100644 locale/fr/ar create mode 100644 locale/fr/arap create mode 100644 locale/fr/ca create mode 100644 locale/fr/cp create mode 100644 locale/fr/ct create mode 100644 locale/fr/gl create mode 100644 locale/fr/ic create mode 100644 locale/fr/io create mode 100644 locale/fr/ir create mode 100644 locale/fr/is create mode 100644 locale/fr/login create mode 100644 locale/fr/menu create mode 100644 locale/fr/oe create mode 100644 locale/fr/pe create mode 100644 locale/fr/rc create mode 100644 locale/fr/rp create mode 100755 login.pl create mode 100644 lx-erp.conf create mode 100644 lx-erp.conf.default create mode 100755 makesymlinks create mode 100644 members.default create mode 100644 menu.ini create mode 100644 sql/Austria-chart.sql create mode 100644 sql/Austria-gifi.sql create mode 100644 sql/Belgium-gifi.sql create mode 100644 sql/Canada-gifi.sql create mode 100644 sql/France-chart.sql create mode 100644 sql/Germany-DATEV-SKR03EU-chart.sql create mode 100644 sql/Germany-DATEV-SKR03EU-gifi.sql create mode 100644 sql/Pg-upgrade-1.0.0-2.1.0.sql create mode 100644 sql/Pg-upgrade-2.1.0-2.1.1.sql create mode 100644 sql/Pg-upgrade-2.1.1-2.1.2.sql create mode 100644 sql/Swiss-German-chart.sql create mode 100644 sql/Swiss-German-gifi.sql create mode 100644 sql/datevautomatik.sql create mode 100644 sql/liste.sql create mode 100644 sql/lx-office.sql create mode 100644 sql/update.sh create mode 100644 sql/update100-200.sql create mode 100644 sql/update10x-200.sql create mode 100644 sql/updateLedger-200.sql create mode 100644 templates/Default-balance_sheet.html create mode 100644 templates/Default-bin_list.html create mode 100644 templates/Default-bin_list.tex create mode 100644 templates/Default-check.tex create mode 100644 templates/Default-income_statement.html create mode 100644 templates/Default-invoice.html create mode 100644 templates/Default-invoice.tex create mode 100644 templates/Default-packing_list.html create mode 100644 templates/Default-packing_list.tex create mode 100644 templates/Default-pick_list.html create mode 100644 templates/Default-pick_list.tex create mode 100644 templates/Default-purchase_order.html create mode 100644 templates/Default-purchase_order.tex create mode 100644 templates/Default-receipt.tex create mode 100644 templates/Default-request_quotation.html create mode 100644 templates/Default-request_quotation.tex create mode 100644 templates/Default-sales_order.html create mode 100644 templates/Default-sales_order.tex create mode 100644 templates/Default-sales_quotation.html create mode 100644 templates/Default-sales_quotation.tex create mode 100644 templates/Default-statement.html create mode 100644 templates/Default-statement.tex create mode 100644 templates/French-balance_sheet.html create mode 100644 templates/French-check.tex create mode 100644 templates/French-income_statement.html create mode 100644 templates/French-invoice.html create mode 100644 templates/French-invoice.tex create mode 100644 templates/French-packing_list.html create mode 100644 templates/French-packing_list.tex create mode 100644 templates/French-purchase_order.html create mode 100644 templates/French-purchase_order.tex create mode 100644 templates/French-receipt.tex create mode 100644 templates/French-sales_order.html create mode 100644 templates/French-sales_order.tex create mode 100644 templates/French-statement.html create mode 100644 templates/French-statement.tex create mode 100644 templates/German-balance_sheet.html create mode 100644 templates/German-bin_list.html create mode 100644 templates/German-bin_list.tex create mode 100644 templates/German-bwa.html create mode 100644 templates/German-check.tex create mode 100644 templates/German-income_statement.html create mode 100644 templates/German-invoice.html create mode 100644 templates/German-invoice.tex create mode 100644 templates/German-packing_list.html create mode 100644 templates/German-packing_list.tex create mode 100644 templates/German-pick_list.html create mode 100644 templates/German-pick_list.tex create mode 100644 templates/German-purchase_order.html create mode 100644 templates/German-purchase_order.tex create mode 100644 templates/German-receipt.tex create mode 100644 templates/German-request_quotation.html create mode 100644 templates/German-request_quotation.tex create mode 100644 templates/German-sales_order.html create mode 100644 templates/German-sales_order.tex create mode 100644 templates/German-sales_quotation.html create mode 100644 templates/German-sales_quotation.tex create mode 100644 templates/German-statement.html create mode 100644 templates/German-statement.tex create mode 100644 templates/German-ustva-2004.tex create mode 100644 templates/German-ustva-2005.tex create mode 100644 templates/German-ustva.html create mode 100644 templates/German-ustva.tex create mode 100644 templates/Service-balance_sheet.html create mode 100644 templates/Service-check.tex create mode 100644 templates/Service-income_statement.html create mode 100644 templates/Service-invoice.html create mode 100644 templates/Service-invoice.tex create mode 100644 templates/Service-packing_list.html create mode 100644 templates/Service-packing_list.tex create mode 100644 templates/Service-purchase_order.html create mode 100644 templates/Service-purchase_order.tex create mode 100644 templates/Service-receipt.tex create mode 100644 templates/Service-sales_order.html create mode 100644 templates/Service-sales_order.tex create mode 100644 templates/Service-statement.html create mode 100644 templates/Service-statement.tex create mode 100644 templates/lsletter.sty create mode 100644 users/finanzamt.ini create mode 100755 users/ustva-2004-1.pdf create mode 100755 users/ustva-2004-2.pdf create mode 100755 users/ustva-2005-1.pdf create mode 100755 users/ustva-2005-2.pdf create mode 100644 users/ustva1.pdf create mode 100644 users/ustva2.pdf diff --git a/SL/AM.pm b/SL/AM.pm new file mode 100644 index 000000000..62406e74c --- /dev/null +++ b/SL/AM.pm @@ -0,0 +1,1359 @@ +#===================================================================== +# LX-Office ERP +# Copyright (C) 2004 +# Based on SQL-Ledger Version 2.1.9 +# Web http://www.lx-office.org +# +#===================================================================== +# 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 { + $main::lxdebug->enter_sub(); + + my ($self, $myconfig, $form) = @_; + + $form->{id} = "NULL" unless ($form->{id}); + + # connect to database + my $dbh = $form->dbconnect($myconfig); + + my $query = qq|SELECT c.accno, c.description, c.charttype, c.gifi_accno, + c.category, c.link, c.taxkey_id, c.pos_ustva, c.pos_bwa, c.pos_bilanz,c.pos_eur + FROM chart c + WHERE c.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; + + # get taxkeys and description + $query = qq|SELECT taxkey, taxdescription + FROM tax|; + $sth = $dbh->prepare($query); + $sth->execute || $form->dberror($query); + + $ref = $sth->fetchrow_hashref(NAME_lc); + + while (my $ref = $sth->fetchrow_hashref(NAME_lc)) { + push @{ $form->{TAXKEY} }, $ref; + } + + $sth->finish; + + # check if we have any transactions + $query = qq|SELECT a.trans_id FROM acc_trans a + WHERE a.chart_id = $form->{id}|; + $sth = $dbh->prepare($query); + $sth->execute || $form->dberror($query); + + ($form->{orphaned}) = $sth->fetchrow_array; + $form->{orphaned} = !$form->{orphaned}; + $sth->finish; + + $dbh->disconnect; + + $main::lxdebug->leave_sub(); +} + +sub save_account { + $main::lxdebug->enter_sub(); + + 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 CT_tax); + } + + $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); + + my ($query, $sth); + + if ($form->{id} eq "NULL") { + $form->{id} = ""; + } + + map({ $form->{$_} = "NULL" unless ($form->{$_}); } + qw(pos_ustva pos_bwa pos_bilanz pos_eur)); + + 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}', + taxkey_id = $form->{taxkey_id}, + pos_ustva = $form->{pos_ustva}, + pos_bwa = $form->{pos_bwa}, + pos_bilanz = $form->{pos_bilanz}, + pos_eur = $form->{pos_eur} + WHERE id = $form->{id}|; + } else { + + $query = qq|INSERT INTO chart + (accno, description, charttype, gifi_accno, category, link, taxkey_id, pos_ustva, pos_bwa, pos_bilanz,pos_eur) + VALUES ('$form->{accno}', '$form->{description}', + '$form->{charttype}', '$form->{gifi_accno}', + '$form->{category}', '$form->{link}', $form->{taxkey_id}, $form->{pos_ustva}, $form->{pos_bwa}, $form->{pos_bilanz}, $form->{pos_eur})|; + } + $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 c.id + FROM chart c + WHERE c.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 t.chart_id + FROM tax t + WHERE t.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; + + $main::lxdebug->leave_sub(); + + return $rc; +} + +sub delete_account { + $main::lxdebug->enter_sub(); + + my ($self, $myconfig, $form) = @_; + + # connect to database, turn off AutoCommit + my $dbh = $form->dbconnect_noauto($myconfig); + + my $query = qq|SELECT count(*) FROM acc_trans a + WHERE a.chart_id = $form->{id}|; + my $sth = $dbh->prepare($query); + $sth->execute || $form->dberror($query); + + if ($sth->fetchrow_array) { + $sth->finish; + $dbh->disconnect; + $main::lxdebug->leave_sub(); + return; + } + $sth->finish; + + # 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; + + $main::lxdebug->leave_sub(); + + return $rc; +} + +sub gifi_accounts { + $main::lxdebug->enter_sub(); + + 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; + + $main::lxdebug->leave_sub(); +} + +sub get_gifi { + $main::lxdebug->enter_sub(); + + my ($self, $myconfig, $form) = @_; + + # connect to database + my $dbh = $form->dbconnect($myconfig); + + my $query = qq|SELECT g.accno, g.description + FROM gifi g + WHERE g.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; + + # check for transactions + $query = qq|SELECT count(*) FROM acc_trans a, chart c, gifi g + WHERE c.gifi_accno = g.accno + AND a.chart_id = c.id + AND g.accno = '$form->{accno}'|; + $sth = $dbh->prepare($query); + $sth->execute || $form->dberror($query); + + ($form->{orphaned}) = $sth->fetchrow_array; + $sth->finish; + $form->{orphaned} = !$form->{orphaned}; + + $dbh->disconnect; + + $main::lxdebug->leave_sub(); +} + +sub save_gifi { + $main::lxdebug->enter_sub(); + + my ($self, $myconfig, $form) = @_; + + # connect to database + my $dbh = $form->dbconnect($myconfig); + + $form->{description} =~ 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; + + $main::lxdebug->leave_sub(); +} + +sub delete_gifi { + $main::lxdebug->enter_sub(); + + 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; + + $main::lxdebug->leave_sub(); +} + +sub warehouses { + $main::lxdebug->enter_sub(); + + my ($self, $myconfig, $form) = @_; + + # connect to database + my $dbh = $form->dbconnect($myconfig); + + my $query = qq|SELECT id, description + FROM warehouse + ORDER BY 2|; + + $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; + + $main::lxdebug->leave_sub(); +} + +sub get_warehouse { + $main::lxdebug->enter_sub(); + + my ($self, $myconfig, $form) = @_; + + # connect to database + my $dbh = $form->dbconnect($myconfig); + + my $query = qq|SELECT w.description + FROM warehouse w + WHERE w.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; + + # see if it is in use + $query = qq|SELECT count(*) FROM inventory i + WHERE i.warehouse_id = $form->{id}|; + $sth = $dbh->prepare($query); + $sth->execute || $form->dberror($query); + + ($form->{orphaned}) = $sth->fetchrow_array; + $form->{orphaned} = !$form->{orphaned}; + $sth->finish; + + $dbh->disconnect; + + $main::lxdebug->leave_sub(); +} + +sub save_warehouse { + $main::lxdebug->enter_sub(); + + my ($self, $myconfig, $form) = @_; + + # connect to database + my $dbh = $form->dbconnect($myconfig); + + $form->{description} =~ s/\'/\'\'/g; + + if ($form->{id}) { + $query = qq|UPDATE warehouse SET + description = '$form->{description}' + WHERE id = $form->{id}|; + } else { + $query = qq|INSERT INTO warehouse + (description) + VALUES ('$form->{description}')|; + } + $dbh->do($query) || $form->dberror($query); + + $dbh->disconnect; + + $main::lxdebug->leave_sub(); +} + +sub delete_warehouse { + $main::lxdebug->enter_sub(); + + my ($self, $myconfig, $form) = @_; + + # connect to database + my $dbh = $form->dbconnect($myconfig); + + $query = qq|DELETE FROM warehouse + WHERE id = $form->{id}|; + $dbh->do($query) || $form->dberror($query); + + $dbh->disconnect; + + $main::lxdebug->leave_sub(); +} + +sub departments { + $main::lxdebug->enter_sub(); + + my ($self, $myconfig, $form) = @_; + + # connect to database + my $dbh = $form->dbconnect($myconfig); + + my $query = qq|SELECT d.id, d.description, d.role + FROM department d + ORDER BY 2|; + + $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; + + $main::lxdebug->leave_sub(); +} + +sub get_department { + $main::lxdebug->enter_sub(); + + my ($self, $myconfig, $form) = @_; + + # connect to database + my $dbh = $form->dbconnect($myconfig); + + my $query = qq|SELECT d.description, d.role + FROM department d + WHERE d.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; + + # see if it is in use + $query = qq|SELECT count(*) FROM dpt_trans d + WHERE d.department_id = $form->{id}|; + $sth = $dbh->prepare($query); + $sth->execute || $form->dberror($query); + + ($form->{orphaned}) = $sth->fetchrow_array; + $form->{orphaned} = !$form->{orphaned}; + $sth->finish; + + $dbh->disconnect; + + $main::lxdebug->leave_sub(); +} + +sub save_department { + $main::lxdebug->enter_sub(); + + my ($self, $myconfig, $form) = @_; + + # connect to database + my $dbh = $form->dbconnect($myconfig); + + $form->{description} =~ s/\'/\'\'/g; + + if ($form->{id}) { + $query = qq|UPDATE department SET + description = '$form->{description}', + role = '$form->{role}' + WHERE id = $form->{id}|; + } else { + $query = qq|INSERT INTO department + (description, role) + VALUES ('$form->{description}', '$form->{role}')|; + } + $dbh->do($query) || $form->dberror($query); + + $dbh->disconnect; + + $main::lxdebug->leave_sub(); +} + +sub delete_department { + $main::lxdebug->enter_sub(); + + my ($self, $myconfig, $form) = @_; + + # connect to database + my $dbh = $form->dbconnect($myconfig); + + $query = qq|DELETE FROM department + WHERE id = $form->{id}|; + $dbh->do($query) || $form->dberror($query); + + $dbh->disconnect; + + $main::lxdebug->leave_sub(); +} + +sub business { + $main::lxdebug->enter_sub(); + + my ($self, $myconfig, $form) = @_; + + # connect to database + my $dbh = $form->dbconnect($myconfig); + + my $query = qq|SELECT id, description, discount, customernumberinit, salesman + FROM business + ORDER BY 2|; + + $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; + + $main::lxdebug->leave_sub(); +} + +sub get_business { + $main::lxdebug->enter_sub(); + + my ($self, $myconfig, $form) = @_; + + # connect to database + my $dbh = $form->dbconnect($myconfig); + + my $query = + qq|SELECT b.description, b.discount, b.customernumberinit, b.salesman + FROM business b + WHERE b.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; + + $dbh->disconnect; + + $main::lxdebug->leave_sub(); +} + +sub save_business { + $main::lxdebug->enter_sub(); + + my ($self, $myconfig, $form) = @_; + + # connect to database + my $dbh = $form->dbconnect($myconfig); + + $form->{description} =~ s/\'/\'\'/g; + $form->{discount} /= 100; + $form->{salesman} *= 1; + + # id is the old record + if ($form->{id}) { + $query = qq|UPDATE business SET + description = '$form->{description}', + discount = $form->{discount}, + customernumberinit = '$form->{customernumberinit}', + salesman = '$form->{salesman}' + WHERE id = $form->{id}|; + } else { + $query = qq|INSERT INTO business + (description, discount, customernumberinit, salesman) + VALUES ('$form->{description}', $form->{discount}, '$form->{customernumberinit}', '$form->{salesman}')|; + } + $dbh->do($query) || $form->dberror($query); + + $dbh->disconnect; + + $main::lxdebug->leave_sub(); +} + +sub delete_business { + $main::lxdebug->enter_sub(); + + my ($self, $myconfig, $form) = @_; + + # connect to database + my $dbh = $form->dbconnect($myconfig); + + $query = qq|DELETE FROM business + WHERE id = $form->{id}|; + $dbh->do($query) || $form->dberror($query); + + $dbh->disconnect; + + $main::lxdebug->leave_sub(); +} + +sub sic { + $main::lxdebug->enter_sub(); + + my ($self, $myconfig, $form) = @_; + + # connect to database + my $dbh = $form->dbconnect($myconfig); + + my $query = qq|SELECT code, sictype, description + FROM sic + ORDER BY code|; + + $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; + + $main::lxdebug->leave_sub(); +} + +sub get_sic { + $main::lxdebug->enter_sub(); + + my ($self, $myconfig, $form) = @_; + + # connect to database + my $dbh = $form->dbconnect($myconfig); + + my $query = qq|SELECT s.code, s.sictype, s.description + FROM sic s + WHERE s.code = '$form->{code}'|; + 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; + + $main::lxdebug->leave_sub(); +} + +sub save_sic { + $main::lxdebug->enter_sub(); + + my ($self, $myconfig, $form) = @_; + + # connect to database + my $dbh = $form->dbconnect($myconfig); + + $form->{code} =~ s/\'/\'\'/g; + $form->{description} =~ s/\'/\'\'/g; + + # if there is an id + if ($form->{id}) { + $query = qq|UPDATE sic SET + code = '$form->{code}', + sictype = '$form->{sictype}', + description = '$form->{description}' + WHERE code = '$form->{id}'|; + } else { + $query = qq|INSERT INTO sic + (code, sictype, description) + VALUES ('$form->{code}', '$form->{sictype}', '$form->{description}')|; + } + $dbh->do($query) || $form->dberror($query); + + $dbh->disconnect; + + $main::lxdebug->leave_sub(); +} + +sub delete_sic { + $main::lxdebug->enter_sub(); + + my ($self, $myconfig, $form) = @_; + + # connect to database + my $dbh = $form->dbconnect($myconfig); + + $query = qq|DELETE FROM sic + WHERE code = '$form->{code}'|; + $dbh->do($query) || $form->dberror($query); + + $dbh->disconnect; + + $main::lxdebug->leave_sub(); +} + +sub load_template { + $main::lxdebug->enter_sub(); + + my ($self, $form) = @_; + + open(TEMPLATE, "$form->{file}") or $form->error("$form->{file} : $!"); + + while (