1829 |
1829 |
$main::lxdebug->leave_sub();
|
1830 |
1830 |
}
|
1831 |
1831 |
|
1832 |
|
sub ustva {
|
1833 |
|
$main::lxdebug->enter_sub();
|
1834 |
|
|
1835 |
|
my ($self, $myconfig, $form) = @_;
|
1836 |
|
|
1837 |
|
# connect to database
|
1838 |
|
my $dbh = $form->dbconnect($myconfig);
|
1839 |
|
|
1840 |
|
my $last_period = 0;
|
1841 |
|
my @categories_cent = qw(51r 511 86r 861 97r 971 93r 931
|
1842 |
|
96 66 43 45 53 62 65 67);
|
1843 |
|
my @categories_euro = qw(48 51 86 91 97 93 94);
|
1844 |
|
$form->{decimalplaces} *= 1;
|
1845 |
|
|
1846 |
|
foreach my $item (@categories_cent) {
|
1847 |
|
$form->{"$item"} = 0;
|
1848 |
|
}
|
1849 |
|
foreach my $item (@categories_euro) {
|
1850 |
|
$form->{"$item"} = 0;
|
1851 |
|
}
|
1852 |
|
|
1853 |
|
&get_accounts_g($dbh, $last_period, $form->{fromdate}, $form->{todate}, $form, "pos_ustva");
|
1854 |
|
|
1855 |
|
# foreach $item (@categories_cent) {
|
1856 |
|
# if ($form->{$item}{"jetzt"} > 0) {
|
1857 |
|
# $form->{$item} = $form->{$item}{"jetzt"};
|
1858 |
|
# delete $form->{$item}{"jetzt"};
|
1859 |
|
# }
|
1860 |
|
# }
|
1861 |
|
# foreach $item (@categories_euro) {
|
1862 |
|
# if ($form->{$item}{"jetzt"} > 0) {
|
1863 |
|
# $form->{$item} = $form->{$item}{"jetzt"};
|
1864 |
|
# delete $form->{$item}{"jetzt"};
|
1865 |
|
# } foreach $item (@categories_cent) {
|
1866 |
|
# if ($form->{$item}{"jetzt"} > 0) {
|
1867 |
|
# $form->{$item} = $form->{$item}{"jetzt"};
|
1868 |
|
# delete $form->{$item}{"jetzt"};
|
1869 |
|
# }
|
1870 |
|
# }
|
1871 |
|
# foreach $item (@categories_euro) {
|
1872 |
|
# if ($form->{$item}{"jetzt"} > 0) {
|
1873 |
|
# $form->{$item} = $form->{$item}{"jetzt"};
|
1874 |
|
# delete $form->{$item}{"jetzt"};
|
1875 |
|
# }
|
1876 |
|
# }
|
1877 |
|
#
|
1878 |
|
# }
|
1879 |
|
|
1880 |
|
#
|
1881 |
|
# Berechnung der USTVA Formularfelder
|
1882 |
|
#
|
1883 |
|
$form->{"51r"} = $form->{"511"};
|
1884 |
|
$form->{"86r"} = $form->{"861"};
|
1885 |
|
$form->{"97r"} = $form->{"971"};
|
1886 |
|
$form->{"93r"} = $form->{"931"};
|
1887 |
|
|
1888 |
|
#$form->{"96"} = $form->{"94"} * 0.16;
|
1889 |
|
$form->{"43"} =
|
1890 |
|
$form->{"51r"} + $form->{"86r"} + $form->{"97r"} + $form->{"93r"} +
|
1891 |
|
$form->{"96"};
|
1892 |
|
$form->{"45"} = $form->{"43"};
|
1893 |
|
$form->{"53"} = $form->{"43"};
|
1894 |
|
$form->{"62"} = $form->{"43"} - $form->{"66"};
|
1895 |
|
$form->{"65"} = $form->{"43"} - $form->{"66"};
|
1896 |
|
$form->{"67"} = $form->{"43"} - $form->{"66"};
|
1897 |
|
|
1898 |
|
foreach my $item (@categories_cent) {
|
1899 |
|
$form->{$item} =
|
1900 |
|
$form->format_amount($myconfig, $form->round_amount($form->{$item}, 2),
|
1901 |
|
2, '0');
|
1902 |
|
}
|
1903 |
|
|
1904 |
|
foreach my $item (@categories_euro) {
|
1905 |
|
$form->{$item} =
|
1906 |
|
$form->format_amount($myconfig, $form->round_amount($form->{$item}, 0),
|
1907 |
|
0, '0');
|
1908 |
|
}
|
1909 |
|
|
1910 |
|
$dbh->disconnect;
|
1911 |
|
|
1912 |
|
$main::lxdebug->leave_sub();
|
1913 |
|
}
|
1914 |
|
|
1915 |
1832 |
sub income_statement {
|
1916 |
1833 |
$main::lxdebug->enter_sub();
|
1917 |
1834 |
|
Entfernt gifi und pos_ustva
Dieser Commit entfernt die Tabelle gifi und die Spalten gifi_accno/
pos_ustva aus der Datenbank. Sie wurden nicht mehr benutzt.
Behebt Bug #1966.