Revision 89b26688
Von Sven Schöling vor mehr als 9 Jahren hinzugefügt
SL/IR.pm | ||
---|---|---|
381 | 381 |
$query = |
382 | 382 |
qq|INSERT INTO invoice (id, trans_id, parts_id, description, longdescription, qty, base_qty, |
383 | 383 |
sellprice, fxsellprice, discount, allocated, unit, deliverydate, |
384 |
project_id, serialnumber, price_factor_id, price_factor, marge_price_factor) |
|
385 |
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, (SELECT factor FROM price_factors WHERE id = ?), ?, ?)|; |
|
384 |
project_id, serialnumber, price_factor_id, price_factor, marge_price_factor, |
|
385 |
active_price_source, active_discount_source) |
|
386 |
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, (SELECT factor FROM price_factors WHERE id = ?), ?, ?, ?)|; |
|
386 | 387 |
@values = ($invoice_id, conv_i($form->{id}), conv_i($form->{"id_$i"}), |
387 | 388 |
$form->{"description_$i"}, $restricter->process($form->{"longdescription_$i"}), $form->{"qty_$i"} * -1, |
388 | 389 |
$baseqty * -1, $form->{"sellprice_$i"}, $fxsellprice, $form->{"discount_$i"}, $allocated, |
389 | 390 |
$form->{"unit_$i"}, conv_date($form->{deliverydate}), |
390 | 391 |
conv_i($form->{"project_id_$i"}), $form->{"serialnumber_$i"}, |
391 | 392 |
conv_i($form->{"price_factor_id_$i"}), conv_i($form->{"price_factor_id_$i"}), conv_i($form->{"marge_price_factor_$i"}), |
392 |
conv_i($form->{"active_price_source_$i"}), |
|
393 |
conv_i($form->{"active_price_source_$i"}), conv_i($form->{"active_discount_source_$i"}),
|
|
393 | 394 |
); |
394 | 395 |
do_query($form, $dbh, $query, @values); |
395 | 396 |
|
... | ... | |
978 | 979 |
|
979 | 980 |
i.id AS invoice_id, |
980 | 981 |
i.description, i.longdescription, i.qty, i.fxsellprice AS sellprice, i.parts_id AS id, i.unit, i.deliverydate, i.project_id, i.serialnumber, |
981 |
i.price_factor_id, i.price_factor, i.marge_price_factor, i.discount, i.active_price_source, |
|
982 |
i.price_factor_id, i.price_factor, i.marge_price_factor, i.discount, i.active_price_source, i.active_discount_source,
|
|
982 | 983 |
p.partnumber, p.inventory_accno_id AS part_inventory_accno_id, pr.projectnumber, pg.partsgroup |
983 | 984 |
|
984 | 985 |
FROM invoice i |
Auch abrufbar als: Unified diff
PriceSource: Rabattbehandlung