Revision afe8a81b
Von Moritz Bunkus vor fast 18 Jahren hinzugefügt
SL/Form.pm | ||
---|---|---|
44 | 44 |
use CGI::Ajax; |
45 | 45 |
use SL::DBUtils; |
46 | 46 |
use SL::Menu; |
47 |
use SL::User; |
|
47 | 48 |
use CGI; |
48 | 49 |
|
49 | 50 |
sub _input_to_hash { |
... | ... | |
1377 | 1378 |
$main::lxdebug->leave_sub(); |
1378 | 1379 |
} |
1379 | 1380 |
|
1381 |
sub get_salesman { |
|
1382 |
$main::lxdebug->enter_sub(); |
|
1383 |
|
|
1384 |
my ($self, $myconfig, $salesman_id) = @_; |
|
1385 |
|
|
1386 |
my $dbh = $self->dbconnect($myconfig); |
|
1387 |
|
|
1388 |
my ($login) = |
|
1389 |
selectrow_query($self, $dbh, qq|SELECT login FROM employee WHERE id = ?|, |
|
1390 |
$salesman_id); |
|
1391 |
|
|
1392 |
if ($login) { |
|
1393 |
my $user = new User($main::memberfile, $login); |
|
1394 |
map({ $self->{"salesman_$_"} = $user->{$_}; } |
|
1395 |
qw(address businessnumber co_ustid company duns email fax name |
|
1396 |
taxnumber tel)); |
|
1397 |
$self->{salesman_login} = $login; |
|
1398 |
|
|
1399 |
$self->{salesman_name} = $login |
|
1400 |
if ($self->{salesman_name} eq ""); |
|
1401 |
|
|
1402 |
map({ $self->{"salesman_$_"} =~ s/\\n/\n/g; } qw(address company)); |
|
1403 |
} |
|
1404 |
|
|
1405 |
$dbh->disconnect(); |
|
1406 |
|
|
1407 |
$main::lxdebug->leave_sub(); |
|
1408 |
} |
|
1409 |
|
|
1380 | 1410 |
sub get_duedate { |
1381 | 1411 |
$main::lxdebug->enter_sub(); |
1382 | 1412 |
|
... | ... | |
2498 | 2528 |
return $var; |
2499 | 2529 |
} |
2500 | 2530 |
|
2501 |
sub get_salesman { |
|
2502 |
$main::lxdebug->enter_sub(); |
|
2503 |
|
|
2504 |
my ($self, $myconfig, $salesman) = @_; |
|
2505 |
|
|
2506 |
my $dbh = $self->dbconnect($myconfig); |
|
2507 |
my $query = |
|
2508 |
qq|SELECT id, name FROM customer WHERE (customernumber ilike '%$salesman%' OR name ilike '%$salesman%') AND business_id in (SELECT id from business WHERE salesman)|; |
|
2509 |
my $sth = $dbh->prepare($query); |
|
2510 |
$sth->execute || $self->dberror($query); |
|
2511 |
|
|
2512 |
my $i = 0; |
|
2513 |
while ($ref = $sth->fetchrow_hashref(NAME_lc)) { |
|
2514 |
push(@{ $self->{salesman_list} }, $ref); |
|
2515 |
$i++; |
|
2516 |
} |
|
2517 |
$dbh->commit; |
|
2518 |
$main::lxdebug->leave_sub(); |
|
2519 |
|
|
2520 |
return $i; |
|
2521 |
} |
|
2522 |
|
|
2523 | 2531 |
sub get_partsgroup { |
2524 | 2532 |
$main::lxdebug->enter_sub(); |
2525 | 2533 |
|
bin/mozilla/io.pl | ||
---|---|---|
1894 | 1894 |
|
1895 | 1895 |
$language_saved = $form->{language_id}; |
1896 | 1896 |
$payment_id_saved = $form->{payment_id}; |
1897 |
$salesman_id_saved = $form->{salesman_id}; |
|
1897 | 1898 |
|
1898 | 1899 |
&{"$form->{vc}_details"}(); |
1899 | 1900 |
|
... | ... | |
1923 | 1924 |
IS->invoice_details(\%myconfig, \%$form, $locale); |
1924 | 1925 |
} |
1925 | 1926 |
|
1927 |
$form->get_salesman(\%myconfig, $salesman_id_saved); |
|
1928 |
|
|
1926 | 1929 |
if ($form->{shipto_id}) { |
1927 | 1930 |
$form->get_shipto(\%myconfig); |
1928 | 1931 |
} |
doc/dokumentenvorlagen-und-variablen.html | ||
---|---|---|
55 | 55 |
<li><a href="dokumentenvorlagen-und-variablen.html#allgemein_stammdaten"> |
56 | 56 |
Stammdaten von Kunden und Lieferanten</a></li> |
57 | 57 |
|
58 |
<li><a href="dokumentenvorlagen-und-variablen.html#allgemein_bearbeiter"> |
|
59 |
Informationen über den Bearbeiter</a></li> |
|
60 |
|
|
58 | 61 |
<li><a href="dokumentenvorlagen-und-variablen.html#allgemein_verkaeufer"> |
59 | 62 |
Informationen über den Verkäufer</a></li> |
60 | 63 |
|
... | ... | |
390 | 393 |
sondern schlicht Kopien der Lieferdatenvariablen sind |
391 | 394 |
(z.B. <code>shiptocontact</code>).</p> |
392 | 395 |
|
393 |
<h3><a name="allgemein_verkaeufer">
|
|
394 |
Informationen über den Verk?ufer:</a></h3>
|
|
396 |
<h3><a name="allgemein_bearbeiter">
|
|
397 |
Informationen über den Bearbeiter:</a></h3>
|
|
395 | 398 |
|
396 | 399 |
<p> |
397 | 400 |
<table border="1"> |
... | ... | |
443 | 446 |
</table> |
444 | 447 |
</p> |
445 | 448 |
|
449 |
<h3><a name="allgemein_verkaeufer"> |
|
450 |
Informationen über den Verkäfer (nur bei Verkaufsmasken):</a></h3> |
|
451 |
|
|
452 |
<p> |
|
453 |
<table border="1"> |
|
454 |
<tr><th>Variablenname</th><th>Bedeutung</th></tr> |
|
455 |
<tr> |
|
456 |
<td><code>salesman_address</code></td> |
|
457 |
<td>Adressfeld</td> |
|
458 |
</tr> |
|
459 |
<tr> |
|
460 |
<td><code>salesman_businessnumber</code></td> |
|
461 |
<td>Firmennummer</td> |
|
462 |
</tr> |
|
463 |
<tr> |
|
464 |
<td><code>salesman_company</code></td> |
|
465 |
<td>Firmenname</td> |
|
466 |
</tr> |
|
467 |
<tr> |
|
468 |
<td><code>salesman_co_ustid</code></td> |
|
469 |
<td>Usatzsteuer-Identifikationsnummer</td> |
|
470 |
</tr> |
|
471 |
<tr> |
|
472 |
<td><code>salesman_duns</code></td> |
|
473 |
<td>DUNS-Nummer</td> |
|
474 |
</tr> |
|
475 |
<tr> |
|
476 |
<td><code>salesman_email</code></td> |
|
477 |
<td>Email</td> |
|
478 |
</tr> |
|
479 |
<tr> |
|
480 |
<td><code>salesman_fax</code></td> |
|
481 |
<td>Fax</td> |
|
482 |
</tr> |
|
483 |
<tr> |
|
484 |
<td><code>salesman_name</code></td> |
|
485 |
<td>voller Name</td> |
|
486 |
</tr> |
|
487 |
<tr> |
|
488 |
<td><code>salesman_signature</code></td> |
|
489 |
<td>Signatur</td> |
|
490 |
</tr> |
|
491 |
<tr> |
|
492 |
<td><code>salesman_taxnumber</code></td> |
|
493 |
<td>Steuernummer</td> |
|
494 |
</tr> |
|
495 |
<tr> |
|
496 |
<td><code>salesman_tel</code></td> |
|
497 |
<td>Telefonnummer</td> |
|
498 |
</tr> |
|
499 |
</table> |
|
500 |
</p> |
|
501 |
|
|
446 | 502 |
<h3><a name="allgemein_steuern"> |
447 | 503 |
Variablen für die einzelnen Steuern:</a></h3> |
448 | 504 |
|
Auch abrufbar als: Unified diff
Beim Ausdruck die Variablen für den Verkäufer (salesman_*) füllen.