Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 134ecd71

Von Moritz Bunkus vor fast 18 Jahren hinzugefügt

  • ID 134ecd713fae927536c69259fbd3489f0925fc3f
  • Vorgänger 960160dc
  • Nachfolger d4651135

Buchungsjournal: Filtermöglichkeit nach Projekten sowie das Anzeigen von Projektnummern implementiert.

Unterschiede anzeigen:

bin/mozilla/gl.pl
227 227
	</tr>
228 228
| if $form->{selectdepartment};
229 229

  
230
  $form->get_lists("projects" => { "key" => "ALL_PROJECTS",
231
                                   "all" => 1 });
232

  
233
  my %project_labels = ();
234
  my @project_values = ("");
235
  foreach my $item (@{ $form->{"ALL_PROJECTS"} }) {
236
    push(@project_values, $item->{"id"});
237
    $project_labels{$item->{"id"}} = $item->{"projectnumber"};
238
  }
239

  
240
  my $projectnumber =
241
    NTI($cgi->popup_menu('-name' => "project_id",
242
                         '-values' => \@project_values,
243
                         '-labels' => \%project_labels));
244

  
230 245
  # use JavaScript Calendar or not
231 246
  $form->{jsscript} = $jscalendar;
232 247
  $jsscript = "";
......
289 304
	  <th align=right>| . $locale->text('Notes') . qq|</th>
290 305
	  <td colspan=3><input name=notes size=40></td>
291 306
	</tr>
307
	<tr>
308
	  <th align=right>| . $locale->text('Project Number') . qq|</th>
309
	  <td colspan=3>$projectnumber</td>
310
	</tr>
292 311
	<tr>
293 312
	  <th align=right>| . $locale->text('From') . qq|</th>
294 313
          $button1
......
342 361
		  <tr>
343 362
		    <td align=right><input name="l_subtotal" class=checkbox type=checkbox value=Y></td>
344 363
		    <td>| . $locale->text('Subtotal') . qq|</td>
364
		    <td align=right><input name="l_projectnumbers" class=checkbox type=checkbox value=Y></td>
365
		    <td>| . $locale->text('Project Number') . qq|</td>
345 366
		  </tr>
346 367
		</table>
347 368
	      </tr>
......
447 468
    $option   .= "\n<br>" if $option;
448 469
    $option   .= $locale->text('Notes') . " : $form->{notes}";
449 470
  }
471
 if ($form->{project_id}) {
472
    $href     .= "&project_id=" . $form->escape($form->{project_id});
473
    $callback .= "&project_id=" . $form->escape($form->{project_id});
474
  }
450 475

  
451 476
  if ($form->{datefrom}) {
452 477
    $href     .= "&datefrom=$form->{datefrom}";
......
469 494
      . $locale->date(\%myconfig, $form->{dateto}, 1);
470 495
  }
471 496

  
472
  @columns = $form->sort_columns(
473
    qw(transdate id reference description notes source debit debit_accno credit credit_accno debit_tax debit_tax_accno credit_tax credit_tax_accno accno gifi_accno)
474
  );
497
  @columns =
498
    qw(transdate id reference description notes source debit debit_accno credit
499
       credit_accno debit_tax debit_tax_accno credit_tax credit_tax_accno accno
500
       gifi_accno projectnumbers);
475 501

  
476 502
  if ($form->{accno} || $form->{gifi_accno}) {
477 503
    @columns = grep !/(accno|gifi_accno)/, @columns;
......
560 586
    . $locale->text('GIFI')
561 587
    . "</a></th>";
562 588
  $column_header{balance} = "<th>" . $locale->text('Balance') . "</th>";
589
  $column_header{projectnumbers} =
590
      "<th class=listheading>"  . $locale->text('Project Numbers') . "</th>";
563 591

  
564 592
  $form->{landscape} = 1;
565 593

  
......
789 817
    $column_data{balance} =
790 818
      "<td align=right>"
791 819
      . $form->format_amount(\%myconfig, $form->{balance}, 2, 0) . "</td>";
820
    $column_data{projectnumbers} =
821
      "<td>" . join(", ", sort({ lc($a) cmp lc($b) } keys(%{ $ref->{projectnumbers} }))) . "</td>";
792 822

  
793 823
    $i++;
794 824
    $i %= 2;

Auch abrufbar als: Unified diff