Beim Buchen von Einkaufsrechnungen die Langbeschreibung speichern
authorMoritz Bunkus <m.bunkus@linet-services.de>
Wed, 3 Mar 2010 12:11:48 +0000 (13:11 +0100)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Wed, 3 Mar 2010 12:11:48 +0000 (13:11 +0100)
Fix für Bug 1095.

SL/IR.pm

index a64869d..7fefd41 100644 (file)
--- a/SL/IR.pm
+++ b/SL/IR.pm
@@ -318,12 +318,12 @@ sub post_invoice {
     my ($invoice_id) = selectfirst_array_query($form, $dbh, qq|SELECT nextval('invoiceid')|);
 
     $query =
-      qq|INSERT INTO invoice (id, trans_id, parts_id, description, qty, base_qty,
+      qq|INSERT INTO invoice (id, trans_id, parts_id, description, longdescription, qty, base_qty,
                               sellprice, fxsellprice, discount, allocated, unit, deliverydate,
                               project_id, serialnumber, price_factor_id, price_factor, marge_price_factor)
-         VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, (SELECT factor FROM price_factors WHERE id = ?), ?)|;
+         VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, (SELECT factor FROM price_factors WHERE id = ?), ?)|;
     @values = ($invoice_id, conv_i($form->{id}), conv_i($form->{"id_$i"}),
-               $form->{"description_$i"}, $form->{"qty_$i"} * -1,
+               $form->{"description_$i"}, $form->{"longdescription_$i"}, $form->{"qty_$i"} * -1,
                $baseqty * -1, $form->{"sellprice_$i"}, $fxsellprice, $form->{"discount_$i"}, $allocated,
                $form->{"unit_$i"}, conv_date($form->{deliverydate}),
                conv_i($form->{"project_id_$i"}), $form->{"serialnumber_$i"},
@@ -799,7 +799,7 @@ sub retrieve_invoice {
         c3.accno AS expense_accno,   c3.new_chart_id AS expense_new_chart,   date($transdate) - c3.valid_from AS expense_valid,
 
         i.id AS invoice_id,
-        i.description, i.qty, i.fxsellprice AS sellprice, i.parts_id AS id, i.unit, i.deliverydate, i.project_id, i.serialnumber,
+        i.description, i.longdescription, i.qty, i.fxsellprice AS sellprice, i.parts_id AS id, i.unit, i.deliverydate, i.project_id, i.serialnumber,
         i.price_factor_id, i.price_factor, i.marge_price_factor, i.discount,
         p.partnumber, p.inventory_accno_id AS part_inventory_accno_id, p.bin, pr.projectnumber, pg.partsgroup