Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 2709dc1f

Von Werner Hahn vor mehr als 1 Jahr hinzugefügt

  • ID 2709dc1f4d5c9fad71883a5daab5f4f7eda4440e
  • Vorgänger fc504386
  • Nachfolger 554ddc07

Dispositionsmanager: Spalte Besteller mit aufgenommen

Eine Extra Spalte BestellerIn und die Ansicht in der
Positionszeile(Details) wer bestellt hat.

Unterschiede anzeigen:

SL/Controller/DispositionManager.pm
28 28
    my $basket_part = SL::DB::PurchaseBasketItem->new(
29 29
      parts_id    => $part->id,
30 30
      qty         => $part->ordersize, # was ist wenn order_size < (rop-onhand) ist? sollte dann nicht (rop-onhand) genommen werden?
31
      description => $part->description,  # Warum wird description zusätzlich gespeichert, parts_id sollte doch reichen? Falls die sich in den Stammdaten in der Zwischenzeit verändert? zumal du in action_transfer_to_purchase_order explizit $part->description verwendest
31
      orderer     => SL::DB::Manager::Employee->current;
32 32
    )->save;
33 33
 }
34 34
 $self->action_show_basket;
SL/Controller/Part.pm
268 268
    my $basket_part = SL::DB::PurchaseBasketItem->new(
269 269
      parts_id    => $self->part->id,
270 270
      qty         => $self->part->ordersize || 1, # was ist wenn order_size < (rop-onhand) ist? sollte dann nicht (rop-onhand) genommen werden?
271
      orderer     => SL::DB::Manager::Employee->current,
271 272
    )->save;
272 273

  
273 274
    $self->js->flash('info', t8('Part added to purchasebasket'))->render;
......
699 700
      paginated    => { per_page => 2 },
700 701
      with_objects => [ qw(unit_obj classification) ],
701 702
    );
703

  
702 704
    my $exact_matches;
703 705
    if (1 == scalar @{ $exact_matches = $exact_models->get }) {
704 706
      $self->parts($exact_matches);
......
1588 1590

  
1589 1591
  return SL::DB::Manager::PurchaseBasketItem->get_all_count( query => [ parts_id => $self->part->id ] );
1590 1592
}
1593
sub _is_ordered {
1594
  my ( $self ) = @_;
1595

  
1596
  return $self->part->get_ordered_qty( $self->part->id );
1597
}
1598

  
1591 1599

  
1592 1600
sub _setup_form_action_bar {
1593 1601
  my ($self) = @_;
......
1666 1674
        call     => [ 'kivi.Part.add_to_basket' ],
1667 1675
        disabled => !$self->part->id       ? t8('This object has not been saved yet.')
1668 1676
                  : $self->_is_in_purchase_basket ? t8('Part already in purchasebasket')
1677
                  : $self->_is_ordered ? t8('Part already ordered')
1669 1678
                  : !scalar @{$self->part->makemodels} ? t8('No vendors to add to purchasebasket')
1670 1679
                  : undef,
1671 1680
      ],
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/DB/MetaSetup/PurchaseBasketItem.pm
9 9
__PACKAGE__->meta->table('purchase_basket_items');
10 10

  
11 11
__PACKAGE__->meta->columns(
12
  cleared     => { type => 'boolean', default => 'false', not_null => 1 },
13
  description => { type => 'text' },
14
  id          => { type => 'serial', not_null => 1 },
15
  parts_id    => { type => 'integer' },
16
  qty         => { type => 'numeric', precision => 15, scale => 5 },
12
  cleared    => { type => 'boolean', default => 'false', not_null => 1 },
13
  id         => { type => 'serial', not_null => 1 },
14
  orderer_id => { type => 'integer' },
15
  parts_id   => { type => 'integer' },
16
  qty        => { type => 'numeric', precision => 15, scale => 5 },
17 17
);
18 18

  
19 19
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
20 20

  
21 21
__PACKAGE__->meta->foreign_keys(
22
  orderer => {
23
    class       => 'SL::DB::Employee',
24
    key_columns => { orderer_id => 'id' },
25
  },
26

  
22 27
  part => {
23 28
    class       => 'SL::DB::Part',
24 29
    key_columns => { parts_id => 'id' },
SL/OE.pm
1289 1289
           o.ordnumber, o.transdate, o.cusordnumber, o.subtotal, o.recurring_billing_mode, o.longdescription,
1290 1290
           o.price_factor_id, o.price_factor, o.marge_price_factor, o.active_price_source, o.active_discount_source,
1291 1291
           pr.projectnumber, p.formel,
1292
           pg.partsgroup, o.pricegroup_id, (SELECT pricegroup FROM pricegroup WHERE id=o.pricegroup_id) as pricegroup
1292
           pg.partsgroup, o.pricegroup_id, (SELECT pricegroup FROM pricegroup WHERE id=o.pricegroup_id) as pricegroup,
1293
           e.login as orderer
1293 1294
         FROM orderitems o
1294 1295
         JOIN parts p ON (o.parts_id = p.id)
1295 1296
         JOIN oe ON (o.trans_id = oe.id)
......
1297 1298
         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)
1298 1299
         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)
1299 1300
         LEFT JOIN project pr ON (o.project_id = pr.id)
1300
         LEFT JOIN partsgroup pg ON (p.partsgroup_id = pg.id) | .
1301
         LEFT JOIN partsgroup pg ON (p.partsgroup_id = pg.id)
1302
         LEFT JOIN employee e ON (o.orderer_id = e.id) | .
1301 1303
      ($form->{id}
1302 1304
       ? qq|WHERE o.trans_id = ?|
1303 1305
       : qq|WHERE o.trans_id IN (| . join(", ", map("?", @ids)) . qq|)|) .
......
1524 1526
  my @arrays =
1525 1527
    qw(runningnumber number description longdescription qty qty_nofmt ship ship_nofmt unit bin
1526 1528
       partnotes serialnumber reqdate sellprice sellprice_nofmt listprice listprice_nofmt netprice netprice_nofmt
1529
       orderer
1527 1530
       discount discount_nofmt p_discount discount_sub discount_sub_nofmt nodiscount_sub nodiscount_sub_nofmt
1528 1531
       linetotal linetotal_nofmt nodiscount_linetotal nodiscount_linetotal_nofmt tax_rate projectnumber projectdescription
1529 1532
       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;
locale/de/all
331 331
  'Already counted'             => 'Bereits erfasst',
332 332
  'Already imported entries (duplicates)' => 'Bereits importierte Einträge (Duplikate)',
333 333
  'Already imported: '          => 'Bereits importiert:',
334
  'Also with reserved Qty'      => 'inklusive Reservierungen',
334 335
  'Always edit assembly items (user can change/delete items even if assemblies are already produced)' => 'Erzeugnisbestandteile verändern (Löschen/Umsortieren) auch nachdem dieses Erzeugnis schon produziert wurde.',
335 336
  'Always edit assortment items (user can change/delete items even if assortments are already used)' => 'Sortimentsbestandteile verändern (Löschen/Umsortieren), auch nachdem dieses Sortiment schon verwendet wurde.',
336 337
  'Always save orders with a projectnumber (create new projects)' => 'Aufträge immer mit Projektnummer speichern (neue Projekte erstellen)',
......
2613 2614
  'Order/Item row name'         => 'Name der Auftrag-/Positions-Zeilen',
2614 2615
  'Order/Item/Stock row name'   => 'Name der Auftrag-/Positions-/Lager-Zeilen',
2615 2616
  'Order/RFQ Number'            => 'Belegnummer',
2617
  'Order:'                      => 'Auftrag:',
2616 2618
  'OrderItem'                   => 'Position',
2617 2619
  'Ordered'                     => 'Von Kunden bestellt',
2618 2620
  'Ordered qty'                 => 'bestellt',
2619 2621
  'Ordered purchase'            => 'Bestellte Menge',
2622
  'Orderer'                     => 'BestellerIn',
2620 2623
  'Orders'                      => 'Aufträge',
2621 2624
  'Orders / Delivery Orders deleteable' => 'Aufträge / Lieferscheine löschbar',
2622 2625
  'Orders in Webshop'           => 'Bestellungen in Webshop',
......
2687 2690
  'Part Type'                   => 'Artikel-Typ',
2688 2691
  'Part Unit'                   => 'Einheit',
2689 2692
  'Part added to purchasebasket' => 'Zu Einkaufkorb hinzugefügt',
2690
  'Part already in purchasebasket' => 'Schon im Einkaufskorb',
2691 2693
  'Part already in purchasebasket or has no vendor' => 'Artikel ist schon im Bestellwarenkorb oder hat keinen Lieferanten',
2694
  'Part already in purchasebasket' => 'Schon im Einkaufskorb',
2695
  'Part already ordered'        => 'Artikel ist bestellt',
2692 2696
  'Part classifications'        => 'Artikel-Klassifizierungen',
2693 2697
  'Part marked as "Shop part"'  => 'Markiert als Shopartikel',
2694 2698
  'Part picker'                 => 'Artikelauswahl',
......
4532 4536
  'VAT ID'                      => 'USt-IdNr.',
4533 4537
  'VAT ID and/or taxnumber must be given.' => 'UStId und/oder Steuernummer muss angegeben werden.',
4534 4538
  'VN'                          => 'Kred.-Nr.',
4539
  'VPE'                         => '',
4535 4540
  'Valid'                       => 'Gültig',
4536 4541
  'Valid are integer values and floating point numbers, e.g. 4.75h = 4 hours and 45 minutes.' => 'Erlaubt sind ganzzahlige Werte und Kommawerte: Beispiel: 4,75h = 4 Stunden und 45 Minuten.',
4537 4542
  'Valid for Purchase'          => 'Gültig für Einkauf',
templates/webpages/disposition_manager/show_purchase_basket.html
21 21
    </thead>
22 22
    <tbody>
23 23
    [% FOREACH basket_item = BASKET_ITEMS %]
24

  
25
[% # Dumper.dump_html('TEST') %]
26
[% # Dumper.dump_html(basket_item) %]
24 27
    [% SET select_size = basket_item.part.vendor_dropdown.size %]
25
      [% IF !basket_item.part.get_ordered_qty(part.id) %]
28
      [% # IF !basket_item.part.get_ordered_qty(part.id) %]
26 29
      <tr class="listrow">
27 30
        <td>[% L.checkbox_tag('ids[+]', checked = '1',  value=basket_item.id) %]</td>
28 31
        <td>[% HTML.escape(basket_item.part.partnumber) %] </td>
......
32 35
        <td class="numeric">[% basket_item.qty_as_number %] </td>
33 36
        <td>[% L.select_tag('vendor_ids[]', basket_item.part.vendor_dropdown, value_key = 'value', title_key = 'title', default = basket_item.part.makemodels.item(0).make, size = select_size, style='width: 350px;' ) %]</td>
34 37
      </tr>
35
      [% END %]
38
      [% # END %]
36 39
    [% END %]
37 40
    </tbody>
38 41
  </table>

Auch abrufbar als: Unified diff