Projektnummer pro Beleg auch für Debitoren- und Kreditorenbuchungen.
authorBernd Blessmann <bibi@online.de>
Mon, 22 Aug 2011 11:36:42 +0000 (13:36 +0200)
committerBernd Blessmann <bibi@online.de>
Mon, 22 Aug 2011 11:36:42 +0000 (13:36 +0200)
SL/AP.pm
SL/AR.pm
SL/Form.pm
bin/mozilla/ap.pl
bin/mozilla/ar.pl
doc/changelog

index 33d09f1..d90a53f 100644 (file)
--- a/SL/AP.pm
+++ b/SL/AP.pm
@@ -185,7 +185,8 @@ sub post_transaction {
     $query = qq|UPDATE ap SET
                 invnumber = ?, transdate = ?, ordnumber = ?, vendor_id = ?, taxincluded = ?,
                 amount = ?, duedate = ?, paid = ?, netamount = ?,
-                curr = ?, notes = ?, department_id = ?, storno = ?, storno_id = ?
+                curr = ?, notes = ?, department_id = ?, storno = ?, storno_id = ?,
+                globalproject_id = ?
                WHERE id = ?|;
     @values = ($form->{invnumber}, conv_date($form->{transdate}),
                   $form->{ordnumber}, conv_i($form->{vendor_id}),
@@ -194,7 +195,8 @@ sub post_transaction {
                   $form->{netamount},
                   $form->{currency}, $form->{notes},
                   conv_i($form->{department_id}), $form->{storno},
-                  $form->{storno_id}, $form->{id});
+                  $form->{storno_id}, conv_i($form->{globalproject_id}),
+                  $form->{id});
     do_query($form, $dbh, $query, @values);
 
     # add individual transactions
index 01a2ee6..ef42e69 100644 (file)
--- a/SL/AR.pm
+++ b/SL/AR.pm
@@ -156,11 +156,12 @@ sub post_transaction {
            invnumber = ?, ordnumber = ?, transdate = ?, customer_id = ?,
            taxincluded = ?, amount = ?, duedate = ?, paid = ?,
            netamount = ?, curr = ?, notes = ?, department_id = ?,
-           employee_id = ?, storno = ?, storno_id = ?
+           employee_id = ?, storno = ?, storno_id = ?, globalproject_id = ?
          WHERE id = ?|;
     my @values = ($form->{invnumber}, $form->{ordnumber}, conv_date($form->{transdate}), conv_i($form->{customer_id}), $form->{taxincluded} ? 't' : 'f', $form->{amount},
                   conv_date($form->{duedate}), $form->{paid}, $form->{netamount}, $form->{currency}, $form->{notes}, conv_i($form->{department_id}),
-                  conv_i($form->{employee_id}), $form->{storno} ? 't' : 'f', $form->{storno_id}, conv_i($form->{id}));
+                  conv_i($form->{employee_id}), $form->{storno} ? 't' : 'f', $form->{storno_id},
+                  conv_i($form->{globalproject_id}), conv_i($form->{id}));
     do_query($form, $dbh, $query, @values);
 
     # add individual transactions for AR, amount and taxes
index e919714..418d3cf 100644 (file)
@@ -2929,6 +2929,7 @@ sub create_links {
            a.duedate, a.ordnumber, a.taxincluded, a.curr AS currency, a.notes,
            a.intnotes, a.department_id, a.amount AS oldinvtotal,
            a.paid AS oldtotalpaid, a.employee_id, a.gldate, a.type,
+           a.globalproject_id,
            c.name AS $table,
            d.description AS department,
            e.name AS employee
index e98a1cf..f19363d 100644 (file)
@@ -401,6 +401,12 @@ sub form_header {
   $form->{javascript} .= qq|<script type="text/javascript" src="js/show_vc_details.js"></script>|;
   $form->{javascript} .= qq|<script type="text/javascript" src="js/follow_up.js"></script>|;
 
+  my $globalprojectnumber =
+    NTI($cgi->popup_menu('-name' => "globalproject_id",
+                         '-values' => \@project_values,
+                         '-labels' => \%project_labels,
+                         '-default' => $form->{"globalproject_id"} ));
+
   $form->header;
   my $onload = qq|;setupDateFormat('|. $myconfig{dateformat} .qq|', '|. $locale->text("Falsches Datumsformat!") .qq|')|;
   $onload .= qq|;setupPoints('|. $myconfig{numberformat} .qq|', '|. $locale->text("wrongformat") .qq|')|;
@@ -486,6 +492,10 @@ sub form_header {
                 <th align=right nowrap>| . $locale->text('Due Date') . qq|</th>
                 $button2
               </tr>
+              <tr>
+                <th align=right nowrap>| . $locale->text('Project Number') . qq|</th>
+                <td>$globalprojectnumber</td>
+              </tr>
             </table>
           </td>
         </tr>
index b225370..8a04ac5 100644 (file)
@@ -436,6 +436,12 @@ sub form_header {
     qq|<script type="text/javascript" src="js/show_vc_details.js"></script>| .
     qq|<script type="text/javascript" src="js/follow_up.js"></script>|;
 
+  my $globalprojectnumber =
+    NTI($cgi->popup_menu('-name' => "globalproject_id",
+                         '-values' => \@project_values,
+                         '-labels' => \%project_labels,
+                         '-default' => $form->{"globalproject_id"} ));
+
   $form->header;
   $onload = qq|focus()|;
   $onload .= qq|;setupDateFormat('|. $myconfig{dateformat} .qq|', '|. $locale->text("Falsches Datumsformat!") .qq|')|;
@@ -523,6 +529,10 @@ sub form_header {
                 <th align=right nowrap>| . $locale->text('Due Date') . qq|</th>
                 $button2
               </tr>
+              <tr>
+                <th align=right nowrap>| . $locale->text('Project Number') . qq|</th>
+                <td>$globalprojectnumber</td>
+              </tr>
      </table>
           </td>
         </tr>
index 81f3fba..0abf480 100644 (file)
@@ -2,6 +2,9 @@
 # Veränderungen von Lx-Office ERP #
 ###################################
 
+- Projektnummer pro Beleg läßt sich auch für Debitoren- und
+  Kreditorenbuchungen angeben.
+
 - Bei den Berichten für Verkaus- und Einkaufsrechnungen wird auch auf die
   positionsbezogenen Projektnummern für Debitoren- und Kreditorenbuchungen
   gefiltert.