Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision bce93dd4

Von Sven Schöling vor mehr als 3 Jahren hinzugefügt

  • ID bce93dd4b0fbdcee9a7b8d53bae7c7a2e3b319bc
  • Vorgänger 139ae60d
  • Nachfolger f28c26b9

CGI.pm nicht mehr als html Generator verwenden

Die restlichen Vorkommen sind jetzt noch

- header
- redirect
- cookie

und sind alle der Form: $::request->cgi->...

Unterschiede anzeigen:

bin/mozilla/ar.pl
52 52
use SL::DB::Tax;
53 53
use SL::Helper::Flash qw(flash);
54 54
use SL::Locale::String qw(t8);
55
use SL::Presenter::Tag;
55
use SL::Presenter::Tag qw(checkbox_tag hidden_tag select_tag);
56 56
use SL::Presenter::Chart;
57 57
use SL::ReportGenerator;
58 58

  
......
354 354
  my $form     = $main::form;
355 355
  my %myconfig = %main::myconfig;
356 356
  my $locale   = $main::locale;
357
  my $cgi      = $::request->{cgi};
358 357

  
359 358
  $form->{invoice_obj} = _retrieve_invoice_object();
360 359

  
......
395 394

  
396 395
  my %project_labels = map { $_->{id} => $_->{projectnumber} } @{ $form->{"ALL_PROJECTS"} };
397 396

  
398
  my (@AR_paid_values, %AR_paid_labels);
397
  my @AR_paid_values;
399 398
  my $default_ar_amount_chart_id;
400 399

  
401 400
  foreach my $item (@{ $form->{ALL_CHARTS} }) {
......
403 402
      $default_ar_amount_chart_id //= $item->{id};
404 403

  
405 404
    } elsif ($item->{link_split}{AR_paid}) {
406
      push(@AR_paid_values, $item->{accno});
407
      $AR_paid_labels{$item->{accno}} = "$item->{accno}--$item->{description}";
405
      push @AR_paid_values, [ $item->{accno}, "$item->{accno}--$item->{description}" ];
408 406
    }
409 407
  }
410 408

  
......
427 425
      project_id => ($i==$form->{rowcount}) ? $form->{globalproject_id} : $form->{"project_id_$i"},
428 426
    };
429 427

  
430
    my (%taxchart_labels, @taxchart_values, $default_taxchart, $taxchart_to_use);
428
    my (@taxchart_values, $default_taxchart, $taxchart_to_use);
431 429
    my $amount_chart_id = $form->{"AR_amount_chart_id_$i"} // $default_ar_amount_chart_id;
432 430

  
433 431
    my $used_tax_id;
......
440 438
      $default_taxchart   = $item if $item->{is_default};
441 439
      $taxchart_to_use    = $item if $key eq $form->{"taxchart_$i"};
442 440

  
443
      push(@taxchart_values, $key);
444
      $taxchart_labels{$key} = $item->taxkey . " - " . $item->taxdescription . " " . $item->rate * 100 . ' %';
441
      push @taxchart_values, [ $key, $item->taxkey . " - " . $item->taxdescription . " " . $item->rate * 100 . ' %' ];
445 442
    }
446 443

  
447 444
    $taxchart_to_use    //= $default_taxchart // $first_taxchart;
......
452 449
      . SL::Presenter::Tag::hidden_tag("previous_AR_amount_chart_id_$i", $amount_chart_id);
453 450

  
454 451
    $transaction->{taxchart} =
455
      NTI($cgi->popup_menu('-name' => "taxchart_$i",
456
                           '-id' => "taxchart_$i",
457
                           '-style' => 'width:200px',
458
                           '-values' => \@taxchart_values,
459
                           '-labels' => \%taxchart_labels,
460
                           '-default' => $selected_taxchart));
452
      select_tag("taxchart_$i", \@taxchart_values, id => "taxchart_$i", style => 'width:200px', default => $selected_taxchart);
461 453

  
462 454
    push @transactions, $transaction;
463 455
  }
......
488 480
    $form->{accno_arap} = IS->get_standard_accno_current_assets(\%myconfig, \%$form);
489 481

  
490 482
    $payment->{selectAR_paid} =
491
      NTI($cgi->popup_menu('-name' => "AR_paid_$i",
492
                           '-id' => "AR_paid_$i",
493
                           '-values' => \@AR_paid_values,
494
                           '-labels' => \%AR_paid_labels,
495
                           '-default' => $payment->{AR_paid} || $form->{accno_arap}));
483
      select_tag("AR_paid_$i", \@AR_paid_values, id => "AR_paid_$i", default => $payment->{AR_paid} || $form->{accno_arap});
496 484

  
497 485

  
498 486

  
......
556 544
  my $form     = $main::form;
557 545
  my %myconfig = %main::myconfig;
558 546
  my $locale   = $main::locale;
559
  my $cgi      = $::request->{cgi};
560 547

  
561 548
  if ( $form->{id} ) {
562 549
    my $follow_ups = FU->follow_ups('trans_id' => $form->{id}, 'not_done' => 1);
......
944 931
  my $form     = $main::form;
945 932
  my %myconfig = %main::myconfig;
946 933
  my $locale   = $main::locale;
947
  my $cgi      = $::request->{cgi};
948 934

  
949 935
  $form->{title} = $locale->text('Invoices, Credit Notes & AR Transactions');
950 936

  

Auch abrufbar als: Unified diff