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/OE.pm
67 67
    qq|  o.amount, ct.name, o.netamount, o.${vc}_id, o.globalproject_id, | .
68 68
    qq|  o.closed, o.delivered, o.quonumber, o.shippingpoint, o.shipvia, | .
69 69
    qq|  o.transaction_description, | .
70
    qq|  o.marge_total, o.marge_percent, | .
70 71
    qq|  ex.$rate AS exchangerate, | .
71 72
    qq|  pr.projectnumber AS globalprojectnumber, | .
72 73
    qq|  e.name AS employee | .
......
246 247
      }
247 248
      my $baseqty = $form->{"qty_$i"} * $basefactor;
248 249

  
250
      $form->{"marge_percent_$i"} = $form->parse_amount($myconfig, $form->{"marge_percent_$i"}) * 1;
251
      $form->{"marge_absolut_$i"} = $form->parse_amount($myconfig, $form->{"marge_absolut_$i"}) * 1;
252
      $form->{"lastcost_$i"} = $form->{"lastcost_$i"} * 1;
253

  
249 254
      # set values to 0 if nothing entered
250 255
      $form->{"discount_$i"} =
251 256
        $form->parse_amount($myconfig, $form->{"discount_$i"}) / 100;
......
335 340
      }
336 341
      $query .= qq|trans_id, parts_id, description, longdescription, qty, base_qty, | .
337 342
                qq|sellprice, discount, unit, reqdate, project_id, serialnumber, ship, | .
338
                qq|pricegroup_id, ordnumber, transdate, cusordnumber, subtotal) | .
343
                qq|pricegroup_id, ordnumber, transdate, cusordnumber, subtotal, | .
344
                qq|marge_percent, marge_total, lastcost) | .
339 345
                qq|VALUES (|;
340 346
      if($form->{"orderitems_id_$i"}) {
341 347
        $query .= qq|?,|;
342 348
        push(@values, $form->{"orderitems_id_$i"});
343 349
      }
344
      $query .= qq|?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)|;
350
      $query .= qq|?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)|;
345 351
		  push(@values,
346 352
           conv_i($form->{id}), conv_i($form->{"id_$i"}),
347 353
           $form->{"description_$i"}, $form->{"longdescription_$i"},
......
350 356
           $form->{"unit_$i"}, conv_date($reqdate), conv_i($form->{"project_id_$i"}),
351 357
           $form->{"serialnumber_$i"}, $form->{"ship_$i"}, conv_i($pricegroup_id),
352 358
           $form->{"ordnumber_$i"}, conv_date($form->{"transdate_$i"}),
353
           $form->{"cusordnumber_$i"}, $subtotal);
359
           $form->{"cusordnumber_$i"}, $subtotal,
360
           $form->{"marge_percent_$i"}, $form->{"marge_absolut_$i"},
361
           $form->{"lastcost_$i"});
354 362
      do_query($form, $dbh, $query, @values);
355 363

  
356 364
      $form->{"sellprice_$i"} = $fxsellprice;
......
419 427
    qq|shippingpoint = ?, shipvia = ?, notes = ?, intnotes = ?, curr = ?, closed = ?, | .
420 428
    qq|delivered = ?, proforma = ?, quotation = ?, department_id = ?, language_id = ?, | .
421 429
    qq|taxzone_id = ?, shipto_id = ?, payment_id = ?, delivery_vendor_id = ?, delivery_customer_id = ?, | .
422
    qq|globalproject_id = ?, employee_id = ?, salesman_id = ?, cp_id = ?, transaction_description = ? | .
430
    qq|globalproject_id = ?, employee_id = ?, salesman_id = ?, cp_id = ?, transaction_description = ?, marge_total = ?, marge_percent = ?| .
423 431
    qq|WHERE id = ?|;
424 432

  
425 433
  @values = ($form->{ordnumber}, $form->{quonumber},
......
438 446
             conv_i($form->{globalproject_id}), conv_i($form->{employee_id}),
439 447
             conv_i($form->{salesman_id}), conv_i($form->{cp_id}),
440 448
             $form->{transaction_description},
449
             $form->{marge_total}, $form->{marge_percent},
441 450
             conv_i($form->{id}));
442 451
  do_query($form, $dbh, $query, @values);
443 452

  
......
767 776
      qq|  oe.ordnumber AS ordnumber_oe, oe.transdate AS transdate_oe, oe.cusordnumber AS cusordnumber_oe,  | .
768 777
      qq|  p.partnumber, p.assembly, o.description, o.qty, | .
769 778
      qq|  o.sellprice, o.parts_id AS id, o.unit, o.discount, p.bin, p.notes AS partnotes, p.inventory_accno_id AS part_inventory_accno_id, | .
770
      qq|  o.reqdate, o.project_id, o.serialnumber, o.ship, | .
779
      qq|  o.reqdate, o.project_id, o.serialnumber, o.ship, o.lastcost, | .
771 780
      qq|  o.ordnumber, o.transdate, o.cusordnumber, o.subtotal, o.longdescription, | .
772 781
      qq|  pr.projectnumber, p.formel, | .
773 782
      qq|  pg.partsgroup, o.pricegroup_id, (SELECT pricegroup FROM pricegroup WHERE id=o.pricegroup_id) as pricegroup | .

Auch abrufbar als: Unified diff