Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision d8f857c7

Von Sven Schöling vor etwa 15 Jahren hinzugefügt

  • ID d8f857c7a3a8705e85acb5e7f8bcfe8fe2dabf7f
  • Vorgänger 96d60de4
  • Nachfolger df682ff9

Einkaufsrechnungen Buchungskonto

Unterschiede anzeigen:

SL/AP.pm
390 390
  my ($self, $myconfig, $form) = @_;
391 391

  
392 392
  # connect to database
393
  my $dbh = $form->dbconnect($myconfig);
393
  my $dbh = $form->get_standard_dbh($myconfig);
394 394

  
395 395
  my $query =
396 396
    qq|SELECT a.id, a.invnumber, a.transdate, a.duedate, a.amount, a.paid, | .
......
400 400
    qq|  e.name AS employee, | .
401 401
    qq|  v.vendornumber, v.country, v.ustid, | .
402 402
    qq|  tz.description AS taxzone, | .
403
    qq|  pt.description AS payment_terms | .
403
    qq|  pt.description AS payment_terms, | .
404
    qq{  ch.accno || ' -- ' || ch.description AS charts } .
404 405
    qq|FROM ap a | .
405 406
    qq|JOIN vendor v ON (a.vendor_id = v.id) | .
406 407
    qq|LEFT JOIN employee e ON (a.employee_id = e.id) | .
407 408
    qq|LEFT JOIN project pr ON (a.globalproject_id = pr.id) | .
408 409
    qq|LEFT JOIN tax_zones tz ON (tz.id = v.taxzone_id)| .
409
    qq|LEFT JOIN payment_terms pt ON (pt.id = v.payment_id)|;
410
    qq|LEFT JOIN payment_terms pt ON (pt.id = v.payment_id)| .
411
    qq|LEFT JOIN acc_trans at ON (at.trans_id = a.id)| .
412
    qq|INNER JOIN chart ch ON (ch.id = at.chart_id AND ch.link ~ 'AP[[:>:]]')|;
410 413

  
411 414
  my $where = '';
412 415
  my @values;
......
474 477

  
475 478
  $query .= " ORDER BY $sortorder";
476 479

  
477
  my $sth = $dbh->prepare($query);
478
  $sth->execute(@values) ||
479
    $form->dberror($query . " (" . join(", ", @values) . ")");
480
  my @result = selectall_hashref_query($form, $dbh, $query, @values);
480 481

  
481
  $form->{AP} = [];
482
  while (my $ap = $sth->fetchrow_hashref(NAME_lc)) {
483
    push @{ $form->{AP} }, $ap;
484
  }
485

  
486
  $sth->finish;
487
  $dbh->disconnect;
482
  $form->{AP} = [ @result ];
488 483

  
489 484
  $main::lxdebug->leave_sub();
490 485
}
bin/mozilla/ap.pl
1342 1342
          <tr>
1343 1343
		<td align=right><input name="l_payment_terms" class=checkbox type=checkbox value=Y></td>
1344 1344
		<td nowrap>| . $locale->text('Payment Terms') . qq|</td>
1345
		<td align=right><input name="l_charts" class=checkbox type=checkbox value=Y></td>
1346
		<td nowrap>| . $locale->text('Buchungskonto') . qq|</td>
1345 1347
          </tr>
1346 1348
	    </table>
1347 1349
	  </td>
......
1406 1408
  my @columns =
1407 1409
    qw(transdate id type invnumber ordnumber name netamount tax amount paid datepaid
1408 1410
       due duedate transaction_description notes employee globalprojectnumber
1409
       vendornumber country ustid taxzone payment_terms);
1411
       vendornumber country ustid taxzone payment_terms charts);
1410 1412

  
1411 1413
  my @hidden_variables = map { "l_${_}" } @columns;
1412 1414
  push @hidden_variables, "l_subtotal", qw(open closed vendor invnumber ordnumber transaction_description notes project_id transdatefrom transdateto);
......
1436 1438
    'ustid'                   => { 'text' => $locale->text('USt-IdNr.'), },
1437 1439
    'taxzone'                 => { 'text' => $locale->text('Steuersatz'), },
1438 1440
    'payment_terms'           => { 'text' => $locale->text('Payment Terms'), },
1441
    'charts'                  => { 'text' => $locale->text('Buchungskonto'), },
1439 1442
  );
1440 1443

  
1441 1444
  foreach my $name (qw(id transdate duedate invnumber ordnumber name datepaid employee shippingpoint shipvia transaction_description)) {
locale/de/ap
28 28
  'Bin List'                    => 'Lagerliste',
29 29
  'Binding to the LDAP server as "#1" failed. Please check config/authentication.pl.' => 'Die Anmeldung am LDAP-Server als "#1" schlug fehl. Bitte &uuml;berpr&uuml;fen Sie die Angaben in config/authentication.pl.',
30 30
  'Bis'                         => 'bis',
31
  'Buchungskonto'               => 'Buchungskonto',
31 32
  'CANCELED'                    => 'Storniert',
32 33
  'CR'                          => 'H',
33 34
  'CRM admin'                   => 'Administration',

Auch abrufbar als: Unified diff