Revision bd34eaea
Von Udo Spallek vor mehr als 17 Jahren hinzugefügt
SL/CA.pm | ||
---|---|---|
41 | 41 |
sub all_accounts { |
42 | 42 |
$main::lxdebug->enter_sub(); |
43 | 43 |
|
44 |
my ($self, $myconfig, $form) = @_; |
|
44 |
my ($self, $myconfig, $form, $chart_id) = @_;
|
|
45 | 45 |
|
46 | 46 |
my %amount; |
47 | 47 |
|
... | ... | |
61 | 61 |
} |
62 | 62 |
$sth->finish; |
63 | 63 |
|
64 |
$query = |
|
65 |
qq!SELECT c.accno, c.id, c.description, c.charttype, c.category, ! . |
|
66 |
qq! c.link, c.pos_bwa, c.pos_bilanz, c.pos_eur, c.valid_from, ! . |
|
67 |
qq! c.datevautomatik, comma(tk.startdate) AS startdate, ! . |
|
68 |
qq! comma(tk.taxkey_id) AS taxkey, ! . |
|
69 |
qq! comma(tx.taxdescription || to_char (tx.rate, '99V99' ) || '%') ! . |
|
70 |
qq! AS taxdescription, ! . |
|
71 |
qq! comma(tx.taxnumber) AS taxaccount, comma(tk.pos_ustva) ! . |
|
72 |
qq! AS tk_ustva, ! . |
|
73 |
qq! ( SELECT accno FROM chart c2 WHERE c2.id = c.id ) AS new_account ! . |
|
74 |
qq!FROM chart c ! . |
|
75 |
qq!LEFT JOIN taxkeys tk ON (c.id = tk.chart_id) ! . |
|
76 |
qq!LEFT JOIN tax tx ON (tk.tax_id = tx.id) ! . |
|
77 |
qq!GROUP BY c.accno, c.id, c.description, c.charttype, ! . |
|
78 |
qq! c.category, c.link, c.pos_bwa, c.pos_bilanz, c.pos_eur, ! . |
|
79 |
qq! c.valid_from, c.datevautomatik ! . |
|
80 |
qq!ORDER BY c.accno!; |
|
64 |
my $where = "AND c.id = $chart_id" if ($chart_id ne ''); |
|
65 |
|
|
66 |
$query = qq{ |
|
67 |
SELECT |
|
68 |
c.accno, |
|
69 |
c.id, |
|
70 |
c.description, |
|
71 |
c.charttype, |
|
72 |
c.category, |
|
73 |
c.link, |
|
74 |
c.pos_bwa, |
|
75 |
c.pos_bilanz, |
|
76 |
c.pos_eur, |
|
77 |
c.valid_from, |
|
78 |
c.datevautomatik, |
|
79 |
comma(tk.startdate) AS startdate, |
|
80 |
comma(tk.taxkey_id) AS taxkey, |
|
81 |
comma(tx.taxdescription || to_char (tx.rate, '99V99' ) || '%') AS taxdescription, |
|
82 |
comma(tx.taxnumber) AS taxaccount, |
|
83 |
comma(tk.pos_ustva) AS tk_ustva, |
|
84 |
( SELECT accno |
|
85 |
FROM chart c2 |
|
86 |
WHERE c2.id = c.id |
|
87 |
) AS new_account |
|
88 |
FROM chart c |
|
89 |
LEFT JOIN taxkeys tk ON (c.id = tk.chart_id) |
|
90 |
LEFT JOIN tax tx ON (tk.tax_id = tx.id) |
|
91 |
WHERE 1=1 |
|
92 |
$where |
|
93 |
GROUP BY c.accno, c.id, c.description, c.charttype, c.gifi_accno, |
|
94 |
c.category, c.link, c.pos_bwa, c.pos_bilanz, c.pos_eur, c.valid_from, |
|
95 |
c.datevautomatik |
|
96 |
ORDER BY c.accno |
|
97 |
}; |
|
98 |
|
|
81 | 99 |
my $sth = prepare_execute_query($form, $dbh, $query); |
82 | 100 |
|
83 | 101 |
$form->{CA} = []; |
102 |
|
|
84 | 103 |
while (my $ca = $sth->fetchrow_hashref(NAME_lc)) { |
85 | 104 |
$ca->{amount} = $amount{ $ca->{accno} }; |
86 | 105 |
if ($ca->{amount} < 0) { |
Auch abrufbar als: Unified diff
System->Konteneinstellungen ueberarbeitet:
- Klick auf Beschreibung zeigt Details an
(Ajax template list_account_details)
- Klick auf Kontonummer öffnet Einstellungen (wie gehabt)
- Ueberschriften werden per css (accountlistheader) formatiert
- Gegenueberstellung von allen Konten mit allen Details
- Uebersetzungn
- Steuerautomatik und USTVA Positionen sind einstellbar/loeschbar
(max. 10 Steuerkonten)
- Folgekonto: Sortierung nach chart.accno
- Validierung:
+ Wenn Kontentyp Ueberschrift, alle anderen Einstellungen entfernen
(js/FormManager.js)
+ Must have: Kontonummer, Beschreibung, Kontentyp, (Kontenart)
+ Taxkeys: Gueltig, wenn Startdate und mindestens ein Merkmal aus:
Steuerverknuepfung oder USTVA Position
- Beim loeschen eines Kontos werden alle abhaengigen taxkeys geloescht
- Uebersetzungen