Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 7f8599c0

Von Moritz Bunkus vor fast 12 Jahren hinzugefügt

  • ID 7f8599c0909affd56ad82fd842015bb51c6a3dbf
  • Vorgänger 5c5c1eef
  • Nachfolger 95eb8f3c

Projektverwaltung auf Rose- und Controller-Code umgestellt

Unterschiede anzeigen:

bin/mozilla/rp.pl
37 37

  
38 38
use POSIX qw(strftime);
39 39

  
40
use SL::DB::Project;
40 41
use SL::PE;
41 42
use SL::RP;
42 43
use SL::Iconv;
43 44
use SL::ReportGenerator;
44 45
use Data::Dumper;
46
use List::MoreUtils qw(any);
45 47

  
46 48
require "bin/mozilla/arap.pl";
47 49
require "bin/mozilla/common.pl";
......
213 215

  
214 216
sub continue { call_sub($main::form->{"nextsub"}); }
215 217

  
216
sub get_project {
217
  $main::lxdebug->enter_sub();
218

  
219
  $main::auth->assert('report');
220

  
221
  my $form     = $main::form;
222
  my %myconfig = %main::myconfig;
223
  my $locale   = $main::locale;
224

  
225
  my $nextsub = shift;
226

  
227
  $form->{project_id} = $form->{project_id_1};
228
  if ($form->{projectnumber} && !$form->{project_id}) {
229
    $form->{rowcount} = 1;
230

  
231
    # call this instead of update
232
    $form->{update}          = $nextsub;
233
    $form->{projectnumber_1} = $form->{projectnumber};
234

  
235
    delete $form->{sort};
236
    check_project('generate_projects');
237

  
238
    # if there is one only, assign id
239
    $form->{project_id} = $form->{project_id_1};
240
  }
241

  
242
  $main::lxdebug->leave_sub();
243
}
244

  
245 218
sub generate_income_statement {
246 219
  $main::lxdebug->enter_sub();
247 220

  
......
460 433
  my %myconfig = %main::myconfig;
461 434
  my $locale   = $main::locale;
462 435

  
463
  &get_project("generate_projects");
464
  $form->{projectnumber} = $form->{projectnumber_1};
436
  my $project            = $form->{project_id} ? SL::DB::Project->new(id => $form->{project_id})->load : undef;
437
  $form->{projectnumber} = $project ? $project->projectnumber : '';
465 438

  
466 439
  $form->{nextsub} = "generate_projects";
467 440
  $form->{title}   = $locale->text('Project Transactions');

Auch abrufbar als: Unified diff