From: Moritz Bunkus Date: Mon, 7 Mar 2011 12:23:26 +0000 (+0100) Subject: Merge branch 'master' of lx-office.linet-services.de:lx-office-erp X-Git-Tag: release-2.6.3~53^2~3 X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/commitdiff_plain/1db3214445fbc5144ebc62c314c11082a2d904c4?hp=4d6e7659706445947795fa5319a0d988e8cbff49 Merge branch 'master' of lx-office.linet-services.de:lx-office-erp --- diff --git a/DEBIAN/DEBIAN/postinst b/DEBIAN/DEBIAN/postinst index 5604cd99c..a681b98da 100755 --- a/DEBIAN/DEBIAN/postinst +++ b/DEBIAN/DEBIAN/postinst @@ -78,17 +78,14 @@ config_postgresql_sql_routines() { set_lx_office_erp_web_admin_password() { - if ! [ -f /etc/lx-office-erp/lx_office.conf ] ; then - cp /etc/lx-office-erp/lx_office.conf.default /etc/lx-office-erp/lx_office.conf - fi db_get lx-office-erp/admin-password ADMINPASSWORD="$RET" - cat /etc/lx-office-erp/lx_office.conf | \ - sed --expression "s/admin_password = /admin_password = $ADMINPASSWORD/g" \ + cat /etc/lx-office-erp/authentication.pl | \ + sed --expression "s/{admin_password} = /{admin_password} = '$ADMINPASSWORD';#/g" \ > /tmp/1.txt - mv /tmp/1.txt /etc/lx-office-erp/lx_office.conf + mv /tmp/1.txt /etc/lx-office-erp/authentication.pl } @@ -97,13 +94,13 @@ set_lx_office_erp_authentication_db_user_password() { db_get lx-office-erp/lx-office-erp-user-postgresql-password PASSWORD="$RET" - cat /etc/lx-office-erp/lx_office.conf | \ - sed --expression "s/^password = /password = $PASSWORD/g" \ + cat /etc/lx-office-erp/authentication.pl | \ + sed --expression "s/'password' => /'password' => '$PASSWORD', #/g" \ > /tmp/1.txt cat /tmp/1.txt | \ sed --expression "s/^user = postgres/user = lxoffice/g" \ - > /etc/lx-office-erp/lx_office.conf + > /etc/lx-office-erp/authentication.pl } @@ -111,9 +108,12 @@ set_lx_office_erp_authentication_db_user_password() { set_user_rights() { chown -R www-data:www-data /usr/lib/lx-office-erp/users chown -R www-data:www-data /usr/lib/lx-office-erp/templates - chown www-data:www-data /etc/lx-office-erp/lx_office.conf + chown www-data:www-data /etc/lx-office-erp/lx-erp.conf + chown www-data:www-data /etc/lx-office-erp/authentication.pl + chown www-data:www-data /etc/lx-office-erp/console.conf chown www-data:www-data /usr/lib/lx-office-erp/menu.ini - chmod 0600 /etc/lx-office-erp/lx_office.conf + chmod 0600 /etc/lx-office-erp/lx-erp.conf + chmod 0600 /etc/lx-office-erp/authentication.pl } disable_ipv6_on_lo_interface() { @@ -142,20 +142,23 @@ mk_new_menu() { } mk_new_config() { - if ! [ -f /etc/lx-office-erp/lx_office.conf ] ; then - cp /etc/lx-office-erp/lx_office.conf.default /etc/lx-office-erp/lx_office.conf + if ! [ -f /etc/lx-office-erp/lx-erp.conf ] ; then + cp /etc/lx-office-erp/lx-erp.conf.default /etc/lx-office-erp/lx-erp.conf + fi + if ! [ -f /etc/lx-office-erp/authentication.pl ] ; then + cp /etc/lx-office-erp/authentication.pl.default /etc/lx-office-erp/authentication.pl + fi + if ! [ -f /etc/lx-office-erp/console.conf ] ; then + cp /etc/lx-office-erp/console.conf.default /etc/lx-office-erp/console.conf fi } mk_links() { - if ! [ -f /usr/lib/lx-office-erp/config/lx_office.conf ] ; then - ln -s /etc/lx-office-erp/lx_office.conf /usr/lib/lx-office-erp/config/lx_office.conf - fi; - if ! [ -f /usr/lib/lx-office-erp/config/lx_office.conf.default ] ; then - ln -s /etc/lx-office-erp/lx_office.conf.default /usr/lib/lx-office-erp/config/lx_office.conf.default + if ! [ -f /usr/lib/lx-office-erp/config/lx-erp.conf ] ; then + ln -s /etc/lx-office-erp/lx-erp.conf /usr/lib/lx-office-erp/config/lx-erp.conf fi; - if [ -e /etc/lx-office-erp/authentication.pl ] ; then - rm /etc/lx-office-erp/authentication.pl + if ! [ -f /usr/lib/lx-office-erp/config/authentication.pl ] ; then + ln -s /etc/lx-office-erp/authentication.pl /usr/lib/lx-office-erp/config/authentication.pl fi if [ -e /etc/apache2 ] ; then if ! [ -f /etc/apache2/conf.d/lx-office-erp.apache2.conf ] ; then diff --git a/SL/IR.pm b/SL/IR.pm index 850d6ada8..83921779a 100644 --- a/SL/IR.pm +++ b/SL/IR.pm @@ -527,7 +527,14 @@ sub post_invoice { # set values which could be empty my $taxzone_id = $form->{taxzone_id} * 1; - $form->{department_id} = (split /--/, $form->{department})[1]; + + # Seit neuestem wird die department_id schon übergeben UND $form->department nicht mehr + # korrekt zusammengebaut. Sehr wahrscheinlich beim Umstieg auf T8 kaputt gegangen + # Ich lass den Code von 2005 erstmal noch stehen ;-) jb 03-2011 + # copy & paste von IS.pm + if (!$form->{department_id}){ + $form->{department_id} = (split /--/, $form->{department})[1]; + } $form->{invnumber} = $form->{id} unless $form->{invnumber}; $taxzone_id = 0 if (3 < $taxzone_id) || (0 > $taxzone_id); diff --git a/SL/IS.pm b/SL/IS.pm index d91a36b8b..a94035598 100644 --- a/SL/IS.pm +++ b/SL/IS.pm @@ -529,8 +529,12 @@ sub post_invoice { } $form->{defaultcurrency} = $form->get_default_currency($myconfig); - - ($null, $form->{department_id}) = split(/--/, $form->{department}); + # Seit neuestem wird die department_id schon übergeben UND $form->department nicht mehr + # korrekt zusammengebaut. Sehr wahrscheinlich beim Umstieg auf T8 kaputt gegangen + # Ich lass den Code von 2005 erstmal noch stehen ;-) jb 03-2011 + if (!$form->{department_id}){ + ($null, $form->{department_id}) = split(/--/, $form->{department}); + } my $all_units = AM->retrieve_units($myconfig, $form); @@ -1005,7 +1009,7 @@ sub post_invoice { cp_id = ?, marge_total = ?, marge_percent = ?, globalproject_id = ?, delivery_customer_id = ?, transaction_description = ?, delivery_vendor_id = ?, - donumber = ? + donumber = ?, invnumber_for_credit_note = ? WHERE id = ?|; @values = ( $form->{"invnumber"}, $form->{"ordnumber"}, $form->{"quonumber"}, $form->{"cusordnumber"}, conv_date($form->{"invdate"}), conv_date($form->{"orddate"}), conv_date($form->{"quodate"}), conv_i($form->{"customer_id"}), @@ -1018,7 +1022,7 @@ sub post_invoice { conv_i($form->{"cp_id"}), 1 * $form->{marge_total} , 1 * $form->{marge_percent}, conv_i($form->{"globalproject_id"}), conv_i($form->{"delivery_customer_id"}), $form->{transaction_description}, conv_i($form->{"delivery_vendor_id"}), - $form->{"donumber"}, #das entsprechende feld lieferscheinnummer aus der html-form 12.02.09 jb + $form->{"donumber"}, $form->{"invnumber_for_credit_note"}, conv_i($form->{"id"})); do_query($form, $dbh, $query, @values); @@ -1448,9 +1452,9 @@ sub retrieve_invoice { a.duedate, a.taxincluded, a.curr AS currency, a.shipto_id, a.cp_id, a.employee_id, a.salesman_id, a.payment_id, a.language_id, a.delivery_customer_id, a.delivery_vendor_id, a.type, - a.transaction_description, + a.transaction_description, a.donumber, a.invnumber_for_credit_note, a.marge_total, a.marge_percent, - e.name AS employee, a.donumber + e.name AS employee FROM ar a LEFT JOIN employee e ON (e.id = a.employee_id) WHERE a.id = ?|; diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index 51c7def75..e1076ef9c 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -915,7 +915,8 @@ sub credit_note { $form->{title} = $locale->text('Add Credit Note'); $form->{script} = 'is.pl'; - + # Bei Gutschriften bezug zur Rechnungsnummer + $form->{invnumber_for_credit_note} = $form->{invnumber}; # bo creates the id, reset it map { delete $form->{$_} } qw(id invnumber subject message cc bcc printed emailed queued); diff --git a/doc/changelog b/doc/changelog index 520aa2774..d7cd59ecc 100644 --- a/doc/changelog +++ b/doc/changelog @@ -11,6 +11,12 @@ - Beim Laden von Rechnungsentwürfen, das Fälligkeits- und Rechnungsdatum duch das Tagesdatum ersetzen + - Bei Verkaufsgutschriften zusätzlich noch die Rechnungsnummer mitnehmen, damit der Bezug klarer ist. + + Liste gefixter Bugs aus dem Bugtracker: + + - Bugfix 1613: Status teilweise + 2011-02-02 - Release 2.6.2 diff --git a/sql/Pg-upgrade2/ar_add_invnumber_for_credit_note.sql b/sql/Pg-upgrade2/ar_add_invnumber_for_credit_note.sql new file mode 100644 index 000000000..0eaeade94 --- /dev/null +++ b/sql/Pg-upgrade2/ar_add_invnumber_for_credit_note.sql @@ -0,0 +1,5 @@ +-- @tag: ar_add_invnumber_for_credit_note +-- @description: Die Rechnungsnummer wird bei Gutschriften bisher nicht uebernommen. Das aendert sich mit diesem Update. Hierfuer muss allerdings die Rechnungstabelle ar um einen entsprechenden Eintrag erweitert werden. (invnumber_for_credit_note in ar) +-- @depends: delivery_orders +alter table ar add column invnumber_for_credit_note text; + diff --git a/templates/German-credit_note.tex b/templates/German-credit_note.tex index 8236f3713..61cd7f369 100644 --- a/templates/German-credit_note.tex +++ b/templates/German-credit_note.tex @@ -43,6 +43,7 @@ \rightline{\LARGE\textbf{\textit{Gutschrift}}} \vspace*{0.2cm} \rightline{\large\textbf{\textit{Nr. <%invnumber%>% \vspace*{0.2cm} }}} + für Rechnung: \hfill <%invnumber_for_credit_note%> Gutschriftdatum:\hfill <%invdate%> diff --git a/templates/webpages/is/form_header.html b/templates/webpages/is/form_header.html index a6c21975b..c84e5d49c 100644 --- a/templates/webpages/is/form_header.html +++ b/templates/webpages/is/form_header.html @@ -201,6 +201,10 @@ [% 'Credit Note Number' | $T8 %] + + [% 'Invoice Number' | $T8 %] + + [% 'Credit Note Date' | $T8 %]