Revision 3b3ef5ba
Von Sven Schöling vor etwa 15 Jahren hinzugefügt
SL/AR.pm | ||
---|---|---|
419 | 419 |
qq| a.marge_total, a.marge_percent, | . |
420 | 420 |
qq| a.transaction_description, | . |
421 | 421 |
qq| pr.projectnumber AS globalprojectnumber, | . |
422 |
qq| c.name, | . |
|
422 |
qq| c.name, c.customernumber, c.country, c.ustid, | .
|
|
423 | 423 |
qq| e.name AS employee, | . |
424 |
qq| e2.name AS salesman | . |
|
424 |
qq| e2.name AS salesman, | . |
|
425 |
qq| tz.description AS taxzone, | . |
|
426 |
qq| pt.description AS payment_terms | . |
|
425 | 427 |
qq|FROM ar a | . |
426 | 428 |
qq|JOIN customer c ON (a.customer_id = c.id) | . |
427 | 429 |
qq|LEFT JOIN employee e ON (a.employee_id = e.id) | . |
428 | 430 |
qq|LEFT JOIN employee e2 ON (a.salesman_id = e2.id) | . |
429 |
qq|LEFT JOIN project pr ON (a.globalproject_id = pr.id)|; |
|
431 |
qq|LEFT JOIN project pr ON (a.globalproject_id = pr.id)| . |
|
432 |
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)|; |
|
430 | 434 |
|
431 | 435 |
my $where = "1 = 1"; |
432 | 436 |
if ($form->{customer_id}) { |
... | ... | |
470 | 474 |
} |
471 | 475 |
} |
472 | 476 |
|
473 |
my @a = (transdate, invnumber, name);
|
|
477 |
my @a = qw(transdate invnumber name);
|
|
474 | 478 |
push @a, "employee" if $form->{l_employee}; |
475 | 479 |
my $sortdir = !defined $form->{sortdir} ? 'ASC' : $form->{sortdir} ? 'ASC' : 'DESC'; |
476 | 480 |
my $sortorder = join(', ', map { "$_ $sortdir" } @a); |
... | ... | |
652 | 656 |
|
653 | 657 |
# now copy acc_trans entries |
654 | 658 |
$query = qq|SELECT a.*, c.link FROM acc_trans a LEFT JOIN chart c ON a.chart_id = c.id WHERE a.trans_id = ? ORDER BY a.acc_trans_id|; |
655 |
my $rowref = selectall_hashref_query($form, $dbh, $query, $id);
|
|
659 |
my $rowref = selectall_hashref_query($form, $dbh, $query, $id); |
|
656 | 660 |
|
657 | 661 |
# kill all entries containing payments, which are the last 2n rows, of which the last has link =~ /paid/ |
658 | 662 |
while ($rowref->[-1]{link} =~ /paid/) { |
Auch abrufbar als: Unified diff
Anzeige von Kundendaten in der Verkaufsrechnungssuche.