Revision 4be9b9dc
Von Sven Schöling vor fast 17 Jahren hinzugefügt
bin/mozilla/ct.pl | ||
---|---|---|
236 | 236 |
$lxdebug->enter_sub(); |
237 | 237 |
|
238 | 238 |
$form->get_lists("employees" => "ALL_SALESMEN", |
239 |
"taxzones" => "ALL_TAXZONES"); |
|
240 |
|
|
241 |
$form->{taxincluded} = ($form->{taxincluded}) ? "checked" : ""; |
|
242 |
$form->{creditlimit} = |
|
243 |
$form->format_amount(\%myconfig, $form->{creditlimit}, 0); |
|
244 |
$form->{discount} = $form->format_amount(\%myconfig, $form->{discount}); |
|
245 |
|
|
246 |
if ($myconfig{role} eq 'admin') { |
|
247 |
$bcc = qq| |
|
248 |
<tr> |
|
249 |
<th align=right nowrap>| . $locale->text('Bcc') . qq|</th> |
|
250 |
<td><input name=bcc size=35 value="$form->{bcc}"></td> |
|
251 |
</tr> |
|
252 |
|; |
|
253 |
} |
|
254 |
$form->{obsolete} = "checked" if $form->{obsolete}; |
|
255 |
|
|
256 |
$lang = qq|<option value=""></option>|; |
|
257 |
foreach $item (@{ $form->{languages} }) { |
|
258 |
if ($form->{language_id} eq $item->{id}) { |
|
259 |
$lang .= qq|<option value="$item->{id}" selected>$item->{description}</option>|; |
|
260 |
} else { |
|
261 |
$lang .= qq|<option value="$item->{id}">$item->{description}</option>|; |
|
262 |
} |
|
263 |
} |
|
264 |
|
|
265 |
$payment = qq|<option value=""></option>|; |
|
266 |
foreach $item (@{ $form->{payment_terms} }) { |
|
267 |
if ($form->{payment_id} eq $item->{id}) { |
|
268 |
$payment .= qq|<option value="$item->{id}" selected>$item->{description}</option>|; |
|
269 |
} else { |
|
270 |
$payment .= qq|<option value="$item->{id}">$item->{description}</option>|; |
|
271 |
} |
|
272 |
} |
|
273 |
|
|
274 |
if (!$form->{id}) { |
|
275 |
if ($form->{db} eq "customer") { |
|
276 |
$form->{taxzone_id} = 0; |
|
277 |
} else { |
|
278 |
$form->{taxzone_id} = 0; |
|
279 |
} |
|
280 |
} |
|
281 |
|
|
282 |
%labels = (); |
|
283 |
@values = (); |
|
284 |
foreach my $item (@{ $form->{"ALL_TAXZONES"} }) { |
|
285 |
push(@values, $item->{"id"}); |
|
286 |
$labels{$item->{"id"}} = $item->{"description"}; |
|
287 |
} |
|
288 |
|
|
289 |
$taxzone = qq| |
|
290 |
<th align=right>| . $locale->text('Steuersatz') . qq|</th> |
|
291 |
<td>| . |
|
292 |
NTI($cgi->popup_menu('-name' => 'taxzone_id', '-default' => $form->{"taxzone_id"}, |
|
293 |
'-values' => \@values, '-labels' => \%labels)) . qq| |
|
294 |
</td> |
|
295 |
|; |
|
296 |
|
|
297 |
$get_contact_url = |
|
298 |
"$form->{script}?login=$form->{login}&password=$form->{password}&action=get_contact"; |
|
299 |
|
|
300 |
my $pjx = new CGI::Ajax( 'get_contact' => $get_contact_url ); |
|
301 |
$form->{selectcontact} = "<option value=0>" . $locale->text('New contact') . "</option>"; |
|
302 |
if (@{ $form->{CONTACTS} }) { |
|
303 |
foreach $item (@{ $form->{CONTACTS} }) { |
|
304 |
if ($item->{cp_id} == $form->{cp_id}) { |
|
305 |
$form->{selectcontact} .= |
|
306 |
qq|<option value=$item->{cp_id} selected>$item->{cp_name}</option>\n|; |
|
307 |
} else { |
|
308 |
$form->{selectcontact} .= |
|
309 |
qq|<option value=$item->{cp_id}>$item->{cp_name}</option>\n|; |
|
310 |
} |
|
311 |
|
|
312 |
} |
|
313 |
} |
|
314 |
push(@ { $form->{AJAX} }, $pjx); |
|
315 |
$ansprechpartner = qq| |
|
316 |
<tr> |
|
317 |
<th align=right>| . $locale->text('Ansprechpartner') . qq|</th> |
|
318 |
<td><select id=cp_id name=cp_id onChange="get_contact(['cp_id__' + this.value], ['cp_name', 'cp_greeting', 'cp_title', 'cp_givenname', 'cp_phone1', 'cp_phone2', 'cp_email', 'cp_abteilung', 'cp_fax', 'cp_mobile1', 'cp_mobile2', 'cp_satphone', 'cp_satfax', 'cp_project', 'cp_privatphone', 'cp_privatemail', 'cp_birthday'])">$form->{selectcontact}</select></td> |
|
319 |
<input type=hidden name=selectcontact value="$form->{selectcontact}"> |
|
320 |
</tr>|; |
|
321 |
$get_shipto_url = |
|
322 |
"$form->{script}?login=$form->{login}&password=$form->{password}&action=get_shipto"; |
|
323 |
|
|
324 |
my $pjy = new CGI::Ajax( 'get_shipto' => $get_shipto_url ); |
|
325 |
$form->{selectshipto} = "<option value=0></option>"; |
|
326 |
$form->{selectshipto} .= "<option value=0>Alle</option>"; |
|
327 |
if (@{ $form->{SHIPTO} }) { |
|
328 |
foreach $item (@{ $form->{SHIPTO} }) { |
|
329 |
if ($item->{shipto_id} == $form->{shipto_id}) { |
|
330 |
$form->{selectshipto} .= |
|
331 |
"<option value=$item->{shipto_id} selected>$item->{shiptoname} $item->{shiptodepartment_1}\n"; |
|
332 |
} else { |
|
333 |
$form->{selectshipto} .= |
|
334 |
"<option value=$item->{shipto_id}>$item->{shiptoname} $item->{shiptodepartment_1}\n"; |
|
335 |
} |
|
336 |
|
|
337 |
} |
|
338 |
} |
|
339 |
push(@ { $form->{AJAX} }, $pjy); |
|
340 |
|
|
341 |
$shipto = qq| |
|
342 |
<tr> |
|
343 |
<th align=right>| . $locale->text('Shipping Address') . qq|</th> |
|
344 |
<td><select id=shipto_id name=shipto_id onChange="get_shipto(['shipto_id__' + this.value], ['shiptoname','shiptodepartment_1', 'shiptodepartment_2','shiptostreet','shiptozipcode','shiptocity','shiptocountry','shiptocontact','shiptophone','shiptofax','shiptoemail'])">$form->{selectshipto}</select></td> |
|
345 |
<input type=hidden name=selectshipto value="$form->{selectshipto}"> |
|
346 |
</tr>|; |
|
347 |
|
|
348 |
|
|
349 |
$get_delivery_url = |
|
350 |
"$form->{script}?login=$form->{login}&password=$form->{password}&action=get_delivery"; |
|
351 |
|
|
352 |
my $pjz = new CGI::Ajax( 'get_delivery' => $get_delivery_url ); |
|
239 |
"taxzones" => "ALL_TAXZONES"); |
|
240 |
$form->get_pricegroup(\%myconfig, { all => 1 }); |
|
353 | 241 |
|
354 |
push(@ { $form->{AJAX} }, $pjz); |
|
242 |
$form->{taxincluded} = ($form->{taxincluded}) ? "checked" : ""; |
|
243 |
$form->{is_admin} = $myconfig{role} eq 'admin'; |
|
244 |
$form->{is_customer} = $form->{db} eq 'customer'; |
|
245 |
$form->{salesman_label} = sub { $_[0]->{name} ne "" ? $_[0]->{name} : $_[0]->{login} }; |
|
246 |
$form->{shipto_label} = sub { "$_[0]->{shiptoname} $_[0]->{shiptodepartment_1}" }; |
|
247 |
$form->{taxzone_id} = 0 if !$form->{id}; |
|
248 |
$form->{jsscript} = 1; |
|
249 |
$form->{fokus} = "ct.greeting"; |
|
355 | 250 |
|
356 |
$delivery = qq| |
|
357 |
<tr> |
|
358 |
<th align=right>| . $locale->text('Shipping Address') . qq|</th> |
|
359 |
<td><select id=delivery_id name=delivery_id onChange="get_delivery(['shipto_id__' + this.value, 'from__' + from.value, 'to__' + to.value, 'id__' + cvid.value, 'db__' + db.value], ['delivery'])">$form->{selectshipto}</select></td> |
|
360 |
</tr>|; |
|
251 |
unshift @{ $form->{SHIPTO} }, +{ shipto_id => '0', shiptoname => '' }, +{ shipto_id => '0', shiptoname => 'Alle' }; |
|
252 |
unshift @{ $form->{CONTACTS} }, +{ cp_id => '0', cp_name => $locale->text('New contact') }; |
|
361 | 253 |
|
362 |
$form->{selectbusiness} = qq|<option>\n|; |
|
363 |
map { |
|
364 |
$form->{selectbusiness} .= |
|
365 |
qq|<option value=$_->{id}>$_->{description}\n| |
|
366 |
} @{ $form->{all_business} }; |
|
367 |
if ($form->{business_save}) { |
|
368 |
$form->{selectbusiness} = $form->{business_save}; |
|
369 |
} |
|
370 |
$form->{selectbusiness} =~ |
|
371 |
s/<option value=$form->{business}>/<option value=$form->{business} selected>/; |
|
372 |
|
|
373 |
$label = ucfirst $form->{db}; |
|
374 |
if ($form->{title} eq "Edit") { |
|
375 |
$form->{title} = $locale->text("$form->{title} $label") . " $form->{name}"; |
|
376 |
} else { |
|
377 |
$form->{title} = $locale->text("$form->{title} $label"); |
|
378 |
} |
|
379 |
if ($form->{title_save}) { |
|
380 |
$form->{title} = $form->{title_save}; |
|
381 |
} |
|
382 |
if ($form->{db} eq 'vendor') { |
|
383 |
$customer = qq| |
|
384 |
<th align=right>| . $locale->text('Kundennummer') . qq|</th> |
|
385 |
<td><input name=v_customer_id size=10 value="$form->{v_customer_id}"></td> |
|
386 |
|; |
|
387 |
} |
|
254 |
push @{ $form->{AJAX} }, map { |
|
255 |
new CGI::Ajax( "get_$_" => "$form->{script}?login=$form->{login}&password=$form->{password}&action=get_$_" ) |
|
256 |
} qw(shipto contact delivery); |
|
388 | 257 |
|
389 |
if ($form->{db} eq 'customer') { |
|
390 |
|
|
391 |
$customer = qq| |
|
392 |
<th align=right>| . $locale->text('KNr. beim Kunden') . qq|</th> |
|
393 |
<td><input name=c_vendor_id size=10 value="$form->{c_vendor_id}"></td> |
|
394 |
|; |
|
395 |
} |
|
396 |
|
|
397 |
$business = qq| |
|
398 |
<th align=right>| . $locale->text('Type of Business') . qq|</th> |
|
399 |
<td><select name=business>$form->{selectbusiness}</select></td> |
|
400 |
|; |
|
401 |
|
|
402 |
$salesman = ""; |
|
403 |
|
|
404 |
if ($form->{db} eq "customer") { |
|
405 |
my (@salesman_values, %salesman_labels); |
|
406 |
push(@salesman_values, undef); |
|
407 |
foreach my $item (@{ $form->{ALL_SALESMEN} }) { |
|
408 |
push(@salesman_values, $item->{id}); |
|
409 |
$salesman_labels{$item->{id}} = $item->{name} ne "" ? $item->{name} : $item->{login}; |
|
410 |
} |
|
411 |
|
|
412 |
$salesman = |
|
413 |
qq| <th align="right">| . $locale->text('Salesman') . qq|</th> |
|
414 |
<td>| . |
|
415 |
NTI($cgi->popup_menu('-name' => 'salesman_id', '-default' => $form->{salesman_id}, |
|
416 |
'-values' => \@salesman_values, '-labels' => \%salesman_labels)) |
|
417 |
. qq|</td>|; |
|
418 |
} |
|
258 |
$form->{title} = $form->{title_save} |
|
259 |
|| $locale->text("$form->{title} " . ucfirst $form->{db}) . ($form->{title} eq "Edit" ? " $form->{name}" : ''); |
|
419 | 260 |
|
420 | 261 |
## LINET: Create a drop-down box with all prior titles and greetings. |
421 | 262 |
CT->query_titles_and_greetings(\%myconfig, \%$form); |
422 |
|
|
423 |
$select_title = qq| <select name=selected_cp_title><option></option>|; |
|
424 |
map({ $select_title .= qq|<option>$_</option>|; } @{ $form->{TITLES} }); |
|
425 |
$select_title .= qq|</select>|; |
|
426 |
|
|
427 |
$select_greeting = |
|
428 |
qq| <select name=selected_cp_greeting><option></option>|; |
|
429 |
map( |
|
430 |
{ $select_greeting .= qq|<option>$_</option>|; } @{ $form->{GREETINGS} }); |
|
431 |
$select_greeting .= qq|</select>|; |
|
432 |
|
|
433 |
$select_company_greeting = |
|
434 |
qq| <select name=selected_company_greeting><option></option>|; |
|
435 |
map( |
|
436 |
{ $select_company_greeting .= qq|<option>$_</option>|; } @{ $form->{COMPANY_GREETINGS} }); |
|
437 |
$select_company_greeting .= qq|</select>|; |
|
438 |
|
|
439 |
$select_department = |
|
440 |
qq| <select name=selected_cp_abteilung><option></option>|; |
|
441 |
map( |
|
442 |
{ $select_department .= qq|<option>$_</option>|; } @{ $form->{DEPARTMENT} }); |
|
443 |
$select_department .= qq|</select>|; |
|
263 |
map { $form->{"MB_$_"} = [ map +{ id => $_, description => $_ }, @{ $form->{$_} } ] } qw(TITLES GREETINGS COMPANY_GREETINGS DEPARTMENT); |
|
444 | 264 |
## /LINET |
445 | 265 |
|
446 |
if ($form->{db} eq 'customer') { |
|
447 |
|
|
448 |
#get pricegroup and form it |
|
449 |
$form->get_pricegroup(\%myconfig, { all => 1 }); |
|
450 |
|
|
451 |
$form->{pricegroup} = "$form->{klass}"; |
|
452 |
$form->{pricegroup_id} = "$form->{klass}"; |
|
453 |
|
|
454 |
if (@{ $form->{all_pricegroup} }) { |
|
455 |
|
|
456 |
$form->{selectpricegroup} = qq|<option>\n|; |
|
457 |
map { |
|
458 |
$form->{selectpricegroup} .= |
|
459 |
qq|<option value="$_->{id}">$_->{pricegroup}\n| |
|
460 |
} @{ $form->{all_pricegroup} }; |
|
461 |
} |
|
462 |
|
|
463 |
if ($form->{selectpricegroup}) { |
|
464 |
$form->{selectpricegroup} = $form->unescape($form->{selectpricegroup}); |
|
465 |
|
|
466 |
$pricegroup = |
|
467 |
qq|<input type=hidden name=selectpricegroup value="| |
|
468 |
. $form->escape($form->{selectpricegroup}, 1) . qq|">|; |
|
469 |
|
|
470 |
$form->{selectpricegroup} =~ |
|
471 |
s/(<option value="\Q$form->{klass}\E")/$1 selected/; |
|
472 |
|
|
473 |
$pricegroup .= |
|
474 |
qq|<select name=klass>$form->{selectpricegroup}</select>|; |
|
475 |
|
|
476 |
} |
|
477 |
} |
|
478 |
|
|
479 |
# $locale->text('Customer Number') |
|
480 |
# $locale->text('Vendor Number') |
|
481 |
$form->{fokus} = "ct.greeting"; |
|
482 |
$form->{jsscript} = 1; |
|
483 | 266 |
$form->header; |
484 |
|
|
485 |
print qq| |
|
486 |
<body onLoad="fokus()"> |
|
487 |
<table width=100%> |
|
488 |
<tr> |
|
489 |
<th class=listtop>$form->{title}</th> |
|
490 |
</tr> |
|
491 |
</table> |
|
492 |
|
|
493 |
|
|
494 |
<form method=post name="ct" action=$form->{script} onKeyUp="highlight(event)" onClick="highlight(event)"> |
|
495 |
|
|
496 |
|
|
497 |
|
|
498 |
<ul id="maintab" class="shadetabs"> |
|
499 |
<li class="selected"><a href="#" rel="billing">| |
|
500 |
. $locale->text('Billing Address') . qq|</a></li> |
|
501 |
<li><a href="#" rel="shipto">| |
|
502 |
. $locale->text('Shipping Address') . qq|</a></li> |
|
503 |
<li><a href="#" rel="contacts">Ansprechpartner</a></li> |
|
504 |
<li><a href="#" rel="deliveries">| |
|
505 |
. $locale->text('Lieferungen') . qq|</a></li> |
|
506 |
|
|
507 |
</ul> |
|
508 |
|
|
509 |
<div class="tabcontentstyle"> |
|
510 |
|
|
511 |
<div id="billing" class="tabcontent"> |
|
512 |
|
|
513 |
<table width=100%> |
|
514 |
<tr height="5"></tr> |
|
515 |
<tr> |
|
516 |
<th align=right nowrap>| . $locale->text($label . ' Number') . qq|</th> |
|
517 |
<td><input name="$form->{db}number" size=35 value="$form->{"$form->{db}number"}"></td> |
|
518 |
</tr> |
|
519 |
<tr> |
|
520 |
<th align=right nowrap>| . $locale->text('Greeting') . qq|</th> |
|
521 |
<td><input id=greeting name=greeting size=30 value="$form->{greeting}"> |
|
522 |
$select_company_greeting</td> |
|
523 |
</tr> |
|
524 |
<tr> |
|
525 |
<th align=right nowrap>| . $locale->text('Company Name') . qq|</th> |
|
526 |
<td><input name=name size=35 maxlength=75 value="$form->{name}"></td> |
|
527 |
</tr> |
|
528 |
<tr> |
|
529 |
<th align=right nowrap>| . $locale->text('Abteilung') . qq|</th> |
|
530 |
<td><input name=department_1 size=16 maxlength=75 value="$form->{department_1}"> |
|
531 |
<input name=department_2 size=16 maxlength=75 value="$form->{department_2}"></td> |
|
532 |
</tr> |
|
533 |
<tr> |
|
534 |
<th align=right nowrap>| . $locale->text('Street') . qq|</th> |
|
535 |
<td><input name=street size=35 maxlength=75 value="$form->{street}"></td> |
|
536 |
</tr> |
|
537 |
<tr> |
|
538 |
<th align=right nowrap>| |
|
539 |
. $locale->text('Zipcode') . "/" . $locale->text('City') . qq|</th> |
|
540 |
<td><input name=zipcode size=5 maxlength=10 value="$form->{zipcode}"> |
|
541 |
<input name=city size=30 maxlength=75 value="$form->{city}"></td> |
|
542 |
</tr> |
|
543 |
<tr> |
|
544 |
<th align=right nowrap>| . $locale->text('Country') . qq|</th> |
|
545 |
<td><input name=country size=35 maxlength=75 value="$form->{country}"></td> |
|
546 |
</tr> |
|
547 |
<tr> |
|
548 |
<th align=right nowrap>| . $locale->text('Contact') . qq|</th> |
|
549 |
<td><input name=contact size=28 maxlength=75 value="$form->{contact}"></td> |
|
550 |
</tr> |
|
551 |
<tr> |
|
552 |
<th align=right nowrap>| . $locale->text('Phone') . qq|</th> |
|
553 |
<td><input name=phone size=30 maxlength=30 value="$form->{phone}"></td> |
|
554 |
</tr> |
|
555 |
<tr> |
|
556 |
<th align=right nowrap>| . $locale->text('Fax') . qq|</th> |
|
557 |
<td><input name=fax size=30 maxlength=30 value="$form->{fax}"></td> |
|
558 |
</tr> |
|
559 |
<tr> |
|
560 |
<th align=right nowrap>| . $locale->text('E-mail') . qq|</th> |
|
561 |
<td><input name=email size=45 value="$form->{email}"></td> |
|
562 |
</tr> |
|
563 |
<tr> |
|
564 |
<th align=right nowrap>| . $locale->text('Homepage') . qq|</th> |
|
565 |
<td><input name=homepage size=45 value="$form->{homepage}"></td> |
|
566 |
</tr> |
|
567 |
</table> |
|
568 |
<table> |
|
569 |
<tr> |
|
570 |
<th align=right>| . $locale->text('Credit Limit') . qq|</th> |
|
571 |
<td><input name=creditlimit size=9 value="$form->{creditlimit}"></td> |
|
572 |
<input type="hidden" name="terms" value="$form->{terms}"> |
|
573 |
<th align=right>| . $locale->text('Payment Terms') . qq|</th> |
|
574 |
<td><select name=payment_id>$payment</select></td> |
|
575 |
<th align=right>| . $locale->text('Discount') . qq|</th> |
|
576 |
<td><input name=discount size=4 value="$form->{discount}"> |
|
577 |
%</td> |
|
578 |
</tr> |
|
579 |
<tr> |
|
580 |
<th align=right>| . $locale->text('Tax Number / SSN') . qq|</th> |
|
581 |
<td><input name=taxnumber size=20 value="$form->{taxnumber}"></td> |
|
582 |
<th align=right>| . $locale->text('USt-IdNr.') . qq|</th> |
|
583 |
<td><input name="ustid" maxlength="14" size="20" value="$form->{ustid}"></td> |
|
584 |
$customer |
|
585 |
</tr> |
|
586 |
<tr> |
|
587 |
<th align=right>| . $locale->text('Account Number') . qq|</th> |
|
588 |
<td><input name="account_number" size="10" maxlength="15" value="$form->{account_number}"></td> |
|
589 |
<th align=right>| . $locale->text('Bank Code Number') . qq|</th> |
|
590 |
<td><input name="bank_code" size="10" maxlength="10" value="$form->{bank_code}"></td> |
|
591 |
<th align=right>| . $locale->text('Bank') . qq|</th> |
|
592 |
<td><input name=bank size=30 value="$form->{bank}"></td> |
|
593 |
</tr> |
|
594 |
<tr> |
|
595 |
$business |
|
596 |
<th align=right>| . $locale->text('Language') . qq|</th> |
|
597 |
<td><select name=language_id>$lang |
|
598 |
</select></td>|; |
|
599 |
|
|
600 |
if ($form->{db} eq 'customer') { |
|
601 |
|
|
602 |
print qq| |
|
603 |
<th align=right>| . $locale->text('Preisklasse') . qq|</th> |
|
604 |
<td>$pricegroup</td>|; |
|
605 |
} |
|
606 |
print qq| </tr> |
|
607 |
<tr> |
|
608 |
<td align=right>| . $locale->text('Obsolete') . qq|</td> |
|
609 |
<td><input name=obsolete class=checkbox type=checkbox value=1 $form->{obsolete}></td> |
|
610 |
</tr> |
|
611 |
<tr> |
|
612 |
$taxzone |
|
613 |
$salesman |
|
614 |
</tr> |
|
615 |
</table> |
|
616 |
<table> |
|
617 |
<tr> |
|
618 |
<th align=left nowrap>| . $locale->text('Notes') . qq|</th> |
|
619 |
</tr> |
|
620 |
<tr> |
|
621 |
<td><textarea name=notes rows=3 cols=60 wrap=soft>$form->{notes}</textarea></td> |
|
622 |
</tr> |
|
623 |
|
|
624 |
</table> |
|
625 |
</td> |
|
626 |
</tr> |
|
627 |
</table> |
|
628 |
<br style="clear: left" /></div>|; |
|
629 |
|
|
630 |
print qq| |
|
631 |
<div id="shipto" class="tabcontent"> |
|
632 |
|
|
633 |
<table width=100%> |
|
634 |
$shipto |
|
635 |
<tr> |
|
636 |
<th align=right nowrap>| . $locale->text('Company Name') . qq|</th> |
|
637 |
<td><input id=shiptoname name=shiptoname size=35 maxlength=75 value="$form->{shiptoname}"></td> |
|
638 |
</tr> |
|
639 |
<tr> |
|
640 |
<th align=right nowrap>| . $locale->text('Abteilung') . qq|</th> |
|
641 |
<td><input id=shiptodepartment_1 name=shiptodepartment_1 size=16 maxlength=75 value="$form->{shiptodepartment_1}"> |
|
642 |
<input id=shiptodepartment_2 name=shiptodepartment_2 size=16 maxlength=75 value="$form->{shiptodepartment_2}"></td> |
|
643 |
</tr> |
|
644 |
<tr> |
|
645 |
<th align=right nowrap>| . $locale->text('Street') . qq|</th> |
|
646 |
<td><input id=shiptostreet name=shiptostreet size=35 maxlength=75 value="$form->{shiptostreet}"></td> |
|
647 |
</tr> |
|
648 |
<tr> |
|
649 |
<th align=right nowrap>| |
|
650 |
. $locale->text('Zipcode') . "/" . $locale->text('City') . qq|</th> |
|
651 |
<td><input id=shiptozipcode name=shiptozipcode size=5 maxlength=75 value="$form->{shiptozipcode}"> |
|
652 |
<input id=shiptocity name=shiptocity size=30 maxlength=75 value="$form->{shiptocity}"></td> |
|
653 |
</tr> |
|
654 |
<tr> |
|
655 |
<th align=right nowrap>| . $locale->text('Country') . qq|</th> |
|
656 |
<td><input id=shiptocountry name=shiptocountry size=35 maxlength=75 value="$form->{shiptocountry}"></td> |
|
657 |
</tr> |
|
658 |
<tr> |
|
659 |
<th align=right nowrap>| . $locale->text('Contact') . qq|</th> |
|
660 |
<td><input id=shiptocontact name=shiptocontact size=30 maxlength=75 value="$form->{shiptocontact}"></td> |
|
661 |
</tr> |
|
662 |
<tr> |
|
663 |
<th align=right nowrap>| . $locale->text('Phone') . qq|</th> |
|
664 |
<td><input id=shiptophone name=shiptophone size=30 maxlength=30 value="$form->{shiptophone}"></td> |
|
665 |
</tr> |
|
666 |
<tr> |
|
667 |
<th align=right nowrap>| . $locale->text('Fax') . qq|</th> |
|
668 |
<td><input id=shiptofax name=shiptofax size=30 maxlength=30 value="$form->{shiptofax}"></td> |
|
669 |
</tr> |
|
670 |
<tr> |
|
671 |
<th align=right nowrap>| . $locale->text('E-mail') . qq|</th> |
|
672 |
<td><input id=shiptoemail name=shiptoemail size=45 value="$form->{shiptoemail}"></td> |
|
673 |
</tr> |
|
674 |
<tr> |
|
675 |
<td> </td> |
|
676 |
</tr> |
|
677 |
<tr> |
|
678 |
<td> </td> |
|
679 |
</tr> |
|
680 |
|
|
681 |
</table> |
|
682 |
<br style="clear: left" /></div>|; |
|
683 |
|
|
684 |
|
|
685 |
##LINET - added fields for contact person |
|
686 |
print qq| |
|
687 |
<div id="contacts" class="tabcontent"> |
|
688 |
<table> |
|
689 |
<tr> |
|
690 |
<td colspan=3> |
|
691 |
<input type=hidden name=cp_id value=$form->{cp_id}> |
|
692 |
<table> |
|
693 |
$ansprechpartner |
|
694 |
<tr> |
|
695 |
<th align=left nowrap>| . $locale->text('Greeting') . qq|</th> |
|
696 |
<td><input id=cp_greeting name=cp_greeting size=40 maxlength=75 value="$form->{cp_greeting}"> |
|
697 |
$select_greeting</td> |
|
698 |
</tr> |
|
699 |
<tr> |
|
700 |
<th align=left nowrap>| . $locale->text('Title') . qq|</th> |
|
701 |
<td><input id=cp_title name=cp_title size=40 maxlength=75 value="$form->{cp_title}"> |
|
702 |
$select_title</td> |
|
703 |
</tr> |
|
704 |
<tr> |
|
705 |
<th align=left nowrap>| . $locale->text('Department') . qq|</th> |
|
706 |
<td><input id=cp_abteilung name=cp_abteilung size=40 value="$form->{cp_abteilung}"> |
|
707 |
$select_department</td> |
|
708 |
</tr> |
|
709 |
<tr> |
|
710 |
<th align=left nowrap>| |
|
711 |
. $locale->text('Given Name') . qq|</th> |
|
712 |
<td><input id="cp_givenname" name="cp_givenname" size="40" maxlength="75" value="$form->{cp_givenname}"></td> |
|
713 |
</tr> |
|
714 |
<tr> |
|
715 |
<th align=left nowrap>| . $locale->text('Name') . qq|</th> |
|
716 |
<td><input id="cp_name" name="cp_name" size="40" maxlength="75" value="$form->{cp_name}"></td> |
|
717 |
</tr> |
|
718 |
<tr> |
|
719 |
<th align=left nowrap>| . $locale->text('Phone1') . qq|</th> |
|
720 |
<td><input id="cp_phone1" name="cp_phone1" size="40" maxlength="75" value="$form->{cp_phone1}"></td> |
|
721 |
</tr> |
|
722 |
<tr> |
|
723 |
<th align=left nowrap>| . $locale->text('Phone2') . qq|</th> |
|
724 |
<td><input id="cp_phone2" name="cp_phone2" size="40" maxlength="75" value="$form->{cp_phone2}"></td> |
|
725 |
</tr> |
|
726 |
<tr> |
|
727 |
<th align=left nowrap>| . $locale->text('Fax') . qq|</th> |
|
728 |
<td><input id=cp_fax name=cp_fax size=40 value="$form->{cp_fax}"></td> |
|
729 |
</tr> |
|
730 |
<tr> |
|
731 |
<th align=left nowrap>| . $locale->text('Mobile1') . qq|</th> |
|
732 |
<td><input id=cp_mobile1 name=cp_mobile1 size=40 value="$form->{cp_mobile1}"></td> |
|
733 |
</tr> |
|
734 |
<tr> |
|
735 |
<th align=left nowrap>| . $locale->text('Mobile2') . qq|</th> |
|
736 |
<td><input id=cp_mobile2 name=cp_mobile2 size=40 value="$form->{cp_mobile2}"></td> |
|
737 |
</tr> |
|
738 |
<tr> |
|
739 |
<th align=left nowrap>| . $locale->text('Sat. Phone') . qq|</th> |
|
740 |
<td><input id=cp_satphone name=cp_satphone size=40 value="$form->{cp_satphone}"></td> |
|
741 |
</tr> |
|
742 |
<tr> |
|
743 |
<th align=left nowrap>| . $locale->text('Sat. Fax') . qq|</th> |
|
744 |
<td><input id=cp_satfax name=cp_satfax size=40 value="$form->{cp_satfax}"></td> |
|
745 |
</tr> |
|
746 |
<tr> |
|
747 |
<th align=left nowrap>| . $locale->text('Project') . qq|</th> |
|
748 |
<td><input id=cp_project name=cp_project size=40 value="$form->{cp_project}"></td> |
|
749 |
</tr> |
|
750 |
<tr> |
|
751 |
<th align=left nowrap>| . $locale->text('E-mail') . qq|</th> |
|
752 |
<td><input id=cp_email name=cp_email size=40 value="$form->{cp_email}"></td> |
|
753 |
</tr> |
|
754 |
<tr> |
|
755 |
<th align=left nowrap>| . $locale->text('Private Phone') . qq|</th> |
|
756 |
<td><input id=cp_privatphone name=cp_privatphone size=40 value="$form->{cp_privatphone}"></td> |
|
757 |
</tr> |
|
758 |
<tr> |
|
759 |
<th align=left nowrap>| . $locale->text('Private E-mail') . qq|</th> |
|
760 |
<td><input id=cp_privatemail name=cp_privatemail size=40 value="$form->{cp_privatemail}"></td> |
|
761 |
</tr> |
|
762 |
<tr> |
|
763 |
<th align=left nowrap>| . $locale->text('Birthday') . qq|</th> |
|
764 |
<td><input id=cp_birthday name=cp_birthday size=40 value="$form->{cp_birthday}"></td> |
|
765 |
</tr> |
|
766 |
|
|
767 |
</table> |
|
768 |
</td> |
|
769 |
</tr> |
|
770 |
<tr height="5"></tr>|; |
|
771 |
##/LINET |
|
772 |
print qq| $bcc |
|
773 |
$tax |
|
774 |
</table> |
|
775 |
</td> |
|
776 |
</tr> |
|
777 |
<tr> |
|
778 |
<td> |
|
779 |
|
|
780 |
<br style="clear: left" /></div> |
|
781 |
<div id="deliveries" class="tabcontent"> |
|
782 |
<table> |
|
783 |
$delivery |
|
784 |
<tr> |
|
785 |
<th align=left nowrap>| . $locale->text('From') . qq|</th> |
|
786 |
<td><input id=from name=from size=10 maxlength=10 value="$form->{from}"> |
|
787 |
<input type="button" name="fromB" id="trigger_from" value="?"></td> |
|
788 |
<th align=left nowrap>| . $locale->text('To (time)') . qq|</th> |
|
789 |
<td><input id=to name=to size=10 maxlength=10 value="$form->{to}"> |
|
790 |
<input type="button" name="toB" id="trigger_to" value="?"></td> |
|
791 |
</tr> |
|
792 |
<tr> |
|
793 |
<td colspan=4> |
|
794 |
<div id=delivery> |
|
795 |
</div> |
|
796 |
</td> |
|
797 |
</tr> |
|
798 |
</table> |
|
799 |
<br style="clear: left" /></div> |
|
800 |
|
|
801 |
</div> |
|
802 |
|
|
803 |
| . $form->write_trigger(\%myconfig, 2, "fromB", "BL", "trigger_from", |
|
804 |
"toB", "BL", "trigger_to"); |
|
267 |
print $form->parse_html_template('ct/form_header'); |
|
805 | 268 |
|
806 | 269 |
$lxdebug->leave_sub(); |
807 | 270 |
} |
Auch abrufbar als: Unified diff
Customer/Vendor add/edit Dialog auf templates umgestellt.