]> wagnertech.de Git - mfinanz.git/commitdiff
Merge branch 'master' of ssh://lx-office/~/lx-office-erp
authorSven Schöling <s.schoeling@linet-services.de>
Thu, 24 Sep 2009 11:06:09 +0000 (13:06 +0200)
committerSven Schöling <s.schoeling@linet-services.de>
Thu, 24 Sep 2009 11:06:09 +0000 (13:06 +0200)
SL/Form.pm
SL/IS.pm
SL/Mailer.pm
bin/mozilla/ct.pl
bin/mozilla/do.pl
bin/mozilla/gl.pl
bin/mozilla/oe.pl
templates/webpages/ct/get_delivery_de.html
templates/webpages/ct/get_delivery_master.html
templates/webpages/rp/html_report_susa_de.html
templates/webpages/rp/html_report_susa_master.html

index d5bb9c3d3a19ddeab86e565e06cd302f5ef3a905..f0bb0e2cb617b51a1c7e41ada698abea624c2e69 100644 (file)
@@ -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 | .
index 2550393fea2c1e46b2d68e0f409a712086e730f3..9b978217e831d9fc1b81031a9453090a15ffc927 100644 (file)
--- 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") {
index 5e280128bdf90d2d5554d7d7c51f8ce434bc5129..2e2a60cec10e940bbce0df9781a94b3bb2923097 100644 (file)
@@ -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);
index 0128c29e49ffdf214d854ec3c88629dedc2db350..35f10647579d90a420962ed80b4ac0837751870f 100644 (file)
@@ -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');
 
index ebaffc640ff0d8eca4df1224e19636e856b4051e..80e38e860d737fc0f923597818f57bee98c1eaca 100644 (file)
@@ -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();
index 7516cf8d11e5d42e995ff0c53766396127f2f713..ae476bd17ee77a78bc52bb50664f8adc1087b4e2 100644 (file)
@@ -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);
index bac180490e77ebdfe1ca550fb692855072bfc7e8..cb7402aa338238d42fd7ed387858d88595d613fc 100644 (file)
@@ -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/\"/&quot;/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};
index 1d71757d82340bd3630a9a514913b6addeb95fca..ddfd0750a9fc6ba2ce6aca1f02157514678da550 100644 (file)
@@ -16,7 +16,7 @@
 [%- FOREACH row = DELIVERY %]
         <tr class="listrow[% loop.count % 2 %]">
           <td>[% HTML.escape(row.shiptoname) UNLESS loop.prev.shiptoname == row.shiptoname %]&nbsp;</td>
-          <td>[% IF row.id %]<a href='is.pl?action=edit&id=[% HTML.escape(row.id) %]'>[% END %][% HTML.escape(row.invnumber)   || '&nbsp;' %][% IF row.id %]</a>[% END %]</td>
+          <td>[% IF row.id %]<a href='[% IF IS_CUSTOMER %]is[% ELSE %]ir[% END %].pl?action=edit&id=[% HTML.escape(row.id) %]'>[% END %][% HTML.escape(row.invnumber)   || '&nbsp;' %][% IF row.id %]</a>[% END %]</td>
           <td>[% IF row.oe_id %]<a href='oe.pl?action=edit&type=sales_order&vc=customer&id=[% HTML.escape(row.oe_id) %]'>[% END %][% HTML.escape(row.ordnumber)   || '&nbsp;' %][% IF row.oe_id %]</a>[% END %]</td>
           <td>[% HTML.escape(row.transdate)   || '&nbsp;' %]</td>
           <td>[% HTML.escape(row.description) || '&nbsp;' %]</td>
index 774909e0937e4abf2a16242e43596ac8d5eb40c0..0ca76e1032ae74c1e886fc7ab267740774f76007 100644 (file)
@@ -16,7 +16,7 @@
 [%- FOREACH row = DELIVERY %]
         <tr class="listrow[% loop.count % 2 %]">
           <td>[% HTML.escape(row.shiptoname) UNLESS loop.prev.shiptoname == row.shiptoname %]&nbsp;</td>
-          <td>[% IF row.id %]<a href='is.pl?action=edit&id=[% HTML.escape(row.id) %]'>[% END %][% HTML.escape(row.invnumber)   || '&nbsp;' %][% IF row.id %]</a>[% END %]</td>
+          <td>[% IF row.id %]<a href='[% IF IS_CUSTOMER %]is[% ELSE %]ir[% END %].pl?action=edit&id=[% HTML.escape(row.id) %]'>[% END %][% HTML.escape(row.invnumber)   || '&nbsp;' %][% IF row.id %]</a>[% END %]</td>
           <td>[% IF row.oe_id %]<a href='oe.pl?action=edit&type=sales_order&vc=customer&id=[% HTML.escape(row.oe_id) %]'>[% END %][% HTML.escape(row.ordnumber)   || '&nbsp;' %][% IF row.oe_id %]</a>[% END %]</td>
           <td>[% HTML.escape(row.transdate)   || '&nbsp;' %]</td>
           <td>[% HTML.escape(row.description) || '&nbsp;' %]</td>
index 15d560868b2a83b5c17e3b3090f3c4ddd81862a4..386bc8717195e2038aa4916144cfe336ff8186f9 100644 (file)
@@ -56,7 +56,7 @@
     <th class="listheading">Haben</th>
     <th class="listheading">Soll</th>
     <th class="listheading">Haben</th>
-  
+   </tr>
    [% FOREACH row = ROWS %]
     [% IF row.IS_CONTROL %]
      [% IF row.IS_COLSPAN_DATA %]<tr><td colspan="[% row.NUM_COLUMNS %]">[% row.data %]</td></tr>[% END %]
index 6f9d4c553de1a080837a459a1da052312f890108..2671a827276c64b6f3fc14494d07b7f31ae86c29 100644 (file)
@@ -56,7 +56,7 @@
     <th class="listheading"><translate>Credit</translate></th>
     <th class="listheading"><translate>Debit</translate></th>
     <th class="listheading"><translate>Credit</translate></th>
-  
+   </tr>
    [% FOREACH row = ROWS %]
     [% IF row.IS_CONTROL %]
      [% IF row.IS_COLSPAN_DATA %]<tr><td colspan="[% row.NUM_COLUMNS %]">[% row.data %]</td></tr>[% END %]