Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 4d8a6515

Von Philip Reetz vor mehr als 17 Jahren hinzugefügt

  • ID 4d8a65151cff0399654ea47c196ab38361a976e8
  • Vorgänger e8a42733
  • Nachfolger 18da4a96

Erweiterung um Anzeige des Ertrages im Verkauf

Unterschiede anzeigen:

SL/IS.pm
551 551
    my $basefactor;
552 552
    my $basqty;
553 553

  
554
    $form->{"marge_percent_$i"} = $form->parse_amount($myconfig, $form->{"marge_percent_$i"}) * 1;
555
    $form->{"marge_absolut_$i"} = $form->parse_amount($myconfig, $form->{"marge_absolut_$i"}) * 1;
556
    $form->{"lastcost_$i"} = $form->{"lastcost_$i"} * 1;
557

  
554 558
    if ($form->{storno}) {
555 559
      $form->{"qty_$i"} *= -1;
556 560
    }
......
688 692
        qq|INSERT INTO invoice (trans_id, parts_id, description, longdescription, qty,
689 693
                                sellprice, fxsellprice, discount, allocated, assemblyitem,
690 694
                                unit, deliverydate, project_id, serialnumber, pricegroup_id,
691
                                ordnumber, transdate, cusordnumber, base_qty, subtotal)
692
           VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)|;
695
                                ordnumber, transdate, cusordnumber, base_qty, subtotal,
696
                                marge_percent, marge_total, lastcost)
697
           VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)|;
693 698

  
694 699
      @values = (conv_i($form->{id}), conv_i($form->{"id_$i"}),
695 700
                 $form->{"description_$i"}, $form->{"longdescription_$i"}, $form->{"qty_$i"},
......
698 703
                 $form->{"unit_$i"}, conv_date($form->{"deliverydate_$i"}), conv_i($form->{"project_id_$i"}),
699 704
                 $form->{"serialnumber_$i"}, conv_i($pricegroup_id),
700 705
                 $form->{"ordnumber_$i"}, conv_date($form->{"transdate_$i"}),
701
                 $form->{"cusordnumber_$i"}, $baseqty, $subtotal);
706
                 $form->{"cusordnumber_$i"}, $baseqty, $subtotal,
707
                 $form->{"marge_percent_$i"}, $form->{"marge_absolut_$i"},
708
                 $form->{"lastcost_$i"});
702 709
      do_query($form, $dbh, $query, @values);
703 710

  
704 711
      if ($form->{lizenzen} && $form->{"licensenumber_$i"}) {
......
986 993
                storno = ?,
987 994
                globalproject_id = ?,
988 995
                cp_id = ?,
989
                transaction_description = ?
996
                transaction_description = ?,
997
                marge_total = ?,
998
                marge_percent = ?
990 999
              WHERE id = ?|;
991 1000
  @values = ($form->{"invnumber"}, $form->{"ordnumber"}, $form->{"quonumber"}, $form->{"cusordnumber"},
992 1001
             conv_date($form->{"invdate"}), conv_date($form->{"orddate"}), conv_date($form->{"quodate"}),
......
1001 1010
             conv_i($form->{"employee_id"}), conv_i($form->{"salesman_id"}),
1002 1011
             $form->{"storno"} ? 't' : 'f', conv_i($form->{"globalproject_id"}),
1003 1012
             conv_i($form->{"cp_id"}), $form->{transaction_description},
1013
             $form->{marge_total}, $form->{marge_percent},
1004 1014
             conv_i($form->{"id"}));
1005 1015
  do_query($form, $dbh, $query, @values);
1006 1016
  
......
1477 1487
           i.description, i.longdescription, i.qty, i.fxsellprice AS sellprice,
1478 1488
           i.discount, i.parts_id AS id, i.unit, i.deliverydate,
1479 1489
           i.project_id, i.serialnumber, i.id AS invoice_pos, i.pricegroup_id,
1480
           i.ordnumber, i.transdate, i.cusordnumber, i.subtotal,
1490
           i.ordnumber, i.transdate, i.cusordnumber, i.subtotal, i.lastcost,
1481 1491

  
1482 1492
           p.partnumber, p.assembly, p.bin, p.notes AS partnotes,
1483 1493
           p.inventory_accno_id AS part_inventory_accno_id, p.formel,

Auch abrufbar als: Unified diff