From: Sven Schöling Date: Thu, 24 Sep 2009 11:06:09 +0000 (+0200) Subject: Merge branch 'master' of ssh://lx-office/~/lx-office-erp X-Git-Tag: release-2.6.1beta1~275^2~4 X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/commitdiff_plain/b735f45033d8daef70ee2c82365a86cc06281f4c?hp=e5ea1c8392d571fbac87d9bb79bcc2709f6deb6e Merge branch 'master' of ssh://lx-office/~/lx-office-erp --- diff --git a/SL/Form.pm b/SL/Form.pm index d5bb9c3d3..f0bb0e2cb 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -2065,11 +2065,11 @@ sub get_duedate { my ($self, $myconfig, $reference_date) = @_; - my $reference_date = $reference_date ? conv_dateq($reference_date) . '::DATE' : 'current_date'; + $reference_date = $reference_date ? conv_dateq($reference_date) . '::DATE' : 'current_date'; - my $dbh = $self->get_standard_dbh($myconfig); - my $query = qq|SELECT ${reference_date} + terms_netto FROM payment_terms WHERE id = ?|; - my ($duedate) = selectrow_query($self, $dbh, $query, $self->{payment_id}); + my $dbh = $self->get_standard_dbh($myconfig); + my $query = qq|SELECT ${reference_date} + terms_netto FROM payment_terms WHERE id = ?|; + my ($duedate) = selectrow_query($self, $dbh, $query, $self->{payment_id}); $main::lxdebug->leave_sub(); @@ -2196,7 +2196,7 @@ sub _get_charts { my $transdate = quote_db_date($params->{transdate}); my $query = - qq|SELECT c.id, c.accno, c.description, c.link, tk.taxkey_id, tk.tax_id | . + qq|SELECT c.id, c.accno, c.description, c.link, c.charttype, tk.taxkey_id, tk.tax_id | . qq|FROM chart c | . qq|LEFT JOIN taxkeys tk ON | . qq|(tk.id = (SELECT id FROM taxkeys | . diff --git a/SL/IS.pm b/SL/IS.pm index 2550393fe..9b978217e 100644 --- a/SL/IS.pm +++ b/SL/IS.pm @@ -737,8 +737,6 @@ sub post_invoice { } } - $form->{datepaid} = $form->{invdate}; - # total payments, don't move we need it here for my $i (1 .. $form->{paidaccounts}) { if ($form->{type} eq "credit_note") { diff --git a/SL/Mailer.pm b/SL/Mailer.pm index 5e280128b..2e2a60cec 100644 --- a/SL/Mailer.pm +++ b/SL/Mailer.pm @@ -184,7 +184,7 @@ $self->{message} my $application = ($attachment =~ /(^\w+$)|\.(html|text|txt|sql)$/) ? "text" : "application"; my $content_type = SL::MIME->mime_type_from_ext($filename); - $content_type = "${application}/${self->{format}}" if (!$content_type && $self->{format}); + $content_type = "${application}/$self->{format}" if (!$content_type && $self->{format}); $content_type ||= 'application/octet-stream'; open(IN, $attachment); diff --git a/bin/mozilla/ct.pl b/bin/mozilla/ct.pl index 0128c29e4..35f106475 100644 --- a/bin/mozilla/ct.pl +++ b/bin/mozilla/ct.pl @@ -599,6 +599,7 @@ sub get_delivery { $auth->assert('customer_vendor_edit'); CT->get_delivery(\%myconfig, \%$form ); + $form->{IS_CUSTOMER} = $form->{db} eq 'customer'; print $form->ajax_response_header(), $form->parse_html_template('ct/get_delivery'); diff --git a/bin/mozilla/do.pl b/bin/mozilla/do.pl index ebaffc640..80e38e860 100644 --- a/bin/mozilla/do.pl +++ b/bin/mozilla/do.pl @@ -279,6 +279,9 @@ sub form_header { } $form->header(); + # Fix für Bug 1082 Erwartet wird: 'abteilungsNAME--abteilungsID' + $form->{department} .= '--' . $form->{department_id}; + print $form->parse_html_template('do/form_header'); $lxdebug->leave_sub(); diff --git a/bin/mozilla/gl.pl b/bin/mozilla/gl.pl index 7516cf8d1..ae476bd17 100644 --- a/bin/mozilla/gl.pl +++ b/bin/mozilla/gl.pl @@ -88,6 +88,7 @@ sub add { $form->{callback} = "gl.pl?action=add" unless $form->{callback}; # we use this only to set a default date + # yep. aber er holt hier auch schon ALL_CHARTS. Aufwand / Nutzen? jb GL->transaction(\%myconfig, \%$form); map { @@ -796,6 +797,9 @@ sub display_rows { my %charts = (); my $taxchart_init; foreach my $item (@{ $form->{ALL_CHARTS} }) { + if ($item->{charttype} eq 'H'){ #falls überschrift + next; #überspringen (Bug 1150) + } my $key = $item->{accno} . "--" . $item->{tax_id}; $taxchart_init = $item->{tax_id} unless (@chart_values); push(@chart_values, $key); diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index bac180490..cb7402aa3 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -527,9 +527,17 @@ sub update { } else { $sellprice = $form->parse_amount(\%myconfig, $form->{"sellprice_$i"}); - $form->{"discount_$i"} = 0 if $form->{"not_discountable_$i"}; + # hier werden parts (Artikeleigenschaften) aus item_list (retrieve_item aus IS.pm) + # (item wahrscheinlich synonym für parts) entsprechend in die form geschrieben ... + + # Wäre dieses Mapping nicht besser in retrieve_items aufgehoben? + #(Eine Funktion bekommt Daten -> ARBEIT -> Rückgabe DATEN) + # Das quot sieht doch auch nach Überarbeitung aus ... (hmm retrieve_items gibt es in IS und IR) map { $form->{item_list}[$i]{$_} =~ s/\"/"/g } qw(partnumber description unit); map { $form->{"${_}_$i"} = $form->{item_list}[0]{$_} } keys %{ $form->{item_list}[0] }; + + # ... deswegen muss die prüfung, ob es sich um einen nicht rabattierfähigen artikel handelt später erfolgen (Bug 1136) + $form->{"discount_$i"} = 0 if $form->{"not_discountable_$i"}; $form->{payment_id} = $form->{"part_payment_id_$i"} if $form->{"part_payment_id_$i"} ne ""; $form->{"marge_price_factor_$i"} = $form->{item_list}->[0]->{price_factor}; diff --git a/templates/webpages/ct/get_delivery_de.html b/templates/webpages/ct/get_delivery_de.html index 1d71757d8..ddfd0750a 100644 --- a/templates/webpages/ct/get_delivery_de.html +++ b/templates/webpages/ct/get_delivery_de.html @@ -16,7 +16,7 @@ [%- FOREACH row = DELIVERY %] [% HTML.escape(row.shiptoname) UNLESS loop.prev.shiptoname == row.shiptoname %]  - [% IF row.id %][% END %][% HTML.escape(row.invnumber) || ' ' %][% IF row.id %][% END %] + [% IF row.id %][% END %][% HTML.escape(row.invnumber) || ' ' %][% IF row.id %][% END %] [% IF row.oe_id %][% END %][% HTML.escape(row.ordnumber) || ' ' %][% IF row.oe_id %][% END %] [% HTML.escape(row.transdate) || ' ' %] [% HTML.escape(row.description) || ' ' %] diff --git a/templates/webpages/ct/get_delivery_master.html b/templates/webpages/ct/get_delivery_master.html index 774909e09..0ca76e103 100644 --- a/templates/webpages/ct/get_delivery_master.html +++ b/templates/webpages/ct/get_delivery_master.html @@ -16,7 +16,7 @@ [%- FOREACH row = DELIVERY %] [% HTML.escape(row.shiptoname) UNLESS loop.prev.shiptoname == row.shiptoname %]  - [% IF row.id %][% END %][% HTML.escape(row.invnumber) || ' ' %][% IF row.id %][% END %] + [% IF row.id %][% END %][% HTML.escape(row.invnumber) || ' ' %][% IF row.id %][% END %] [% IF row.oe_id %][% END %][% HTML.escape(row.ordnumber) || ' ' %][% IF row.oe_id %][% END %] [% HTML.escape(row.transdate) || ' ' %] [% HTML.escape(row.description) || ' ' %] diff --git a/templates/webpages/rp/html_report_susa_de.html b/templates/webpages/rp/html_report_susa_de.html index 15d560868..386bc8717 100644 --- a/templates/webpages/rp/html_report_susa_de.html +++ b/templates/webpages/rp/html_report_susa_de.html @@ -56,7 +56,7 @@ Haben Soll Haben - + [% FOREACH row = ROWS %] [% IF row.IS_CONTROL %] [% IF row.IS_COLSPAN_DATA %][% row.data %][% END %] diff --git a/templates/webpages/rp/html_report_susa_master.html b/templates/webpages/rp/html_report_susa_master.html index 6f9d4c553..2671a8272 100644 --- a/templates/webpages/rp/html_report_susa_master.html +++ b/templates/webpages/rp/html_report_susa_master.html @@ -56,7 +56,7 @@ Credit Debit Credit - + [% FOREACH row = ROWS %] [% IF row.IS_CONTROL %] [% IF row.IS_COLSPAN_DATA %][% row.data %][% END %]