Revision 195883fd
Von Stephan Köhler vor etwa 19 Jahren hinzugefügt
SL/OE.pm | ||
---|---|---|
311 | 311 |
$reqdate = |
312 | 312 |
($form->{"reqdate_$i"}) ? qq|'$form->{"reqdate_$i"}'| : "NULL"; |
313 | 313 |
|
314 |
# get pricegroup_id and save ist |
|
315 |
($null, my $pricegroup_id) = split /--/, $form->{"sellprice_drag_$i"}; |
|
316 |
|
|
314 | 317 |
# save detail record in orderitems table |
315 | 318 |
$query = qq|INSERT INTO orderitems (|; |
316 | 319 |
$query .= "id, " if $form->{"orderitems_id_$i"}; |
317 | 320 |
$query .= qq|trans_id, parts_id, description, qty, sellprice, discount, |
318 |
unit, reqdate, project_id, serialnumber, ship) |
|
321 |
unit, reqdate, project_id, serialnumber, ship, pricegroup_id)
|
|
319 | 322 |
VALUES (|; |
320 | 323 |
$query .= qq|$form->{"orderitems_id_$i"},| |
321 | 324 |
if $form->{"orderitems_id_$i"}; |
... | ... | |
323 | 326 |
'$form->{"description_$i"}', $form->{"qty_$i"}, |
324 | 327 |
$fxsellprice, $form->{"discount_$i"}, |
325 | 328 |
'$form->{"unit_$i"}', $reqdate, (SELECT id from project where projectnumber = '$project_id'), |
326 |
'$form->{"serialnumber_$i"}', $form->{"ship_$i"})|; |
|
329 |
'$form->{"serialnumber_$i"}', $form->{"ship_$i"}, |
|
330 |
'$pricegroup_id')|; |
|
327 | 331 |
$dbh->do($query) || $form->dberror($query); |
328 | 332 |
|
329 | 333 |
$form->{"sellprice_$i"} = $fxsellprice; |
... | ... | |
631 | 635 |
o.sellprice, o.parts_id AS id, o.unit, o.discount, p.bin, p.notes AS partnotes, |
632 | 636 |
o.reqdate, o.project_id, o.serialnumber, o.ship, |
633 | 637 |
pr.projectnumber, |
634 |
pg.partsgroup |
|
638 |
pg.partsgroup, o.pricegroup_id, (SELECT pricegroup FROM pricegroup WHERE id=o.pricegroup_id) as pricegroup
|
|
635 | 639 |
FROM orderitems o |
636 | 640 |
JOIN parts p ON (o.parts_id = p.id) |
637 | 641 |
LEFT JOIN chart c1 ON (p.inventory_accno_id = c1.id) |
Auch abrufbar als: Unified diff
Preisgruppenerweiterung auf Basis von Andres Patch - Thanks
Preisgruppenverwaltung
...-Preiseingabe der Preisgruppen in Masken Waren,etc.
-Auswahl der Preisgruppen in den Verkaufsmasken
Erweiterung Datenbankschema