Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision c98a426e

Von Moritz Bunkus vor fast 18 Jahren hinzugefügt

  • ID c98a426e3bc4461e663570ca4da8c12091daa7a9
  • Vorgänger 2b664a1f
  • Nachfolger 652397fc

Die Buchungsgruppen sortierbar gemacht.

Unterschiede anzeigen:

bin/mozilla/am.pl
1782 1782

  
1783 1783
  $form->{title} = $locale->text('Buchungsgruppen');
1784 1784

  
1785
  @column_index = qw(description inventory_accno income_accno_0 expense_accno_0 income_accno_1 expense_accno_1 income_accno_2 expense_accno_2 income_accno_3 expense_accno_3 );
1786

  
1785
  @column_index = qw(up down description inventory_accno
1786
                     income_accno_0 expense_accno_0
1787
                     income_accno_1 expense_accno_1
1788
                     income_accno_2 expense_accno_2
1789
                     income_accno_3 expense_accno_3 );
1790

  
1791
  $column_header{up} =
1792
      qq|<th class="listheading">|
1793
    . qq|<img src="image/up.png" alt="| . $locale->text("up") . qq|">|
1794
    . qq|</th>|;
1795
  $column_header{down} =
1796
      qq|<th class="listheading">|
1797
    . qq|<img src="image/down.png" alt="| . $locale->text("down") . qq|">|
1798
    . qq|</th>|;
1787 1799
  $column_header{description} =
1788
      qq|<th class=listheading width=60%>|
1800
      qq|<th class="listheading" width="40%">|
1789 1801
    . $locale->text('Description')
1790 1802
    . qq|</th>|;
1791 1803
  $column_header{inventory_accno} =
1792
      qq|<th class=listheading width=10%>|
1804
      qq|<th class=listheading>|
1793 1805
    . $locale->text('Bestandskonto')
1794 1806
    . qq|</th>|;
1795 1807
  $column_header{income_accno_0} =
......
1846 1858
        </tr>
1847 1859
|;
1848 1860

  
1861
  my $swap_link = qq|$form->{script}?action=swap_buchungsgruppen&|;
1862
  map({ $swap_link .= $_ . "=" . $form->escape($form->{$_}) . "&" }
1863
      qw(login password path));
1864

  
1865
  my $row = 0;
1849 1866
  foreach $ref (@{ $form->{ALL} }) {
1850 1867

  
1851 1868
    $i++;
......
1855 1872
        <tr valign=top class=listrow$i>
1856 1873
|;
1857 1874

  
1875
    if ($row) {
1876
      my $pref = $form->{ALL}->[$row - 1];
1877
      $column_data{up} =
1878
        qq|<td align="center" valign="center">| .
1879
        qq|<a href="${swap_link}id1=$ref->{id}&id2=$pref->{id}">| .
1880
        qq|<img src="image/up.png" alt="| . $locale->text("up") . qq|">| .
1881
        qq|</a></td>|;
1882
    } else {
1883
      $column_data{up} = qq|<td>&nbsp;</td>|;
1884
    }
1885

  
1886
    if ($row == (scalar(@{ $form->{ALL} }) - 1)) {
1887
      $column_data{down} = qq|<td>&nbsp;</td>|;
1888
    } else {
1889
      my $nref = $form->{ALL}->[$row + 1];
1890
      $column_data{down} =
1891
        qq|<td align="center" valign="center">| .
1892
        qq|<a href="${swap_link}id1=$ref->{id}&id2=$nref->{id}">| .
1893
        qq|<img src="image/down.png" alt="| . $locale->text("down") . qq|">| .
1894
        qq|</a></td>|;
1895
    }
1858 1896

  
1859 1897
    $column_data{description} =
1860 1898
      qq|<td><a href=$form->{script}?action=edit_buchungsgruppe&id=$ref->{id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{description}</td>|;
......
1877 1915
    print qq|
1878 1916
	</tr>
1879 1917
|;
1918

  
1919
    $row++;
1880 1920
  }
1881 1921

  
1882 1922
  print qq|
......
2071 2111
  $lxdebug->leave_sub();
2072 2112
}
2073 2113

  
2114
sub swap_buchungsgruppen {
2115
  $lxdebug->enter_sub();
2116

  
2117
  AM->swap_buchungsgruppen(\%myconfig, $form);
2118
  list_buchungsgruppe();
2119

  
2120
  $lxdebug->leave_sub();
2121
}
2122

  
2074 2123

  
2075 2124
sub add_printer {
2076 2125
  $lxdebug->enter_sub();

Auch abrufbar als: Unified diff