Revision b3327c52
Von Sven Schöling vor mehr als 17 Jahren hinzugefügt
SL/IS.pm | ||
---|---|---|
38 | 38 |
use SL::Common; |
39 | 39 |
use SL::DBUtils; |
40 | 40 |
use SL::MoreCommon; |
41 |
use Data::Dumper; |
|
41 | 42 |
|
42 | 43 |
sub invoice_details { |
43 | 44 |
$main::lxdebug->enter_sub(); |
... | ... | |
1219 | 1220 |
my $taxzone_id = $form->{"taxzone_id"} * 1; |
1220 | 1221 |
my $query = |
1221 | 1222 |
qq|SELECT i.id, i.trans_id, i.base_qty, i.allocated, i.sellprice, |
1222 |
|
|
1223 |
c1.accno AS inventory_accno, |
|
1224 |
c1.new_chart_id AS inventory_new_chart, |
|
1225 |
date($transdate) - c1.valid_from AS inventory_valid, |
|
1226 |
|
|
1227 |
c2.accno AS income_accno, |
|
1228 |
c2.new_chart_id AS income_new_chart, |
|
1229 |
date($transdate) - c2.valid_from AS income_valid, |
|
1230 |
|
|
1231 |
c3.accno AS expense_accno, |
|
1232 |
c3.new_chart_id AS expense_new_chart, |
|
1233 |
date($transdate) - c3.valid_from AS expense_valid |
|
1234 |
|
|
1223 |
c1.accno AS inventory_accno, c1.new_chart_id AS inventory_new_chart, date($transdate) - c1.valid_from AS inventory_valid, |
|
1224 |
c2.accno AS income_accno, c2.new_chart_id AS income_new_chart, date($transdate) - c2.valid_from AS income_valid, |
|
1225 |
c3.accno AS expense_accno, c3.new_chart_id AS expense_new_chart, date($transdate) - c3.valid_from AS expense_valid |
|
1235 | 1226 |
FROM invoice i, parts p |
1236 | 1227 |
LEFT JOIN chart c1 ON ((SELECT inventory_accno_id FROM buchungsgruppen WHERE id = p.buchungsgruppen_id) = c1.id) |
1237 | 1228 |
LEFT JOIN chart c2 ON ((SELECT income_accno_id_${taxzone_id} FROM buchungsgruppen WHERE id = p.buchungsgruppen_id) = c2.id) |
Auch abrufbar als: Unified diff
Kosmetik