Revision 03daa77e
Von Moritz Bunkus vor mehr als 17 Jahren hinzugefügt
SL/Form.pm | ||
---|---|---|
1611 | 1611 |
sub _get_employees { |
1612 | 1612 |
$main::lxdebug->enter_sub(); |
1613 | 1613 |
|
1614 |
my ($self, $dbh, $key) = @_; |
|
1615 |
|
|
1616 |
$key = "all_employees" unless ($key); |
|
1617 |
$self->{$key} = |
|
1618 |
selectall_hashref_query($self, $dbh, qq|SELECT * FROM employee|); |
|
1619 |
|
|
1620 |
$main::lxdebug->leave_sub(); |
|
1621 |
} |
|
1614 |
my ($self, $dbh, $default_key, $key) = @_; |
|
1622 | 1615 |
|
1623 |
sub _get_salesmen { |
|
1624 |
$main::lxdebug->enter_sub(); |
|
1625 |
|
|
1626 |
my ($self, $dbh, $key) = @_; |
|
1627 |
|
|
1628 |
$key = "all_salesmen" unless ($key); |
|
1629 |
$self->{$key} = |
|
1630 |
selectall_hashref_query($self, $dbh, qq|SELECT * FROM employee|); |
|
1616 |
$key = $default_key unless ($key); |
|
1617 |
$self->{$key} = selectall_hashref_query($self, $dbh, qq|SELECT * FROM employee ORDER BY name|); |
|
1631 | 1618 |
|
1632 | 1619 |
$main::lxdebug->leave_sub(); |
1633 | 1620 |
} |
... | ... | |
1707 | 1694 |
|
1708 | 1695 |
$key = "all_customers" unless ($key); |
1709 | 1696 |
|
1710 |
my $query = qq|SELECT * FROM customer|; |
|
1697 |
my $query = qq|SELECT * FROM customer ORDER BY name|;
|
|
1711 | 1698 |
|
1712 | 1699 |
$self->{$key} = selectall_hashref_query($self, $dbh, $query); |
1713 | 1700 |
|
... | ... | |
1721 | 1708 |
|
1722 | 1709 |
$key = "all_vendors" unless ($key); |
1723 | 1710 |
|
1724 |
my $query = qq|SELECT * FROM vendor|; |
|
1711 |
my $query = qq|SELECT * FROM vendor ORDER BY name|;
|
|
1725 | 1712 |
|
1726 | 1713 |
$self->{$key} = selectall_hashref_query($self, $dbh, $query); |
1727 | 1714 |
|
... | ... | |
1735 | 1722 |
|
1736 | 1723 |
$key = "all_departments" unless ($key); |
1737 | 1724 |
|
1738 |
my $query = qq|SELECT * FROM department|; |
|
1725 |
my $query = qq|SELECT * FROM department ORDER BY description|;
|
|
1739 | 1726 |
|
1740 | 1727 |
$self->{$key} = selectall_hashref_query($self, $dbh, $query); |
1741 | 1728 |
|
... | ... | |
1789 | 1776 |
} |
1790 | 1777 |
|
1791 | 1778 |
if ($params{"employees"}) { |
1792 |
$self->_get_employees($dbh, $params{"employees"}); |
|
1779 |
$self->_get_employees($dbh, "all_employees", $params{"employees"});
|
|
1793 | 1780 |
} |
1794 | 1781 |
|
1795 | 1782 |
if ($params{"salesmen"}) { |
1796 |
$self->_get_salesmen($dbh, $params{"salesmen"});
|
|
1783 |
$self->_get_employees($dbh, "all_salesmen", $params{"salesmen"});
|
|
1797 | 1784 |
} |
1798 | 1785 |
|
1799 | 1786 |
if ($params{"business_types"}) { |
Auch abrufbar als: Unified diff
Diverse Listen nach Namen sortieren. Fix für Bug 661.