Revision cfda5e71
Von Tamino Steinert vor fast 2 Jahren hinzugefügt
SL/IR.pm | ||
---|---|---|
431 | 431 |
project_id = ?, serialnumber = ?, price_factor_id = ?, |
432 | 432 |
price_factor = (SELECT factor FROM price_factors WHERE id = ?), marge_price_factor = ?, |
433 | 433 |
active_price_source = ?, active_discount_source = ? |
434 |
,expense_chart_id = ?, tax_id = ?, inventory_chart_id = ? |
|
434 | 435 |
WHERE id = ? |
435 | 436 |
SQL |
436 | 437 |
|
... | ... | |
441 | 442 |
conv_i($form->{"project_id_$i"}), $form->{"serialnumber_$i"}, |
442 | 443 |
conv_i($form->{"price_factor_id_$i"}), conv_i($form->{"price_factor_id_$i"}), conv_i($form->{"marge_price_factor_$i"}), |
443 | 444 |
$form->{"active_price_source_$i"}, $form->{"active_discount_source_$i"}, |
445 |
$form->{"expense_chart_id_$i"}, $form->{"tax_id_$i"}, $form->{"inventory_chart_id_$i"}, |
|
444 | 446 |
conv_i($form->{"invoice_id_$i"})); |
445 | 447 |
do_query($form, $dbh, $query, @values); |
446 | 448 |
push @processed_invoice_ids, $form->{"invoice_id_$i"}; |
... | ... | |
1054 | 1056 |
i.price_factor_id, i.price_factor, i.marge_price_factor, i.discount, i.active_price_source, i.active_discount_source, |
1055 | 1057 |
p.partnumber, p.part_type, pr.projectnumber, pg.partsgroup |
1056 | 1058 |
,p.classification_id |
1057 |
,i.expense_chart_id, ec.accno AS expense_chart_accno, i.tax_id, i.inventory_chart_id
|
|
1059 |
,i.expense_chart_id, i.tax_id, i.inventory_chart_id |
|
1058 | 1060 |
|
1059 | 1061 |
FROM invoice i |
1060 | 1062 |
JOIN parts p ON (i.parts_id = p.id) |
1061 | 1063 |
LEFT JOIN chart c1 ON ((SELECT inventory_accno_id FROM buchungsgruppen WHERE id = p.buchungsgruppen_id) = c1.id) |
1062 | 1064 |
LEFT JOIN chart c2 ON ((SELECT tc.income_accno_id FROM taxzone_charts tc where tc.taxzone_id = '$taxzone_id' and tc.buchungsgruppen_id = p.buchungsgruppen_id) = c2.id) |
1063 | 1065 |
LEFT JOIN chart c3 ON ((SELECT tc.expense_accno_id FROM taxzone_charts tc where tc.taxzone_id = '$taxzone_id' and tc.buchungsgruppen_id = p.buchungsgruppen_id) = c3.id) |
1064 |
LEFT JOIN chart ec ON (expense_chart_id = ec.id) |
|
1065 | 1066 |
LEFT JOIN project pr ON (i.project_id = pr.id) |
1066 | 1067 |
LEFT JOIN partsgroup pg ON (pg.id = p.partsgroup_id) |
1067 | 1068 |
|
Auch abrufbar als: Unified diff
InvoiceItem: Speicher überlagerte Konten und Steuern