Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 96d60de4

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

  • ID 96d60de4d387a1e821b25a47e07c269995959b0f
  • Vorgänger 875f08f3
  • Nachfolger d8f857c7

Buchungskonten in Verkaufsrechnungen anzeigen.

Unterschiede anzeigen:

SL/AR.pm
407 407
  my ($self, $myconfig, $form) = @_;
408 408

  
409 409
  # connect to database
410
  my $dbh = $form->dbconnect($myconfig);
410
  my $dbh = $form->get_standard_dbh($myconfig);
411 411

  
412 412
  my @values;
413 413

  
414 414
  my $query =
415
    qq|SELECT a.id, a.invnumber, a.ordnumber, a.transdate, | .
415
    qq|SELECT DISTINCT a.id, a.invnumber, a.ordnumber, a.transdate, | .
416 416
    qq|  a.duedate, a.netamount, a.amount, a.paid, | .
417 417
    qq|  a.invoice, a.datepaid, a.terms, a.notes, a.shipvia, | .
418 418
    qq|  a.shippingpoint, a.storno, a.storno_id, a.globalproject_id, | .
......
423 423
    qq|  e.name AS employee, | .
424 424
    qq|  e2.name AS salesman, | .
425 425
    qq|  tz.description AS taxzone, | .
426
    qq|  pt.description AS payment_terms | .
426
    qq|  pt.description AS payment_terms, | .
427
    qq{  ch.accno || ' -- ' || ch.description AS charts } .
427 428
    qq|FROM ar a | .
428 429
    qq|JOIN customer c ON (a.customer_id = c.id) | .
429 430
    qq|LEFT JOIN employee e ON (a.employee_id = e.id) | .
430 431
    qq|LEFT JOIN employee e2 ON (a.salesman_id = e2.id) | .
431 432
    qq|LEFT JOIN project pr ON (a.globalproject_id = pr.id)| .
432 433
    qq|LEFT JOIN tax_zones tz ON (tz.id = c.taxzone_id)| .
433
    qq|LEFT JOIN payment_terms pt ON (pt.id = c.payment_id)|;
434
    qq|LEFT JOIN payment_terms pt ON (pt.id = c.payment_id)| .
435
    qq|LEFT JOIN acc_trans at ON (at.trans_id = a.id)| .
436
    qq|INNER JOIN chart ch ON (ch.id = at.chart_id AND ch.link ~ 'AR[[:>:]]')|;
434 437

  
435 438
  my $where = "1 = 1";
436 439
  if ($form->{customer_id}) {
......
485 488

  
486 489
  $query .= " WHERE $where ORDER BY $sortorder";
487 490

  
488
  my $sth = $dbh->prepare($query);
489
  $sth->execute(@values) ||
490
    $form->dberror($query . " (" . join(", ", @values) . ")");
491
  my @result = selectall_hashref_query($form, $dbh, $query, @values);
491 492

  
492
  $form->{AR} = [];
493
  while (my $ar = $sth->fetchrow_hashref(NAME_lc)) {
494
    push @{ $form->{AR} }, $ar;
495
  }
496

  
497
  $sth->finish;
498
  $dbh->disconnect;
493
  $form->{AR} = [ @result ];
499 494

  
500 495
  $main::lxdebug->leave_sub();
501 496
}
bin/mozilla/ar.pl
1428 1428
          <tr>
1429 1429
		<td align=right><input name="l_payment_terms" class=checkbox type=checkbox value=Y></td>
1430 1430
		<td nowrap>| . $locale->text('Payment Terms') . qq|</td>
1431
		<td align=right><input name="l_charts" class=checkbox type=checkbox value=Y></td>
1432
		<td nowrap>| . $locale->text('Buchungskonto') . qq|</td>
1431 1433
          </tr>
1432 1434

  
1433 1435
	    </table>
......
1498 1500
  @columns =
1499 1501
    qw(transdate id type invnumber ordnumber name netamount tax amount paid
1500 1502
       datepaid due duedate transaction_description notes salesman employee shippingpoint shipvia
1501
       marge_total marge_percent globalprojectnumber customernumber country ustid taxzone payment_terms);
1503
       marge_total marge_percent globalprojectnumber customernumber country ustid taxzone payment_terms charts);
1502 1504

  
1503 1505
  my @hidden_variables = map { "l_${_}" } @columns;
1504 1506
  push @hidden_variables, "l_subtotal", qw(open closed customer invnumber ordnumber transaction_description notes project_id transdatefrom transdateto);
......
1533 1535
    'ustid'                   => { 'text' => $locale->text('USt-IdNr.'), },
1534 1536
    'taxzone'                 => { 'text' => $locale->text('Steuersatz'), },
1535 1537
    'payment_terms'           => { 'text' => $locale->text('Payment Terms'), },
1538
    'charts'                  => { 'text' => $locale->text('Buchungskonto'), },
1536 1539
  );
1537 1540

  
1538 1541
  foreach my $name (qw(id transdate duedate invnumber ordnumber name datepaid employee shippingpoint shipvia transaction_description)) {
locale/de/all
268 268
  'Buchungsdatum'               => 'Buchungsdatum',
269 269
  'Buchungsgruppe'              => 'Buchungsgruppe',
270 270
  'Buchungsgruppen'             => 'Buchungsgruppen',
271
  'Buchungskonto'               => 'Buchungskonto',
271 272
  'Buchungsnummer'              => 'Buchungsnummer',
272 273
  'Business Number'             => 'Firmennummer',
273 274
  'Business Volume'             => 'Gesch?ftsvolumen',
locale/de/ar
27 27
  'Bin List'                    => 'Lagerliste',
28 28
  '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.',
29 29
  'Bis'                         => 'bis',
30
  'Buchungskonto'               => 'Buchungskonto',
30 31
  'CANCELED'                    => 'Storniert',
31 32
  'CR'                          => 'H',
32 33
  'CRM admin'                   => 'Administration',

Auch abrufbar als: Unified diff