From: Moritz Bunkus Date: Wed, 9 Feb 2011 13:33:36 +0000 (+0100) Subject: Merge remote branch 'refs/remotes/kirana/after-262' X-Git-Tag: release-2.6.3~61^2~7^2~1 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=5536f72295081df4c6b227855cfa22745fcc6039;hp=d639b4fce190514f773d255af4f89514a95515b2;p=kivitendo-erp.git Merge remote branch 'refs/remotes/kirana/after-262' --- diff --git a/DEBIAN/DEBIAN/control b/DEBIAN/DEBIAN/control index f47766de3..b5523a6b3 100644 --- a/DEBIAN/DEBIAN/control +++ b/DEBIAN/DEBIAN/control @@ -5,7 +5,7 @@ Section: universe/web Priority: optional Installed-Size: 0 Maintainer: Holger Lindemann , Adrian Weibel -Depends: patch, apache2 | apache | lighttpd, postgresql-8.2 | postgresql-8.3 | postgresql-8.4, libdbi-perl, libdbd-pg-perl, libpg-perl, libarchive-zip-perl, libyaml-perl, libio-stringy-perl, libtemplate-perl, libpdf-api2-perl, libcgi-ajax-perl, liblist-moreutils-perl, libxml-writer-perl, libtext-csv-xs-perl | libtext-csv-perl, liburi-perl, libdatetime-perl, libtext-iconv-perl, libclass-accessor-perl,libemail-address-perl,libparent-perl, librose-object-perl, librose-db-perl, librose-db-object-perl +Depends: patch, apache2 | apache | lighttpd, postgresql-8.3 | postgresql-8.4, libdbi-perl, libdbd-pg-perl, libpg-perl, libarchive-zip-perl, libyaml-perl, libio-stringy-perl, libtemplate-perl, libpdf-api2-perl, libcgi-ajax-perl, liblist-moreutils-perl, libxml-writer-perl, libtext-csv-xs-perl | libtext-csv-perl, liburi-perl, libdatetime-perl, libtext-iconv-perl, libclass-accessor-perl,libemail-address-perl,libparent-perl, librose-object-perl, librose-db-perl, librose-db-object-perl Suggests: tetex-base | texlive-latex-base, tetex-bin | texlive-base-bin , tetex-extra | texlive-latex-extra, xpdf | evince | okular, libfcgi-perl, libapache2-mod-fastcgi Homepage: http://www.lx-office.org Description: Extended double entry accounting system for the german market. diff --git a/DEBIAN/DEBIAN/control.older b/DEBIAN/DEBIAN/control.older new file mode 100644 index 000000000..1460d2873 --- /dev/null +++ b/DEBIAN/DEBIAN/control.older @@ -0,0 +1,25 @@ +Package: lx-office-erp +Version: 0 +Architecture: all +Section: universe/web +Priority: optional +Installed-Size: 0 +Maintainer: Holger Lindemann , Adrian Weibel +Depends: patch, apache2 | apache | lighttpd, postgresql-8.3 | postgresql-8.4, libdbi-perl, libdbd-pg-perl, libpg-perl, libarchive-zip-perl, libyaml-perl, libio-stringy-perl, libtemplate-perl, libpdf-api2-perl, libcgi-ajax-perl, liblist-moreutils-perl, libxml-writer-perl, libtext-csv-xs-perl | libtext-csv-perl, liburi-perl, libdatetime-perl, libtext-iconv-perl, libclass-accessor-perl,libemail-address-perl,libparent-perl, libbit-vector-perl, libsub-exporter-perl, libclone-perl, libclass-factory-util-perl +Suggests: tetex-base | texlive-latex-base, tetex-bin | texlive-base-bin , tetex-extra | texlive-latex-extra, xpdf | evince | okular, libfcgi-perl, libapache2-mod-fastcgi +Homepage: http://www.lx-office.org +Description: Extended double entry accounting system for the german market. + Lx-Office is derived from sql-ledger and rewritten + and extended to meet german requirements in ERP software. + It is multi user capable and the administrator can grant and revoke + rights to access different modules. You can manage vendors and customers + as well as goods and attendences. Invoices and orders as well as other + documents can be sent direcly by email. German taxes are sent to Finanzamt + via Winston and taxbird (Elster) out of the program. The data stored in + datasets can + be accessed by a group of users and it is possible to sent it in DATEV + data format to a tax consultant. Most of the documents are printable in + html or pdf format. + Further information about Lx-Office is available at http://www.lx-office.org . + Revision: + diff --git a/DEBIAN/DEBIAN/postinst b/DEBIAN/DEBIAN/postinst index 02f5ac927..97acf8a28 100755 --- a/DEBIAN/DEBIAN/postinst +++ b/DEBIAN/DEBIAN/postinst @@ -170,6 +170,11 @@ mk_links() { ln -s /etc/lx-office-erp/lx-office-erp.cherokee /etc/cherokee/sites-available/lx-office-erp.cherokee fi; fi; + if [ -e /etc/lighttpd ] ; then + if ! [ -f /etc/lighttpd/conf-enabled/lx-office-erp.lighttpd ] ; then + ln -s /etc/lx-office-erp/lx-office-erp.lighttpd /etc/lighttpf/conf-enabled/10-lx-office-erp + fi; + fi; } reload_web_server() { if [ -f /etc/init.d/apache* ] ; then @@ -178,6 +183,9 @@ reload_web_server() { if [ -f /etc/init.d/cherokee ] ; then /etc/init.d/cherokee reload fi + if [ -f /etc/init.d/lighttpd ] ; then + /etc/init.d/lighttpd reload + fi } case "$1" in diff --git a/DEBIAN/mk_erp_deb.sh b/DEBIAN/mk_erp_deb.sh index 786534218..a0029531f 100755 --- a/DEBIAN/mk_erp_deb.sh +++ b/DEBIAN/mk_erp_deb.sh @@ -15,7 +15,7 @@ DST=/tmp/package ################################################ VER=`cat VERSION` -DEST=$DST/lx-office-erp_$VER-$NR-all +DEST=$DST/lx-office-erp_$VER-$NR$1-all mkdir -p $DEST @@ -25,6 +25,13 @@ cd $DEST cp -a $SRC/DEBIAN/DEBIAN . tar xzf $SRC/DEBIAN/struktur.tgz +#Für Hardy + co Sonderbehandlung +if [ "$1#" == "-older#" ]; then + mv DEBIAN/control.older DEBIAN/control +else + rm DEBIAN/control.older +fi + #Dateien kopieren: #aber keine fertigen Konfigurationen, nur *.default cp -a $SRC/SL usr/lib/lx-office-erp @@ -50,6 +57,11 @@ cp -a $SRC/xslt var/lib/lx-office-erp cp -a $SRC/doc/* usr/share/doc/lx-office-erp/ cp -a $SRC/image/* usr/share/lx-office-erp/ +#Ist nicht im Repository. Liegt bei sf +if [ "$1#" == "-older#" ]; then + tar xzf $SRC/DEBIAN/lx-erp-perl-libs-compat-v2.tar.gz +fi + #Git- und dummy-files löschen find . -name ".git*" -exec rm -rf {} \; find . -name ".dummy" -exec rm -rf {} \; @@ -76,6 +88,6 @@ mv DEBIAN/1.tmp DEBIAN/control #Paket bauen: cd .. -dpkg-deb --build lx-office-erp_$VER-$NR-all +dpkg-deb --build lx-office-erp_$VER-$NR$1-all echo "Done" diff --git a/SL/DB/Helper/PriceTaxCalculator.pm b/SL/DB/Helper/PriceTaxCalculator.pm index 2988d14ee..d84d0feb7 100644 --- a/SL/DB/Helper/PriceTaxCalculator.pm +++ b/SL/DB/Helper/PriceTaxCalculator.pm @@ -229,7 +229,7 @@ sub _num_decimal_places { } sub _dbg { - $::lxdebug->message(0, join(' ', @_)); + # $::lxdebug->message(0, join(' ', @_)); } 1; diff --git a/SL/DB/Invoice.pm b/SL/DB/Invoice.pm index 758f91a61..91ee14c85 100644 --- a/SL/DB/Invoice.pm +++ b/SL/DB/Invoice.pm @@ -178,7 +178,7 @@ sub post { if ($self->db->in_transaction) { $worker->(); } elsif (!$self->db->do_transaction($worker)) { - $::lxdebug->message(0, "convert_to_invoice failed: " . join("\n", (split(/\n/, $self->db->error))[0..2])); + $::lxdebug->message(LXDebug->WARN(), "convert_to_invoice failed: " . join("\n", (split(/\n/, $self->db->error))[0..2])); return undef; } diff --git a/SL/DO.pm b/SL/DO.pm index 9099ba602..f39196323 100644 --- a/SL/DO.pm +++ b/SL/DO.pm @@ -939,7 +939,7 @@ sub unpack_stock_information { } sub get_item_availability { - $main::lxdebug->enter_sub(); + $::lxdebug->enter_sub; my $self = shift; my %params = @_; @@ -947,8 +947,6 @@ sub get_item_availability { Common::check_params(\%params, qw(parts_id)); my @parts_ids = 'ARRAY' eq ref $params{parts_id} ? @{ $params{parts_id} } : ($params{parts_id}); - my $form = $main::form; - my $myconfig = \%main::myconfig; my $query = qq|SELECT i.warehouse_id, i.bin_id, i.chargenumber, i.bestbefore, SUM(qty) AS qty, i.parts_id, @@ -962,9 +960,9 @@ sub get_item_availability { HAVING SUM(qty) > 0 ORDER BY LOWER(w.description), LOWER(b.description), LOWER(i.chargenumber), i.bestbefore |; - my $contents = selectall_hashref_query($form, $form->get_standard_dbh($myconfig), $query, @parts_ids); + my $contents = selectall_hashref_query($::form, $::form->get_standard_dbh, $query, @parts_ids); - $main::lxdebug->leave_sub(); + $::lxdebug->leave_sub; return @{ $contents }; } diff --git a/SL/Form.pm b/SL/Form.pm index bd16b4c30..6e7145f20 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -385,7 +385,7 @@ sub escape { my ($self, $str) = @_; $str = Encode::encode('utf-8-strict', $str) if $::locale->is_utf8; - $str =~ s/([^a-zA-Z0-9_.-])/sprintf("%%%02x", ord($1))/ge; + $str =~ s/([^a-zA-Z0-9_.:-])/sprintf("%%%02x", ord($1))/ge; $main::lxdebug->leave_sub(2); @@ -401,6 +401,7 @@ sub unescape { $str =~ s/\\$//; $str =~ s/%([0-9a-fA-Z]{2})/pack("c",hex($1))/eg; + $str = Encode::decode('utf-8-strict', $str) if $::locale->is_utf8; $main::lxdebug->leave_sub(2); diff --git a/SL/RP.pm b/SL/RP.pm index 84dd73e22..d875fb162 100644 --- a/SL/RP.pm +++ b/SL/RP.pm @@ -346,12 +346,10 @@ sub get_accounts { } } else { # if ($form->{method} eq 'cash') - # ich sehe keinen sinn das nochmal explizit ohne conv_i aufzurufen - # bitte prüfen und löschen jan 15.11.2009 - # if ($department_id) { - # $dpt_join = qq| JOIN dpt_trans t ON (t.trans_id = ac.trans_id) |; - # $dpt_where = qq| AND t.department_id = $department_id |; - # } + if ($department_id) { + $dpt_join = qq| JOIN dpt_trans t ON (t.trans_id = ac.trans_id) |; + $dpt_where = qq| AND t.department_id = | . conv_i($department_id); + } $query = qq| SELECT c.accno, sum(ac.amount) AS amount, c.description, c.category @@ -597,10 +595,10 @@ sub get_accounts_g { } } else { # if ($form->{method} eq 'cash') - # s.o. jan 15.11.2009 -# if ($department_id) { -# ($dpt_join, $dpt_where) = sql_department($department_id); -# } + if ($department_id) { + $dpt_join = qq| JOIN dpt_trans t ON (t.trans_id = ac.trans_id) |; + $dpt_where = qq| AND (t.department_id = | . conv_i($department_id, 'NULL') . qq|) |; + } $query = qq| SELECT sum(ac.amount * chart_category_to_sgn(c.category)) AS amount, c.$category diff --git a/SL/Template/Excel.pm b/SL/Template/Excel.pm index e961f28eb..941dbb321 100644 --- a/SL/Template/Excel.pm +++ b/SL/Template/Excel.pm @@ -47,11 +47,11 @@ sub parse { my $contents = join("", @lines); my @indices; - $contents =~ s{ + $contents =~ s% $self->{tag_start} [<]* (\s?) [<>\s]* ([\w\s]+) [<>\s]* $self->{tag_end} - }{ + % $self->format_vars(align_right => $1 ne '', varstring => $2, length => length($&), indices => \@indices) - }egx; + %egx; if (!defined($contents)) { $main::lxdebug->leave_sub(); @@ -75,10 +75,6 @@ sub format_vars { $varstring =~ s/(\w+)/ $self->_get_loop_variable($1, 0, @indices) /eg; my $old_string=$varstring; my $new_string = sprintf "%*s", ($align_right ? 1 : -1 ) * $length, $varstring; - if (!defined($new_string) || $new_string eq ''){ - $main::lxdebug->message(0, 'varstring' . $varstring . "old" . $old_string); - # return substr $varstring, ($align_right ? (0, $length) : -$length); - } return substr $new_string, ($align_right ? (0, $length) : -$length); } diff --git a/VERSION b/VERSION index 38745eb80..3e9dc5c90 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.6.2-beta2 +2.6.3-unstable diff --git a/bin/mozilla/admin.pl b/bin/mozilla/admin.pl index cc0d463a6..b89487c7e 100755 --- a/bin/mozilla/admin.pl +++ b/bin/mozilla/admin.pl @@ -194,6 +194,7 @@ sub create_auth_tables { $main::auth->save_group($group); } + _apply_dbupgrade_scripts(); login(); } diff --git a/bin/mozilla/amcvar.pl b/bin/mozilla/amcvar.pl index 6c6865cc3..3be956a72 100644 --- a/bin/mozilla/amcvar.pl +++ b/bin/mozilla/amcvar.pl @@ -108,7 +108,7 @@ sub list_cvar_configs { print $form->parse_html_template('amcvar/list_cvar_configs', { CONFIGS => \@configs, MODULES => \@modules }); - $main::lxdebug->dump(0, "modules", \@modules); +# $main::lxdebug->dump(0, "modules", \@modules); $main::lxdebug->leave_sub(); } diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index caf6749c1..97cc38896 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -2020,16 +2020,14 @@ sub save_periodic_invoices_config { } sub dispatcher { - my $form = $main::form; - my $locale = $main::locale; - foreach my $action (qw(delete delivery_order e_mail invoice print purchase_order purchase_order quotation request_for_quotation sales_order sales_order save save_and_close save_as_new ship_to update)) { - if ($form->{"action_${action}"}) { + if ($::form->{"action_${action}"}) { + $::form->{dispatched_action} = $action; call_sub($action); return; } } - $form->error($locale->text('No action defined.')); + $::form->error($::locale->text('No action defined.')); } diff --git a/bin/mozilla/projects.pl b/bin/mozilla/projects.pl index 8f5991e2f..16d5e45f7 100644 --- a/bin/mozilla/projects.pl +++ b/bin/mozilla/projects.pl @@ -208,7 +208,7 @@ sub display_project_form { $form->{title} = $form->{project}->{id} ? $locale->text("Edit Project") : $locale->text("Add Project"); $form->{CUSTOM_VARIABLES} = CVar->get_custom_variables('module' => 'Projects', 'trans_id' => $form->{project}->{id}); - $main::lxdebug->dump(0, "cv", $form->{CUSTOM_VARIABLES}); +# $main::lxdebug->dump(0, "cv", $form->{CUSTOM_VARIABLES}); CVar->render_inputs('variables' => $form->{CUSTOM_VARIABLES}) if (scalar @{ $form->{CUSTOM_VARIABLES} }); $form->header(); diff --git a/config/lx_office.conf.default b/config/lx_office.conf.default index d843ec27a..ff5e97b68 100644 --- a/config/lx_office.conf.default +++ b/config/lx_office.conf.default @@ -82,7 +82,7 @@ openofficeorg_daemon_port = 2002 [task_server] # User name to use for database access -login = mb +login = # Set to 1 for debug messages in /tmp/lx-office-debug.log debug = 1 # Chose a system user the daemon should run under when started as root. @@ -101,7 +101,7 @@ email_template = templates/webpages/oe/periodic_invoices_email.txt [console] # autologin to use if none is given -login = mb +login = # autorun lines will be executed after autologin. # be warned that loading huge libraries will noticably lengthen startup time. diff --git a/doc/INSTALL.texi b/doc/INSTALL.texi index 6fa2e2bed..63ac6aeaa 100644 --- a/doc/INSTALL.texi +++ b/doc/INSTALL.texi @@ -114,6 +114,10 @@ Zur Installation das Paket in das entpackte Lx-Office Verzeichnis entpacken: @code{tar xzf lx-erp-perl-libs-compat-v2.tar.gz /path/to/lx-office/} +Zusätzlich müssen dann noch die folgenden Pakete installiert weerden + +@code{libbit-vector-perl libsub-exporter-perl libclone-perl libclass-factory-util-perl} + Danach sollte der Installationscheck (@pxref{Pakete}) die enthaltenen Pakete erkennen. @node Pakete diff --git a/doc/INSTALL.txt b/doc/INSTALL.txt index 200c35979..106d8af75 100644 --- a/doc/INSTALL.txt +++ b/doc/INSTALL.txt @@ -103,6 +103,11 @@ entpacken: `tar xzf lx-erp-perl-libs-compat-v2.tar.gz /path/to/lx-office/' + Zusätzlich müssen dann noch die folgenden Pakete installiert weerden + + `libbit-vector-perl libsub-exporter-perl libclone-perl +libclass-factory-util-perl' + Danach sollte der Installationscheck (*note Pakete::) die enthaltenen Pakete erkennen. diff --git a/doc/INSTALL/Betriebssystem.html b/doc/INSTALL/Betriebssystem.html index 854e472b8..40515d2b0 100644 --- a/doc/INSTALL/Betriebssystem.html +++ b/doc/INSTALL/Betriebssystem.html @@ -71,6 +71,10 @@ Das Paket ist auf Pakete) die enthaltenen Pakete erkennen. diff --git a/doc/changelog b/doc/changelog index 3ba67f79f..0311afec7 100644 --- a/doc/changelog +++ b/doc/changelog @@ -2,14 +2,20 @@ # Veränderungen von Lx-Office ERP # ################################### -2011-02-?? - Release 2.6.2 +2011-02-02 - Release 2.6.2 Größere neue Features: - FastCGI Schnittstelle. Das Program läuft jetzt optional unter FastCGI, und damit etwa um - Faktor 10 schneller. Siehe Dokumentation in doc INSTALL.fcgi. + Faktor 10 schneller. Siehe Dokumentation in doc/INSTALL.fcgi. + + - SEPA Einzug + + Zusätzlich zum schon existierenden SEPA Export für ausgehende + Überweisungen, ist es jetzt auch möglich Bankeinzug über SEPA zu + exportieren. - Neues Gruppenrecht "Druck" @@ -21,39 +27,72 @@ Für bereits bestehende Gruppen muss es sofern gewünscht vom Administrator manuell gewährt werden. + Sicherheit: + + - Drucker konnten verwendet werden um beliebigen Code mit den Rechten des + Webservers auszuführen. Das Anlegen von neuen Druckerkommandos ist daher + jetzt dem Administrator vorbehalten. + Kleinere neue Features und Detailverbesserungen: - - Druckvorlage optional auf Excel erweitert, um Variablen die sich nicht in foreach-Schleifen - befinden anzuzeigen (s.a.: doc/excel_templates.txt). + - Druckvorlage optional auf Excel erweitert, um Variablen die sich nicht in + foreach-Schleifen befinden anzuzeigen (s.a.: doc/excel_templates.txt). - FiBu -> Bericht um Suchfeld Kontonummer erweitert - - Ansprechpartner für abweichende Lieferadresse, um das Attribut Geschlecht erweitert - - FiBu -> Bericht -> Offene Forderung | Offene Verbindlichkeiten um Altersstrukturliste (30, 60, 90, 120) erweitert + - Ansprechpartner für abweichende Lieferadresse um das Attribut Geschlecht + erweitert + - FiBu -> Bericht -> Offene Forderung | Offene Verbindlichkeiten um + Altersstrukturliste (30, 60, 90, 120) erweitert - SEPA Hinzufügen von Überweisungen um das Infofeld Fälligkeitsdatum erweitert - Verkaufsbericht mit Statistiken zu Margen - - Wenn ein Auftrag komplett geliefert ist, den Workflow-Knopf 'Lieferschein' ausblenden - - Zahlungsein- und ausgänge um Suche nach Rechnungsnummer erweitert + - Wenn ein Auftrag komplett geliefert ist, den Workflow-Knopf 'Lieferschein' + ausblenden + - Zahlungsein- und -ausgänge um Suche nach Rechnungsnummer erweitert - Anzeige von Bildern in Artikelmaske und Wahlmöglichkeit Defaultwert für Bilder in Artikelsuche via Configparameter in config/lx-erp.conf - - Kundentyp in Rechnungssuche auch als Wert in Rechnungsübersicht anzeigen und exportieren - - API Änderungen: - - - Template System Zentralisierung. - - Alle lokalisierten Templates wurden entfernt. - Alle Konstrukte wurden auf das Hilfsmodul T8 umgeschrieben. - + - Kundentyp in Rechnungssuche auch als Wert in Rechnungsübersicht anzeigen + und exportieren + - CSV-Importe sind nun per Cronjob möglich + - Es gibt nun eine alternative Lokalisierung de_DE, die auf Effizienz und + Benutzerfreundlichkeit entworfen wurde. + - Viele Masken haben jetzt zusätzliche "Zurück"-Verlinkungen, um die + Navigation zu erleichtern. + - Es werden jetzt auch monatliche Zeiträume nach Taxbird exportiert. + - Der Kontorahmen SKR04 wurde aktualisiert. + - Dienstleistungen können jetzt eingelagert werden. + - Der Artikelupload unterstützt jetzt auch gezippte Uploads. + + API-Änderungen: + + - Alle lokalisierten Templates wurden entfernt. + Konstrukte werden ab jetzt mit dem Hilfsmodul T8 realisiert. Bitte vor dem Upgrade das Dokument doc/2010_template_changes.txt lesen. - - - Locales System zentralisiert. - - locales.pl liegt jetzt unter scripts/ und bedient alle Sprachpakete. Die - Übersetzung von templates und sprachdateien in separate Versionen ist nicht + - locales.pl liegt jetzt unter scripts/ und bedient alle Sprachpakete. Die + Übersetzung von templates und Sprachdateien in separate Versionen ist nicht mehr notwendig. Genauere Informationen zu den neuen locales gibt es im Dokument doc/language_howto.txt + - Nahezu alle Objekte im Programm haben jetzt eine äquivalente + Rose::DB::Object Klasse, und diese sollten bevorzugt benutzt werden. Siehe + perldoc Rose::DB::Object + - Nahezu sämtliche Quelldateien sind jetzt in UTF-8 codiert, statt wie bisher + ISO-8859-15. + - Upgrade auf jQuery 1.4.4 + - Datenbankupgradescripte können nun auch für die Auth-Datenbank geschrieben + werden. Sie werden wie üblich beim Login eingelesen. + + Experimentelle Features: + + - Für neue Plugins gibt es jetzt eine Controllerbasisklasse + SL::Controler::Base. Davon abgeleitete Klassen verhalten sich ähnlich wie + Rails-Controller. Siehe perldoc SL::Controller::Base. + - Für HTML-Templates gibt es jetzt ein Hilfsmodul SL::Template::Plugins::L, + und es wird empfohlen das für Templatearbeiten zu verwenden. + - Die Helferklasse SL::Helper::Flash implementiert einen flüchtigen Speicher + für Nachrichten im gleichen oder folgenden Request, inspiriert vom Flash + in Rails. Liste gefixter Bugs aus dem Bugtracker: + - Bugfix 1056: Workflow-Variable fuer Auftragsdatum ueberlebt Auftrag -> Lieferschein -> Rechnung nicht - Bugfix 1131: Einkaufslieferscheine: Mengen muessen beim Auslagern manuell in die maske eingetragen werden - Bugfix 1154: Debitoren und Kreditoren werden nicht korrekt gebucht - Bugfix 1185: Preis überschreiben bei Preisgruppe @@ -82,6 +121,7 @@ - Bugfix 1410: Beschriftung bei Eingabe der Einkaufsrechnung falsch - Bugfix 1412: Wenn die Ware ausgewählt werden muss wird der Rabatt verworfen - Bugfix 1414: Einfügen der \usepackage{textcomp}-Zeile in TeX-Templates ungünstig + - Bugfix 1421: Loeschen von Stornos bereitet eine Reihe von Problemen: (2)Stornorechnungen loeschen bereitet Probleme - Bugfix 1422: Loeschen von Stornos bereitet eine Reihe von Problemen: (3)Gutschriften aus Rechnungen, die einstmals storniert wurden - Bugfix 1429: Debitorenbuchungen 1: Wechsel des Debitoren loescht Bemerkungsfeld nicht - Bugfix 1432: Mahnläufe: Nach manuellem Zurücksetzen der Mahnstufen gibt es ein Chaos bei der weiteren Erzeugung @@ -150,6 +190,9 @@ - Bugfix 1576: Änderung der Datenbank bei einem Benutzer führt zu Fehler - Bugfix 1577: oberer Zurück-Knopf in 'Gruppe bearbeiten' im Admin-Interface bewirkt nichts - Bugfix 1580: /doc/INSTALL/*.html in UTF-8 kein Coding im HTML Header + - Bugfix 1581: Preisanfragen / Lieferantenaufträge Drucken wirft Fehler + - Bugfix 1582: Bilanz mit Auswahl ""Abteilung"" und Typ ""Bilanzierung"" fehlerhaft + - Bugfix 1583: Anlegen eines Artikels aus einer Rechnung heraus ändert die Umlaute im Formular 2010-03-24 - Release 2.6.1 diff --git a/locale/de_DE/all b/locale/de_DE/all index c6a530e70..5cdbecb64 100644 --- a/locale/de_DE/all +++ b/locale/de_DE/all @@ -238,6 +238,7 @@ $self->{texts} = { 'BOM' => 'Stückliste', 'BWA' => 'BWA', 'Back' => 'Zurück', + 'Back to the login page' => 'Zurück zur Loginseite', 'Backup Dataset' => 'Datenbank sichern', 'Backup file' => 'Sicherungsdatei', 'Backup of dataset' => 'Sicherung der Datenbank', @@ -1702,7 +1703,7 @@ $self->{texts} = { 'The selected bin does not exist.' => 'Der ausgewählte Lagerplatz existiert nicht.', 'The selected exports have been closed.' => 'Die ausgewählten Exporte wurden abgeschlossen.', 'The selected warehouse does not exist.' => 'Das ausgewählte Lager existiert nicht.', - 'The selected warehouse is empty.' => 'Das ausgewählte Lager ist leer.', + 'The selected warehouse is empty, or no stocked items where found that match the filter settings.' => 'Das ausgewählte Lager ist leer, oder die Suche ergab keine Übereinstimmungen.', 'The session is invalid or has expired.' => 'Sie sind von Lx-Office abgemeldet.', 'The settings were saved, but the password was not changed.' => '', 'The source warehouse does not contain any bins.' => 'Das Quelllager enthält keine Lagerplätze.', diff --git a/locale/en/all b/locale/en/all index c95febd0a..cedc53810 100644 --- a/locale/en/all +++ b/locale/en/all @@ -232,6 +232,7 @@ $self->{texts} = { 'BOM' => '', 'BWA' => '', 'Back' => '', + 'Back to the login page' => '', 'Backup Dataset' => '', 'Backup file' => '', 'Backup of dataset' => '', @@ -1680,7 +1681,7 @@ $self->{texts} = { 'The selected bin does not exist.' => '', 'The selected exports have been closed.' => '', 'The selected warehouse does not exist.' => '', - 'The selected warehouse is empty.' => '', + 'The selected warehouse is empty, or no stocked items where found that match the filter settings.' => '', 'The session is invalid or has expired.' => '', 'The source warehouse does not contain any bins.' => '', 'The subject is missing.' => '', diff --git a/lxo-import/contactB.php b/lxo-import/contactB.php index 4a157c4f9..5dd8891e5 100644 --- a/lxo-import/contactB.php +++ b/lxo-import/contactB.php @@ -127,6 +127,7 @@ $first=true; foreach ($zeile as $fld) { $fld = strtolower(trim(strtr($fld,array("\""=>"","'"=>"")))); $in_fld[]=$fld; + if (substr($fld,0,2) == "x_") $kunde_fld[] = $fld; } $j=0; $zeile=fgetcsv($f,2000,$trenner); @@ -138,6 +139,8 @@ while (!feof($f)){ $sql="insert into contacts "; $keys="("; $vals=" values ("; + unset($extra); + $extra = array(); foreach($zeile as $data) { $i++; if (!in_array($in_fld[$i],$kunde_fld)) { @@ -163,6 +166,12 @@ while (!feof($f)){ } else if($in_fld[$i]=="cp_cv_id") { continue; } + if (substr($in_fld[$i],0,2)=="x_" && $data) { + $extra[substr($in_fld[$i],2)] = $data; + continue; + } else if ((substr($in_fld[$i],0,2)=="x_")) { + continue; + }; if ($in_fld[$i]==$file."number" && $data) { if (!$id) { $tmp=getFirma($data,$file); @@ -223,10 +232,20 @@ while (!feof($f)){ echo "".str_replace("null,","null",$vals)."\n"; flush(); } else { - $sql.=substr($keys,0,-1).")"; - $sql.=substr($vals,0,-1).")"; + $newID=uniqid (rand()); + $now = date('Y-m-d H:i').":1.$j"; + $sql.= $keys."mtime)"; + $sql.= $vals."'$now')"; $rc=$db->query($sql); if (!$rc) echo "Fehler: ".$sql."\n"; + $rs = $db->getAll("select cp_id,cp_name from contacts where mtime = '$now'"); + $cp_id = $rs[0]["cp_id"]; + echo "(".$rs[0]["cp_name"].":$cp_id)".count($extra).";"; + if (count($extra)>0 and $cp_id) { + foreach ($extra as $fld=>$val) { + $rc = insertExtra("P",$cp_id,$fld,$val); + } + } } $j++; }; @@ -237,7 +256,7 @@ echo $j." $file importiert.\n";} else { ?>

Kontakt-Adressimport für die ERP

- + diff --git a/lxo-import/import_lib.php b/lxo-import/import_lib.php index 6d9dd879b..5d282030e 100644 --- a/lxo-import/import_lib.php +++ b/lxo-import/import_lib.php @@ -224,7 +224,23 @@ function getKdRefId($data) { $rs=$db->getAll($sql); return $rs[0]["id"]; } - +/** + * TODO: short description. + * + * @param mixed $tab + * @param object $own + * @param mixed $fld + * @param mixed $val + * + * @return TODO + */ +function insertExtra($tab,$own,$fld,$val) { + global $db; + $sql = "insert into extra_felder (fkey,fval,tab,owner) "; + $sql.= "values ('$fld','$val','$tab','$own')"; + $rc = $db->query($sql); + return $rc; +} function suchFirma($tab,$data) { // gibt die Firma ? global $db; @@ -237,7 +253,7 @@ function suchFirma($tab,$data) { if (!$rs) { $org=$data; while(strpos($data," ")>0) { - $data=ereg_replace(" "," ",$data); + $data=str_replace(" "," ",$data); } $data=preg_replace("/[^A-Z0-9]/ ",".*",trim($data)); $sql="select * from $tab where upper(name) ~ '$data'"; @@ -259,13 +275,13 @@ function getFirma($nummer,$tabelle) { $sql="select id from $tabelle where upper(".$tabelle."number) = '$nummer'"; $rs=$db->getAll($sql); if (!$rs) { - $nr=ereg_replace(" ","%",$nummer); + $nr=str_replace(" ","%",$nummer); $sql="select id,".$tabelle."number from $tabelle where upper(".$tabelle."number) like '$nr'"; $rs=$db->getAll($sql); if ($rs) { - $nr=ereg_replace(" ","",$nummer); + $nr=str_replace(" ","",$nummer); foreach ($rs as $row) { - $tmp=ereg_replace(" ","",$row[$tabelle."number"]); + $tmp=str_replace(" ","",$row[$tabelle."number"]); if ($tmp==$nr) return $row["id"]; } } else { diff --git a/scripts/dbupgrade2_tool.pl b/scripts/dbupgrade2_tool.pl index a9054aaff..97e8e3f77 100755 --- a/scripts/dbupgrade2_tool.pl +++ b/scripts/dbupgrade2_tool.pl @@ -12,6 +12,7 @@ BEGIN { use strict; +use warnings; use utf8; use English '-no_match_vars'; @@ -44,7 +45,7 @@ my ($opt_list, $opt_tree, $opt_rtree, $opt_nodeps, $opt_graphviz, $opt_help); my ($opt_user, $opt_apply, $opt_applied, $opt_format, $opt_test_utf8); my ($opt_dbhost, $opt_dbport, $opt_dbname, $opt_dbuser, $opt_dbpassword); -our (%myconfig, $form, $user, $auth, $locale, $controls); +our (%myconfig, $form, $user, $auth, $locale, $controls, $dbupgrader); sub show_help { my $help_text = <<"END_HELP" @@ -111,7 +112,7 @@ sub calc_rev_depends { } sub dump_list { - my @sorted_controls = sort_dbupdate_controls($controls); + my @sorted_controls = $dbupgrader->sort_dbupdate_controls; print "LIST VIEW\n\n" . "number tag depth priority\n"; @@ -140,7 +141,7 @@ sub dump_tree { calc_rev_depends(); - my @sorted_controls = sort_dbupdate_controls($controls); + my @sorted_controls = $dbupgrader->sort_dbupdate_controls; foreach my $control (@sorted_controls) { dump_node($control->{tag}, "") unless (@{ $control->{rev_depends} }); @@ -164,7 +165,7 @@ sub dump_tree_reverse { calc_rev_depends(); - my @sorted_controls = sort_dbupdate_controls($controls); + my @sorted_controls = $dbupgrader->sort_dbupdate_controls; foreach my $control (@sorted_controls) { last if ($control->{depth} > 1); @@ -197,7 +198,8 @@ sub dump_graphviz { foreach my $c (values %{ $controls }) { $ranks{$c->{depth}} ||= []; - my ($pre, $post) = ('node [fillcolor=lightgray] ', 'node [fillcolor=white] ') if (!scalar @{ $c->{rev_depends} }); + my ($pre, $post) = @{ $c->{rev_depends} } ? ('')x2 : + (map "node [fillcolor=$_] ", qw(lightgray white)); push @{ $ranks{$c->{"depth"}} }, qq|${pre}"$c->{tag}"; ${post}|; } @@ -207,10 +209,10 @@ sub dump_graphviz { } foreach my $c (values %{ $controls }) { - print OUT "$c->{tag};\n"; + print OUT qq|"$c->{tag}";\n|; foreach my $d (@{ $c->{depends} }) { - print OUT "$c->{tag} -> $d;\n"; + print OUT qq|"$c->{tag}" -> "$d";\n|; } } @@ -275,9 +277,9 @@ sub apply_upgrade { print "Applying upgrade $control->{file}\n"; if ($file_type eq "sql") { - $user->process_query($form, $dbh, "sql/$form->{dbdriver}-upgrade2/$control->{file}", $control); + $dbupgrader->process_query($dbh, "sql/$form->{dbdriver}-upgrade2/$control->{file}", $control); } else { - $user->process_perl_script($form, $dbh, "sql/$form->{dbdriver}-upgrade2/$control->{file}", $control); + $dbupgrader->process_perl_script($dbh, "sql/$form->{dbdriver}-upgrade2/$control->{file}", $control); } } @@ -359,8 +361,8 @@ sub build_upgrade_order { ####### ####### -$form = Form->new(); -$locale = Locale->new("de"); +$locale = Locale->new; +$form = Form->new; ####### ####### @@ -386,7 +388,8 @@ GetOptions("list" => \$opt_list, show_help() if ($opt_help); -$controls = parse_dbupdate_controls($form, "Pg"); +$dbupgrader = SL::DBUpgrade2->new(form => $form, dbdriver => 'Pg'); +$controls = $dbupgrader->parse_dbupdate_controls->{all_controls}; dump_list() if ($opt_list); dump_tree() if ($opt_tree); diff --git a/scripts/find-use.pl b/scripts/find-use.pl index 63bbc0e8e..97f5ad2d0 100644 --- a/scripts/find-use.pl +++ b/scripts/find-use.pl @@ -1,60 +1,114 @@ -#!/usr/bin/perl -w +#!/usr/bin/perl -l +use strict; +#use warnings; # corelist and find throw tons of warnings +use Module::CoreList; +use File::Find; +use SL::InstallationCheck; + +my (%uselines, %modules, %supplied); + +find(sub { + return unless /(\.p[lm]|console)$/; + + # remember modules shipped with Lx-Office + $supplied{modulize($File::Find::name)}++ + if $File::Find::dir =~ m#modules/#; + + open my $fh, '<', $_ or warn "can't open $_: $!"; + while (<$fh>) { + chomp; + next if !/^use /; + next if /SL::/; + next if /Support::Files/; # our own test support module + next if /use (warnings|strict|vars|lib|constant|utf8)/; + + my ($useline) = m/^use\s+(.*?)$/; + + next if $useline =~ /^[\d.]+;/; # skip version requirements + next if !$useline; + + $uselines{$useline}++; + } +}, '.'); + +for my $useline (keys %uselines) { + $useline =~ s/#.*//; # kill comments + + # modules can be loaded implicit with use base qw(Module) or use parent + # 'Module'. catch these: + my ($module, $args) = $useline =~ / + (?: + (?:base|parent) + \s + (?:'|"|qw.) + )? # optional parent block + ([\w:]+) # the module + (.*) # args + /ix; + + # some comments looks very much like use lines + # try to get rid of them + next if $useline =~ /^it like a normal Perl node/; # YAML::Dump comment + next if $useline =~ /^most and offer that in a small/; # YAML + + my $version = Module::CoreList->first_release($module); + $modules{$module} = $supplied{$module} ? 'included' + : $version ? sprintf '%2.6f', $version + : is_documented($module) ? 'required' + : '!missing'; +} + +print sprintf "%8s : %s", $modules{$_}, $_ + for sort { + $modules{$a} cmp $modules{$b} + || $a cmp $b + } keys %modules; + +sub modulize { + for (my ($name) = @_) { + s#^./modules/\w+/##; + s#.pm$##; + s#/#::#g; + return $_; + } +} + +sub is_documented { + my ($module) = @_; + return grep { $_->{name} eq $module } @SL::InstallationCheck::required_modules; +} + +__END__ + =head1 NAME find-use =head1 EXAMPLE - ~/ledgersmb # utils/devel/find-use - 0.000000 : HTML::Entities - 0.000000 : Locale::Maketext::Lexicon - 0.000000 : Module::Build - ... + # perl scipts/find-use.pl + missing : Perl::Tags + missing : Template::Constants + missing : DBI -=head1 EXPLINATION +=head1 EXPLANATION -This util is useful for package builders to identify all the CPAN dependencies we've made. It required Module::CoreList (which is core, but is not yet in any stable -release of perl) to determine if a module is distributed with perl or not. The output reports which version of perl the module is in. If it reports 0.000000, then the -module is not in core perl, and needs to be installed before Lx-Office will operate. +This util is useful for package builders to identify all the CPAN dependencies +we've made. It requires Module::CoreList (which is core, but is not in most +stable releases of perl) to determine if a module is distributed with perl or +not. The output reports which version of perl the module is in. If it reports +0.000000, then the module is not in core perl, and needs to be installed before +Lx-Office will operate. =head1 AUTHOR http://www.ledgersmb.org/ - The LedgerSMB team +Sven Schöling Es.schoeling@linet-services.deE =head1 LICENSE Distributed under the terms of the GNU General Public License v2. -=cut - -use strict; -use warnings; - -open GREP, "grep -r '^use ' . |"; -use Module::CoreList; - -my %uselines; -while() { - next if /SL::/; - next if /LX::/; - next if /use warnings/; - next if /use strict/; - next if /use vars/; - chomp; - my ($file, $useline) = m/^([^:]+):use\s(.*?)$/; - $uselines{$useline}||=[]; - push @{$uselines{$useline}}, $file; -} - -my %modules; -foreach my $useline (keys %uselines) { - - my ($module) = grep { $_ } $useline =~ /(?:base ['"]([a-z:]+)|([a-z:]+)(?:\s|;))/i; - my $version = Module::CoreList->first_release($module); - $modules{$module} = $version||0; -} +=cut -foreach my $mod (sort { $modules{$a} == 0 ? -1 : $modules{$b} == 0 ? 1 : 0 or $a cmp $b } keys %modules) { - printf "%2.6f : %s\n", $modules{$mod}, $mod; -} diff --git a/scripts/inst_postgres.sh b/scripts/inst_postgres.sh index db7b3129e..66fbaa920 100755 --- a/scripts/inst_postgres.sh +++ b/scripts/inst_postgres.sh @@ -27,7 +27,7 @@ if [ "$POSTGRESQL#" == "#" ]; then writeln 3 1 Datenbank bitte manuell einrichten. exit 0 else - PLPGSQL=`dpkg -L postgresql-8.3 | grep plpgsql.so` + PLPGSQL=`dpkg -L $POSTGRESQL | grep plpgsql.so` fi #Mit Paketmanager (RPM) suchen ? diff --git a/scripts/inst_postgres_deb.sh b/scripts/inst_postgres_deb.sh index 6dff83247..49cddc7b6 100755 --- a/scripts/inst_postgres_deb.sh +++ b/scripts/inst_postgres_deb.sh @@ -10,6 +10,7 @@ source /usr/share/debconf/confmodule #Als root anmelden if [ `id -u` -gt 0 ]; then echo "Bitte als root anmelden"; exit 1; fi + POSTGRESQL=`dpkg -l | grep -E "postgresql-[0-9]" | cut -d" " -f3 | sort -r | head -1 -` #Datei plpgsql.so suchen @@ -20,7 +21,7 @@ if [ "$POSTGRESQL#" == "#" ]; then echo Datenbank bitte manuell einrichten. exit 0 else - PLPGSQL=`dpkg -L postgresql-8.3 | grep plpgsql.so` + PLPGSQL=`dpkg -L $POSTGRESQL | grep plpgsql.so ` fi if [ "$PLPGSQL#" == "#" ]; then @@ -53,7 +54,7 @@ fi v8=`su postgres -c "echo 'select version()' | psql template1 2>/dev/null | grep -E "[Ss][Qq][Ll][[:space:]]+8\.[2-9]\.[0-9]" | wc -l"` if [ $v8 -eq 0 ]; then echo $FEHLER - echo Datenbank Version 8x konnte erreicht werden. + echo Datenbank Version 8x konnte nicht erreicht werden. exit 0 fi diff --git a/sql/Pg-upgrade2/release_2_6_2.sql b/sql/Pg-upgrade2/release_2_6_2.sql new file mode 100644 index 000000000..4a805f10d --- /dev/null +++ b/sql/Pg-upgrade2/release_2_6_2.sql @@ -0,0 +1,4 @@ +-- @tag: release_2_6_2 +-- @description: Leeres Script, das von allen bis zum Release 2.6.2 hinzugefügten Upgradescripten abhängt, um ein fest definiertes Schema für 2.6.2 zu definieren. +-- @depends: add_ar_paid_defaults add_makemodel_prices customer_long_entries drop_yearend invalid_entries_in_custom_variables_validity schema_normalization_3 sepa_in shipto_add_cp_gender skr03_04_bwa_zuordnung_konten_4250_4610 skr04_fix_category_3151_3160_3170 ustva_2010 +-- @charset: utf-8 diff --git a/templates/webpages/oe/form_header.html b/templates/webpages/oe/form_header.html index e3f3e1d30..0867d4abb 100644 --- a/templates/webpages/oe/form_header.html +++ b/templates/webpages/oe/form_header.html @@ -26,6 +26,10 @@ +[%- IF resubmit %] +[%# in case of resubmits, restore enough information for dispatcher to work %] + [% L.hidden_tag('action_' _ dispatched_action, 1) %] +[%- END %]
[% title %]
Zieltabellecustomer vendor