Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 980917db

Von Tamino Steinert vor mehr als 1 Jahr hinzugefügt

  • ID 980917dbe3534e86bef747b210b6ef2ecad70c0d
  • Vorgänger cec7cc39
  • Nachfolger 44e85149

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
1335 1335
           o.ordnumber, o.transdate, o.cusordnumber, o.subtotal, o.recurring_billing_mode, o.longdescription,
1336 1336
           o.price_factor_id, o.price_factor, o.marge_price_factor, o.active_price_source, o.active_discount_source,
1337 1337
           pr.projectnumber, p.formel,
1338
           pg.partsgroup, o.pricegroup_id, (SELECT pricegroup FROM pricegroup WHERE id=o.pricegroup_id) as pricegroup
1338
           pg.partsgroup, o.pricegroup_id, (SELECT pricegroup FROM pricegroup WHERE id=o.pricegroup_id) as pricegroup,
1339
           e.name as orderer, e.id as orderer_id
1339 1340
         FROM orderitems o
1340 1341
         JOIN parts p ON (o.parts_id = p.id)
1341 1342
         JOIN oe ON (o.trans_id = oe.id)
......
1343 1344
         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)
1344 1345
         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)
1345 1346
         LEFT JOIN project pr ON (o.project_id = pr.id)
1346
         LEFT JOIN partsgroup pg ON (p.partsgroup_id = pg.id) | .
1347
         LEFT JOIN partsgroup pg ON (p.partsgroup_id = pg.id)
1348
         LEFT JOIN employee e ON (o.orderer_id = e.id) | .
1347 1349
      ($form->{id}
1348 1350
       ? qq|WHERE o.trans_id = ?|
1349 1351
       : qq|WHERE o.trans_id IN (| . join(", ", map("?", @ids)) . qq|)|) .
......
1570 1572
  my @arrays =
1571 1573
    qw(runningnumber number description longdescription qty qty_nofmt ship ship_nofmt unit bin
1572 1574
       partnotes serialnumber reqdate sellprice sellprice_nofmt listprice listprice_nofmt netprice netprice_nofmt
1575
       orderer
1573 1576
       discount discount_nofmt p_discount discount_sub discount_sub_nofmt nodiscount_sub nodiscount_sub_nofmt
1574 1577
       linetotal linetotal_nofmt nodiscount_linetotal nodiscount_linetotal_nofmt tax_rate projectnumber projectdescription
1575 1578
       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
2631 2631
  'Order/RFQ Number'            => 'Belegnummer',
2632 2632
  'OrderItem'                   => 'Position',
2633 2633
  'Ordered'                     => 'Von Kunden bestellt',
2634
  'Orderer'                     => 'BestellerIn',
2634 2635
  'Orders'                      => 'Aufträge',
2635 2636
  'Orders / Delivery Orders deleteable' => 'Aufträge / Lieferscheine löschbar',
2636 2637
  'Orders in Webshop'           => 'Bestellungen in Webshop',
locale/en/all
2625 2625
  'Order/RFQ Number'            => '',
2626 2626
  'OrderItem'                   => '',
2627 2627
  'Ordered'                     => '',
2628
  'Orderer'                     => '',
2628 2629
  'Orders'                      => '',
2629 2630
  'Orders / Delivery Orders deleteable' => '',
2630 2631
  '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
281 281
    "sales_delivery_order_items to sales_reclamation_items",
282 282
    qw(
283 283
      id delivery_order_id reclamation_id itime mtime
284
      cusordnumber marge_price_factor ordnumber transdate
284
      cusordnumber marge_price_factor ordnumber transdate orderer_id
285 285
      description reason_description_ext reason_description_int reason_id
286 286
    ));
287 287
} @sales_delivery_order_items, @converted_sales_reclamation_items;
......
301 301
    "sales_reclamation_items to sales_delivery_order_items",
302 302
    qw(
303 303
      id delivery_order_id reclamation_id itime mtime
304
      cusordnumber marge_price_factor ordnumber transdate
304
      cusordnumber marge_price_factor ordnumber transdate orderer_id
305 305
      description reason_description_ext reason_description_int reason_id
306 306
    ));
307 307
} @sales_reclamation_items, @converted_sales_delivery_order_items;
......
323 323
    "purchase_delivery_order_items to purchase_reclamation_items",
324 324
    qw(
325 325
      id delivery_order_id reclamation_id itime mtime
326
      cusordnumber marge_price_factor ordnumber transdate
326
      cusordnumber marge_price_factor ordnumber transdate orderer_id
327 327
      description reason_description_ext reason_description_int reason_id
328 328
    ));
329 329
} @purchase_delivery_order_items, @converted_purchase_reclamation_items;
......
343 343
    "purchase_reclamation_items to purchase_delivery_order_items",
344 344
    qw(
345 345
      id delivery_order_id reclamation_id itime mtime
346
      cusordnumber marge_price_factor ordnumber transdate
346
      cusordnumber marge_price_factor ordnumber transdate orderer_id
347 347
      description reason_description_ext reason_description_int reason_id
348 348
    ));
349 349
} @purchase_reclamation_items, @converted_purchase_delivery_order_items;
t/workflow/order_reclamation.t
282 282
    "sales_order_items to sales_reclamation_items",
283 283
    qw(
284 284
      id trans_id reclamation_id itime mtime
285
      cusordnumber marge_percent marge_price_factor marge_total optional ordnumber ship subtotal transdate
285
      cusordnumber marge_percent marge_price_factor marge_total optional ordnumber ship subtotal transdate orderer_id
286 286
      reason_description_ext reason_description_int reason_id
287 287
      recurring_billing_mode recurring_billing_invoice_id
288 288
    ));
......
303 303
    "sales_reclamation_items to sales_order_items",
304 304
    qw(
305 305
      id trans_id reclamation_id itime mtime
306
      cusordnumber marge_percent marge_price_factor marge_total optional ordnumber ship subtotal transdate
306
      cusordnumber marge_percent marge_price_factor marge_total optional ordnumber ship subtotal transdate orderer_id
307 307
      reason_description_ext reason_description_int reason_id
308 308
      recurring_billing_mode recurring_billing_invoice_id
309 309
    ));
......
325 325
    "purchase_order_items to purchase_reclamation_items",
326 326
    qw(
327 327
      id trans_id reclamation_id itime mtime
328
      cusordnumber marge_percent marge_price_factor marge_total optional ordnumber ship subtotal transdate
328
      cusordnumber marge_percent marge_price_factor marge_total optional ordnumber ship subtotal transdate orderer_id
329 329
      reason_description_ext reason_description_int reason_id
330 330
      recurring_billing_mode recurring_billing_invoice_id
331 331
    ));
......
346 346
    "purchase_reclamation_items to purchase_order_items",
347 347
    qw(
348 348
      id trans_id reclamation_id itime mtime
349
      cusordnumber marge_percent marge_price_factor marge_total optional ordnumber ship subtotal transdate
349
      cusordnumber marge_percent marge_price_factor marge_total optional ordnumber ship subtotal transdate orderer_id
350 350
      reason_description_ext reason_description_int reason_id
351 351
      recurring_billing_mode recurring_billing_invoice_id
352 352
    ));

Auch abrufbar als: Unified diff