Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision ebd668c1

Von Tamino Steinert vor etwa 1 Jahr hinzugefügt

  • ID ebd668c18a9ac4e54893ba1fb7aa1facf23b4a2d
  • Vorgänger fecfb63a
  • Nachfolger 3751ebca

Besteller zu Auftrags- und Lieferscheinpositionen hinzugefügt

Unterschiede anzeigen:

SL/DB/MetaSetup/DeliveryOrderItem.pm
22 22
  longdescription        => { type => 'text' },
23 23
  marge_price_factor     => { type => 'numeric', default => 1, precision => 15, scale => 5 },
24 24
  mtime                  => { type => 'timestamp' },
25
  orderer_id             => { type => 'integer' },
25 26
  ordnumber              => { type => 'text' },
26 27
  parts_id               => { type => 'integer', not_null => 1 },
27 28
  position               => { type => 'integer', not_null => 1 },
......
47 48
    key_columns => { delivery_order_id => 'id' },
48 49
  },
49 50

  
51
  orderer => {
52
    class       => 'SL::DB::Employee',
53
    key_columns => { orderer_id => 'id' },
54
  },
55

  
50 56
  part => {
51 57
    class       => 'SL::DB::Part',
52 58
    key_columns => { parts_id => 'id' },
SL/DB/MetaSetup/OrderItem.pm
24 24
  marge_total                  => { type => 'numeric', precision => 15, scale => 5 },
25 25
  mtime                        => { type => 'timestamp' },
26 26
  optional                     => { type => 'boolean', default => 'false' },
27
  orderer_id                   => { type => 'integer' },
27 28
  ordnumber                    => { type => 'text' },
28 29
  parts_id                     => { type => 'integer' },
29 30
  position                     => { type => 'integer', not_null => 1 },
......
54 55
    key_columns => { trans_id => 'id' },
55 56
  },
56 57

  
58
  orderer => {
59
    class       => 'SL::DB::Employee',
60
    key_columns => { orderer_id => 'id' },
61
  },
62

  
57 63
  part => {
58 64
    class       => 'SL::DB::Part',
59 65
    key_columns => { parts_id => 'id' },
SL/OE.pm
1325 1325
           o.ordnumber, o.transdate, o.cusordnumber, o.subtotal, o.recurring_billing_mode, o.longdescription,
1326 1326
           o.price_factor_id, o.price_factor, o.marge_price_factor, o.active_price_source, o.active_discount_source,
1327 1327
           pr.projectnumber, p.formel,
1328
           pg.partsgroup, o.pricegroup_id, (SELECT pricegroup FROM pricegroup WHERE id=o.pricegroup_id) as pricegroup
1328
           pg.partsgroup, o.pricegroup_id, (SELECT pricegroup FROM pricegroup WHERE id=o.pricegroup_id) as pricegroup,
1329
           e.name as orderer, e.id as orderer_id
1329 1330
         FROM orderitems o
1330 1331
         JOIN parts p ON (o.parts_id = p.id)
1331 1332
         JOIN oe ON (o.trans_id = oe.id)
......
1333 1334
         LEFT JOIN chart c2 ON ((SELECT tc.income_accno_id  FROM taxzone_charts tc WHERE tc.taxzone_id = ? and tc.buchungsgruppen_id = p.buchungsgruppen_id) = c2.id)
1334 1335
         LEFT JOIN chart c3 ON ((SELECT tc.expense_accno_id FROM taxzone_charts tc WHERE tc.taxzone_id = ? and tc.buchungsgruppen_id = p.buchungsgruppen_id) = c3.id)
1335 1336
         LEFT JOIN project pr ON (o.project_id = pr.id)
1336
         LEFT JOIN partsgroup pg ON (p.partsgroup_id = pg.id) | .
1337
         LEFT JOIN partsgroup pg ON (p.partsgroup_id = pg.id)
1338
         LEFT JOIN employee e ON (o.orderer_id = e.id) | .
1337 1339
      ($form->{id}
1338 1340
       ? qq|WHERE o.trans_id = ?|
1339 1341
       : qq|WHERE o.trans_id IN (| . join(", ", map("?", @ids)) . qq|)|) .
......
1560 1562
  my @arrays =
1561 1563
    qw(runningnumber number description longdescription qty qty_nofmt ship ship_nofmt unit bin
1562 1564
       partnotes serialnumber reqdate sellprice sellprice_nofmt listprice listprice_nofmt netprice netprice_nofmt
1565
       orderer
1563 1566
       discount discount_nofmt p_discount discount_sub discount_sub_nofmt nodiscount_sub nodiscount_sub_nofmt
1564 1567
       linetotal linetotal_nofmt nodiscount_linetotal nodiscount_linetotal_nofmt tax_rate projectnumber projectdescription
1565 1568
       price_factor price_factor_name partsgroup weight weight_nofmt lineweight lineweight_nofmt optional);
bin/mozilla/io.pl
175 175
  # position of serialnr is used below!
176 176
  my @row2_sort   = qw(
177 177
    tax_chart tax serialnr projectnr reqdate subtotal recurring_billing_mode marge listprice lastcost onhand
178
    orderer
178 179
  );
179 180
  # serialnr is important for delivery_orders
180 181
  if ($form->{type} eq 'sales_delivery_order') {
......
212 213
    vendor_partnumber => { width => 8, value => $locale->text('Vendor Part Number'),   display => $is_delivery_order && $is_purchase, },
213 214
    tax_chart     => {                 value => "",                                    display => $is_purchase && $is_invoice },
214 215
    tax           => {                 value => $locale->text('Tax'),                  display => $is_purchase && $is_invoice },
216
    orderer       => { width => 10,    value => $locale->text('Orderer'),              display => 1, },
215 217
  );
216 218
  my @HEADER = map { $column_def{$_} } @header_sort;
217 219

  
......
497 499
      default => $::form->{"recurring_billing_mode_$i"} || 'always',
498 500
    );
499 501

  
502
    # Orderer
503
    $column_data{orderer}   = qq|: $form->{"orderer_$i"}|;
504

  
500 505
    # begin marge calculations
501 506
    $form->{"lastcost_$i"}     *= 1;
502 507
    $form->{"marge_percent_$i"} = 0;
......
580 585
          $cgi->hidden("-name" => "price_new_$i", "-value" => $form->format_amount(\%myconfig, $form->{"price_new_$i"})),
581 586
          map { ($cgi->hidden("-name" => $_, "-id" => $_, "-value" => $form->{$_})); } map { $_."_$i" }
582 587
            (qw(bo price_old id inventory_accno bin partsgroup partnotes active_price_source active_discount_source
588
                orderer_id
583 589
                income_accno expense_accno listprice part_type taxaccounts ordnumber donumber transdate cusordnumber
584 590
                longdescription basefactor marge_absolut marge_percent marge_price_factor weight), @hidden_vars)
585 591
    );
locale/de/all
2642 2642
  'Order/RFQ Number'            => 'Belegnummer',
2643 2643
  'OrderItem'                   => 'Position',
2644 2644
  'Ordered'                     => 'Von Kunden bestellt',
2645
  'Orderer'                     => 'BestellerIn',
2645 2646
  'Orders'                      => 'Aufträge',
2646 2647
  'Orders / Delivery Orders deleteable' => 'Aufträge / Lieferscheine löschbar',
2647 2648
  'Orders in Webshop'           => 'Bestellungen in Webshop',
locale/en/all
2641 2641
  'Order/RFQ Number'            => '',
2642 2642
  'OrderItem'                   => '',
2643 2643
  'Ordered'                     => '',
2644
  'Orderer'                     => '',
2644 2645
  'Orders'                      => '',
2645 2646
  'Orders / Delivery Orders deleteable' => '',
2646 2647
  'Orders in Webshop'           => '',
sql/Pg-upgrade2/add_orderer.sql
1
-- @tag: add_orderer
2
-- @description: Neue Spalte Besteller in Angebots- und Lieferscheinpositionen
3
-- @depends: release_3_8_0
4
-- @ignore: 0
5

  
6
ALTER TABLE orderitems ADD COLUMN orderer_id INTEGER REFERENCES employee(id);
7
ALTER TABLE delivery_order_items ADD COLUMN orderer_id INTEGER REFERENCES employee(id);
t/workflow/delivery_order_reclamation.t
288 288
);
289 289
my @different_record_item_values = qw(
290 290
  id delivery_order_id reclamation_id itime mtime
291
  cusordnumber marge_price_factor ordnumber transdate
291
  cusordnumber marge_price_factor ordnumber transdate orderer_id
292 292
  description reason_description_ext reason_description_int reason_id
293 293
);
294 294

  
t/workflow/order_reclamation.t
288 288
);
289 289
my @different_record_item_values = qw(
290 290
  id trans_id reclamation_id itime mtime
291
  cusordnumber marge_percent marge_price_factor marge_total optional ordnumber ship subtotal transdate
291
  cusordnumber marge_percent marge_price_factor marge_total optional ordnumber ship subtotal transdate orderer_id
292 292
  reason_description_ext reason_description_int reason_id
293 293
  recurring_billing_mode recurring_billing_invoice_id
294 294
);

Auch abrufbar als: Unified diff