Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision f01741e3

Von Moritz Bunkus vor mehr als 17 Jahren hinzugefügt

  • ID f01741e36a022e2bb7503abb23fbc0f46f27cd62
  • Vorgänger a4b22a8f
  • Nachfolger 185d7c5b

Projektauswahl in Debitoren- und Kreditorenbuchungen per Drop-Down-Box. Bei der Buchung auf das Gegenkonto wird keine Projektnummer vermerkt.

Unterschiede anzeigen:

SL/AP.pm
222 222
  for $i (1 .. $form->{rowcount}) {
223 223
    if ($form->{"amount_$i"} != 0) {
224 224
      my $project_id;
225
      if ("amount_$i" =~ /amount_/) {
226
        if ($form->{"project_id_$i"} && $form->{"projectnumber_$i"}) {
227
          $project_id = $form->{"project_id_$i"};
228
        }
229
      }
230
      if ("amount_$i" =~ /amount/) {
231
        $taxkey = $form->{AP_amounts}{"amount_$i"}{taxkey};
232
      }
225
      $project_id = conv_i($form->{"project_id_$i"});
226
      $taxkey = $form->{AP_amounts}{"amount_$i"}{taxkey};
233 227

  
234 228
      # insert detail records in acc_trans
235 229
      $query =
......
239 233
        qq|  ?, ?, ?, ?)|;
240 234
      @values = ($form->{id}, $form->{AP_amounts}{"amount_$i"},
241 235
                 $form->{"amount_$i"}, conv_date($form->{transdate}),
242
                 conv_i($project_id), $taxkey);
236
                 $project_id, $taxkey);
243 237
      do_query($form, $dbh, $query, @values);
244 238

  
245 239
      if ($form->{"tax_$i"} != 0) {
......
251 245
          qq|  ?, ?, ?, ?)|;
252 246
        @values = ($form->{id}, $form->{AP_amounts}{"tax_$i"},
253 247
                   $form->{"tax_$i"}, conv_date($form->{transdate}),
254
                   conv_date($project_id), $taxkey);
248
                   $project_id, $taxkey);
255 249
        do_query($form, $dbh, $query, @values);
256 250
      }
257 251

  
......
260 254

  
261 255
  # add payables
262 256
  $query =
263
    qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate, project_id) | .
264
    qq|VALUES (?, (SELECT c.id FROM chart c WHERE c.accno = ?), | .
265
    qq|  ?, ?, ?)|;
257
    qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate) | .
258
    qq|VALUES (?, (SELECT c.id FROM chart c WHERE c.accno = ?), ?, ?)|;
266 259
  @values = ($form->{id}, $form->{AP_amounts}{payables}, $form->{payables},
267
             conv_date($form->{transdate}), conv_i($project_id));
260
             conv_date($form->{transdate}));
268 261
  do_query($form, $dbh, $query, @values);
269 262

  
270 263
  # if there is no amount but a payment record a payable

Auch abrufbar als: Unified diff