Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 82c4717d

Von Jan Büren vor mehr als 11 Jahren hinzugefügt

  • ID 82c4717d48bbdb8d30c9671e71ecb0d6d8eac963
  • Vorgänger 617b4d78
  • Nachfolger 82053b45

Migration von parts.bin nach wirklichen Lager und Lagerplatz s.a. Ticket 2284

Unterschiede anzeigen:

SL/AM.pm
2101 2101
  map { $form->{$_} = $ref->{$_} } keys %{ $ref };
2102 2102

  
2103 2103
  $query = qq|SELECT b.*, EXISTS
2104
                (SELECT i.warehouse_id
2105
                 FROM inventory i
2104
                (SELECT i.warehouse_id, p.warehouse_id
2105
                 FROM inventory i, parts p
2106 2106
                 WHERE i.bin_id = b.id
2107
                 OR    p.bin_id = b.id
2107 2108
                 LIMIT 1)
2108 2109
                AS in_use
2109 2110
              FROM bin b
SL/Common.pm
85 85
  }
86 86

  
87 87
  if ($form->{no_services}) {
88
    $filter .= qq| AND (inventory_accno_id is not NULL or assembly=TRUE)|; # @mb hier nochmal optimieren ... nach kurzer ruecksprache alles i.o.
88
    $filter .= qq| AND (inventory_accno_id is not NULL or assembly=TRUE)|;
89 89
  }
90 90

  
91 91
  substr($filter, 1, 3) = "WHERE" if ($filter);
......
94 94
  $order_dir = $order_dir ? "ASC" : "DESC";
95 95

  
96 96
  my $query =
97
    qq|SELECT id, partnumber, description, ean | .
97
    qq|SELECT id, partnumber, description, ean, | .
98
    qq|       warehouse_id, bin_id | .
98 99
    qq|FROM parts $filter | .
99 100
    qq|ORDER BY $order_by $order_dir|;
100 101
  my $sth = $dbh->prepare($query);
SL/DB/MetaSetup/Default.pm
68 68
    ar_show_mark_as_paid                => { type => 'boolean', default => 'true' },
69 69
    ap_show_mark_as_paid                => { type => 'boolean', default => 'true' },
70 70
    assemblynumber                      => { type => 'text' },
71
    warehouse_id                        => { type => 'integer' },
72
    bin_id                              => { type => 'integer' },
71 73
  ],
72 74

  
73 75
  primary_key_columns => [ 'id' ],
76

  
77
  foreign_keys => [
78
    bin => {
79
      class       => 'SL::DB::Bin',
80
      key_columns => { bin_id => 'id' },
81
    },
82

  
83
    warehouse => {
84
      class       => 'SL::DB::Warehouse',
85
      key_columns => { warehouse_id => 'id' },
86
    },
87
  ],
74 88
);
75 89

  
76 90
1;
SL/DB/MetaSetup/Part.pm
26 26
    inventory_accno_id => { type => 'integer' },
27 27
    income_accno_id    => { type => 'integer' },
28 28
    expense_accno_id   => { type => 'integer' },
29
    bin                => { type => 'text' },
30 29
    shop               => { type => 'boolean', default => 'false' },
31 30
    obsolete           => { type => 'boolean', default => 'false' },
32 31
    bom                => { type => 'boolean', default => 'false' },
......
48 47
    onhand             => { type => 'numeric', default => '0', precision => 5, scale => 25 },
49 48
    stockable          => { type => 'boolean', default => 'false' },
50 49
    has_sernumber      => { type => 'boolean', default => 'false' },
50
    warehouse_id       => { type => 'integer' },
51
    bin_id             => { type => 'integer' },
51 52
  ],
52 53

  
53 54
  primary_key_columns => [ 'id' ],
......
55 56
  allow_inline_column_values => 1,
56 57

  
57 58
  foreign_keys => [
59
    bin => {
60
      class       => 'SL::DB::Bin',
61
      key_columns => { bin_id => 'id' },
62
    },
63

  
58 64
    buchungsgruppen => {
59 65
      class       => 'SL::DB::Buchungsgruppe',
60 66
      key_columns => { buchungsgruppen_id => 'id' },
......
79 85
      class       => 'SL::DB::Unit',
80 86
      key_columns => { unit => 'name' },
81 87
    },
88

  
89
    warehouse => {
90
      class       => 'SL::DB::Warehouse',
91
      key_columns => { warehouse_id => 'id' },
92
    },
82 93
  ],
83 94
);
84 95

  
SL/DO.pm
684 684
  $query =
685 685
    qq|SELECT doi.id AS delivery_order_items_id,
686 686
         p.partnumber, p.assembly, p.listprice, doi.description, doi.qty,
687
         doi.sellprice, doi.parts_id AS id, doi.unit, doi.discount, p.bin, p.notes AS partnotes,
687
         doi.sellprice, doi.parts_id AS id, doi.unit, doi.discount, p.notes AS partnotes,
688 688
         doi.reqdate, doi.project_id, doi.serialnumber, doi.lastcost,
689 689
         doi.ordnumber, doi.transdate, doi.cusordnumber, doi.longdescription,
690 690
         doi.price_factor_id, doi.price_factor, doi.marge_price_factor, doi.pricegroup_id,
SL/IC.pm
346 346
         notes = ?,
347 347
         formel = ?,
348 348
         rop = ?,
349
         bin = ?,
349
         warehouse_id = ?,
350
         bin_id = ?,
350 351
         buchungsgruppen_id = ?,
351 352
         payment_id = ?,
352 353
         inventory_accno_id = $subq_inventory,
......
378 379
             $form->{notes},
379 380
             $form->{formel},
380 381
             $form->{rop},
381
             $form->{bin},
382
             conv_i($form->{warehouse_id}),
383
             conv_i($form->{bin_id}),
382 384
             conv_i($form->{buchungsgruppen_id}),
383 385
             conv_i($form->{payment_id}),
384 386
             conv_i($form->{buchungsgruppen_id}),
......
567 569
  # retrieve assembly items
568 570
  my $query =
569 571
    qq|SELECT p.id, p.partnumber, p.description,
570
         p.bin, p.onhand, p.rop,
572
              p.onhand, p.rop,
571 573
         (SELECT sum(p2.inventory_accno_id)
572 574
          FROM parts p2, assembly a
573 575
          WHERE (p2.id = a.parts_id) AND (a.id = p.id)) AS inventory
......
671 673
#   partnumber ean description partsgroup microfiche drawing
672 674
#
673 675
# column flags:
674
#   l_partnumber l_description l_listprice l_sellprice l_lastcost l_priceupdate l_weight l_unit l_bin l_rop l_image l_drawing l_microfiche l_partsgroup
676
#   l_partnumber l_description l_listprice l_sellprice l_lastcost l_priceupdate l_weight l_unit l_rop l_image l_drawing l_microfiche l_partsgroup
675 677
#
676 678
# exclusives:
677 679
#   itemstatus  = active | onhand | short | obsolete | orphaned
......
721 723
  my @apoe_filters         = qw(transdate);
722 724
  my @like_filters         = (@simple_filters, @invoice_oi_filters);
723 725
  my @all_columns          = (@simple_filters, @makemodel_filters, @apoe_filters, @project_filters, qw(serialnumber));
724
  my @simple_l_switches    = (@all_columns, qw(notes listprice sellprice lastcost priceupdate weight unit bin rop image));
726
  my @simple_l_switches    = (@all_columns, qw(notes listprice sellprice lastcost priceupdate weight unit rop image));
725 727
  my @oe_flags             = qw(bought sold onorder ordered rfq quoted);
726 728
  my @qsooqr_flags         = qw(invnumber ordnumber quonumber trans_id name module qty);
727 729
  my @deliverydate_flags   = qw(deliverydate);
......
964 966

  
965 967
  my $token_builder = $make_token_builder->(\%joins_needed);
966 968

  
967
  my @sort_cols    = (@simple_filters, qw(id bin priceupdate onhand invnumber ordnumber quonumber name serialnumber soldtotal deliverydate));
969
  my @sort_cols    = (@simple_filters, qw(id priceupdate onhand invnumber ordnumber quonumber name serialnumber soldtotal deliverydate));
968 970
     $form->{sort} = 'id' unless grep { $form->{"l_$_"} } grep { $form->{sort} eq $_ } @sort_cols; # sort by id if unknown or invisible column
969 971
  my $sort_order   = ($form->{revers} ? ' DESC' : ' ASC');
970 972
  my $order_clause = " ORDER BY " . $token_builder->($form->{sort}) . ($form->{revers} ? ' DESC' : ' ASC');
......
1022 1024
  if ($form->{searchitems} eq 'assembly' && $form->{bom}) {
1023 1025
    $query =
1024 1026
      qq|SELECT p.id, p.partnumber, p.description, a.qty AS onhand,
1025
           p.unit, p.bin, p.notes,
1027
           p.unit, p.notes,
1026 1028
           p.sellprice, p.listprice, p.lastcost,
1027 1029
           p.rop, p.weight, p.priceupdate,
1028 1030
           p.image, p.drawing, p.microfiche,
......
1496 1498
      $transdate = $form->{deliverydate};
1497 1499
    }
1498 1500
  } elsif ($form->{script} eq 'ir.pl') {
1499
    # when a purchase invoice is opened from the report of purchase invoices 
1501
    # when a purchase invoice is opened from the report of purchase invoices
1500 1502
    # $form->{type} isn't set, but $form->{script} is, not sure why this is or
1501 1503
    # whether this distinction matters in some other scenario. Otherwise one
1502 1504
    # could probably take out this elsif and add a
SL/IR.pm
975 975
        i.id AS invoice_id,
976 976
        i.description, i.longdescription, i.qty, i.fxsellprice AS sellprice, i.parts_id AS id, i.unit, i.deliverydate, i.project_id, i.serialnumber,
977 977
        i.price_factor_id, i.price_factor, i.marge_price_factor, i.discount,
978
        p.partnumber, p.inventory_accno_id AS part_inventory_accno_id, p.bin, pr.projectnumber, pg.partsgroup
978
        p.partnumber, p.inventory_accno_id AS part_inventory_accno_id,  pr.projectnumber, pg.partsgroup
979 979

  
980 980
        FROM invoice i
981 981
        JOIN parts p ON (i.parts_id = p.id)
......
1234 1234
  my $query =
1235 1235
    qq|SELECT
1236 1236
         p.id, p.partnumber, p.description, p.lastcost AS sellprice, p.listprice,
1237
         p.unit, p.assembly, p.bin, p.onhand, p.formel,
1237
         p.unit, p.assembly, p.onhand, p.formel,
1238 1238
         p.notes AS partnotes, p.notes AS longdescription, p.not_discountable,
1239 1239
         p.inventory_accno_id, p.price_factor_id,
1240 1240

  
SL/IS.pm
1638 1638
           i.description, i.longdescription, i.qty, i.fxsellprice AS sellprice, i.discount, i.parts_id AS id, i.unit, i.deliverydate AS reqdate,
1639 1639
           i.project_id, i.serialnumber, i.id AS invoice_pos, i.pricegroup_id, i.ordnumber, i.transdate, i.cusordnumber, i.subtotal, i.lastcost,
1640 1640
           i.price_factor_id, i.price_factor, i.marge_price_factor,
1641
           p.partnumber, p.assembly, p.bin, p.notes AS partnotes, p.inventory_accno_id AS part_inventory_accno_id, p.formel, p.listprice,
1641
           p.partnumber, p.assembly, p.notes AS partnotes, p.inventory_accno_id AS part_inventory_accno_id, p.formel, p.listprice,
1642 1642
           pr.projectnumber, pg.partsgroup, prg.pricegroup
1643 1643

  
1644 1644
         FROM invoice i
......
1946 1946
         c3.new_chart_id AS expense_new_chart,
1947 1947
         date($transdate) - c3.valid_from AS expense_valid,
1948 1948

  
1949
         p.unit, p.assembly, p.bin, p.onhand,
1949
         p.unit, p.assembly, p.onhand,
1950 1950
         p.notes AS partnotes, p.notes AS longdescription,
1951 1951
         p.not_discountable, p.formel, p.payment_id AS part_payment_id,
1952 1952
         p.price_factor_id,
SL/InstanceConfiguration.pm
144 144
  return $self->{data}->{purchase_delivery_order_show_delete};
145 145
}
146 146

  
147
sub get_default_warehouse_id {
148
  my ($self) = @_;
149
  return ($self->{data}->{warehouse_id});
150
}
151

  
152
sub get_default_bin_id {
153
  my ($self) = @_;
154
  return ($self->{data}->{bin_id});
155
}
156

  
147 157
1;
148 158

  
149 159
__END__
......
256 266
Returns the default behavior for showing the delete button for the
257 267
corresponding record type (true or false).
258 268

  
269
=item C<get_default_warehouse_id>
270

  
271
Returns the default warehouse_id
272

  
273
=item C<get_default_bin_id>
274

  
275
Returns the default bin_id
276

  
259 277
=back
260 278

  
261 279
=head1 BUGS
SL/OE.pm
874 874
           c3.accno AS expense_accno,   c3.new_chart_id AS expense_new_chart,   date($transdate) - c3.valid_from as expense_valid,
875 875
           oe.ordnumber AS ordnumber_oe, oe.transdate AS transdate_oe, oe.cusordnumber AS cusordnumber_oe,
876 876
           p.partnumber, p.assembly, p.listprice, o.description, o.qty,
877
           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,
877
           o.sellprice, o.parts_id AS id, o.unit, o.discount, p.notes AS partnotes, p.inventory_accno_id AS part_inventory_accno_id,
878 878
           o.reqdate, o.project_id, o.serialnumber, o.ship, o.lastcost,
879 879
           o.ordnumber, o.transdate, o.cusordnumber, o.subtotal, o.longdescription,
880 880
           o.price_factor_id, o.price_factor, o.marge_price_factor,
bin/mozilla/ic.pl
1586 1586

  
1587 1587
  $form->get_lists('price_factors' => 'ALL_PRICE_FACTORS',
1588 1588
                   'partsgroup'    => 'all_partsgroup',
1589
                   'vendors'       => 'ALL_VENDORS',);
1589
                   'vendors'       => 'ALL_VENDORS',
1590
                   'warehouses'    => { 'key'    => 'WAREHOUSES',
1591
                                        'bins'   => 'BINS', });
1592
  # leerer wert für Lager und Lagerplatz korrekt einstellt
1593
  # ID 0 sollte in Ordnung sein, da der Zähler sowieso höher ist
1594
  my $no_default_bin_entry = { 'id' => '0', description => '--', 'BINS' => [ { id => '0', description => ''} ] };
1595
  push @ { $form->{WAREHOUSES} }, $no_default_bin_entry;
1596
  if (my $max = scalar @{ $form->{WAREHOUSES} }) {
1597

  
1598
    my $default_warehouse_id = $::instance_conf->get_default_warehouse_id;
1599
    my $default_bin_id       = $::instance_conf->get_default_bin_id;
1600
    $form->{warehouse_id} ||= $default_warehouse_id || $form->{WAREHOUSES}->[$max -1]->{id};
1601
    $form->{bin_id}       ||= $default_bin_id       ||  $form->{WAREHOUSES}->[$max -1]->{BINS}->[0]->{id};
1602
  }
1590 1603

  
1591 1604

  
1592 1605
  IC->retrieve_buchungsgruppen(\%myconfig, $form);
......
1847 1860
  $form->error($locale->text('Description must not be empty!')) unless $form->{description};
1848 1861
  $form->error($locale->text('Partnumber must not be set to empty!')) if $form->{id} && !$form->{partnumber};
1849 1862

  
1863
  # undef warehouse_id if the empty value is selected
1864
  if ( ($form->{warehouse_id} == 0) && ($form->{bin_id} == 0) ) {
1865
    undef $form->{warehouse_id};
1866
    undef $form->{bin_id};
1867
  }
1850 1868
  # save part
1851 1869
  if (IC->save(\%myconfig, \%$form) == 3) {
1852 1870
    $form->error($locale->text('Partnumber not unique!'));
locale/de/all
32 32
  '2. Quarter'                  => '2. Quartal',
33 33
  '3. Quarter'                  => '3. Quartal',
34 34
  '4. Quarter'                  => '4. Quartal',
35
  '<b> I DO CARE!</b> Please check create warehouse and bins and define a name for the warehouse (Bins will be created automatically) and then continue' => '<b>ICH KÜMMER MICH</b> Bitte haken Sie Lager und Lagerplätze erzeugen an (Automatisches Zuweisen der Lagerplätze) und vergeben einen Namen für dieses Lager (Lagerplätze werden automatisch übernommen). Danach auf weiter.',
36
  '<b> I DO CARE!</b> Please click back and cancel the update and come back after there has been at least one warehouse defined with bin(s).:' => '<b>ICH KÜMMER MICH</b> Brechen Sie das Update ab und legen selber mindestens ein Lager mit Lagerplätzen unter dem Menü System / Lager an.',
37
  '<b> I DO NOT CARE</b> Please click continue and the following data (see list) will be deleted:' => '<b>IST MIR EGAL</b> Mit einem Klick auf Weiter (rot) werden keine Daten übernommen, bzw. migriert und die folgende Information in der untenstehenden Liste wird gelöscht.',
38
  '<b>Automatically create new bins</b> in the following new warehouse ' => '<b>Automatisches Zuweisen der Lagerplätze</b> im folgenden neuem Lager:',
39
  '<b>Automatically create new bins</b> in the following warehouse if not selected in the list above' => '<b>Automatisches Zuweisen der Lagerplätze</b> im folgenden Lager, falls keine andere Zuweisung oben ausgewählt ist. ',
40
  '<b>Default Bins Migration !READ CAREFULLY!</b>' => 'Standardlagerplatz Migraition !AUFMERKSAM LESEN!',
35 41
  '<b>What</b> do you want to look for?' => '<b>Wonach</b> wollen Sie suchen?',
36 42
  'A Buchungsgruppe consists of a descriptive name and the account numbers for the income and expense accounts for those four tax zones as well as the inventory account number.' => 'Eine Buchungsgruppe besteht aus einem deskriptiven Namen, den Erl&ouml;s- und Aufwandskonten f&uuml;r diese vier Steuerzonen sowie aus einem Inventarkonto.',
37 43
  'A digit is required.'        => 'Eine Ziffer ist vorgeschrieben.',
......
65 71
  'ASSETS'                      => 'AKTIVA',
66 72
  'ATTENTION! If you enabled this feature you can not simply turn it off again without taking care that best_before fields are emptied in the database.' => 'ACHTUNG! Wenn Sie diese Einstellung aktivieren, dann können Sie sie später nicht ohne Weiteres deaktivieren, ohne dafür zu sorgen, dass die Felder der Mindeshaltbarkeitsdaten in der Datenbank leer gemacht werden.',
67 73
  'ATTENTION! You can not simply change it from periodic to perpetual once you started posting.' => 'ACHTUNG! Es kann nicht ohne Weiteres im laufenden Betrieb von der Aufwandsmethode zur Bestandsmethode gewechselt werden.',
74
  'AUTOMATICALLY MATCH BINS'    => 'LAGERPLÄTZE AUTOMATISCH ZUWEISEN',
68 75
  'Abort'                       => 'Abbrechen',
69 76
  'Abrechnungsnummer'           => 'Abrechnungsnummer',
70 77
  'Abteilung'                   => 'Abteilung',
......
297 304
  'Billing/shipping address (street)' => 'Rechnungsadresse (Straße)',
298 305
  'Billing/shipping address (zipcode)' => 'Rechnungsadresse (PLZ)',
299 306
  'Bin'                         => 'Lagerplatz',
300
  'Bin 2'                       => '',
301 307
  'Bin From'                    => 'Quelllagerplatz',
302 308
  'Bin List'                    => 'Lagerliste',
303 309
  'Bin To'                      => 'Ziellagerplatz',
......
396 402
  'Cash'                        => 'Zahlungsverkehr',
397 403
  'Cc'                          => 'Cc',
398 404
  'Cc E-mail'                   => 'CC (E-Mail)',
405
  'Change default bin for this parts' => 'Standardlagerplatz für diese Waren ändern',
399 406
  'Change kivitendo installation settings (all menu entries beneath \'System\')' => 'Ver&auml;ndern der kivitendo-Installationseinstellungen (Men&uuml;punkte unterhalb von \'System\')',
400 407
  'Change representative to'    => 'Vertreter ändern in',
401 408
  'Changes in this block are only sensible if the account is NOT a summary account AND there exists one valid taxkey. To select both Receivables and Payables only make sense for Payment / Receipt (i.e. account cash).' => 'Es ist nur sinnvoll Änderungen vorzunehmen, wenn das Konto KEIN Sammelkonto ist und wenn ein gültiger Steuerschlüssel für das Konto existiert. Gleichzeitig Haken bei Forderungen und Verbindlichkeiten zu setzen, macht auch NUR für den Zahlungsein- und Ausgang (bspw. Bank oder Kasse) Sinn.',
......
606 613
  'Decrease'                    => 'Verringern',
607 614
  'Default (no language selected)' => 'Standard (keine Sprache ausgewählt)',
608 615
  'Default Accounts'            => 'Standardkonten',
609
  'Default Bin'                 => '',
616
  'Default Bin'                 => 'Standard-Lagerplatz',
610 617
  'Default Customer/Vendor Language' => 'Standard-Kunden-/Lieferantensprache',
611
  'Default Warehouse'           => '',
618
  'Default Warehouse'           => 'Standard-Lager',
612 619
  'Default buchungsgruppe'      => 'Standardbuchungsgruppe',
613 620
  'Default output medium'       => 'Standardausgabekanal',
614 621
  'Default printer'             => 'Standarddrucker',
......
1006 1013
  'If you want to change any of these parameters then press the &quot;Back&quot; button, edit the file &quot;config/kivitendo.conf&quot; and login into the admin module again.' => 'Wenn Sie einen der Parameter &auml;ndern wollen, so dr&uuml;cken Sie auf den &quot;Zur&uuml;ck&quot;-Button, bearbeiten Sie die Datei &quot;config/kivitendo.conf&quot;, und melden Sie sich erneut im Administrationsbereich an.',
1007 1014
  'If you want to delete such a dataset you have to edit the user(s) that are using the dataset in question and have them use another dataset.' => 'Wenn Sie eine solche Datenbank l&ouml;schen wollen, so m&uuml;ssen Sie zuerst die Benutzer bearbeiten, die die fragliche Datenbank benutzen, und sie so &auml;ndern, dass sie eine andere Datenbank benutzen.',
1008 1015
  'If you want to set up the authentication database yourself then log in to the administration panel. kivitendo will then create the database and tables for you.' => 'Wenn Sie die Authentifizierungs-Datenbank selber einrichten wollen, so melden Sie sich im Administrationsbereich an. kivitendo wird dann die Datenbank und die erforderlichen Tabellen für Sie anlegen.',
1016
  'If your old bins match exactly Bins in the Warehouse CLICK on <b>AUTOMATICALLY MATCH BINS</b>.' => 'Falls die alte Lagerplatz-Beschreibung in Stammdaten genau mit einem Lagerplatz in einem vorhandenem Lager übereinstimmt, KLICK auf <b>LAGERPLÄTZE AUTOMATISCH ZUORDNEN</b>',
1009 1017
  'Illegal characters have been removed from the following fields: #1' => 'Ungültige Zeichen wurden aus den folgenden Feldern entfernt: #1',
1010 1018
  'Image'                       => 'Grafik',
1011 1019
  'Import'                      => 'Import',
......
1204 1212
  'Marked as paid'              => 'Als bezahlt markiert',
1205 1213
  'Marked entries printed!'     => 'Markierte Einträge wurden gedruckt!',
1206 1214
  'Master Data'                 => 'Stammdaten',
1215
  'Master Data Bin Text Deleted' => 'Gelöschte Stammdaten Freitext-Lagerplätze',
1207 1216
  'Max. Dunning Level'          => 'höchste Mahnstufe',
1208 1217
  'May'                         => 'Mai',
1209 1218
  'May '                        => 'Mai',
......
1379 1388
  'Others'                      => 'Andere',
1380 1389
  'Otherwise all users will only have access to their own settings.' => 'Andernfalls haben alle Benutzer nur Zugriff auf ihre Einstellungen.',
1381 1390
  'Otherwise the variable is only available for printing.' => 'Andernfalls steht die Variable nur beim Ausdruck zur Verfügung.',
1391
  'Otherwise you can simply check create warehouse and bins and define a name for the warehouse (Bins will be created automatically) and then continue' => 'Andernfalls einfach Lager und Lagerplätze erschaffen anhaken und einen Namen für das Lager vergeben (Lagerplätze werden dann automatisch hinzugefügt) danach auf weiter',
1382 1392
  'Out of balance transaction!' => 'Buchung ist nicht ausgeglichen!',
1383 1393
  'Out of balance!'             => 'Summen stimmen nicht berein!',
1384 1394
  'Output Number Format'        => 'Zahlenformat (Ausgabe)',
......
1929 1939
  'The \'tag\' field must only consist of alphanumeric characters or the carachters - _ ( )' => 'Das Feld \'tag\' darf nur aus alphanumerischen Zeichen und den Zeichen - _ ( ) bestehen.',
1930 1940
  'The AP transaction #1 has been deleted.' => 'Die Kreditorenbuchung #1 wurde gelöscht.',
1931 1941
  'The AR transaction #1 has been deleted.' => 'Die Debitorenbuchung #1 wurde gelöscht.',
1942
  'The Bins in Inventory were only a information text field.' => 'Die Lagerplätze unter Stammdaten/Waren, sind nur ein informatives Textfeld.',
1943
  'The Bins in master data were only a information text field.' => 'Die Lagerplätze unter Stammdaten/Waren, sind nur ein informatives Textfeld.',
1932 1944
  'The GL transaction #1 has been deleted.' => 'Die Dialogbuchung #1 wurde gelöscht.',
1933 1945
  'The LDAP server "#1:#2" is unreachable. Please check config/kivitendo.conf.' => 'Der LDAP-Server "#1:#2" ist nicht erreichbar. Bitte &uuml;berpr&uuml;fen Sie die Angaben in config/kivitendo.conf.',
1934 1946
  'The SEPA export has been created.' => 'Der SEPA-Export wurde erstellt',
......
2101 2113
  'There are #1 more open invoices for this customer with other currencies.' => 'Es gibt #1 weitere offene Rechnungen für diesen Kunden, die in anderen Währungen ausgestellt wurden.',
2102 2114
  'There are #1 more open invoices from this vendor with other currencies.' => 'Es gibt #1 weitere offene Rechnungen von diesem Lieferanten, die in anderen Währungen ausgestellt wurden.',
2103 2115
  'There are #1 unfinished follow-ups of which #2 are due.' => 'Es gibt #1 Wiedervorlage(n), von denen #2 fällig ist/sind.',
2116
  'There are Bins defined in your Inventory.' => 'Unter Stammdaten/Waren sind Lagerplätze defininert',
2117
  'There are Bins defined in your master data.' => 'Unter Stammdaten/Waren sind Lagerplätze defininert',
2104 2118
  'There are bookings to the account 3803 after 01.01.2007. If you didn\'t change this account manually to 19% the bookings are probably incorrect.' => 'Das Konto 3803 wurde nach dem 01.01.2007 bebucht. Falls Sie dieses Konto nicht manuell auf 19% gestellt haben sind die Buchungen wahrscheinlich mit falscher Umsatzsteuer gebucht worden.',
2105 2119
  'There are double partnumbers in your database.' => 'In ihrer Datenbank befinden sich mehrfach vergebene Artikelnummern.',
2106 2120
  'There are entries in tax where taxkey is NULL.' => 'In der Datenbank sind Steuern ohne Steuerschlüssel vorhanden (in der Tabelle tax Spalte taxkey).',
......
2133 2147
  'This customer number is already in use.' => 'Diese Kundennummer wird bereits verwendet.',
2134 2148
  'This feature especially prevents mistakes by mixing up prior tax and sales tax.' => 'Dieses Feature vermeidet insbesondere Verwechslungen von Umsatz- und Vorsteuer.',
2135 2149
  'This group will be called &quot;Full Access&quot;.' => 'Diese Gruppe wird &quot;Vollzugriff&quot; genannt.',
2150
  'This has been changed in this version, therefore please change the "old" bins to some real warehouse bins.' => 'Das wurde in dieser Version umgestellt, bitte ändern Sie die Freitext-Lagerplätze auf wirkliche Lagerplätze.',
2151
  'This has been changed in this version.' => 'Ab dieser Version ist dies nicht mehr so.',
2136 2152
  'This installation uses an unknown chart of accounts (&quot;#1&quot;). This database upgrade cannot create standard buchungsgruppen automatically.' => 'Diese Installation benutzt einen unbekannten Kontenrahmen (&quot;#1&quot;). Dieses Datenbankupgrade kann die Standardbuchungsgruppen nicht automatisch anlegen.',
2137 2153
  'This is a preliminary check for existing sources. Nothing will be created or deleted at this stage!' => 'In diesem Schritt werden bestehende Datenbanken gesucht. Es werden noch keine &Auml;nderungen vorgenommen!',
2138 2154
  'This is a very critical problem.' => 'Dieses Problem ist sehr schwerwiegend.',
2155
  'This is the default bin for parts' => 'Standard-Lagerplatz für Stammdaten/Waren',
2139 2156
  'This list is capped at 15 items to keep it fast. If you need a full list, please use reports.' => 'Diese Liste ist auf 15 Zeilen begrenzt. Wenn Sie eine vollständige Liste benötigen, erstellen Sie bitte einen Bericht.',
2140 2157
  'This means that the user has created an AP transaction and chosen a taxkey for sales taxes, or that he has created an AR transaction and chosen a taxkey for input taxes.' => 'Das bedeutet, dass ein Benutzer eine Kreditorenbuchung angelegt und in ihr einen Umsatzsteuer-Steuerschlüssel verwendet oder eine Debitorenbuchung mit Vorsteuer-Steuerschlüssel angelegt hat.',
2141 2158
  'This module can help you identify and correct such entries by analyzing the general ledger and presenting you likely solutions but also allowing you to fix problems yourself.' => 'Dieses Modul kann Ihnen helfen, problematische Einträge im Hauptbuch zu identifizieren und teilweise zu beheben. Dabei werden je nach Problem mögliche Lösungen aufgezeigt, wobei Sie die entscheiden können, welche Probleme automatisch gelöst werden sollen.',
......
2149 2166
  'This upgrade script tries to map all existing parts in the database to the newly created Buchungsgruppen.' => 'Dieses Upgradescript versucht, bei allen bestehenden Artikeln neu erstellte Buchungsgruppen zuzuordnen.',
2150 2167
  'This upgrade script tries to map all existing units in the database to the newly created units.' => 'Dieses Update-Script versucht, alle bestehenden Einheiten automatisch in die neuen Einheiten umzuwandeln.',
2151 2168
  'This vendor number is already in use.' => 'Diese Lieferantennummer wird bereits verwendet.',
2169
  'Three Options:'              => 'Drei Optionen:',
2152 2170
  'Time period for the analysis:' => 'Analysezeitraum:',
2153 2171
  'Timestamp'                   => 'Uhrzeit',
2154 2172
  'Title'                       => 'Titel',
......
2218 2236
  'Unbalanced Ledger'           => 'Bilanzfehler',
2219 2237
  'Unchecked custom variables will not appear in orders and invoices.' => 'Unmarkierte Variablen werden für diesen Artikel nicht in Aufträgen und Rechnungen angezeigt.',
2220 2238
  'Unfinished follow-ups'       => 'Nicht erledigte Wiedervorlagen',
2239
  'Unfortunately you have no warehouse defined.' => 'Leider, gibt es kein Lager in diesem Mandanten.',
2221 2240
  'Unit'                        => 'Einheit',
2222 2241
  'Unit (if missing or empty default unit will be used)' => 'Einheit (falls nicht vorhanden oder leer wird die Standardeinheit benutzt)',
2223 2242
  'Unit missing.'               => 'Die Einheit fehlt.',
sql/Pg-upgrade2/add_warehouse_defaults.sql
1
-- @tag: add_warehouse_defaults
2
-- @description: Standardlager und Lagerplatz in der Tabelle defaults. Sowie als ID-Verknüpfung in parts
3
-- @depends: release_3_0_0
4
-- @charset: utf-8
5
ALTER TABLE defaults ADD COLUMN warehouse_id integer references warehouse(id);
6
ALTER TABLE defaults add column bin_id integer references bin(id);
7
ALTER TABLE parts ADD COLUMN warehouse_id integer references warehouse(id);
8
ALTER TABLE parts add column bin_id integer references bin(id);
9

  
sql/Pg-upgrade2/default_bin_parts.pl
1
# @tag: default_bin_parts
2
# @description: Freitext Feld Lagerplatz nach Lager und Lagerplatz migrieren
3
# @depends: release_3_0_0 add_warehouse_defaults
4

  
5
package SL::DBUpgrade2::default_bin_parts;
6

  
7
use strict;
8
use utf8;
9
use Data::Dumper;
10
use SL::DBUtils;
11
use parent qw(SL::DBUpgrade2::Base);
12

  
13
sub run {
14
  my ($self) = @_;
15
  $::form->get_lists('warehouses' => { 'key'    => 'WAREHOUSES',
16
                                     'bins'   => 'BINS', });
17
  if (scalar @{ $::form->{WAREHOUSES} }) {
18
    $::form->{warehouse_id} ||= $::form->{WAREHOUSES}->[0]->{id};
19
    $::form->{bin_id}       ||= $::form->{WAREHOUSES}->[0]->{BINS}->[0]->{id};
20
  } else {
21
    $::form->{NO_WAREHOUSE} = 1;
22
  }
23
    $::form->{warehouse_id} = 0;    # 0 ist die ID für leere Option
24

  
25
  if ( $::form->{'continued'} ) {
26
    my $CREATE_BINS      = 0;
27
    my $CREATE_WAREHOUSE = 0;
28
    if (!defined($::form->{NO_WAREHOUSE}) && defined($::form->{create_new_bins}) && $::form->{warehouse_id_default}) {
29
      $CREATE_BINS = 1;
30
    }
31
    if (defined($::form->{NO_WAREHOUSE}) && defined($::form->{create_new_bins}) && $::form->{new_warehouse}) {
32
      $CREATE_WAREHOUSE = 1;
33
      $CREATE_BINS      = 1;
34
    }
35

  
36
    # Lager anlegen
37
    my $insert_warehouse_query = qq|INSERT into warehouse (description, invalid, sortkey) VALUES (?, 'false', 1) |;
38
    my $prepared_insert_warehouse_query   = $self->dbh->prepare($insert_warehouse_query)   || $self->db_error($insert_warehouse_query);
39

  
40
    # Lagerplatz anlegen
41
    my $insert_bin_query = qq|INSERT into bin (description, warehouse_id) VALUES (?, ?) |;
42
    my $prepared_insert_bin_query   = $self->dbh->prepare($insert_bin_query)   || $self->db_error($insert_bin_query);
43

  
44
    # Lagerplatz aus Liste zuweisen
45
    my $update_query = qq|UPDATE parts SET warehouse_id = ?, bin_id = ? WHERE id = ?|;
46
    my $prepared_update_query   = $self->dbh->prepare($update_query)   || $self->db_error($update_query);
47

  
48

  
49
    # gerade angelegten Lagerplatz zuweisen
50
    my $update_new_bin_query = qq|UPDATE parts SET warehouse_id = (SELECT warehouse_id from bin where description = ?),
51
                                           bin_id       = (SELECT id from bin where description       = ?)
52
                                           WHERE id = ?|;
53
    my $prepared_update_new_bin_query   = $self->dbh->prepare($update_new_bin_query)   || $self->db_error($update_new_bin_query);
54

  
55

  
56
    # kein lager vorhanden, aber wir legen ein neues an.
57
    if ($CREATE_WAREHOUSE && $CREATE_BINS) {
58
      $prepared_insert_warehouse_query->execute($::form->{new_warehouse}) || $self->db_error($insert_warehouse_query);
59
      $prepared_insert_warehouse_query->finish();
60
      my $query = qq|SELECT id FROM warehouse LIMIT 1;|;
61
      my $sth = $self->dbh->prepare($query);
62
      $sth->execute || $::form->dberror($query);
63
      $::form->{warehouse_id_default} = $sth->fetchrow_array();
64
    }
65

  
66
    foreach my $i (1 .. $::form->{rowcount}) {
67

  
68
      # Best Case: Lagerplatz aus Liste gewählt
69
      if ($::form->{"bin_id_$i"}) {
70
        $prepared_update_query->execute($::form->{"warehouse_id_$i"}, $::form->{"bin_id_$i"}, $::form->{"partid_$i"}) || $self->db_error($update_query);
71
      } elsif ($CREATE_BINS) {
72
        # Lager vorhanden, bzw. vorher erstellt.  alte bins automatisch hinzufügen und zum Standardlagerplatz verdrahten
73
        $prepared_insert_bin_query->execute($::form->{"bin_$i"}, $::form->{warehouse_id_default}) || $self->db_error($insert_bin_query);
74
        $prepared_update_new_bin_query->execute($::form->{"bin_$i"}, $::form->{"bin_$i"}, $::form->{"partid_$i"}) || $self->db_error($update_new_bin_query);
75
      }
76
    }
77
    $prepared_insert_bin_query->finish();
78
    $prepared_update_new_bin_query->finish();
79
    $prepared_update_query->finish();
80
    $::form->{FINISH} = 1;
81
    # das alte textfeld entfernen
82
    #my $query = qq|ALTER TABLE parts drop COLUMN bin|;
83
    #$self->db_query($query);
84
    #return 1;
85
  }
86

  
87
  my $query = qq|SELECT id, partnumber, description, bin
88
                   FROM parts pa
89
                   WHERE '' <> NULLIF ( bin, '')
90
                   ORDER BY partnumber;|;
91

  
92
  my $sth = $self->dbh->prepare($query);
93
  $sth->execute || $::form->dberror($query);
94

  
95
  $::form->{PARTS} = [ selectall_hashref_query($::form, $self->dbh, $query) ];
96

  
97
  if ( (scalar @{ $::form->{PARTS} } > 0 ) && !$::form->{NO_WAREHOUSE} && !$::form->{FINISH} )  {
98
    &print_error_message;
99
    return 2;
100
  } elsif ( (scalar @{ $::form->{PARTS} } > 0 ) && $::form->{NO_WAREHOUSE} && !$::form->{FINISH} ) {
101
    &print_error_message_no_warehouse;
102
    return 2;
103
  }
104
  # das alte textfeld entfernen
105
  # hier nochmal, da oben schon ein return 1 gesetzt ist
106
  my $query = qq|ALTER TABLE parts drop COLUMN bin|;
107
  $self->db_query($query);
108
  return 1;
109
}
110

  
111
sub print_error_message {
112
  print $::form->parse_html_template("dbupgrade/default_bin_parts");
113
}
114

  
115
sub print_error_message_no_warehouse {
116
  print $::form->parse_html_template("dbupgrade/default_bin_parts_no_warehouse");
117
}
118

  
119

  
120
1;
templates/webpages/dbupgrade/default_bin_parts.html
1
[%- USE T8 %]
2
[%- USE HTML %]
3
[%- USE LxERP %]
4
[%- USE JavaScript %]
5
 <script type="text/javascript" src="js/common.js"></script>
6
 <script type="text/javascript" src="js/parts_language_selection.js"></script>
7
 <script type="text/javascript">
8
  <!--
9
     warehouses = new Array();
10
     [%- USE WAREHOUSES_it = Iterator(WAREHOUSES) %][%- FOREACH warehouse = WAREHOUSES_it %]
11
      warehouses[[% WAREHOUSES_it.count - 1 %]] = new Array();
12
      warehouses[[% WAREHOUSES_it.count - 1 %]]['id'] = [% warehouse.id %];
13
      warehouses[[% WAREHOUSES_it.count - 1 %]]['bins'] = new Array();
14
      [% USE BINS_it = Iterator(warehouse.BINS) %][% FOREACH bin = BINS_it %]
15
      warehouses[[% WAREHOUSES_it.count - 1%]]['bins'][[% BINS_it.count - 1 %]] = new Array();
16
      warehouses[[% WAREHOUSES_it.count - 1%]]['bins'][[% BINS_it.count - 1 %]]['description'] = "[% JavaScript.escape(bin.description) %]";
17
      warehouses[[% WAREHOUSES_it.count - 1%]]['bins'][[% BINS_it.count - 1 %]]['id'] = [% bin.id %];
18
      [% END %]
19
      [% END %]
20
      //var rowcount = [% rowcount %];
21
      //var rowcount = 3; //[% rowcount %];
22
      function warehouse_selected(warehouse_id, bin_id, loop) {
23
        var control = document.getElementById("bin_id_" + loop);
24

  
25
        for (var i = control.options.length - 1; i >= 0; i--) {
26
          control.options[i] = null;
27
        }
28

  
29
        var warehouse_index = 0;
30

  
31
        for (i = 0; i < warehouses.length; i++)
32
          if (warehouses[i]['id'] == warehouse_id) {
33
            warehouse_index = i;
34
            break;
35
          }
36

  
37
        var warehouse = warehouses[warehouse_index];
38
        var bin_index = 0;
39

  
40
        for (i = 0; i < warehouse['bins'].length; i++)
41
          if (warehouse['bins'][i]['id'] == bin_id) {
42
            bin_index = i;
43
            break;
44
          }
45

  
46
        for (i = 0; i < warehouse['bins'].length; i++) {
47
          control.options[i] = new Option(warehouse['bins'][i]['description'], warehouse['bins'][i]['id']);
48
        }
49

  
50

  
51
        control.options[bin_index].selected = true;
52
      }
53
      function bin_match(rowcount) {
54
        for (i = 1; i < rowcount + 1; i++) {              // über alle parts_id
55
          var lagerplatz = document.getElementById("bin_" + i).value;
56
          var control = document.getElementById("bin_id_" + i);
57
          var bin_index = 0;
58
          //alert(lagerplatz);
59
          for (j = 0; j < warehouses.length; j++) {       // über alle lager
60
            var warehouse = warehouses[j];
61

  
62
            for (k = 0; k < warehouse['bins'].length; k++) {       // über alle lagerplätze
63

  
64
              if (lagerplatz == warehouse['bins'][k]['description']) {
65
                //alert('ware ' + warehouse['bins'][k]['description']);
66
                var lager = document.getElementById("warehouse_id_" + i);
67
                lager.selectedIndex = j;
68
                bin_index = k;
69
                break;
70
                /*var lagerplatz = document.getElementById("bin_id_" + i);
71
                alert('lagerplatz ' + lagerplatz.value);
72
                lagerplatz.selectedIndex = k; */
73
              }
74

  
75
            }
76
          }
77
        }
78
        for (i = 0; i < warehouse['bins'].length; i++) {
79
                control.options[i] = new Option(warehouse['bins'][i]['description'], warehouse['bins'][i]['id']);
80
              }
81
              control.options[bin_index].selected = true;
82

  
83

  
84
      }
85

  
86

  
87
      $(function() {
88
        warehouse_selected([% warehouse_id %], [% bin_id %]);
89
      })
90
    -->
91
 </script>
92

  
93

  
94

  
95
<div class="listtop">[% '<b>Default Bins Migration !READ CAREFULLY!</b>' | $T8 %]</div>
96
<form name="Form" method="post" action="login.pl">
97
<input type="hidden" name="action" value="login">
98
<input type="hidden" name="continued" value="1">
99

  
100

  
101

  
102
<p>[% 'There are Bins defined in your Inventory.' | $T8 %]</p>
103
<p>[% 'The Bins in Inventory were only a information text field.' | $T8 %]</p>
104
<p>[% 'This has been changed in this version, therefore please change the "old" bins to some real warehouse bins.' | $T8 %]</p>
105
<p>[% 'If your old bins match exactly Bins in the Warehouse CLICK on <b>AUTOMATICALLY MATCH BINS</b>.' | $T8 %]</p>
106
<p>[% 'Otherwise you can simply check create warehouse and bins and define a name for the warehouse (Bins will be created automatically) and then continue'  | $T8 %]</p>
107

  
108
<p>[% 'Please change the partnumber of the following parts and run the update again:' | $T8 %]</p>
109
<table>
110
  <tr>
111
    <th class="listheading">[% 'Partnumber' | $T8 %]</th>
112
    <th class="listheading">[% 'Description' | $T8 %]</th>
113
    <th class="listheading">[% 'Bin' | $T8 %]</th>
114
    <th class="listheading">[% 'Default Warehouse' | $T8 %]</th>
115
    <th class="listheading">[% 'Default Bin' | $T8 %]</th>
116
  </tr>
117

  
118
  [% SET row_odd = '1' %][% FOREACH row = PARTS %]
119
  <tr class="listrow[% IF row_odd %]1[% SET row_odd = '0' %][% ELSE %]0[% SET row_odd = '1' %][% END %]">
120
   <td align="left"> [% HTML.escape(row.partnumber) %]</a></td>
121
    <td align="left"> [% HTML.escape(row.description) %]</a></td>
122
    <td align="right">[% HTML.escape(row.bin) %]
123
    <input type="hidden" id="bin_[% loop.count %]" name="bin_[% loop.count %]" value="[% HTML.escape(row.bin) %]">
124
    </td>
125
    <td>
126
    <input type="hidden" name='partid_[% loop.count %]' value='[% HTML.escape(row.id) %]'>
127
     <select id="warehouse_id_[% loop.count %]" name="warehouse_id_[% loop.count %]" onchange="warehouse_selected(warehouses[this.selectedIndex]['id'], 0, [% loop.count %])">
128
             [%- FOREACH warehouse = WAREHOUSES %]
129
               <option value="[% HTML.escape(warehouse.id) %]"[% IF warehouse_id  == warehouse.id %] selected[% END %]>[% warehouse.description %]</option>
130
             [%- END %]
131
                <option value=""  [% IF warehouse_id  == 0 %] selected[% END %] ></option>
132
     </select>
133
    </td>
134
    <td><select id="bin_id_[% loop.count %]" name="bin_id_[% loop.count %]"></select></td>
135
  </tr>
136
  [% SET rowcount = loop.count %]
137
  [% END %]
138
  <input type="hidden" name="rowcount" value="[% rowcount %]">
139
  <tr><td colspan="5"><hr/></td></tr>
140
  <tr><td colspan="5">
141
         <input type="checkbox" name="create_new_bins"> [% '<b>Automatically create new bins</b> in the following warehouse if not selected in the list above' | $T8 %]
142
          <select id="warehouse_id_default" name="warehouse_id_default">
143
             [%- FOREACH warehouse = WAREHOUSES %]
144
               <option value="[% HTML.escape(warehouse.id) %]"[% IF warehouse_id  == warehouse.id %] selected[% END %]>[% warehouse.description %]</option>
145
             [%- END %]
146
                <option value=""  [% IF warehouse_id  == 0 %] selected[% END %] ></option>
147
         </select>
148
      </td>
149
  </tr>
150

  
151
  <tr><td colspan="5"><hr/></td></tr>
152
 <tr><td><input type="button" class="submit" onclick="history.back()" value="[% 'Back' | $T8 %]"> </td><td colspan="3" align="center"><b><input style="background-color:#FFEE66" type="button" value="[% 'AUTOMATICALLY MATCH BINS' | $T8 %]"  onclick="bin_match([% rowcount %])"></b> </td><td><input type="submit" value="[% 'Continue' | $T8 %]"></td></tr>
153
</table>
154
</form>
templates/webpages/dbupgrade/default_bin_parts_no_warehouse.html
1
[%- USE T8 %]
2
[%- USE HTML %]
3
[%- USE LxERP %]
4

  
5
<div class="listtop">[% '<b>Default Bins Migration !READ CAREFULLY!</b>' | $T8 %]</div>
6
<form name="Form" method="post" action="login.pl">
7
<input type="hidden" name="action" value="login">
8
<input type="hidden" name="continued" value="1">
9

  
10
<p>[% 'There are Bins defined in your master data.' | $T8 %]</p>
11
<p>[% 'The Bins in master data were only a information text field.' | $T8 %]</p>
12
<p>[% 'This has been changed in this version.' | $T8 %]</p>
13
<p>[% 'Unfortunately you have no warehouse defined.' | $T8 %]</p>
14

  
15
<p>[% 'Three Options:' | $T8 %]</p>
16
<p>[% '<b> I DO NOT CARE</b> Please click continue and the following data (see list) will be deleted:' | $T8 %]</p>
17
<p>[% '<b> I DO CARE!</b> Please click back and cancel the update and come back after there has been at least one warehouse defined with bin(s).:' | $T8 %]</p>
18
<p>[% '<b> I DO CARE!</b> Please check create warehouse and bins and define a name for the warehouse (Bins will be created automatically) and then continue'  | $T8 %]</p>
19

  
20
<table>
21
  <tr>
22
    <th class="listheading">[% 'Partnumber' | $T8 %]</th>
23
    <th class="listheading">[% 'Description' | $T8 %]</th>
24
    <th class="listheading">[% 'Master Data Bin Text Deleted' | $T8 %]</th>
25
  </tr>
26

  
27
  [% SET row_odd = '1' %][% FOREACH row = PARTS %]
28
  <tr class="listrow[% IF row_odd %]1[% SET row_odd = '0' %][% ELSE %]0[% SET row_odd = '1' %][% END %]">
29
   <td align="left"> [% HTML.escape(row.partnumber) %]</a></td>
30
    <td align="left"> [% HTML.escape(row.description) %]</a></td>
31
    <td align="right">[% HTML.escape(row.bin) %]
32
    <input type="hidden" name='partid_[% loop.count %]' value='[% HTML.escape(row.id) %]'>
33
    <input type="hidden" id="bin_[% loop.count %]" name="bin_[% loop.count %]" value="[% HTML.escape(row.bin) %]">
34
   </tr>
35
  [% SET rowcount = loop.count %]
36
  [% END %]
37
  <input type="hidden" name="rowcount" value="[% rowcount %]">
38
<tr><td colspan="5"><hr/></td></tr>
39
<tr><td colspan="5"><input type="checkbox" name="create_new_bins"> [% '<b>Automatically create new bins</b> in the following new warehouse ' | $T8 %] <input type="text" name="new_warehouse"></td></tr>
40
<tr><td colspan="5"><hr/></td></tr>
41
<tr><td><input type="button" class="submit" onclick="history.back()" value="[% 'Back' | $T8 %]"> </td><td colspan="3" align="center"><td><input style="background-color:#FA1400" type="submit" value="[% 'Continue' | $T8 %]"></td></tr>
42
</table>
43
</form>
templates/webpages/ic/form_header.html
1
[%- USE T8 %]
1
[[%- USE T8 %]
2 2
[%- USE HTML %]
3 3
[%- USE LxERP %]
4
 <script type="text/javascript" src="js/common.js"></script>
5
 <script type="text/javascript" src="js/parts_language_selection.js"></script>
6

  
4
[% PROCESS 'common/select_warehouse_bin.html' %]
7 5
 <p><div class="listtop">[% title %]  [% HTML.escape(partnumber) %]  [% HTML.escape(description) %]</div></p>
8 6

  
9 7
[% PROCESS 'common/flash.html' %]
......
233 231
           <td><input name="rop" size="10" value="[% LxERP.format_amount(rop) %]"></td>
234 232
          </tr>
235 233
          <tr>
236
           <th align="right" nowrap="true">[% 'Bin' | $T8 %]</th>
237
           <td><input name="bin" size="10" value="[% HTML.escape(bin) %]"></td>
234
           <th align="right" nowrap="true">[% 'Default Warehouse' | $T8 %] [% HTML.escape(bin_id) %]</th>
235
           <td>
236
            <select name="warehouse_id" onchange="warehouse_selected(warehouses[this.selectedIndex]['id'], 0)">
237
             [%- FOREACH warehouse = WAREHOUSES %]
238
               <option value="[% HTML.escape(warehouse.id) %]"[% IF warehouse_id == warehouse.id %] selected[% END %]>[% warehouse.description %]</option>
239
             [%- END %]
240
            </select>
241
          </td>
242
          </tr>
243
          <tr>
244
           <th align="right" nowrap="true">[% 'Default Bin' | $T8 %]</th>
245
           <td><select id="bin_id" name="bin_id"></select></td>
238 246
          </tr>
239 247
        [%- END %]
240 248
          <tr>

Auch abrufbar als: Unified diff