Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 75cb7791

Von Tamino Steinert vor fast 2 Jahren hinzugefügt

  • ID 75cb77915b406e9c34a08db2abaf5f56eda65115
  • Vorgänger 35efaa4a
  • Nachfolger 675fb784

InvoiceItem: Speicher überlagerte Konten und Steuern

Unterschiede anzeigen:

SL/IR.pm
433 433
                           project_id = ?, serialnumber = ?, price_factor_id = ?,
434 434
                           price_factor = (SELECT factor FROM price_factors WHERE id = ?), marge_price_factor = ?,
435 435
                           active_price_source = ?, active_discount_source = ?
436
                           ,expense_chart_id = ?, tax_id = ?, inventory_chart_id = ?
436 437
        WHERE id = ?
437 438
SQL
438 439

  
......
443 444
               conv_i($form->{"project_id_$i"}), $form->{"serialnumber_$i"},
444 445
               conv_i($form->{"price_factor_id_$i"}), conv_i($form->{"price_factor_id_$i"}), conv_i($form->{"marge_price_factor_$i"}),
445 446
               $form->{"active_price_source_$i"}, $form->{"active_discount_source_$i"},
447
               $form->{"expense_chart_id_$i"}, $form->{"tax_id_$i"}, $form->{"inventory_chart_id_$i"},
446 448
               conv_i($form->{"invoice_id_$i"}));
447 449
    do_query($form, $dbh, $query, @values);
448 450
    push @processed_invoice_ids, $form->{"invoice_id_$i"};
......
1056 1058
        i.price_factor_id, i.price_factor, i.marge_price_factor, i.discount, i.active_price_source, i.active_discount_source,
1057 1059
        p.partnumber, p.part_type, pr.projectnumber, pg.partsgroup
1058 1060
        ,p.classification_id
1059
        ,i.expense_chart_id, ec.accno AS expense_chart_accno, i.tax_id, i.inventory_chart_id
1061
        ,i.expense_chart_id, i.tax_id, i.inventory_chart_id
1060 1062

  
1061 1063
        FROM invoice i
1062 1064
        JOIN parts p ON (i.parts_id = p.id)
1063 1065
        LEFT JOIN chart c1 ON ((SELECT inventory_accno_id             FROM buchungsgruppen WHERE id = p.buchungsgruppen_id) = c1.id)
1064 1066
        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)
1065 1067
        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)
1066
        LEFT JOIN chart ec ON (expense_chart_id = ec.id)
1067 1068
        LEFT JOIN project pr    ON (i.project_id = pr.id)
1068 1069
        LEFT JOIN partsgroup pg ON (pg.id = p.partsgroup_id)
1069 1070

  

Auch abrufbar als: Unified diff