Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision ee792a3f

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

  • ID ee792a3f74896ac23931fc34451d17ec95ac03cd
  • Vorgänger 4cc5904b
  • Nachfolger 58d115ff

Aufräumen.

Unterschiede anzeigen:

bin/mozilla/is.pl
89 89
  $main::lxdebug->enter_sub();
90 90

  
91 91
  my $form     = $main::form;
92
  my $locale   = $main::locale;
92 93

  
93 94
  $main::auth->assert('invoice_edit');
94 95

  
......
96 97
  $form->{javascript} = qq|<script type="text/javascript" src="js/show_history.js"></script>|;
97 98
  #/show hhistory button
98 99

  
99
  $edit = 1;
100
  if ($form->{type} eq "credit_note") {
101
    $form->{title} = $locale->text('Edit Credit Note');
102
    $form->{title} = $locale->text('Edit Storno Credit Note') if $form->{storno};
103
  } else {
104
    $form->{title} = $locale->text('Edit Sales Invoice');
105
    $form->{title} = $locale->text('Edit Storno Invoice')     if $form->{storno};
106
  }
107

  
100 108
  my ($language_id, $printer_id);
101 109
  if ($form->{print_and_post}) {
102 110
    $form->{action}   = "print";
......
309 317
  $form->{employee_id} = $form->{old_employee_id} if $form->{old_employee_id};
310 318
  $form->{salesman_id} = $form->{old_salesman_id} if $form->{old_salesman_id};
311 319

  
312
  if ($edit) {
313
    if ($form->{type} eq "credit_note") {
314
      $form->{title} = $locale->text('Edit Credit Note');
315
      $form->{title} = $locale->text('Edit Storno Credit Note') if $form->{storno};
316
    } else {
317
      $form->{title} = $locale->text('Edit Sales Invoice');
318
      $form->{title} = $locale->text('Edit Storno Invoice')     if $form->{storno};
319
    }
320
  }
321 320
  $form->{defaultcurrency} = $form->get_default_currency(\%myconfig);
322 321
  $form->{radier}          = ($form->current_date(\%myconfig) eq $form->{gldate}) ? 1 : 0;
323 322

  
......
332 331

  
333 332
  my $set_duedate_url = "$form->{script}?action=set_duedate";
334 333

  
335
  my $pjx = new CGI::Ajax( 'set_duedate' => $set_duedate_url );
336
  push(@ { $form->{AJAX} }, $pjx);
334
  push @ { $form->{AJAX} }, new CGI::Ajax( 'set_duedate' => $set_duedate_url );
337 335

  
338 336
  my @old_project_ids = ($form->{"globalproject_id"});
339 337
  map { push @old_project_ids, $form->{"project_id_$_"} if $form->{"project_id_$_"}; } 1..$form->{"rowcount"};
......
383 381
  $TMPL_VAR{customer_name} = $follow_up_vc;
384 382

  
385 383
# set option selected
386
  foreach my $item (qw(AR customer currency department employee)) {
384
  foreach my $item (qw(AR)) {
387 385
    $form->{"select$item"} =~ s/ selected//;
388 386
    $form->{"select$item"} =~ s/option>\Q$form->{$item}\E/option selected>$form->{$item}/;
389 387
  }
390 388

  
391
  $TMPL_VAR{is_type_credit_note} = $form->{type} eq "credit_note";
392
  $TMPL_VAR{is_format_html} = $form->{format} eq 'html';
393
  $TMPL_VAR{dateformat} = $myconfig{dateformat};
394
  $TMPL_VAR{numberformat} = $myconfig{numberformat};
389
  $TMPL_VAR{is_type_credit_note} = $form->{type}   eq "credit_note";
390
  $TMPL_VAR{is_format_html}      = $form->{format} eq 'html';
391
  $TMPL_VAR{dateformat}          = $myconfig{dateformat};
392
  $TMPL_VAR{numberformat}        = $myconfig{numberformat};
395 393

  
396 394
  # hiddens
397 395
  $TMPL_VAR{HIDDEN} = [qw(
......
407 405
  $form->{jsscript} = 1;
408 406
  $form->header();
409 407

  
410
#  print qq|
411
#<body onLoad="$onload">
412
#<script type="text/javascript" src="js/common.js"></script>
413
#<script type="text/javascript" src="js/delivery_customer_selection.js"></script>
414
#<script type="text/javascript" src="js/vendor_selection.js"></script>
415
#<script type="text/javascript" src="js/calculate_qty.js"></script>
416
#<script type="text/javascript" src="js/follow_up.js"></script>
417
#
418
#<form method="post" name="invoice" action="$form->{script}">
419
#| ;
420
#
421
#  $form->hide_form(qw(id action type media format queued printed emailed title vc discount
422
#                      creditlimit creditremaining tradediscount business closedto locked shipped storno storno_id
423
#                      max_dunning_level dunning_amount
424
#                      shiptoname shiptostreet shiptozipcode shiptocity shiptocountry  shiptocontact shiptophone shiptofax
425
#                      shiptoemail shiptodepartment_1 shiptodepartment_2 message email subject cc bcc taxaccounts cursor_fokus
426
#                      convert_from_do_ids convert_from_oe_ids),
427
#                      map { $_.'_rate', $_.'_description', $_.'_taxnumber' } split / /, $form->{taxaccounts} );
428
#
429
#  print qq|<p>$form->{saved_message}</p>| if $form->{saved_message};
430
#
431
#  print qq|
432
#
433
#<input type="hidden" name="follow_up_trans_id_1" value="| . H($form->{id}) . qq|">
434
#<input type="hidden" name="follow_up_trans_type_1" value="sales_invoice">
435
#<input type="hidden" name="follow_up_trans_info_1" value="| . H($follow_up_trans_info) . qq|">
436
#<input type="hidden" name="follow_up_rowcount" value="1">
437
#
438
#<input type="hidden" name="lizenzen" value="$lizenzen">
439
#
440
#<div class="listtop" width="100%">$form->{title}</div>
441
#
442
#<table width="100%">
443
#  <tr>
444
#    <td valign="top">
445
#      <table>
446
#        <tr>
447
#          $customers
448
#          <input type="hidden" name="customer_klass" value="| . H($form->{customer_klass}) . qq|">
449
#          <input type="hidden" name="customer_id" value="| . H($form->{customer_id}) . qq|">
450
#          <input type="hidden" name="oldcustomer" value="| . H($form->{oldcustomer}) . qq|">
451
#          <input type="hidden" name="selectcustomer" value="| . H($form->{selectcustomer}) . qq|">
452
#        </tr>
453
#        $contact
454
#        $shipto
455
#        <tr>
456
#          <td align="right">| . $locale->text('Credit Limit') . qq|</td>
457
#          <td>$form->{creditlimit}; | . $locale->text('Remaining') . qq| <span class="plus$n">$form->{creditremaining}</span></td>
458
#        </tr>
459
#        $dunning
460
#        $business
461
#	      <tr>
462
#		<th align="right" nowrap>| . $locale->text('Record in') . qq|</th>
463
#		<td colspan="3"><select name="AR" style="width:250px;">$form->{selectAR}</select></td>
464
#		<input type="hidden" name="selectAR" value="$form->{selectAR}">
465
#	      </tr>
466
#              $taxzone
467
#	      $department
468
#	      <tr>
469
#    $currencies
470
#		<input type="hidden" name="fxgain_accno" value="$form->{fxgain_accno}">
471
#		<input type="hidden" name="fxloss_accno" value="$form->{fxloss_accno}">
472
#		$exchangerate
473
#	      </tr>
474
#	      <tr>
475
#		<th align="right" nowrap>| . $locale->text('Shipping Point') . qq|</th>
476
#		<td colspan="3"> | .
477
#		$cgi->textfield("-name" => "shippingpoint", "-size" => 35, "-value" => $form->{shippingpoint}) .
478
#      	  qq|	</td>
479
#	      </tr>
480
#	      <tr>
481
#		<th align="right" nowrap>| . $locale->text('Ship via') . qq|</th>
482
#		<td colspan="3"> | .
483
#		$cgi->textfield("-name" => "shipvia", "-size" => 35, "-value" => $form->{shipvia}) .
484
#	  qq|	</td>
485
#	      </tr>
486
#              <tr>
487
#                <th align="right">| . $locale->text('Transaction description') . qq|</th>
488
#                <td colspan="3">| . $cgi->textfield("-name" => "transaction_description", "-size" => 35, "-value" => $form->{transaction_description}) . qq|</td>
489
#              </tr>|;
490
##               <tr>
491
##                 <td colspan=4>
492
##                   <table>
493
##                     <tr>
494
##                       <td colspan=2>
495
##                         <button type="button" onclick="delivery_customer_selection_window('delivery_customer_string','delivery_customer_id')">| . $locale->text('Choose Customer') . qq|</button>
496
##                       </td>
497
##                       <td colspan=2><input type=hidden name=delivery_customer_id value="$form->{delivery_customer_id}">
498
##                       <input size=45 id=delivery_customer_string name=delivery_customer_string value="$form->{delivery_customer_string}"></td>
499
##                     </tr>
500
##                     <tr>
501
##                       <td colspan=2>
502
##                         <button type="button" onclick="vendor_selection_window('delivery_vendor_string','delivery_vendor_id')">| . $locale->text('Choose Vendor') . qq|</button>
503
##                       </td>
504
##                       <td colspan=2><input type=hidden name=delivery_vendor_id value="$form->{delivery_vendor_id}">
505
##                       <input size=45 id=delivery_vendor_string name=delivery_vendor_string value="$form->{delivery_vendor_string}"></td>
506
##                     </tr>
507
##                   </table>
508
##                 </td>
509
##               </tr>
510
#print qq|	    </table>
511
#	  </td>
512
#	  <td align="right" valign="top">
513
#	    <table>
514
#	      $employees
515
#        $salesman
516
#|;
517
#
518
##ergänzung in der maske um das feld Lieferscheinnummer (Delivery Order Number), meiner meinung nach sinnvoll ueber dem feld lieferscheindatum 12.02.2009 jb
519
#if ($form->{type} eq "credit_note") {
520
#print qq|     <tr>
521
#		<th align="right" nowrap>| . $locale->text('Credit Note Number') . qq|</th>
522
#		<td> |.
523
#	        $cgi->textfield("-name" => "invnumber", "-size" => 11, "-value" => $form->{invnumber}) .
524
#      qq|	</td>
525
#	      </tr>
526
#	      <tr>
527
#		<th align="right">| . $locale->text('Credit Note Date') . qq|</th>
528
#                $button1
529
#	      </tr>|;
530
#} else {
531
#print qq|     <tr>
532
#		<th align="right" nowrap>| . $locale->text('Invoice Number') . qq|</th>
533
#		<td> |.
534
#	        $cgi->textfield("-name" => "invnumber", "-size" => 11, "-value" => $form->{invnumber}) .
535
#      qq|	</td>
536
#	      </tr>
537
#	      <tr>
538
#		<th align="right">| . $locale->text('Invoice Date') . qq|</th>
539
#                $button1
540
#	      </tr>
541
#	      <tr>
542
#		<th align="right">| . $locale->text('Due Date') . qq|</th>
543
#                $button2
544
#	      </tr>
545
#	      <tr>
546
#		<th align="right" nowrap>| . $locale->text('Delivery Order Number') . qq|</th>
547
#		<td> |.
548
#	        $cgi->textfield("-name" => "donumber", "-size" => 11, "-value" => $form->{donumber}) .
549
#      qq|	</td>
550
#	      </tr>
551
#	      <tr>
552
#		<th align="right">| . $locale->text('Delivery Date') . qq|</th>
553
#                $button3
554
#	      </tr>|;
555
#}
556
#print qq|     <tr>
557
#		<th align="right" nowrap>| . $locale->text('Order Number') . qq|</th>
558
#		<td> |.
559
#	        $cgi->textfield("-name" => "ordnumber", "-size" => 11, "-value" => $form->{ordnumber}) .
560
#      qq|	</td>
561
#	      </tr>
562
#        <tr>
563
#          <th align="right" nowrap>| . $locale->text('Order Date') . qq|</th>
564
#          <td><input name="orddate" id="orddate" size="11" title="$myconfig{dateformat}" value="| . Q($form->{orddate}) . qq|" onBlur=\"check_right_date_format(this)\">
565
#           <input type="button" name="b_orddate" id="trigger_orddate" value="?"></td>
566
#        </tr>
567
#	      <tr>
568
#		<th align="right" nowrap>| . $locale->text('Quotation Number') . qq|</th>
569
#		<td> |.
570
#	        $cgi->textfield("-name" => "quonumber", "-size" => 11, "-value" => $form->{quonumber}) .
571
#      qq|	</td>
572
#	      </tr>
573
#        <tr>
574
#          <th align="right" nowrap>| . $locale->text('Quotation Date') . qq|</th>
575
#          <td><input name="quodate" id="quodate" size="11" title="$myconfig{dateformat}" value="| . Q($form->{quodate}) . qq|" onBlur=\"check_right_date_format(this)\">
576
#           <input type="button" name="b_quodate" id="trigger_quodate" value="?"></td>
577
#        </tr>
578
#	      <tr>
579
#		<th align="right" nowrap>| . $locale->text('Customer Order Number') . qq|</th>
580
#		<td> |.
581
#	        $cgi->textfield("-name" => "cusordnumber", "-size" => 11, "-value" => $form->{cusordnumber}) .
582
#      qq|	</td>
583
#	      </tr>
584
#	      <tr>
585
#          <th align="right" nowrap>| . $locale->text('Project Number') . qq|</th>
586
#          <td>$globalprojectnumber</td>
587
#	      </tr>
588
#	    </table>
589
#          </td>
590
#	</tr>
591
#      </table>
592
#    </td>
593
#  </tr>
594
#  <tr>
595
#    <td>
596
#    </td>
597
#  </tr>
598
#  $jsscript
599
#|;
600
#  print qq|<input type="hidden" name="webdav" value="$webdav">|;
601

  
602 408
  print $form->parse_html_template("is/form_header", \%TMPL_VAR);
603 409

  
604 410
  $main::lxdebug->leave_sub();

Auch abrufbar als: Unified diff