--- /dev/null
+#====================================================================
+# LX-Office ERP
+# Copyright (C) 2004
+# Based on SQL-Ledger Version 2.1.9
+# Web http://www.lx-office.org
+#
+#=====================================================================
+# SQL-Ledger Accounting
+# Copyright (C) 1999-2003
+#
+# Author: Dieter Simader
+# Email: dsimader@sql-ledger.org
+# Web: http://www.sql-ledger.org
+#
+# Contributors:
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#======================================================================
+#
+# Delivery Order entry module
+#======================================================================
+
+package DO;
+
+use List::Util qw(max);
+use YAML;
+
+use SL::AM;
+use SL::Common;
+use SL::DBUtils;
+
+sub transactions {
+ $main::lxdebug->enter_sub();
+
+ my ($self) = @_;
+
+ my $myconfig = \%main::myconfig;
+ my $form = $main::form;
+
+ # connect to database
+ my $dbh = $form->get_standard_dbh($myconfig);
+
+ my (@where, @values, $where);
+
+ my $vc = $form->{vc} eq "customer" ? "customer" : "vendor";
+
+ $query =
+ qq|SELECT dord.id, dord.donumber, dord.ordnumber, dord.oreqnumber, dord.transdate,
+ ct.name, dord.${vc}_id, dord.globalproject_id,
+ dord.closed, dord.delivered, dord.shippingpoint, dord.shipvia,
+ dord.transaction_description,
+ pr.projectnumber AS globalprojectnumber,
+ e.name AS employee,
+ sm.name AS salesman,
+ oreq.id AS oreq_id,
+ oe.id AS oe_id
+ FROM delivery_orders dord
+ LEFT JOIN $vc ct ON (dord.${vc}_id = ct.id)
+ LEFT JOIN employee e ON (dord.employee_id = e.id)
+ LEFT JOIN employee sm ON (dord.salesman_id = sm.id)
+ LEFT JOIN project pr ON (dord.globalproject_id = pr.id)
+ LEFT JOIN order_request oreq ON (dord.oreqnumber = oreq.oreqnumber)
+ LEFT JOIN oe ON ((dord.ordnumber = oe.ordnumber) AND NOT COALESCE(oe.quotation, FALSE))|;
+
+ push @where, ($form->{type} eq 'sales_delivery_order' ? '' : 'NOT ') . qq|COALESCE(dord.is_sales, FALSE)|;
+
+ my $department_id = (split /--/, $form->{department})[1];
+ if ($department_id) {
+ push @where, qq|dord.department_id = ?|;
+ push @values, conv_i($department_id);
+ }
+
+ if ($form->{project_id}) {
+ $query .=
+ qq|(dord.globalproject_id = ?) OR EXISTS
+ (SELECT * FROM delivery_order_items doi
+ WHERE (doi.project_id = ?) AND (oi.delivery_order_id = dord.id))|;
+ push @values, conv_i($form->{project_id}), conv_i($form->{project_id});
+ }
+
+ if ($form->{"${vc}_id"}) {
+ push @where, qq|dord.${vc}_id = ?|;
+ push @values, $form->{"${vc}_id"};
+
+ } elsif ($form->{$vc}) {
+ push @where, qq|ct.name ILIKE ?|;
+ push @values, '%' . $form->{$vc} . '%';
+ }
+
+ foreach my $item (qw(employee_id salesman_id)) {
+ next unless ($form->{$item});
+ push @where, "dord.$item = ?";
+ push @values, conv_i($form->{$item});
+ }
+
+ foreach my $item (qw(donumber ordnumber cusordnumber transaction_description)) {
+ next unless ($form->{$item});
+ push @where, qq|dord.$item ILIKE ?|;
+ push @values, '%' . $form->{$item} . '%';
+ }
+
+ if (!($form->{open} && $form->{closed})) {
+ push @where, ($form->{open} ? "NOT " : "") . "COALESCE(dord.closed, FALSE)";
+ }
+
+ if (($form->{notdelivered} || $form->{delivered}) &&
+ ($form->{notdelivered} ne $form->{delivered})) {
+ push @where, ($form->{delivered} ? "" : "NOT ") . "COALESCE(dord.delivered, FALSE)";
+ }
+
+ if($form->{transdatefrom}) {
+ push @where, qq|dord.transdate >= ?|;
+ push @values, conv_date($form->{transdatefrom});
+ }
+
+ if($form->{transdateto}) {
+ push @where, qq|dord.transdate <= ?|;
+ push @values, conv_date($form->{transdateto});
+ }
+
+ if (@where) {
+ $query .= " WHERE " . join(" AND ", map { "($_)" } @where);
+ }
+
+ my %allowed_sort_columns = (
+ "transdate" => "dord.transdate",
+ "id" => "dord.id",
+ "donumber" => "dord.donumber",
+ "ordnumber" => "dord.ordnumber",
+ "oreqnumber" => "dord.oreqnumber",
+ "name" => "ct.name",
+ "employee" => "e.name",
+ "salesman" => "sm.name",
+ "shipvia" => "dord.shipvia",
+ "transaction_description" => "dord.transaction_description"
+ );
+
+ my $sortoder = "dord.id";
+ if ($form->{sort} && grep($form->{sort}, keys(%allowed_sort_columns))) {
+ $sortorder = $allowed_sort_columns{$form->{sort}};
+ }
+
+ $query .= qq| ORDER by | . $sortorder;
+
+ $form->{DO} = selectall_hashref_query($form, $dbh, $query, @values);
+
+ $main::lxdebug->dump(0, "DO", $form->{DO});
+
+ $main::lxdebug->leave_sub();
+}
+
+sub save {
+ $main::lxdebug->enter_sub();
+
+ my ($self) = @_;
+
+ my $myconfig = \%main::myconfig;
+ my $form = $main::form;
+
+ # connect to database, turn off autocommit
+ my $dbh = $form->get_standard_dbh($myconfig);
+
+ my ($query, @values, $sth, $null);
+
+ my $all_units = AM->retrieve_units($myconfig, $form);
+ $form->{all_units} = $all_units;
+
+ $form->{donumber} = $form->update_defaults($myconfig, $form->{type} eq 'sales_delivery_order' ? 'sdonumber' : 'pdonumber', $dbh) unless $form->{donumber};
+ $form->{employee_id} = (split /--/, $form->{employee})[1] if !$form->{employee_id};
+ $form->get_employee($dbh) unless ($form->{employee_id});
+
+ my $ml = ($form->{type} eq 'sales_delivery_order') ? 1 : -1;
+
+ if ($form->{id}) {
+
+ $query = qq|DELETE FROM delivery_order_items_stock WHERE delivery_order_item_id IN (SELECT id FROM delivery_order_items WHERE delivery_order_id = ?)|;
+ do_query($form, $dbh, $query, conv_i($form->{id}));
+
+ $query = qq|DELETE FROM delivery_order_items WHERE delivery_order_id = ?|;
+ do_query($form, $dbh, $query, conv_i($form->{id}));
+
+ $query = qq|DELETE FROM shipto WHERE trans_id = ? AND module = 'DO'|;
+ do_query($form, $dbh, $query, conv_i($form->{id}));
+
+ } else {
+
+ $query = qq|SELECT nextval('id')|;
+ ($form->{id}) = selectrow_query($form, $dbh, $query);
+
+ $query = qq|INSERT INTO delivery_orders (id, donumber, employee_id) VALUES (?, '', ?)|;
+ do_query($form, $dbh, $query, $form->{id}, conv_i($form->{employee_id}));
+ }
+
+ my $project_id;
+ my $reqdate;
+
+ $form->get_lists('price_factors' => 'ALL_PRICE_FACTORS');
+ my %price_factors = map { $_->{id} => $_->{factor} } @{ $form->{ALL_PRICE_FACTORS} };
+ my $price_factor;
+
+ my %part_id_map = map { $_ => 1 } grep { $_ } map { $form->{"id_$_"} } (1 .. $form->{rowcount});
+ my @part_ids = keys %part_id_map;
+ my %part_unit_map;
+
+ if (@part_ids) {
+ $query = qq|SELECT id, unit FROM parts WHERE id IN (| . join(', ', map { '?' } @part_ids) . qq|)|;
+ %part_unit_map = selectall_as_map($form, $dbh, $query, 'id', 'unit', @part_ids);
+ }
+
+ my $q_item_id = qq|SELECT nextval('delivery_order_items_id')|;
+ my $h_item_id = prepare_query($form, $dbh, $q_item_id);
+
+ my $q_item =
+ qq|INSERT INTO delivery_order_items (
+ id, delivery_order_id, parts_id, description, longdescription, qty, base_qty,
+ sellprice, discount, unit, reqdate, project_id, serialnumber,
+ ordnumber, transdate, cusordnumber,
+ lastcost, price_factor_id, price_factor, marge_price_factor,
+ v_partnumber, v_description)
+ VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
+ (SELECT factor FROM price_factors WHERE id = ?), ?, ?, ?)|;
+ my $h_item = prepare_query($form, $dbh, $q_item);
+
+ my $q_item_stock =
+ qq|INSERT INTO delivery_order_items_stock (delivery_order_item_id, qty, unit, warehouse_id, bin_id, chargenumber)
+ VALUES (?, ?, ?, ?, ?, ?)|;
+ my $h_item_stock = prepare_query($form, $dbh, $q_item_stock);
+
+ my $in_out = $form->{type} =~ /^sales/ ? 'out' : 'in';
+
+ for my $i (1 .. $form->{rowcount}) {
+ next if (!$form->{"id_$i"});
+
+ $form->{"qty_$i"} = $form->parse_amount($myconfig, $form->{"qty_$i"});
+
+ my $item_unit = $part_unit_map{$form->{"id_$i"}};
+
+ my $basefactor = 1;
+ if (defined($all_units->{$item_unit}->{factor}) && (($all_units->{$item_unit}->{factor} * 1) != 0)) {
+ $basefactor = $all_units->{$form->{"unit_$i"}}->{factor} / $all_units->{$item_unit}->{factor};
+ }
+ my $baseqty = $form->{"qty_$i"} * $basefactor;
+
+ $form->{"lastcost_$i"} *= 1;
+
+ # set values to 0 if nothing entered
+ $form->{"discount_$i"} = $form->parse_amount($myconfig, $form->{"discount_$i"}) / 100;
+ $form->{"sellprice_$i"} = $form->parse_amount($myconfig, $form->{"sellprice_$i"});
+
+ $price_factor = $price_factors{ $form->{"price_factor_id_$i"} } || 1;
+ $linetotal = $form->round_amount($form->{"sellprice_$i"} * $form->{"qty_$i"} / $price_factor, 2);
+
+ $reqdate = ($form->{"reqdate_$i"}) ? $form->{"reqdate_$i"} : undef;
+
+ do_statement($form, $h_item_id, $q_item_id);
+ my ($item_id) = $h_item_id->fetchrow_array();
+
+ # save detail record in delivery_order_items table
+ @values = (conv_i($item_id), conv_i($form->{id}), conv_i($form->{"id_$i"}),
+ $form->{"description_$i"}, $form->{"longdescription_$i"},
+ $form->{"qty_$i"}, $baseqty,
+ $form->{"sellprice_$i"}, $form->{"discount_$i"},
+ $form->{"unit_$i"}, conv_date($reqdate), conv_i($form->{"project_id_$i"}),
+ $form->{"serialnumber_$i"},
+ $form->{"ordnumber_$i"}, conv_date($form->{"transdate_$i"}),
+ $form->{"cusordnumber_$i"},
+ $form->{"lastcost_$i"},
+ conv_i($form->{"price_factor_id_$i"}), conv_i($form->{"price_factor_id_$i"}),
+ conv_i($form->{"marge_price_factor_$i"}),
+ $form->{"v_partnumber_$i"}, $form->{"v_description_$i"});
+ do_statement($form, $h_item, $q_item, @values);
+
+ my $stock_info = DO->unpack_stock_information('packed' => $form->{"stock_${in_out}_$i"});
+
+ foreach my $sinfo (@{ $stock_info }) {
+ @values = ($item_id, $sinfo->{qty}, $sinfo->{unit}, conv_i($sinfo->{warehouse_id}),
+ conv_i($sinfo->{bin_id}), $sinfo->{chargenumber});
+ do_statement($form, $h_item_stock, $q_item_stock, @values);
+ }
+ }
+
+ $h_item_id->finish();
+ $h_item->finish();
+ $h_item_stock->finish();
+
+ ($null, $form->{department_id}) = split(/--/, $form->{department});
+
+ # save DO record
+ $query =
+ qq|UPDATE delivery_orders SET
+ donumber = ?, ordnumber = ?, cusordnumber = ?, oreqnumber = ?, transdate = ?, vendor_id = ?,
+ customer_id = ?, reqdate = ?,
+ shippingpoint = ?, shipvia = ?, notes = ?, intnotes = ?, closed = ?,
+ delivered = ?, department_id = ?, language_id = ?, shipto_id = ?,
+ globalproject_id = ?, employee_id = ?, salesman_id = ?, cp_id = ?, transaction_description = ?,
+ is_sales = ?
+ WHERE id = ?|;
+
+ @values = ($form->{donumber}, $form->{ordnumber},
+ $form->{cusordnumber}, $form->{oreqnumber}, conv_date($form->{transdate}),
+ conv_i($form->{vendor_id}), conv_i($form->{customer_id}),
+ conv_date($reqdate), $form->{shippingpoint}, $form->{shipvia},
+ $form->{notes}, $form->{intnotes},
+ $form->{closed} ? 't' : 'f', $form->{delivered} ? "t" : "f",
+ conv_i($form->{department_id}), conv_i($form->{language_id}), conv_i($form->{shipto_id}),
+ conv_i($form->{globalproject_id}), conv_i($form->{employee_id}),
+ conv_i($form->{salesman_id}), conv_i($form->{cp_id}),
+ $form->{transaction_description},
+ $form->{type} =~ /^sales/ ? 't' : 'f',
+ conv_i($form->{id}));
+ do_query($form, $dbh, $query, @values);
+
+ # add shipto
+ $form->{name} = $form->{ $form->{vc} };
+ $form->{name} =~ s/--$form->{"$form->{vc}_id"}//;
+
+ if (!$form->{shipto_id}) {
+ $form->add_shipto($dbh, $form->{id}, "DO");
+ }
+
+ # save printed, emailed, queued
+ $form->save_status($dbh);
+
+ my $rc = $dbh->commit();
+
+ $form->{saved_donumber} = $form->{donumber};
+
+ Common::webdav_folder($form) if ($main::webdav);
+
+ $main::lxdebug->leave_sub();
+
+ return $rc;
+}
+
+sub close_order {
+ $main::lxdebug->enter_sub();
+
+ my ($self) = @_;
+
+ my $myconfig = \%main::myconfig;
+ my $form = $main::form;
+
+ return $main::lxdebug->leave_sub() unless ($form->{id});
+
+ my $dbh = $form->get_standard_dbh($myconfig);
+ do_query($form, $dbh, qq|UPDATE do SET closed = TRUE where id = ?|, conv_i($form->{id}));
+ $dbh->commit();
+
+ $main::lxdebug->leave_sub();
+}
+
+sub delete {
+ $main::lxdebug->enter_sub();
+
+ my ($self) = @_;
+
+ my $myconfig = \%main::myconfig;
+ my $form = $main::form;
+ my $spool = $main::spool;
+
+ # connect to database
+ my $dbh = $form->get_standard_dbh($myconfig);
+
+ # delete spool files
+ my $query = qq|SELECT s.spoolfile FROM status s WHERE s.trans_id = ?|;
+ my $sth = prepare_execute_query($form, $dbh, $query, conv_i($form->{id}));
+
+ my $spoolfile;
+ my @spoolfiles = ();
+
+ while (($spoolfile) = $sth->fetchrow_array) {
+ push @spoolfiles, $spoolfile;
+ }
+ $sth->finish();
+
+ # delete-values
+ @values = (conv_i($form->{id}));
+
+ # delete status entries
+ $query = qq|DELETE FROM status
+ WHERE trans_id = ?|;
+ do_query($form, $dbh, $query, @values);
+
+ # delete individual entries
+ $query = qq|DELETE FROM delivery_order_items_stock
+ WHERE delivery_order_item_id IN (
+ SELECT id FROM delivery_order_items
+ WHERE delivery_order_id = ?
+ )|;
+ do_query($form, $dbh, $query, @values);
+
+ # delete individual entries
+ $query = qq|DELETE FROM delivery_order_items
+ WHERE delivery_order_id = ?|;
+ do_query($form, $dbh, $query, @values);
+
+ # delete DO record
+ $query = qq|DELETE FROM delivery_orders
+ WHERE id = ?|;
+ do_query($form, $dbh, $query, @values);
+
+ $query = qq|DELETE FROM shipto
+ WHERE trans_id = ? AND module = 'DO'|;
+ do_query($form, $dbh, $query, @values);
+
+ my $rc = $dbh->commit();
+
+ if ($rc) {
+ foreach $spoolfile (@spoolfiles) {
+ unlink "$spool/$spoolfile" if $spoolfile;
+ }
+ }
+
+ $main::lxdebug->leave_sub();
+
+ return $rc;
+}
+
+sub retrieve {
+ $main::lxdebug->enter_sub();
+
+ my ($self) = @_;
+
+ my $myconfig = \%main::myconfig;
+ my $form = $main::form;
+
+ # connect to database
+ my $dbh = $form->get_standard_dbh($myconfig);
+
+ my ($query, $query_add, @values, $sth, $ref);
+
+ if (!$form->{id}) {
+ $ref = selectfirst_hashref_query($form, $dbh, qq|SELECT current_date AS transdate, current_date AS reqdate|);
+ map { $form->{$_} = $ref->{$_} } keys %$ref;
+ }
+
+ my $vc = $form->{vc} eq "customer" ? "customer" : "vendor";
+
+ if ($form->{id}) {
+
+ # retrieve order for single id
+ # NOTE: this query is intended to fetch all information only ONCE.
+ # so if any of these infos is important (or even different) for any item,
+ # it will be killed out and then has to be fetched from the item scope query further down
+ $query =
+ qq|SELECT dord.cp_id, dord.donumber, dord.ordnumber, dord.oreqnumber, dord.transdate, dord.reqdate,
+ dord.shippingpoint, dord.shipvia, dord.notes, dord.intnotes,
+ e.name AS employee, dord.employee_id, dord.salesman_id,
+ dord.${vc}_id, cv.name AS ${vc},
+ dord.closed, dord.reqdate, dord.department_id, dord.cusordnumber,
+ d.description AS department, dord.language_id,
+ dord.shipto_id,
+ dord.globalproject_id, dord.delivered, dord.transaction_description
+ FROM delivery_orders dord
+ JOIN ${vc} cv ON (dord.${vc}_id = cv.id)
+ LEFT JOIN employee e ON (dord.employee_id = e.id)
+ LEFT JOIN department d ON (dord.department_id = d.id)
+ WHERE dord.id = ?|;
+ $sth = prepare_execute_query($form, $dbh, $query, conv_i($form->{id}));
+
+ $ref = $sth->fetchrow_hashref(NAME_lc);
+ $sth->finish();
+
+ map { $form->{$_} = $ref->{$_} } keys %$ref if ($ref);
+
+ $form->{saved_donumber} = $form->{donumber};
+
+ # if not given, fill transdate with current_date
+ $form->{transdate} = $form->current_date($myconfig) unless $form->{transdate};
+
+ $query = qq|SELECT s.* FROM shipto s WHERE s.trans_id = ? AND s.module = 'DO'|;
+ $sth = prepare_execute_query($form, $dbh, $query, $form->{id});
+
+ $ref = $sth->fetchrow_hashref(NAME_lc);
+ delete($ref->{id});
+ map { $form->{$_} = $ref->{$_} } keys %$ref;
+ $sth->finish;
+
+ # get printed, emailed and queued
+ $query = qq|SELECT s.printed, s.emailed, s.spoolfile, s.formname FROM status s WHERE s.trans_id = ?|;
+ $sth = prepare_execute_query($form, $dbh, $query, conv_i($form->{id}));
+
+ while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
+ $form->{printed} .= "$ref->{formname} " if $ref->{printed};
+ $form->{emailed} .= "$ref->{formname} " if $ref->{emailed};
+ $form->{queued} .= "$ref->{formname} $ref->{spoolfile} " if $ref->{spoolfile};
+ }
+ $sth->finish;
+ map { $form->{$_} =~ s/ +$//g } qw(printed emailed queued);
+
+ my %oid = ('Pg' => 'oid',
+ 'Oracle' => 'rowid');
+
+ my $transdate = $form->{transdate} ? $dbh->quote($form->{transdate}) : "current_date";
+
+ # retrieve individual items
+ # this query looks up all information about the items
+ # stuff different from the whole will not be overwritten, but saved with a suffix.
+ $query =
+ qq|SELECT doi.id AS delivery_order_items_id,
+ p.partnumber, p.assembly, doi.description, doi.qty,
+ doi.sellprice, doi.parts_id AS id, doi.unit, doi.discount, p.bin, p.notes AS partnotes,
+ doi.reqdate, doi.project_id, doi.serialnumber, doi.lastcost,
+ doi.ordnumber, doi.transdate, doi.cusordnumber, doi.longdescription,
+ doi.price_factor_id, doi.price_factor, doi.marge_price_factor,
+ doi.v_partnumber, doi.v_description,
+ pr.projectnumber,
+ pg.partsgroup
+ FROM delivery_order_items doi
+ JOIN parts p ON (doi.parts_id = p.id)
+ JOIN delivery_orders dord ON (doi.delivery_order_id = dord.id)
+ LEFT JOIN project pr ON (doi.project_id = pr.id)
+ LEFT JOIN partsgroup pg ON (p.partsgroup_id = pg.id)
+ WHERE doi.delivery_order_id = ?
+ ORDER BY doi.$oid{$myconfig->{dbdriver}}|;
+
+ $form->{form_details} = selectall_hashref_query($form, $dbh, $query, conv_i($form->{id}));
+
+ my $in_out = $form->{type} =~ /^sales/ ? 'out' : 'in';
+
+ $query =
+ qq|SELECT qty, unit, bin_id, warehouse_id, chargenumber
+ FROM delivery_order_items_stock
+ WHERE delivery_order_item_id = ?|;
+ my $sth = prepare_query($form, $dbh, $query);
+
+ foreach my $doi (@{ $form->{form_details} }) {
+ do_statement($form, $sth, $query, conv_i($doi->{delivery_order_items_id}));
+ my $requests = [];
+ while (my $ref = $sth->fetchrow_hashref()) {
+ push @{ $requests }, $ref;
+ }
+
+ $doi->{"stock_${in_out}"} = YAML::Dump($requests);
+ }
+
+ $sth->finish();
+
+ } else {
+ # get last name used
+ $form->lastname_used($dbh, $myconfig, $form->{vc}) unless $form->{"$form->{vc}_id"};
+
+ }
+
+ Common::webdav_folder($form) if ($main::webdav);
+
+ $main::lxdebug->leave_sub();
+}
+
+sub order_details {
+ $main::lxdebug->enter_sub();
+
+ my ($self) = @_;
+
+ my $myconfig = \%main::myconfig;
+ my $form = $main::form;
+
+ # connect to database
+ my $dbh = $form->get_standard_dbh($myconfig);
+ my $query;
+ my @values = ();
+ my $sth;
+ my $item;
+ my $i;
+ my @partsgroup = ();
+ my $partsgroup;
+ my $position = 0;
+
+ my %oid = ('Pg' => 'oid',
+ 'Oracle' => 'rowid');
+
+ my (@project_ids, %projectnumbers);
+
+ push(@project_ids, $form->{"globalproject_id"}) if ($form->{"globalproject_id"});
+
+ # sort items by partsgroup
+ for $i (1 .. $form->{rowcount}) {
+ $partsgroup = "";
+ if ($form->{"partsgroup_$i"} && $form->{groupitems}) {
+ $partsgroup = $form->{"partsgroup_$i"};
+ }
+ push @partsgroup, [$i, $partsgroup];
+ push(@project_ids, $form->{"project_id_$i"}) if ($form->{"project_id_$i"});
+ }
+
+ if (@project_ids) {
+ $query = "SELECT id, projectnumber FROM project WHERE id IN (" .
+ join(", ", map("?", @project_ids)) . ")";
+ $sth = prepare_execute_query($form, $dbh, $query, @project_ids);
+ while (my $ref = $sth->fetchrow_hashref()) {
+ $projectnumbers{$ref->{id}} = $ref->{projectnumber};
+ }
+ $sth->finish();
+ }
+
+ $form->{"globalprojectnumber"} =
+ $projectnumbers{$form->{"globalproject_id"}};
+
+ my $q_pg = qq|SELECT p.partnumber, p.description, p.unit, a.qty, pg.partsgroup
+ FROM assembly a
+ JOIN parts p ON (a.parts_id = p.id)
+ LEFT JOIN partsgroup pg ON (p.partsgroup_id = pg.id)
+ WHERE a.bom = '1'
+ AND a.id = ? $sortorder|;
+ my $h_pg = prepare_query($form, $dbh, $q_pg);
+
+ my $q_bin_wh = qq|SELECT (SELECT description FROM bin WHERE id = ?) AS bin,
+ (SELECT description FROM warehouse WHERE id = ?) AS warehouse|;
+ my $h_bin_wh = prepare_query($form, $dbh, $q_bin_wh);
+
+ my $in_out = $form->{type} =~ /^sales/ ? 'out' : 'in';
+
+ my $num_si = 0;
+
+ my @arrays =
+ qw(runningnumber number description longdescription qty unit
+ partnotes serialnumber reqdate projectnumber
+ si_runningnumber si_number si_description
+ si_warehouse si_bin si_chargenumber si_qty si_unit
+ v_partnumber v_description);
+
+ my $sameitem = "";
+ foreach $item (sort { $a->[1] cmp $b->[1] } @partsgroup) {
+ $i = $item->[0];
+
+ next if (!$form->{"id_$i"});
+
+ $position++;
+
+ if ($item->[1] ne $sameitem) {
+ push(@{ $form->{description} }, qq|$item->[1]|);
+ $sameitem = $item->[1];
+
+ map({ push(@{ $form->{$_} }, "") } grep({ $_ ne "description" } @arrays));
+ }
+
+ $form->{"qty_$i"} = $form->parse_amount($myconfig, $form->{"qty_$i"});
+
+ # add number, description and qty to $form->{number}, ....
+
+ my $price_factor = $price_factors{$form->{"price_factor_id_$i"}} || { 'factor' => 1 };
+
+ push @{ $form->{runningnumber} }, $position;
+ push @{ $form->{number} }, $form->{"partnumber_$i"};
+ push @{ $form->{description} }, $form->{"description_$i"};
+ push @{ $form->{longdescription} }, $form->{"longdescription_$i"};
+ push @{ $form->{qty} }, $form->format_amount($myconfig, $form->{"qty_$i"});
+ push @{ $form->{unit} }, $form->{"unit_$i"};
+ push @{ $form->{partnotes} }, $form->{"partnotes_$i"};
+ push @{ $form->{serialnumber} }, $form->{"serialnumber_$i"};
+ push @{ $form->{reqdate} }, $form->{"reqdate_$i"};
+ push @{ $form->{projectnumber} }, $projectnumbers{$form->{"project_id_$i"}};
+ push @{ $form->{v_partnumber} }, $form->{"v_partnumber_$i"};
+ push @{ $form->{v_description} }, $form->{"v_description_$i"};
+
+ if ($form->{"assembly_$i"}) {
+ $sameitem = "";
+
+ # get parts and push them onto the stack
+ my $sortorder = "";
+ if ($form->{groupitems}) {
+ $sortorder =
+ qq|ORDER BY pg.partsgroup, a.$oid{$myconfig->{dbdriver}}|;
+ } else {
+ $sortorder = qq|ORDER BY a.$oid{$myconfig->{dbdriver}}|;
+ }
+
+ do_statement($form, $h_pg, $q_pg, conv_i($form->{"id_$i"}));
+
+ while (my $ref = $h_pg->fetchrow_hashref(NAME_lc)) {
+ if ($form->{groupitems} && $ref->{partsgroup} ne $sameitem) {
+ map({ push(@{ $form->{$_} }, "") } grep({ $_ ne "description" } @arrays));
+ $sameitem = ($ref->{partsgroup}) ? $ref->{partsgroup} : "--";
+ push(@{ $form->{description} }, $sameitem);
+ }
+
+ push(@{ $form->{description} }, $form->format_amount($myconfig, $ref->{qty} * $form->{"qty_$i"}) . qq|, $ref->{partnumber}, $ref->{description}|);
+
+ map({ push(@{ $form->{$_} }, "") } grep({ $_ ne "description" } @arrays));
+ }
+ }
+
+ if ($form->{"inventory_accno_$i"} && !$form->{"assembly_$i"}) {
+ my $stock_info = DO->unpack_stock_information('packed' => $form->{"stock_${in_out}_$i"});
+
+ foreach my $si (@{ $stock_info }) {
+ $num_si++;
+
+ do_statement($form, $h_bin_wh, $q_bin_wh, conv_i($si->{bin_id}), conv_i($si->{warehouse_id}));
+ my $bin_wh = $h_bin_wh->fetchrow_hashref();
+
+ push @{ $form->{si_runningnumber} }, $num_si;
+ push @{ $form->{si_number} }, $form->{"partnumber_$i"};
+ push @{ $form->{si_description} }, $form->{"description_$i"};
+ push @{ $form->{si_warehouse} }, $bin_wh->{warehouse};
+ push @{ $form->{si_bin} }, $bin_wh->{bin};
+ push @{ $form->{si_chargenumber} }, $si->{chargenumber};
+ push @{ $form->{si_qty} }, $form->format_amount($myconfig, $si->{qty} * 1);
+ push @{ $form->{si_unit} }, $si->{unit};
+ }
+ }
+ }
+
+ $h_pg->finish();
+ $h_bin_wh->finish();
+
+ $form->{username} = $myconfig->{name};
+
+ $main::lxdebug->leave_sub();
+}
+
+sub project_description {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $dbh, $id) = @_;
+
+ my $query = qq|SELECT description FROM project WHERE id = ?|;
+ my ($value) = selectrow_query($form, $dbh, $query, $id);
+
+ $main::lxdebug->leave_sub();
+
+ return $value;
+}
+
+sub unpack_stock_information {
+ $main::lxdebug->enter_sub();
+
+ my $self = shift;
+ my %params = @_;
+
+ Common::check_params_x(\%params, qw(packed));
+
+ my $unpacked;
+
+ eval { $unpacked = $params{packed} ? YAML::Load($params{packed}) : []; };
+
+ $unpacked = [] if (!$unpacked || ('ARRAY' ne ref $unpacked));
+
+ foreach my $entry (@{ $unpacked }) {
+ next if ('HASH' eq ref $entry);
+ $unpacked = [];
+ last;
+ }
+
+ $main::lxdebug->leave_sub();
+
+ return $unpacked;
+}
+
+sub get_item_availability {
+ $main::lxdebug->enter_sub();
+
+ my $self = shift;
+ my %params = @_;
+
+ Common::check_params(\%params, qw(parts_id));
+
+ my @parts_ids = 'ARRAY' eq ref $params{parts_id} ? @{ $params{parts_id} } : ($params{parts_id});
+ my $form = $main::form;
+
+ my $query =
+ qq|SELECT i.warehouse_id, i.bin_id, i.chargenumber, SUM(qty) AS qty, i.parts_id,
+ w.description AS warehousedescription,
+ b.description AS bindescription
+ FROM inventory i
+ LEFT JOIN warehouse w ON (i.warehouse_id = w.id)
+ LEFT JOIN bin b ON (i.bin_id = b.id)
+ WHERE (i.parts_id IN (| . join(', ', ('?') x scalar(@parts_ids)) . qq|))
+ AND qty > 0
+ GROUP BY i.warehouse_id, i.bin_id, i.chargenumber, i.parts_id, w.description, b.description
+ ORDER BY LOWER(w.description), LOWER(b.description), LOWER(i.chargenumber)|;
+
+ my $contents = selectall_hashref_query($form, $form->get_standard_dbh($myconfig), $query, @parts_ids);
+
+ $main::lxdebug->leave_sub();
+
+ return @{ $contents };
+}
+
+
+sub check_stock_availability {
+ $main::lxdebug->enter_sub();
+
+ my $self = shift;
+ my %params = @_;
+
+ Common::check_params(\%params, qw(requests parts_id));
+
+ my $myconfig = \%main::myconfig;
+ my $form = $main::form;
+
+ my $dbh = $form->get_standard_dbh($myconfig);
+
+ my $units = AM->retrieve_units($myconfig, $form, "dimension");
+
+ my ($partunit) = selectrow_query($form, $dbh, qq|SELECT unit FROM parts WHERE id = ?|, conv_i($params{parts_id}));
+ my $unit_factor = $units->{$partunit}->{factor} || 1;
+
+ my @contents = $self->get_item_availability(%params);
+
+ my @errors;
+
+ foreach my $sinfo (@{ $params{requests} }) {
+ my $found = 0;
+
+ foreach my $row (@contents) {
+ next if (($row->{bin_id} != $sinfo->{bin_id}) ||
+ ($row->{warehouse_id} != $sinfo->{warehouse_id}) ||
+ ($row->{chargenumber} ne $sinfo->{chargenumber}));
+
+ $found = 1;
+
+ my $base_qty = $sinfo->{qty} * $units->{$sinfo->{unit}}->{factor} / $unit_factor;
+
+ if ($base_qty > $row->{qty}) {
+ $sinfo->{error} = 1;
+ push @errors, $sinfo;
+
+ last;
+ }
+ }
+
+ push @errors, $sinfo if (!$found);
+ }
+
+ $main::lxdebug->leave_sub();
+
+ return @errors;
+}
+
+sub transfer_in_out {
+ $main::lxdebug->enter_sub();
+
+ my $self = shift;
+ my %params = @_;
+
+ Common::check_params(\%params, qw(direction requests));
+
+ if (!@{ $params{requests} }) {
+ $main::lxdebug->leave_sub();
+ return;
+ }
+
+ my $myconfig = \%main::myconfig;
+ my $form = $main::form;
+
+ my $prefix = $params{direction} eq 'in' ? 'dst' : 'src';
+
+ my @transfers;
+
+ foreach my $request (@{ $params{requests} }) {
+ push @transfers, {
+ 'parts_id' => $request->{parts_id},
+ "${prefix}_warehouse_id" => $request->{warehouse_id},
+ "${prefix}_bin_id" => $request->{bin_id},
+ 'chargenumber' => $request->{chargenumber},
+ 'qty' => $request->{qty},
+ 'unit' => $request->{unit},
+ 'oe_id' => $form->{id},
+ 'shippingdate' => 'current_date',
+ 'transfer_type' => $params{direction} eq 'in' ? 'stock' : 'shipped',
+ };
+ }
+
+ WH->transfer(@transfers);
+
+ $main::lxdebug->leave_sub();
+}
+
+1;
use SL::Template;
use SL::User;
use Template;
-use List::Util qw(max min sum);
+use List::Util qw(first max min sum);
my $standard_dbh;
$formname ||= $self->{formname};
my %formname_translations = (
- bin_list => $main::locale->text('Bin List'),
- credit_note => $main::locale->text('Credit Note'),
- invoice => $main::locale->text('Invoice'),
- packing_list => $main::locale->text('Packing List'),
- pick_list => $main::locale->text('Pick List'),
- proforma => $main::locale->text('Proforma Invoice'),
- purchase_order => $main::locale->text('Purchase Order'),
- request_quotation => $main::locale->text('RFQ'),
- sales_order => $main::locale->text('Confirmation'),
- sales_quotation => $main::locale->text('Quotation'),
- storno_invoice => $main::locale->text('Storno Invoice'),
- storno_packing_list => $main::locale->text('Storno Packing List'),
+ bin_list => $main::locale->text('Bin List'),
+ credit_note => $main::locale->text('Credit Note'),
+ invoice => $main::locale->text('Invoice'),
+ packing_list => $main::locale->text('Packing List'),
+ pick_list => $main::locale->text('Pick List'),
+ proforma => $main::locale->text('Proforma Invoice'),
+ purchase_order => $main::locale->text('Purchase Order'),
+ request_quotation => $main::locale->text('RFQ'),
+ sales_order => $main::locale->text('Confirmation'),
+ sales_quotation => $main::locale->text('Quotation'),
+ storno_invoice => $main::locale->text('Storno Invoice'),
+ storno_packing_list => $main::locale->text('Storno Packing List'),
+ sales_delivery_order => $main::locale->text('Delivery Order'),
+ purchase_delivery_order => $main::locale->text('Delivery Order'),
);
return $formname_translations{$formname}
my ($self) = @_;
my $attachment_filename = $self->unquote_html($self->get_formname_translation());
- my $prefix =
- (grep { $self->{"type"} eq $_ } qw(invoice credit_note)) ? "inv"
- : ($self->{"type"} =~ /_quotation$/) ? "quo"
- : "ord";
+ my $prefix =
+ (first { $self->{type} eq $_ } qw(invoice credit_note)) ? 'inv'
+ : ($self->{type} =~ /_quotation$/) ? 'quo'
+ : ($self->{type} =~ /_delivery_order$/) ? 'do'
+ : 'ord';
if ($attachment_filename && $self->{"${prefix}number"}) {
$attachment_filename .= "_" . $self->{"${prefix}number"}
printer role sid signature stylesheet tel templates vclimit angebote
bestellungen rechnungen anfragen lieferantenbestellungen einkaufsrechnungen
taxnumber co_ustid duns menustyle template_format default_media
- default_printer_id copies show_form_details favorites);
+ default_printer_id copies show_form_details favorites
+ pdonumber sdonumber);
$main::lxdebug->leave_sub();
--- /dev/null
+# #=====================================================================
+# LX-Office ERP
+# Copyright (C) 2004
+# Based on SQL-Ledger Version 2.1.9
+# Web http://www.lx-office.org
+#
+#=====================================================================
+# SQL-Ledger, Accounting
+# Copyright (c) 1998-2003
+#
+# Author: Dieter Simader
+# Email: dsimader@sql-ledger.org
+# Web: http://www.sql-ledger.org
+#
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#======================================================================
+#
+# Delivery orders
+#======================================================================
+
+use List::Util qw(max sum);
+use POSIX qw(strftime);
+use YAML;
+
+use SL::DO;
+use SL::IR;
+use SL::IS;
+use SL::ReportGenerator;
+use SL::WH;
+
+require "bin/mozilla/arap.pl";
+require "bin/mozilla/common.pl";
+require "bin/mozilla/invoice_io.pl";
+require "bin/mozilla/io.pl";
+require "bin/mozilla/reportgenerator.pl";
+
+1;
+
+# end of main
+
+sub check_do_access {
+ $auth->assert($form->{type} . '_edit');
+}
+
+sub set_headings {
+ $lxdebug->enter_sub();
+
+ check_do_access();
+
+ my ($action) = @_;
+
+ if ($form->{type} eq 'purchase_delivery_order') {
+ $form->{vc} = 'vendor';
+ $form->{title} = $action eq "edit" ? $locale->text('Edit Purchase Delivery Order') : $locale->text('Add Purchase Delivery Order');
+ } else {
+ $form->{vc} = 'customer';
+ $form->{title} = $action eq "edit" ? $locale->text('Edit Sales Delivery Order') : $locale->text('Add Sales Delivery Order');
+ }
+
+ $form->{heading} = $locale->text('Delivery Order');
+
+ $lxdebug->leave_sub();
+}
+
+sub add {
+ $lxdebug->enter_sub();
+
+ check_do_access();
+
+ set_headings("add");
+
+ $form->{callback} = build_std_url('action=add', 'type', 'vc') unless ($form->{callback});
+
+ order_links();
+ prepare_order();
+ display_form();
+
+ $lxdebug->leave_sub();
+}
+
+sub edit {
+ $lxdebug->enter_sub();
+
+ check_do_access();
+
+ # show history button
+ $form->{javascript} = qq|<script type="text/javascript" src="js/show_history.js"></script>|;
+ #/show hhistory button
+
+ $form->{simple_save} = 0;
+
+ set_headings("edit");
+
+ # editing without stuff to edit? try adding it first
+ if ($form->{rowcount} && !$form->{print_and_save}) {
+# map { $id++ if $form->{"multi_id_$_"} } (1 .. $form->{rowcount});
+# if (!$id) {
+
+ # reset rowcount
+ undef $form->{rowcount};
+ add();
+ $lxdebug->leave_sub();
+ return;
+# }
+ } elsif (!$form->{id}) {
+ add();
+ $lxdebug->leave_sub();
+ return;
+ }
+
+ if ($form->{print_and_save}) {
+ $form->{action} = "print";
+ $form->{resubmit} = 1;
+ $language_id = $form->{language_id};
+ $printer_id = $form->{printer_id};
+ }
+
+ set_headings("edit");
+
+ order_links();
+ prepare_order();
+
+ if ($form->{print_and_save}) {
+ $form->{language_id} = $language_id;
+ $form->{printer_id} = $printer_id;
+ }
+
+ display_form();
+
+ $lxdebug->leave_sub();
+}
+
+sub order_links {
+ $lxdebug->enter_sub();
+
+ check_do_access();
+
+ # get customer/vendor
+ $form->all_vc(\%myconfig, $form->{vc}, ($form->{vc} eq 'customer') ? "AR" : "AP");
+
+ # retrieve order/quotation
+ $form->{webdav} = $webdav;
+ $form->{jsscript} = 1;
+
+ my $editing = $form->{id};
+
+ DO->retrieve();
+
+ $payment_id = $form->{payment_id} if ($form->{payment_id});
+ $language_id = $form->{language_id} if ($form->{language_id});
+ $taxzone_id = $form->{taxzone_id} if ($form->{taxzone_id});
+ $salesman_id = $form->{salesman_id} if ($editing);
+
+
+ $taxincluded = $form->{taxincluded};
+ $form->{shipto} = 1 if $form->{id};
+
+ if ($form->{"all_$form->{vc}"}) {
+ unless ($form->{"$form->{vc}_id"}) {
+ $form->{"$form->{vc}_id"} = $form->{"all_$form->{vc}"}->[0]->{id};
+ }
+ }
+
+ $cp_id = $form->{cp_id};
+ $intnotes = $form->{intnotes};
+
+ $form->{cp_id} = $cp_id;
+
+ $form->{payment_id} = $payment_id if ($payment_id);
+ $form->{language_id} = $language_id if ($language_id);
+ $form->{taxzone_id} = $taxzone_id if ($taxzone_id);
+ $form->{intnotes} = $intnotes if ($intnotes);
+
+ ($form->{ $form->{vc} }) = split /--/, $form->{ $form->{vc} };
+ $form->{"old$form->{vc}"} = qq|$form->{$form->{vc}}--$form->{"$form->{vc}_id"}|;
+
+ $form->{taxincluded} = $taxincluded if ($form->{id});
+
+ $form->{employee} = "$form->{employee}--$form->{employee_id}";
+
+ $form->{salesman_id} = $salesman_id if ($editing);
+
+ $lxdebug->leave_sub();
+}
+
+sub prepare_order {
+ $lxdebug->enter_sub();
+
+ check_do_access();
+
+ $form->{formname} = $form->{type} unless $form->{formname};
+
+ my $i = 0;
+ foreach $ref (@{ $form->{form_details} }) {
+ $form->{rowcount} = ++$i;
+
+ map { $form->{"${_}_$i"} = $ref->{$_} } keys %{$ref};
+ }
+ for my $i (1 .. $form->{rowcount}) {
+ if ($form->{id}) {
+ $form->{"discount_$i"} = $form->format_amount(\%myconfig, $form->{"discount_$i"} * 100);
+ } else {
+ $form->{"discount_$i"} = $form->format_amount(\%myconfig, $form->{"discount_$i"});
+ }
+ ($dec) = ($form->{"sellprice_$i"} =~ /\.(\d+)/);
+ $dec = length $dec;
+ $decimalplaces = ($dec > 2) ? $dec : 2;
+
+ # copy reqdate from deliverydate for invoice -> order conversion
+ $form->{"reqdate_$i"} = $form->{"deliverydate_$i"} unless $form->{"reqdate_$i"};
+
+ $form->{"sellprice_$i"} = $form->format_amount(\%myconfig, $form->{"sellprice_$i"}, $decimalplaces);
+
+ (my $dec_qty) = ($form->{"qty_$i"} =~ /\.(\d+)/);
+ $dec_qty = length $dec_qty;
+ $form->{"qty_$i"} = $form->format_amount(\%myconfig, $form->{"qty_$i"}, $dec_qty);
+
+ map { $form->{"${_}_$i"} =~ s/\"/"/g } qw(partnumber description unit);
+ }
+
+ $lxdebug->leave_sub();
+}
+
+sub form_header {
+ $lxdebug->enter_sub();
+
+ check_do_access();
+
+ $form->{employee_id} = $form->{old_employee_id} if $form->{old_employee_id};
+ $form->{salesman_id} = $form->{old_salesman_id} if $form->{old_salesman_id};
+
+ # use JavaScript Calendar or not
+ $form->{jsscript} = 1;
+
+ #write Trigger
+ $jsscript = Form->write_trigger(\%myconfig, "2", "transdate", "BL", "trigger1", "reqdate", "BL", "trigger2");
+
+ my @old_project_ids = ($form->{"globalproject_id"});
+ map({ push(@old_project_ids, $form->{"project_id_$_"})
+ if ($form->{"project_id_$_"}); } (1..$form->{"rowcount"}));
+
+ my $vc = $form->{vc} eq "customer" ? "customers" : "vendors";
+ $form->get_lists("contacts" => "ALL_CONTACTS",
+ "shipto" => "ALL_SHIPTO",
+ "projects" => {
+ "key" => "ALL_PROJECTS",
+ "all" => 0,
+ "old_id" => \@old_project_ids
+ },
+ "employees" => "ALL_EMPLOYEES",
+ "salesmen" => "ALL_SALESMEN",
+ $vc => "ALL_VC",
+ "price_factors" => "ALL_PRICE_FACTORS",
+ "departments" => "ALL_DEPARTMENTS",
+ "business_types" => "ALL_BUSINESS_TYPES",
+ );
+
+ map { $_->{value} = "$_->{description}--$_->{id}" } @{ $form->{ALL_DEPARTMENTS} };
+ map { $_->{value} = "$_->{name}--$_->{id}" } @{ $form->{ALL_VC} };
+
+ $form->{SHOW_VC_DROP_DOWN} = $myconfig{vclimit} > scalar @{ $form->{ALL_VC} };
+
+ $form->{oldvcname} = $form->{"old$form->{vc}"};
+ $form->{oldvcname} =~ s/--.*//;
+
+ $form->{onload} = "";
+ if ($form->{resubmit}) {
+ if ($form->{format} eq "html") {
+ $form->{onload} = "window.open('about:blank','Beleg'); document.do.target = 'Beleg';";
+ }
+ $form->{onload} .= "document.do.submit();"
+ }
+
+ $form->header();
+ print $form->parse_html_template('do/form_header');
+
+ $lxdebug->leave_sub();
+}
+
+sub form_footer {
+ $lxdebug->enter_sub();
+
+ check_do_access();
+
+ $form->{PRINT_OPTIONS} = print_options('inline' => 1);
+
+ print $form->parse_html_template('do/form_footer');
+
+ $lxdebug->leave_sub();
+}
+
+sub update_delivery_order {
+ $lxdebug->enter_sub();
+
+ check_do_access();
+
+ set_headings($form->{"id"} ? "edit" : "add");
+
+ $form->{update} = 1;
+
+ $payment_id = $form->{payment_id} if $form->{payment_id};
+
+ check_name($form->{vc});
+
+ $form->{payment_id} = $payment_id if $form->{payment_id} eq "";
+
+ # for pricegroups
+ $i = $form->{rowcount};
+
+ if ( ($form->{"partnumber_$i"} eq "")
+ && ($form->{"description_$i"} eq "")
+ && ($form->{"partsgroup_$i"} eq "")) {
+
+ check_form();
+
+ } else {
+
+ if ($form->{type} eq 'purchase_delivery_order') {
+ IR->retrieve_item(\%myconfig, $form);
+ } else {
+ IS->retrieve_item(\%myconfig, $form);
+ }
+
+ my $rows = scalar @{ $form->{item_list} };
+
+ if ($rows) {
+ $form->{"qty_$i"} = 1 unless ($form->{"qty_$i"});
+
+ if ($rows > 1) {
+
+ select_item();
+ exit;
+
+ } else {
+
+ map { $form->{item_list}[$i]{$_} =~ s/\"/"/g } qw(partnumber description unit);
+ map { $form->{"${_}_$i"} = $form->{item_list}[0]{$_} } keys %{ $form->{item_list}[0] };
+
+ $form->{"marge_price_factor_$i"} = $form->{item_list}->[0]->{price_factor};
+ $form->{"sellprice_$i"} = $form->format_amount(\%myconfig, $form->{"sellprice_$i"});
+ $form->{"qty_$i"} = $form->format_amount(\%myconfig, $form->{"qty_$i"});
+ }
+
+ display_form();
+
+ } else {
+
+ # ok, so this is a new part
+ # ask if it is a part or service item
+
+ if ( $form->{"partsgroup_$i"}
+ && ($form->{"partsnumber_$i"} eq "")
+ && ($form->{"description_$i"} eq "")) {
+ $form->{rowcount}--;
+ $form->{"discount_$i"} = "";
+ display_form();
+
+ } else {
+ $form->{"id_$i"} = 0;
+ new_item();
+ }
+ }
+ }
+
+ $lxdebug->leave_sub();
+}
+
+sub search {
+ $lxdebug->enter_sub();
+
+ check_do_access();
+
+ $form->{vc} = $form->{type} eq 'purchase_order' ? 'vendor' : 'customer';
+
+ $form->get_lists("projects" => { "key" => "ALL_PROJECTS",
+ "all" => 1 },
+ "employees" => "ALL_EMPLOYEES",
+ "salesmen" => "ALL_SALESMEN",
+ "$form->{vc}s" => "ALL_VC");
+
+ $form->{SHOW_VC_DROP_DOWN} = $myconfig{vclimit} > scalar @{ $form->{ALL_VC} };
+ $form->{jsscript} = 1;
+ $form->{title} = $locale->text('Delivery Orders');
+
+ $form->header();
+
+ print $form->parse_html_template('do/search');
+
+ $lxdebug->leave_sub();
+}
+
+sub orders {
+ $lxdebug->enter_sub();
+
+ check_do_access();
+
+ ($form->{ $form->{vc} }, $form->{"${form->{vc}}_id"}) = split(/--/, $form->{ $form->{vc} });
+
+ $form->{sort} ||= 'transdate';
+
+ DO->transactions();
+
+ $form->{rowcount} = scalar @{ $form->{DO} };
+
+ my @columns = qw(
+ transdate
+ id donumber
+ ordnumber oreqnumber
+ name employee
+ shipvia globalprojectnumber
+ transaction_description
+ open delivered
+ );
+
+ $form->{l_open} = $form->{l_closed} = "Y" if ($form->{open} && $form->{closed});
+ $form->{l_delivered} = "Y" if ($form->{delivered} && $form->{notdelivered});
+
+ $form->{title} = $locale->text('Delivery Orders');
+
+ my $attachment_basename = $form->{vc} eq 'vendor' ? $locale->text('purchase_delivery_order_list') : $locale->text('sales_delivery_order_list');
+
+ my $report = SL::ReportGenerator->new(\%myconfig, $form);
+
+ my @hidden_variables = map { "l_${_}" } @columns;
+ push @hidden_variables, $form->{vc}, qw(l_closed l_notdelivered open closed delivered notdelivered donumber ordnumber
+ transaction_description transdatefrom transdateto type vc employee_id salesman_id);
+
+ my $href = build_std_url('action=orders', grep { $form->{$_} } @hidden_variables);
+
+ my %column_defs = (
+ 'ids' => { 'text' => '', },
+ 'transdate' => { 'text' => $locale->text('Date'), },
+ 'id' => { 'text' => $locale->text('ID'), },
+ 'donumber' => { 'text' => $locale->text('Delivery Order'), },
+ 'ordnumber' => { 'text' => $locale->text('Order'), },
+ 'oreqnumber' => { 'text' => $locale->text('Order Request Number'), },
+ 'name' => { 'text' => $form->{vc} eq 'customer' ? $locale->text('Customer') : $locale->text('Vendor'), },
+ 'employee' => { 'text' => $locale->text('Salesperson'), },
+ 'shipvia' => { 'text' => $locale->text('Ship via'), },
+ 'globalprojectnumber' => { 'text' => $locale->text('Project Number'), },
+ 'transaction_description' => { 'text' => $locale->text('Transaction description'), },
+ 'open' => { 'text' => $locale->text('Open'), },
+ 'delivered' => { 'text' => $locale->text('Delivered'), },
+ );
+
+ foreach my $name (qw(id transdate donumber ordnumber oreqnumber name employee shipvia)) {
+ $column_defs{$name}->{link} = $href . "&sort=$name";
+ }
+
+ $form->{"l_type"} = "Y";
+ map { $column_defs{$_}->{visible} = $form->{"l_${_}"} ? 1 : 0 } @columns;
+ $column_defs{ids}->{visible} = $allow_multiple_orders ? 'HTML' : 0;
+
+ $report->set_columns(%column_defs);
+ $report->set_column_order(@columns);
+
+ $report->set_export_options('orders', @hidden_variables);
+
+ $report->set_sort_indicator($form->{sort}, 1);
+
+ my @options;
+ if ($form->{customer}) {
+ push @options, $locale->text('Customer') . " : $form->{customer}";
+ }
+ if ($form->{vendor}) {
+ push @options, $locale->text('Vendor') . " : $form->{vendor}";
+ }
+ if ($form->{department}) {
+ ($department) = split /--/, $form->{department};
+ push @options, $locale->text('Department') . " : $department";
+ }
+ if ($form->{donumber}) {
+ push @options, $locale->text('Delivery Order Number') . " : $form->{donumber}";
+ }
+ if ($form->{ordnumber}) {
+ push @options, $locale->text('Order Number') . " : $form->{ordnumber}";
+ }
+ if ($form->{transaction_description}) {
+ push @options, $locale->text('Transaction description') . " : $form->{transaction_description}";
+ }
+ if ($form->{transdatefrom}) {
+ push @options, $locale->text('From') . " " . $locale->date(\%myconfig, $form->{transdatefrom}, 1);
+ }
+ if ($form->{transdateto}) {
+ push @options, $locale->text('Bis') . " " . $locale->date(\%myconfig, $form->{transdateto}, 1);
+ }
+ if ($form->{open}) {
+ push @options, $locale->text('Open');
+ }
+ if ($form->{closed}) {
+ push @options, $locale->text('Closed');
+ }
+ if ($form->{delivered}) {
+ push @options, $locale->text('Delivered');
+ }
+ if ($form->{notdelivered}) {
+ push @options, $locale->text('Not delivered');
+ }
+
+ $report->set_options('top_info_text' => join("\n", @options),
+ 'output_format' => 'HTML',
+ 'title' => $form->{title},
+ 'attachment_basename' => $attachment_basename . strftime('_%Y%m%d', localtime time),
+ );
+ $report->set_options_from_form();
+
+ # add sort and escape callback, this one we use for the add sub
+ $form->{callback} = $href .= "&sort=$form->{sort}";
+
+ # escape callback for href
+ $callback = $form->escape($href);
+
+ my $edit_url = build_std_url('action=edit', 'type', 'vc');
+ my $edit_order_url = build_std_url('script=oe.pl', 'type=' . ($form->{type} eq 'sales_delivery_order' ? 'sales_order' : 'purchase_order'), 'action=edit');
+ my $edit_oreq_url = build_std_url('script=pkoreq.pl', 'action=edit');
+
+ foreach $dord (@{ $form->{DO} }) {
+ $dord->{open} = $dord->{closed} ? $locale->text('No') : $locale->text('Yes');
+ $dord->{delivered} = $dord->{delivered} ? $locale->text('Yes') : $locale->text('No');
+
+ my $row = { map { $_ => { 'data' => $dord->{$_} } } @columns };
+
+ $row->{donumber}->{link} = $edit_url . "&id=" . E($dord->{id}) . "&callback=${callback}";
+ $row->{ordnumber}->{link} = $edit_order_url . "&id=" . E($dord->{oe_id}) . "&callback=${callback}";
+ $row->{oreqnumber}->{link} = $edit_oreq_url . "&id=" . E($dord->{oreq_id}) . "&callback=${callback}";
+
+ $report->add_data($row);
+ }
+
+ $report->generate_with_headers();
+
+ $lxdebug->leave_sub();
+}
+
+sub save {
+ $lxdebug->enter_sub();
+
+ check_do_access();
+
+ $form->{defaultcurrency} = $form->get_default_currency(\%myconfig);
+
+ $form->isblank("transdate", $locale->text('Delivery Order Date missing!'));
+
+ $form->{donumber} =~ s/^\s*//g;
+ $form->{donumber} =~ s/\s*$//g;
+
+ $msg = ucfirst $form->{vc};
+ $form->isblank($form->{vc}, $locale->text($msg . " missing!"));
+
+ # $locale->text('Customer missing!');
+ # $locale->text('Vendor missing!');
+
+ validate_items();
+
+ # if the name changed get new values
+ if (check_name($form->{vc})) {
+ update();
+ exit;
+ }
+
+ $form->{id} = 0 if $form->{saveasnew};
+
+ DO->save();
+
+ # saving the history
+ if(!exists $form->{addition}) {
+ $form->{snumbers} = qq|donumber_| . $form->{donumber};
+ $form->{addition} = "SAVED";
+ $form->save_history($form->dbconnect(\%myconfig));
+ }
+ # /saving the history
+
+ $form->{simple_save} = 1;
+ if(!$form->{print_and_save}) {
+ set_headings("edit");
+ update();
+ exit;
+ }
+ $lxdebug->leave_sub();
+}
+
+sub delete {
+ $lxdebug->enter_sub();
+
+ check_do_access();
+
+ map { delete $form->{$_} } qw(action header login password);
+ my @variables = map { { 'key' => $_, 'value' => $form->{$_} } } grep { '' eq ref $form->{$_} } keys %{ $form };
+
+ $form->{title} = $locale->text('Delete delivery order');
+ $form->header();
+
+ print $form->parse_html_template('do/delete', { 'VARIABLES' => \@variables });
+
+ $lxdebug->leave_sub();
+}
+
+sub delete_delivery_order {
+ $lxdebug->enter_sub();
+
+ check_do_access();
+
+ if (DO->delete()) {
+ # saving the history
+ if(!exists $form->{addition}) {
+ $form->{snumbers} = qq|donumber_| . $form->{donumber};
+ $form->{addition} = "DELETED";
+ $form->save_history($form->dbconnect(\%myconfig));
+ }
+ # /saving the history
+
+ $form->info($locale->text('Delivery Order deleted!'));
+ exit();
+ }
+
+ $form->error($locale->text('Cannot delete delivery order!'));
+
+ $lxdebug->leave_sub();
+}
+
+sub invoice {
+ $lxdebug->enter_sub();
+
+ check_do_access();
+ $auth->assert($form->{type} eq 'purchase_order' || $form->{type} eq 'request_quotation' ? 'vendor_invoice_edit' : 'invoice_edit');
+
+ $form->{deliverydate} = $form->{transdate};
+ $form->{transdate} = $form->{invdate} = $form->current_date(\%myconfig);
+ $form->{duedate} = $form->current_date(\%myconfig, $form->{invdate}, $form->{terms} * 1);
+
+ $form->{id} = '';
+ $form->{closed} = 0;
+ $form->{rowcount}--;
+
+ $form->{defaultcurrency} = $form->get_default_currency(\%myconfig);
+
+ if ($form->{type} eq 'purchase_delivery_order') {
+ $form->{title} = $locale->text('Add Vendor Invoice');
+ $form->{script} = 'ir.pl';
+ $script = "ir";
+
+ } else {
+ $form->{title} = $locale->text('Add Sales Invoice');
+ $form->{script} = 'is.pl';
+ $script = "is";
+ $buysell = 'buy';
+ }
+
+ for $i (1 .. $form->{rowcount}) {
+ map { $form->{"${_}_${i}"} = $form->parse_amount(\%myconfig, $form->{"${_}_${i}"}) if $form->{"${_}_${i}"} } qw(ship qty sellprice listprice basefactor);
+ }
+
+ $form->{type} = "invoice";
+
+ # locale messages
+ $locale = new Locale "$myconfig{countrycode}", "$script";
+
+ require "bin/mozilla/$form->{script}";
+
+ my $currency = $form->{currency};
+ invoice_links();
+
+ $form->{currency} = $currency;
+ $form->{exchangerate} = "";
+ $form->{forex} = ($exchangerate = $form->check_exchangerate(\%myconfig, $form->{currency}, $form->{invdate}, $buysell));
+ $form->{exchangerate} = $exchangerate if ($form->{forex});
+
+ prepare_invoice();
+
+ # format amounts
+ for $i (1 .. $form->{rowcount}) {
+ $form->{"discount_$i"} = $form->format_amount(\%myconfig, $form->{"discount_$i"});
+
+ ($dec) = ($form->{"sellprice_$i"} =~ /\.(\d+)/);
+ $dec = length $dec;
+ $decimalplaces = ($dec > 2) ? $dec : 2;
+
+ # copy delivery date from reqdate for order -> invoice conversion
+ $form->{"deliverydate_$i"} = $form->{"reqdate_$i"}
+ unless $form->{"deliverydate_$i"};
+
+ $form->{"sellprice_$i"} =
+ $form->format_amount(\%myconfig, $form->{"sellprice_$i"},
+ $decimalplaces);
+
+ (my $dec_qty) = ($form->{"qty_$i"} =~ /\.(\d+)/);
+ $dec_qty = length $dec_qty;
+ $form->{"qty_$i"} =
+ $form->format_amount(\%myconfig, $form->{"qty_$i"}, $dec_qty);
+
+ }
+
+ display_form();
+
+ $lxdebug->leave_sub();
+}
+
+sub save_as_new {
+ $lxdebug->enter_sub();
+
+ check_do_access();
+
+ $form->{saveasnew} = 1;
+ $form->{closed} = 0;
+ map { delete $form->{$_} } qw(printed emailed queued);
+
+ # Let Lx-Office assign a new order number if the user hasn't changed the
+ # previous one. If it has been changed manually then use it as-is.
+ $form->{donumber} =~ s/^\s*//g;
+ $form->{donumber} =~ s/\s*$//g;
+ if ($form->{saved_donumber} && ($form->{saved_donumber} eq $form->{donumber})) {
+ delete($form->{donumber});
+ }
+
+ save();
+
+ $lxdebug->leave_sub();
+}
+
+sub e_mail {
+ $lxdebug->enter_sub();
+
+ check_do_access();
+
+ $form->{print_and_save} = 1;
+
+ $print_post = 1;
+
+ my $saved_form = save_form();
+
+ save();
+
+ restore_form($saved_form, 0, qw(id ordnumber quonumber));
+
+ edit_e_mail();
+
+ $lxdebug->leave_sub();
+}
+
+sub calculate_stock_in_out {
+ $lxdebug->enter_sub();
+
+ my $i = shift;
+
+ if (!$form->{"id_${i}"}) {
+ $lxdebug->leave_sub();
+ return '';
+ }
+
+ my $in_out = $form->{type} =~ /^sales/ ? 'out' : 'in';
+ my $sinfo = DO->unpack_stock_information('packed' => $form->{"stock_${in_out}_${i}"});
+
+ my $sum = AM->sum_with_unit(map { $_->{qty}, $_->{unit} } @{ $sinfo });
+
+ my $content = $form->format_amount_units('amount' => $sum * 1,
+ 'part_unit' => $form->{"partunit_$i"},
+ 'amount_unit' => $units->{$form->{"partunit_$i"}}->{base_unit},
+ 'conv_units' => 'convertible_not_smaller',
+ 'max_places' => 2);
+ $content .= qq| <input type="button" onclick="open_stock_in_out_window('${in_out}', $i);" value="?">|;
+
+ $lxdebug->leave_sub();
+
+ return $content;
+}
+
+sub get_basic_bin_wh_info {
+ $lxdebug->enter_sub();
+
+ my $stock_info = shift;
+
+ foreach my $sinfo (@{ $stock_info }) {
+ next unless ($sinfo->{bin_id});
+
+ my $bin_info = WH->get_basic_bin_info('id' => $sinfo->{bin_id});
+ map { $sinfo->{"${_}_description"} = $sinfo->{"${_}description"} = $bin_info->{"${_}_description"} } qw(bin warehouse);
+ }
+
+ $lxdebug->leave_sub();
+}
+
+sub stock_in_out_form {
+ $lxdebug->enter_sub();
+
+ if ($form->{in_out} eq 'out') {
+ stock_out_form();
+ } else {
+ stock_in_form();
+ }
+
+ $lxdebug->leave_sub();
+}
+
+sub redo_stock_info {
+ $lxdebug->enter_sub();
+
+ my %params = @_;
+
+ my @non_empty = grep { $_->{qty} } @{ $params{stock_info} };
+
+ if ($params{add_empty_row}) {
+ push @non_empty, {
+ 'warehouse_id' => scalar(@non_empty) ? $non_empty[-1]->{warehouse_id} : undef,
+ 'bin_id' => scalar(@non_empty) ? $non_empty[-1]->{bin_id} : undef,
+ };
+ }
+
+ @{ $params{stock_info} } = @non_empty;
+
+ $lxdebug->leave_sub();
+}
+
+sub update_stock_in {
+ $lxdebug->enter_sub();
+
+ my $stock_info = [];
+
+ foreach my $i (1..$form->{rowcount}) {
+ push @{ $stock_info }, { map { $_ => $form->{"${_}_${i}"} } qw(warehouse_id bin_id chargenumber qty unit) };
+ }
+ $main::lxdebug->dump(0, "si", $stock_info);
+
+ display_stock_in_form($stock_info);
+
+ $lxdebug->leave_sub();
+}
+
+sub stock_in_form {
+ $lxdebug->enter_sub();
+
+ my $stock_info = DO->unpack_stock_information('packed' => $form->{stock});
+
+ display_stock_in_form($stock_info);
+
+ $lxdebug->leave_sub();
+}
+
+sub display_stock_in_form {
+ $lxdebug->enter_sub();
+
+ my $stock_info = shift;
+
+ $form->{title} = $locale->text('Stock');
+
+ my $part_info = IC->get_basic_part_info('id' => $form->{parts_id});
+
+ my $units = AM->retrieve_units(\%myconfig, $form, "dimension");
+ my $units_data = AM->unit_select_data($units, undef, undef, $part_info->{unit});
+
+ my $access = $auth->check_right($form->{login}, 'all_warehouses') ? undef : $form->{login};
+
+ $form->get_lists('warehouses' => { 'key' => 'WAREHOUSES',
+ 'bins' => 'BINS',
+ 'access' => $access, });
+
+ redo_stock_info('stock_info' => $stock_info, 'add_empty_row' => !$form->{closed});
+
+ get_basic_bin_wh_info($stock_info);
+
+ $form->header();
+ print $form->parse_html_template('do/stock_in_form', { 'UNITS' => $units_data,
+ 'STOCK_INFO' => $stock_info,
+ 'PART_INFO' => $part_info, });
+
+ $lxdebug->leave_sub();
+}
+
+sub set_stock_in {
+ $lxdebug->enter_sub();
+
+ my $stock_info = [];
+
+ foreach my $i (1..$form->{rowcount}) {
+ $form->{"qty_$i"} = $form->parse_amount(\%myconfig, $form->{"qty_$i"});
+
+ next if ($form->{"qty_$i"} <= 0);
+
+ push @{ $stock_info }, { map { $_ => $form->{"${_}_${i}"} } qw(warehouse_id bin_id chargenumber qty unit) };
+ }
+
+ $form->{stock} = YAML::Dump($stock_info);
+
+ $form->header();
+ print $form->parse_html_template('do/set_stock_in_out');
+
+ $lxdebug->leave_sub();
+}
+
+sub stock_out_form {
+ $lxdebug->enter_sub();
+
+ $form->{title} = $locale->text('Release From Stock');
+
+ my $part_info = IC->get_basic_part_info('id' => $form->{parts_id});
+
+ my $units = AM->retrieve_units(\%myconfig, $form, "dimension");
+ my $units_data = AM->unit_select_data($units, undef, undef, $part_info->{unit});
+
+ my @contents = DO->get_item_availability('parts_id' => $form->{parts_id});
+
+ my $stock_info = DO->unpack_stock_information('packed' => $form->{stock});
+
+ if (!$form->{closed}) {
+ foreach my $row (@contents) {
+ $row->{available_qty} = $form->format_amount_units('amount' => $row->{qty} * 1,
+ 'part_unit' => $part_info->{unit},
+ 'conv_units' => 'convertible_not_smaller',
+ 'max_places' => 2);
+
+ foreach my $sinfo (@{ $stock_info }) {
+ next if (($row->{bin_id} != $sinfo->{bin_id}) ||
+ ($row->{warehouse_id} != $sinfo->{warehouse_id}) ||
+ ($row->{chargenumber} ne $sinfo->{chargenumber}));
+
+ map { $row->{"stock_$_"} = $sinfo->{$_} } qw(qty unit error);
+ }
+ }
+
+ } else {
+ get_basic_bin_wh_info($stock_info);
+
+ foreach my $sinfo (@{ $stock_info }) {
+ map { $sinfo->{"stock_$_"} = $sinfo->{$_} } qw(qty unit);
+ }
+ }
+
+ $form->header();
+ print $form->parse_html_template('do/stock_out_form', { 'UNITS' => $units_data,
+ 'WHCONTENTS' => $form->{closed} ? $stock_info : \@contents,
+ 'PART_INFO' => $part_info, });
+
+ $lxdebug->leave_sub();
+}
+
+sub set_stock_out {
+ $lxdebug->enter_sub();
+
+ my $stock_info = [];
+
+ foreach my $i (1 .. $form->{rowcount}) {
+ $form->{"qty_$i"} = $form->parse_amount(\%myconfig, $form->{"qty_$i"});
+
+ next if ($form->{"qty_$i"} <= 0);
+
+ push @{ $stock_info }, {
+ 'warehouse_id' => $form->{"warehouse_id_$i"},
+ 'bin_id' => $form->{"bin_id_$i"},
+ 'chargenumber' => $form->{"chargenumber_$i"},
+ 'qty' => $form->{"qty_$i"},
+ 'unit' => $form->{"unit_$i"},
+ 'row' => $i,
+ };
+ }
+
+ my @errors = DO->check_stock_availability('requests' => $stock_info,
+ 'parts_id' => $form->{parts_id});
+
+ $form->{stock} = YAML::Dump($stock_info);
+
+ if (@errors) {
+ $form->{ERRORS} = [];
+ map { push @{ $form->{ERRORS} }, $locale->text('Error in row #1: The quantity you entered is bigger than the stocked quantity.', $_->{row}); } @errors;
+ stock_in_out_form();
+
+ } else {
+ $form->header();
+ print $form->parse_html_template('do/set_stock_in_out');
+ }
+
+ $lxdebug->leave_sub();
+}
+
+sub transfer_in_and_close {
+ $lxdebug->enter_sub();
+
+ my @part_ids = map { $form->{"id_${_}"} } grep { $form->{"id_${_}"} && $form->{"stock_in_${_}"} } (1 .. $form->{rowcount});
+ my @all_requests;
+
+ if (@part_ids) {
+ my $units = AM->retrieve_units(\%myconfig, $form, "dimension");
+ my %part_info_map = IC->get_basic_part_info('id' => \@part_ids);
+ my %request_map;
+
+ $form->{ERRORS} = [];
+
+ foreach my $i (1 .. $form->{rowcount}) {
+ next unless ($form->{"id_$i"} && $form->{"stock_in_$i"});
+
+ my $row_sum_base_qty = 0;
+ my $base_unit_factor = $units->{ $part_info_map{$form->{"id_$i"}}->{unit} }->{factor} || 1;
+
+ foreach my $request (@{ DO->unpack_stock_information('packed' => $form->{"stock_in_$i"}) }) {
+ $request->{parts_id} = $form->{"id_$i"};
+ $row_sum_base_qty += $request->{qty} * $units->{$request->{unit}}->{factor} / $base_unit_factor;
+
+ push @all_requests, $request;
+ }
+
+ next if (0 == $row_sum_base_qty);
+
+ my $do_base_qty = $form->parse_amount(\%myconfig, $form->{"qty_$i"}) * $units->{$form->{"unit_$i"}}->{factor} / $base_unit_factor;
+
+ if ($do_base_qty != $row_sum_base_qty) {
+ push @{ $form->{ERRORS} }, $locale->text('Error in position #1: You must either assign no stock at all or the full quantity of #2 #3.',
+ $i, $form->{"qty_$i"}, $form->{"unit_$i"});
+ }
+ }
+
+ if (@{ $form->{ERRORS} }) {
+ push @{ $form->{ERRORS} }, $locale->text('The delivery order has not been closed. The warehouse contents have not changed.');
+
+ update();
+ $lxdebug->leave_sub();
+
+ exit 0;
+ }
+ }
+
+ DO->transfer_in_out('direction' => 'in',
+ 'requests' => \@all_requests);
+
+ $form->{closed} = 1;
+ $form->{delivered} = 1;
+
+ save();
+
+ $lxdebug->leave_sub();
+}
+
+sub transfer_out_and_close {
+ $lxdebug->enter_sub();
+
+ my @part_ids = map { $form->{"id_${_}"} } grep { $form->{"id_${_}"} && $form->{"stock_out_${_}"} } (1 .. $form->{rowcount});
+ my @all_requests;
+
+ if (@part_ids) {
+ my $units = AM->retrieve_units(\%myconfig, $form, "dimension");
+ my %part_info_map = IC->get_basic_part_info('id' => \@part_ids);
+ my %request_map;
+
+ $form->{ERRORS} = [];
+
+ foreach my $i (1 .. $form->{rowcount}) {
+ next unless ($form->{"id_$i"} && $form->{"stock_out_$i"});
+
+ my $row_sum_base_qty = 0;
+ my $base_unit_factor = $units->{ $part_info_map{$form->{"id_$i"}}->{unit} }->{factor} || 1;
+
+ foreach my $request (@{ DO->unpack_stock_information('packed' => $form->{"stock_out_$i"}) }) {
+ $request->{parts_id} = $form->{"id_$i"};
+ $request->{base_qty} = $request->{qty} * $units->{$request->{unit}}->{factor} / $base_unit_factor;
+
+ my $map_key = join '--', ($form->{"id_$i"}, @{$request}{qw(warehouse_id bin_id chargenumber)});
+
+ $request_map{$map_key} ||= $request;
+ $request_map{$map_key}->{sum_base_qty} ||= 0;
+ $request_map{$map_key}->{sum_base_qty} += $request->{base_qty};
+ $row_sum_base_qty += $request->{base_qty};
+
+ push @all_requests, $request;
+ }
+
+ next if (0 == $row_sum_base_qty);
+
+ my $do_base_qty = $form->parse_amount(\%myconfig, $form->{"qty_$i"}) * $units->{$form->{"unit_$i"}}->{factor} / $base_unit_factor;
+
+ if ($do_base_qty != $row_sum_base_qty) {
+ push @{ $form->{ERRORS} }, $locale->text('Error in position #1: You must either assign no transfer at all or the full quantity of #2 #3.',
+ $i, $form->{"qty_$i"}, $form->{"unit_$i"});
+ }
+ }
+
+ if (%request_map) {
+ my @bin_ids = map { $_->{bin_id} } values %request_map;
+ my %bin_info_map = WH->get_basic_bin_info('id' => \@bin_ids);
+ my @contents = DO->get_item_availability('parts_id' => \@part_ids);
+
+ foreach my $inv (@contents) {
+ my $map_key = join '--', @{$inv}{qw(parts_id warehouse_id bin_id chargenumber)};
+
+ next unless ($request_map{$map_key});
+
+ my $request = $request_map{$map_key};
+ $request->{ok} = $request->{sum_base_qty} <= $inv->{qty};
+ }
+
+ foreach $request (values %request_map) {
+ next if ($request->{ok});
+
+ my $pinfo = $part_info_map{$request->{parts_id}};
+ my $binfo = $bin_info_map{$request->{bin_id}};
+
+ push @{ $form->{ERRORS} }, $locale->text("There is not enough available of '#1' at warehouse '#2', bin '#3', #4, for the transfer of #5.",
+ $pinfo->{description}, $binfo->{warehouse_description}, $binfo->{bin_description},
+ $request->{chargenumber} ? $locale->text('chargenumber #1', $request->{chargenumber}) : $locale->text('no chargenumber'),
+ $form->format_amount_units('amount' => $request->{sum_base_qty},
+ 'part_unit' => $pinfo->{unit},
+ 'conv_units' => 'convertible_not_smaller'));
+ }
+ }
+
+ if (@{ $form->{ERRORS} }) {
+ push @{ $form->{ERRORS} }, $locale->text('The delivery order has not been closed. The warehouse contents have not changed.');
+
+ update();
+ $lxdebug->leave_sub();
+
+ exit 0;
+ }
+ }
+
+ DO->transfer_in_out('direction' => 'out',
+ 'requests' => \@all_requests);
+
+ $form->{closed} = 1;
+ $form->{delivered} = 1;
+
+ save();
+
+ $lxdebug->leave_sub();
+}
+
+sub yes {
+ call_sub($form->{yes_nextsub});
+}
+
+sub no {
+ call_sub($form->{no_nextsub});
+}
+
+sub update {
+ call_sub($form->{update_nextsub} || $form->{nextsub} || 'update_delivery_order');
+}
$lxdebug->enter_sub();
$auth->assert('part_service_assembly_edit | vendor_invoice_edit | sales_order_edit | invoice_edit |' .
- 'request_quotation_edit | sales_quotation_edit | purchase_order_edit');
+ 'request_quotation_edit | sales_quotation_edit | purchase_order_edit | ' .
+ 'sales_delivery_order_edit | purchase_delivery_order_edit');
my $numrows = shift;
my ($readonly, $stock_in_out, $stock_in_out_title);
- my $is_purchase = (first { $_ eq $form->{type} } qw(request_quotation purchase_order)) || ($form->{script} eq 'ir.pl');
+ my $is_purchase = (first { $_ eq $form->{type} } qw(request_quotation purchase_order purchase_delivery_order)) || ($form->{script} eq 'ir.pl');
+ my $show_min_order_qty = first { $_ eq $form->{type} } qw(request_quotation purchase_order);
+ my $is_delivery_order = $form->{type} =~ /_delivery_order$/;
+
+ if ($is_delivery_order) {
+ $readonly = ' readonly' if ($form->{closed});
+
+ if ($form->{type} eq 'sales_delivery_order') {
+ $stock_in_out_title = $locale->text('Release From Stock');
+ $stock_in_out = 'out';
+ } else {
+ $stock_in_out_title = $locale->text('Transfer To Stock');
+ $stock_in_out = 'in';
+ }
+ }
# column_index
my @header_sort = qw(runningnumber partnumber description ship qty unit sellprice_pg sellprice discount linetotal);
{ id => 'license', width => 10, value => $locale->text('License'), display => 0, },
{ id => 'serialnr', width => 10, value => $locale->text('Serial No.'), display => 0, },
{ id => 'projectnr', width => 10, value => $locale->text('Project'), display => 0, },
- { id => 'sellprice', width => 15, value => $locale->text('Price'), display => 1, },
- { id => 'sellprice_pg', width => 15, value => $locale->text('Pricegroup'), display => ($form->{type} =~ /^sales_/), },
- { id => 'discount', width => 5, value => $locale->text('Discount'), display => ($form->{vc} eq 'customer'), },
- { id => 'linetotal', width => 10, value => $locale->text('Extended'), display => 1, },
+ { id => 'sellprice', width => 15, value => $locale->text('Price'), display => !$is_delivery_order, },
+ { id => 'sellprice_pg', width => 15, value => $locale->text('Pricegroup'), display => ($form->{type} =~ /^sales_/) && !$is_delivery_order, },
+ { id => 'discount', width => 5, value => $locale->text('Discount'), display => ($form->{vc} eq 'customer') && !$is_delivery_order, },
+ { id => 'linetotal', width => 10, value => $locale->text('Extended'), display => !$is_delivery_order, },
{ id => 'bin', width => 10, value => $locale->text('Bin'), display => 0, },
+ { id => 'stock_in_out', width => 10, value => $stock_in_out_title, display => $is_delivery_order, },
);
my @column_index = map { $_->{id} } grep { $_->{display} } @HEADER;
$deliverydate = $locale->text('Required by');
# special alignings
- my %align = map { $_ => 'right' } qw(qty ship right sellprice_pg discount linetotal);
+ my %align = map { $_ => 'right' } qw(qty ship right sellprice_pg discount linetotal stock_in_out);
my %nowrap = map { $_ => 1 } qw(description unit);
$form->{marge_total} = 0;
$column_data{linetotal} = $form->format_amount(\%myconfig, $linetotal, 2);
$column_data{bin} = $form->{"bin_$i"};
+ if ($is_delivery_order) {
+ $column_data{stock_in_out} = (!$form->{"assembly_$i"} && $form->{"inventory_accno_$i"}) ? calculate_stock_in_out($i) : ' ';
+ }
+
my @ROW1 = map { value => $column_data{$_}, align => $align{$_}, nowrap => $nowrap{$_} }, @column_index;
# second row
my @hidden_vars;
+ if ($is_delivery_order) {
+ map { $form->{"${_}_${i}"} = $form->format_amount(\%myconfig, $form->{"${_}_${i}"}) } qw(sellprice discount);
+ push @hidden_vars, qw(sellprice discount);
+ push @hidden_vars, "stock_${stock_in_out}_sum_qty", "stock_${stock_in_out}";
+ }
+
push @hidden_vars, qw(partunit) if ($is_purchase);
my @HIDDENS = map { value => $_}, (
not_discountable shop ve gv buchungsgruppen_id language_values
sellprice_pg pricegroup_old price_old price_new unit_old ordnumber
transdate longdescription basefactor marge_total marge_percent
- marge_price_factor lastcost price_factor_id);
+ marge_price_factor lastcost price_factor_id
+ stock_out stock_in);
# remove any makes or model rows
if ($form->{item} eq 'part') {
$lxdebug->enter_sub();
$auth->assert('part_service_assembly_edit | vendor_invoice_edit | sales_order_edit | invoice_edit |' .
- 'request_quotation_edit | sales_quotation_edit | purchase_order_edit | dunning_edit');
+ 'request_quotation_edit | sales_quotation_edit | purchase_order_edit | dunning_edit |' .
+ 'sales_delivery_order_edit | purchase_delivery_order_edit');
my %options = @_;
($form->{type} eq 'sales_order') ? (
opthash("sales_order", $form->{PD}{sales_order}, $locale->text('Confirmation')),
opthash("proforma", $form->{PD}{proforma}, $locale->text('Proforma Invoice')),
- opthash("pick_list", $form->{PD}{pick_list}, $locale->text('Pick List')),
- opthash("packing_list", $form->{PD}{packing_list}, $locale->text('Packing List'))
) : undef,
($form->{type} =~ /sales_quotation$/) ?
opthash('sales_quotation', $form->{PD}{sales_quotation}, $locale->text('Quotation')) : undef,
($form->{type} eq 'invoice') ? (
opthash("invoice", $form->{PD}{invoice}, $locale->text('Invoice')),
opthash("proforma", $form->{PD}{proforma}, $locale->text('Proforma Invoice')),
- opthash("packing_list", $form->{PD}{packing_list}, $locale->text('Packing List'))
) : undef,
($form->{type} eq 'invoice' && $form->{storno}) ? (
opthash("storno_invoice", $form->{PD}{storno_invoice}, $locale->text('Storno Invoice')),
opthash("storno_packing_list", $form->{PD}{storno_packing_list}, $locale->text('Storno Packing List'))
) : undef,
+ ($form->{type} =~ /_delivery_order$/) ? (
+ opthash($form->{type}, $form->{PD}{$form->{type}}, $locale->text('Delivery Order')),
+ opthash('pick_list', $form->{PD}{pick_list}, $locale->text('Pick List')),
+ ) : undef;
($form->{type} eq 'credit_note') ?
opthash("credit_note", $form->{PD}{credit_note}, $locale->text('Credit Note')) : undef;
$lxdebug->enter_sub();
$auth->assert('part_service_assembly_edit | vendor_invoice_edit | sales_order_edit | invoice_edit |' .
- 'request_quotation_edit | sales_quotation_edit | purchase_order_edit');
+ 'request_quotation_edit | sales_quotation_edit | purchase_order_edit |' .
+ 'sales_delivery_order_edit | purchase_delivery_order_edit');
my ($old_form) = @_;
# set invnumber for template packing_list
$form->{invnumber} = $form->{ordnumber};
}
- if ($form->{formname} eq 'pick_list') {
- $inv = "ord";
- $due = "req";
- $form->{"${inv}date"} = ($form->{transdate}) ? $form->{transdate} : $form->{invdate};
- $form->{label} = $locale->text('Pick List');
- $order = 1 unless $form->{type} eq 'invoice';
- }
if ($form->{formname} eq 'purchase_order') {
$inv = "ord";
$due = "req";
$order = 1;
}
+ if ($form->{type} =~ /_delivery_order$/) {
+ undef $due;
+ $inv = "do";
+ $form->{"${inv}date"} = $form->{transdate};
+ $numberfld = $form->{type} =~ /^sales/ ? 'sdonumber' : 'pdonumber';
+ $form->{label} = $form->{formname} eq 'pick_list' ? $locale->text('Pick List') : $locale->text('Delivery Order');
+ }
+
$form->isblank("email", $locale->text('E-mail address missing!'))
if ($form->{media} eq 'email');
$form->isblank("${inv}date",
$form->{language} = "_" . $form->{language};
}
- # Format dates and numbers.
+ # Format dates.
format_dates($output_dateformat, $output_longdates,
qw(invdate orddate quodate pldate duedate reqdate transdate
shippingdate deliverydate validitydate paymentdate
$lxdebug->leave_sub();
}
+sub delivery_order {
+ $lxdebug->enter_sub();
+
+ if ($form->{type} =~ /^sales/) {
+ $auth->assert('sales_delivery_order_edit');
+
+ $form->{vc} = 'customer';
+ $form->{type} = 'sales_delivery_order';
+
+ } else {
+ $auth->assert('purchase_delivery_order_edit');
+
+ $form->{vc} = 'vendor';
+ $form->{type} = 'purchase_delivery_order';
+ }
+
+ require "bin/mozilla/do.pl";
+
+ $form->{cp_id} *= 1;
+ $form->{transdate} = $form->current_date(\%myconfig);
+ delete $form->{duedate};
+
+ $form->{closed} = 0;
+
+ $form->{old_employee_id} = $form->{employee_id};
+ $form->{old_salesman_id} = $form->{salesman_id};
+
+ # reset
+ map { delete $form->{$_} } qw(id subject message cc bcc printed emailed queued creditlimit creditremaining discount tradediscount oldinvtotal);
+
+ for $i (1 .. $form->{rowcount}) {
+ map { $form->{"${_}_${i}"} = $form->parse_amount(\%myconfig, $form->{"${_}_${i}"}) if ($form->{"${_}_${i}"}) } qw(ship qty sellprice listprice basefactor);
+ }
+
+ my %old_values = map { $_ => $form->{$_} } qw(customer_id oldcustomer customer vendor_id oldvendor vendor);
+
+ order_links();
+
+ prepare_order();
+
+ map { $form->{$_} = $old_values{$_} if ($old_values{$_}) } keys %old_values;
+
+ update();
+
+ $lxdebug->leave_sub();
+}
+
sub e_mail {
$lxdebug->enter_sub();
check_oe_access();
+ retrieve_partunits() if ($form->{type} =~ /_delivery_order$/);
+
$form->{"taxaccounts"} =~ s/\s*$//;
$form->{"taxaccounts"} =~ s/^\s*//;
foreach my $accno (split(/\s*/, $form->{"taxaccounts"})) {
--- /dev/null
+am.pl
\ No newline at end of file
'Dataset upgrade' => 'Datenbankaktualisierung',
'Date' => 'Datum',
'Delete Dataset' => 'Datenbank löschen',
+ 'Delivery Order' => 'Lieferschein',
'Dependency loop detected:' => 'Schleife in den Abhängigkeiten entdeckt:',
'Directory' => 'Verzeichnis',
'ELSE' => 'Zusatz',
'Add Credit Note' => 'Gutschrift erfassen',
'Add Custom Variable' => 'Benutzerdefinierte Variable erfassen',
'Add Customer' => 'Kunde erfassen',
+ 'Add Delivery Order' => 'Lieferschein erfassen',
'Add Department' => 'Abteilung erfassen',
'Add Dunning' => 'Mahnung erzeugen',
'Add Exchangerate' => 'Wechselkurs erfassen',
'Add Pricegroup' => 'Preisgruppe erfassen',
'Add Printer' => 'Drucker hinzufügen',
'Add Project' => 'Projekt erfassen',
+ 'Add Purchase Delivery Order' => 'Lieferschein (Einkauf) erfassen',
'Add Purchase Order' => 'Lieferantenauftrag erfassen',
'Add Quotation' => 'Angebot erfassen',
'Add RFQ' => 'Neue Preisanfrage',
'Add Request for Quotation' => 'Anfrage erfassen',
+ 'Add Sales Delivery Order' => 'Lieferschein (Verkauf) erfassen',
'Add Sales Invoice' => 'Rechnung erfassen',
'Add Sales Order' => 'Auftrag erfassen',
'Add Service' => 'Dienstleistung erfassen',
'Applying [% HTML.escape(file) %]:' => 'Führe [% HTML.escape(file) %] aus:',
'Apr' => 'Apr',
'April' => 'April',
+ 'Are you sure you want to delete Delivery Order Number #1?' => 'Sind Sie sicher, dass Sie Lieferschein #1 löschen wollen?',
'Are you sure you want to delete Invoice Number' => 'Soll die Rechnung mit folgender Nummer wirklich gelöscht werden:',
'Are you sure you want to delete Order Number' => 'Soll der Auftrag mit folgender Nummer wirklich gelöscht werden:',
'Are you sure you want to delete Quotation Number' => 'Sind Sie sicher, dass Angebotnummer gelöscht werden soll?',
'Cannot delete account!' => 'Konto kann nicht gelöscht werden!',
'Cannot delete customer!' => 'Kunde kann nicht gelöscht werden!',
'Cannot delete default account!' => 'Das Standard-Konto kann nicht gelöscht werden!',
+ 'Cannot delete delivery order!' => 'Lieferschein kann nicht gelöscht werden!',
'Cannot delete invoice!' => 'Rechnung kann nicht gelöscht werden!',
'Cannot delete item!' => 'Artikel kann nicht gelöscht werden!',
'Cannot delete order!' => 'Auftrag kann nicht gelöscht werden!',
'Click on login name to edit!' => 'Zum Bearbeiten den Zugriffsnamen anklicken!',
'Close' => 'Übernehmen',
'Close Books up to' => 'Die Bücher abschließen bis zum',
+ 'Close Window' => 'Fenster Schließen',
'Closed' => 'Geschlossen',
'Collective Orders only work for orders from one customer!' => 'Sammelaufträge funktionieren nur für Aufträge von einem Kunden!',
'Comment' => 'Kommentar',
'Company Name' => 'Firmenname',
'Compare to' => 'Gegenüberstellen zu',
'Configuration of individual TODO items' => 'Konfiguration für die einzelnen Aufgabenlistenpunkte',
+ 'Confirm' => 'Bestätigen',
'Confirm!' => 'Bestätigen Sie!',
'Confirmation' => 'Auftragsbestätigung',
'Contact' => 'Kontakt',
'Delete' => 'Löschen',
'Delete Account' => 'Konto löschen',
'Delete Dataset' => 'Datenbank löschen',
+ 'Delete delivery order' => 'Lieferschein löschen',
'Delete drafts' => 'Entwürfe löschen',
'Delete group' => 'Gruppe löschen',
'Delivered' => 'Geliefert',
'Delivery Date' => 'Lieferdatum',
+ 'Delivery Order' => 'Lieferschein',
+ 'Delivery Order Date' => 'Lieferscheindatum',
+ 'Delivery Order Date missing!' => 'Lieferscheindatum fehlt!',
+ 'Delivery Order Number' => 'Lieferscheinnummer',
+ 'Delivery Order deleted!' => 'Lieferschein gelöscht!',
+ 'Delivery Orders' => 'Lieferscheine',
'Department' => 'Abteilung',
'Department deleted!' => 'Abteilung gelöscht.',
'Department saved!' => 'Abteilung gespeichert.',
'Do you want Lx-Office to create a group for access to all functions?' => 'Wollen Sie, dass Lx-Office eine Gruppe mit Zugriff auf alle Funktionen anlegt?',
'Do you want to <b>limit</b> your search?' => 'Wollen Sie Ihre Suche <b>spezialisieren</b>?',
'Do you want to carry this shipping address over to the new purchase order so that the vendor can deliver the goods directly to your customer?' => 'Wollen Sie diese Lieferadresse in den neuen Lieferantenauftrag übernehmen, damit der Händler die Waren direkt an Ihren Kunden liefern kann?',
+ 'Documents in the WebDAV repository' => 'Dokumente im WebDAV-Repository',
'Done' => 'Fertig',
'Download the backup' => 'Die Sicherungsdatei herunterladen',
'Draft saved.' => 'Entwurf gespeichert.',
'Edit Pricegroup' => 'Preisgruppe bearbeiten',
'Edit Printer' => 'Drucker bearbeiten',
'Edit Project' => 'Projekt bearbeiten',
+ 'Edit Purchase Delivery Order' => 'Lieferschein (Einkauf) bearbeiten',
'Edit Purchase Order' => 'Lieferantenaufrag bearbeiten',
'Edit Quotation' => 'Angebot bearbeiten',
'Edit Request for Quotation' => 'Anfrage bearbeiten',
+ 'Edit Sales Delivery Order' => 'Lieferschein (Verkauf) bearbeiten',
'Edit Sales Invoice' => 'Rechnung bearbeiten',
'Edit Sales Order' => 'Auftrag bearbeiten',
'Edit Service' => 'Dienstleistung bearbeiten',
'Edit note' => 'Notiz bearbeiten',
'Edit rights' => 'Rechte bearbeiten',
'Edit templates' => 'Vorlage bearbeiten',
+ 'Edit the Delivery Order' => 'Lieferschein bearbeiten',
'Edit the membership of all users in all groups:' => 'Bearbeiten der Mitgliedschaft aller Benutzer in allen Gruppen:',
'Edit the purchase_order' => 'Bearbeiten des Lieferantenauftrags',
'Edit the request_quotation' => 'Bearbeiten der Preisanfrage',
'Equity' => 'Passiva',
'Error' => 'Fehler',
'Error in database control file \'%s\': %s' => 'Fehler in Datenbankupgradekontrolldatei \'%s\': %s',
+ 'Error in position #1: You must either assign no stock at all or the full quantity of #2 #3.' => 'Fehler in Position #1: Sie müssen einer Position entweder gar keinen Lagereingang oder die vollständige im Lieferschein vermerkte Menge von #2 #3 zuweisen.',
+ 'Error in position #1: You must either assign no transfer at all or the full quantity of #2 #3.' => 'Fehler in Position #1: Sie müssen einer Position entweder gar keinen Lagerausgang oder die vollständige im Lieferschein vermerkte Menge von #2 #3 zuweisen.',
+ 'Error in row #1: The quantity you entered is bigger than the stocked quantity.' => 'Fehler in Zeile #1: Die angegebene Menge ist größer als die vorhandene Menge.',
'Error!' => 'Fehler!',
'Ertrag' => 'Ertrag',
'Ertrag prozentual' => 'Ertrag prozentual',
'February' => 'Februar',
'Fee' => 'Gebühr',
'File' => 'Datei',
+ 'File name' => 'Dateiname',
'Files created by Lx-Office\'s "Backup Dataset" function are such files.' => 'Dateien, die von Lx-Office\' Funktion "Datenbank sichern" erstellt wurden, erfüllen diese Kriterien.',
'Filter' => 'Filter',
'Finish' => 'Abschließen',
'Purchase Order' => 'Lieferantenauftrag',
'Purchase Orders' => 'Lieferantenaufträge',
'Qty' => 'Menge',
+ 'Qty according to delivery order' => 'Menge laut Lieferschein',
'Qty in stock' => 'Lagerbestand',
'Quantity' => 'Menge',
'Quantity missing.' => 'Die Mengenangabe fehlt.',
'Record in' => 'Buchen auf',
'Reference' => 'Referenz',
'Reference missing!' => 'Referenz fehlt!',
+ 'Release From Stock' => 'Lagerausgang',
'Remaining' => 'Rest',
'Removal' => 'Entnahme',
'Removal from Warehouse' => 'Lagerentnahme',
'The dataset has to exist before a restoration can be started.' => 'Die Datenbank muss vor der Wiederherstellung bereits angelegt worden sein.',
'The dataset name is missing.' => 'Der Datenbankname fehlt.',
'The default value depends on the variable type:' => 'Die Bedeutung des Standardwertes hängt vom Variablentypen ab:',
+ 'The delivery order has not been closed. The warehouse contents have not changed.' => 'Der Lieferschein wurde nicht abgeschlossen. Die Lagerinhalte wurden nicht verändert.',
'The description is missing.' => 'Die Beschreibung fehlt.',
'The description is shown on the form. Chose something short and descriptive.' => 'Die Beschreibung wird in der jeweiligen Maske angezeigt. Sie sollte kurz und prägnant sein.',
'The directory "%s" could not be created:\n%s' => 'Das Verzeichnis "%s" konnte nicht erstellt werden:\n%s',
'The warehouse or the bin is missing.' => 'Das Lager oder der Lagerplatz fehlen.',
'There are #1 unfinished follow-ups of which #2 are due.' => 'Es gibt #1 Wiedervorlage(n), von denen #2 fällig ist/sind.',
'There are four tax zones.' => 'Es gibt vier Steuerzonen.',
+ 'There are no items in stock.' => 'Dieser Artikel ist nicht eingelagert.',
'There are no items on your TODO list at the moment.' => 'Ihre Aufgabenliste enthält momentan keine Einträge.',
'There are still entries in the database for which no unit has been assigned.' => 'Es gibt noch Einträge in der Datenbank, für die keine Einheit zugeordnet ist.',
'There are usually three ways to install Perl modules.' => 'Es gibt normalerweise drei Arten, ein Perlmodul zu installieren.',
+ 'There is not enough available of \'#1\' at warehouse \'#2\', bin \'#3\', #4, for the transfer of #5.' => 'Von \'#1\' ist in Lager \'#2\', Lagerplatz \'#3\', #4, nicht genügend eingelagert, um insgesamt #5 auszulagern.',
'There is not enough left of \'#1\' in bin \'#2\' for the removal of #3.' => 'In Lagerplatz \'#2\' ist nicht genug von \'#1\' vorhanden, um #3 zu entnehmen.',
'There is nothing to do in this step.' => 'In diesem Schritt gibt es nichts mehr zu tun.',
'Therefore there\'s no need to create the same article more than once if it is sold or bought in/from another tax zone.' => 'Deswegen muss man den gleichen Artikel nicht mehr mehrmals anlegen, wenn er in verschiedenen Steuerzonen gehandelt werden soll.',
'Transactions, AR transactions, AP transactions' => 'Dialogbuchen, Debitorenrechnungen, Kreditorenrechnungen',
'Transfer' => 'Umlagern',
'Transfer Quantity' => 'Umlagermenge',
+ 'Transfer To Stock' => 'Lagereingang',
'Transfer from warehouse' => 'Quelllager',
+ 'Transfer in and close' => 'Einlagern und abschließen',
+ 'Transfer out and close' => 'Auslagern und abschließen',
'Transfer qty' => 'Umlagermenge',
'Translation (%s)' => 'Übersetzung (%s)',
'Trial Balance' => 'Saldenbilanz',
'Warehouse saved.' => 'Lager gespeichert.',
'Warehouses' => 'Lager',
'Warnings during template upgrade' => 'Warnungen bei Aktualisierung der Dokumentenvorlagen',
+ 'WebDAV link' => 'WebDAV-Link',
'Weight' => 'Gewicht',
'What type of item is this?' => 'Was ist dieser Artikel?',
'What\'s the <b>term</b> you\'re looking for?' => 'Nach welchem <b>Begriff</b> wollen Sie suchen?',
'With Extension Of Time' => 'mit Dauerfristverlängerung',
+ 'Workflow Delivery Order' => 'Workflow Lieferschein',
'Workflow purchase_order' => 'Workflow Lieferantenauftrag',
'Workflow request_quotation' => 'Workflow Preisanfrage',
'Workflow sales_order' => 'Workflow Auftrag',
'bis' => 'bis',
'button' => '?',
'cash' => 'E/Ü-Rechnung (Ist-Versteuerung)',
+ 'chargenumber #1' => 'Chargennummer #1',
'chart_of_accounts' => 'kontenuebersicht',
'choice' => 'auswählen',
'choice part' => 'Artikel auswählen',
'month' => 'Monatliche Abgabe',
'new Window' => 'neues Fenster',
'no' => 'nein',
+ 'no chargenumber' => 'keine Chargennummer',
'none (pricegroup)' => 'keine',
'number' => 'Nummer',
'order' => 'Reihenfolge',
'prices updated!' => ' Preise aktualisiert!',
'print' => 'drucken',
'proforma' => 'Proforma',
+ 'purchase_delivery_order_list' => 'lieferscheinliste_einkauf',
'purchase_order' => 'Auftrag',
'purchase_order_list' => 'lieferantenauftragsliste',
'quarter' => 'Vierteljährliche (quartalsweise) Abgabe',
'reset' => 'zurücksetzen',
'return_material' => 'Materialrückgabe',
'rfq_list' => 'anfragenliste',
+ 'sales_delivery_order_list' => 'lieferscheinliste_verkauf',
'sales_order' => 'Kundenauftrag',
'sales_order_list' => 'auftragsliste',
'sales_quotation' => 'Verkaufsangebot',
'Defaults saved.' => 'Die Standardeinstellungen wurden gespeichert.',
'Delete' => 'Löschen',
'Delete Account' => 'Konto löschen',
+ 'Delivery Order' => 'Lieferschein',
'Department deleted!' => 'Abteilung gelöscht.',
'Department saved!' => 'Abteilung gespeichert.',
'Departments' => 'Abteilungen',
'DUNNING STARTED' => 'Mahnprozess gestartet',
'Dataset upgrade' => 'Datenbankaktualisierung',
'Date' => 'Datum',
+ 'Delivery Order' => 'Lieferschein',
'Dependency loop detected:' => 'Schleife in den Abhängigkeiten entdeckt:',
'Directory' => 'Verzeichnis',
'ELSE' => 'Zusatz',
'DUNNING STARTED' => 'Mahnprozess gestartet',
'Dataset upgrade' => 'Datenbankaktualisierung',
'Date' => 'Datum',
+ 'Delivery Order' => 'Lieferschein',
'Dependency loop detected:' => 'Schleife in den Abhängigkeiten entdeckt:',
'Directory' => 'Verzeichnis',
'ELSE' => 'Zusatz',
'December' => 'Dezember',
'Delete' => 'Löschen',
'Delete drafts' => 'Entwürfe löschen',
+ 'Delivery Order' => 'Lieferschein',
'Department' => 'Abteilung',
'Dependency loop detected:' => 'Schleife in den Abhängigkeiten entdeckt:',
'Description' => 'Beschreibung',
'December' => 'Dezember',
'Delete' => 'Löschen',
'Delete drafts' => 'Entwürfe löschen',
+ 'Delivery Order' => 'Lieferschein',
'Department' => 'Abteilung',
'Dependency loop detected:' => 'Schleife in den Abhängigkeiten entdeckt:',
'Description' => 'Beschreibung',
'DUNNING STARTED' => 'Mahnprozess gestartet',
'Dataset upgrade' => 'Datenbankaktualisierung',
'Date' => 'Datum',
+ 'Delivery Order' => 'Lieferschein',
'Dependency loop detected:' => 'Schleife in den Abhängigkeiten entdeckt:',
'Description' => 'Beschreibung',
'Directory' => 'Verzeichnis',
'DUNNING STARTED' => 'Mahnprozess gestartet',
'Dataset upgrade' => 'Datenbankaktualisierung',
'Date' => 'Datum',
+ 'Delivery Order' => 'Lieferschein',
'Dependency loop detected:' => 'Schleife in den Abhängigkeiten entdeckt:',
'Directory' => 'Verzeichnis',
'ELSE' => 'Zusatz',
'Debit' => 'Soll',
'Dec' => 'Dez',
'December' => 'Dezember',
+ 'Delivery Order' => 'Lieferschein',
'Department' => 'Abteilung',
'Dependency loop detected:' => 'Schleife in den Abhängigkeiten entdeckt:',
'Description' => 'Beschreibung',
'DUNNING STARTED' => 'Mahnprozess gestartet',
'Dataset upgrade' => 'Datenbankaktualisierung',
'Date' => 'Datum',
+ 'Delivery Order' => 'Lieferschein',
'Dependency loop detected:' => 'Schleife in den Abhängigkeiten entdeckt:',
'Directory' => 'Verzeichnis',
'ELSE' => 'Zusatz',
'Dataset upgrade' => 'Datenbankaktualisierung',
'Date' => 'Datum',
'Date missing!' => 'Datum fehlt!',
+ 'Delivery Order' => 'Lieferschein',
'Department' => 'Abteilung',
'Dependency loop detected:' => 'Schleife in den Abhängigkeiten entdeckt:',
'Deposit' => 'Gutschrift',
'DUNNING STARTED' => 'Mahnprozess gestartet',
'Dataset upgrade' => 'Datenbankaktualisierung',
'Date' => 'Datum',
+ 'Delivery Order' => 'Lieferschein',
'Dependency loop detected:' => 'Schleife in den Abhängigkeiten entdeckt:',
'Directory' => 'Verzeichnis',
'Dunning' => 'Mahnung',
'Date' => 'Datum',
'Datum von' => 'Datum von',
'December' => 'Dezember',
+ 'Delivery Order' => 'Lieferschein',
'Dependency loop detected:' => 'Schleife in den Abhängigkeiten entdeckt:',
'Directory' => 'Verzeichnis',
'ELSE' => 'Zusatz',
'Dec' => 'Dez',
'December' => 'Dezember',
'Delivery Date' => 'Lieferdatum',
+ 'Delivery Order' => 'Lieferschein',
'Department' => 'Abteilung',
'Dependency loop detected:' => 'Schleife in den Abhängigkeiten entdeckt:',
'Directory' => 'Verzeichnis',
'Quotation Number missing!' => 'Angebotsnummer fehlt!',
'RFQ' => 'Anfrage',
'Receipt, payment, reconciliation' => 'Zahlungseingang, Zahlungsausgang, Kontenabgleich',
+ 'Release From Stock' => 'Lagerausgang',
'Reports' => 'Berichte',
'Reqdate' => 'Lieferdatum',
'Request for Quotation' => 'Anfrage',
'To (email)' => 'An',
'Total Fees' => 'Kumulierte Gebühren',
'Transactions, AR transactions, AP transactions' => 'Dialogbuchen, Debitorenrechnungen, Kreditorenrechnungen',
+ 'Transfer To Stock' => 'Lagereingang',
'Trying to call a sub without a name' => 'Es wurde versucht, eine Unterfunktion ohne Namen aufzurufen.',
'Unit' => 'Einheit',
'Unknown dependency \'%s\'.' => 'Unbekannte Abhängigkeit \'%s\'.',
--- /dev/null
+#!/usr/bin/perl
+
+$self->{texts} = {
+ ' Date missing!' => ' Datum fehlt!',
+ ' missing!' => ' fehlt!',
+ '*/' => '*/',
+ 'ADDED' => 'Hinzugefügt',
+ 'AP' => 'Einkauf',
+ 'AP Transaction' => 'Kreditorenbuchung',
+ 'AR' => 'Verkauf',
+ 'AR Transaction' => 'Debitorenbuchung',
+ 'Add Purchase Delivery Order' => 'Lieferschein (Einkauf) erfassen',
+ 'Add Purchase Order' => 'Lieferantenauftrag erfassen',
+ 'Add Quotation' => 'Angebot erfassen',
+ 'Add Request for Quotation' => 'Anfrage erfassen',
+ 'Add Sales Delivery Order' => 'Lieferschein (Verkauf) erfassen',
+ 'Add Sales Invoice' => 'Rechnung erfassen',
+ 'Add Sales Order' => 'Auftrag erfassen',
+ 'Add Vendor Invoice' => 'Einkaufsrechnung erfassen',
+ 'Address' => 'Adresse',
+ 'Advance turnover tax return' => 'Umsatzsteuervoranmeldung',
+ 'All reports' => 'Alle Berichte (Kontenübersicht, Saldenbilanz, GuV, BWA, Bilanz, Projektbuchungen)',
+ 'Apr' => 'Apr',
+ 'April' => 'April',
+ 'Attachment' => 'als Anhang',
+ 'Attempt to call an undefined sub named \'%s\'' => 'Es wurde versucht, eine nicht definierte Unterfunktion namens \'%s\' aufzurufen.',
+ 'Aug' => 'Aug',
+ 'August' => 'August',
+ 'Bcc' => 'Bcc',
+ 'Billing Address' => 'Rechnungsadresse',
+ 'Bin' => 'Lagerplatz',
+ 'Bin List' => 'Lagerliste',
+ 'Binding to the LDAP server as "#1" failed. Please check config/authentication.pl.' => 'Die Anmeldung am LDAP-Server als "#1" schlug fehl. Bitte überprüfen Sie die Angaben in config/authentication.pl.',
+ 'Bis' => 'bis',
+ 'CANCELED' => 'Storniert',
+ 'CSV export -- options' => 'CSV-Export -- Optionen',
+ 'Cannot delete delivery order!' => 'Lieferschein kann nicht gelöscht werden!',
+ 'Cc' => 'Cc',
+ 'Change Lx-Office installation settings (all menu entries beneath \'System\')' => 'Verändern der Lx-Office-Installationseinstellungen (Menüpunkte unterhalb von \'System\')',
+ 'City' => 'Stadt',
+ 'Closed' => 'Geschlossen',
+ 'Company Name' => 'Firmenname',
+ 'Confirmation' => 'Auftragsbestätigung',
+ 'Contact' => 'Kontakt',
+ 'Continue' => 'Weiter',
+ 'Could not spawn html2ps or GhostScript.' => 'html2ps oder GhostScript konnte nicht gestartet werden.',
+ 'Could not spawn the printer command.' => 'Die Druckanwendung konnte nicht gestartet werden.',
+ 'Could not write the html2ps config file.' => 'Die temporäre html2ps-Konfigurationsdatei konnte nicht geschrieben werden.',
+ 'Could not write the temporary HTML file.' => 'Eine temporäre HTML-Datei konnte nicht geschrieben werden.',
+ 'Country' => 'Land',
+ 'Create and edit RFQs' => 'Lieferantenanfragen erfassen und bearbeiten',
+ 'Create and edit customers and vendors' => 'Kunden und Lieferanten erfassen und bearbeiten',
+ 'Create and edit dunnings' => 'Mahnungen erfassen und bearbeiten',
+ 'Create and edit invoices and credit notes' => 'Rechnungen und Gutschriften erfassen und bearbeiten',
+ 'Create and edit parts, services, assemblies' => 'Artikel, Dienstleistungen, Erzeugnisse erfassen und bearbeiten',
+ 'Create and edit projects' => 'Projekte erfassen und bearbeiten',
+ 'Create and edit purchase delivery orders' => 'Lieferscheine von Lieferanten erfassen und bearbeiten',
+ 'Create and edit purchase orders' => 'Lieferantenaufträge erfassen und bearbeiten',
+ 'Create and edit sales delivery orders' => 'Lieferscheine für Kunden erfassen und bearbeiten',
+ 'Create and edit sales orders' => 'Auftragsbestätigungen erfassen und bearbeiten',
+ 'Create and edit sales quotations' => 'Angebote erfassen und bearbeiten',
+ 'Create and edit vendor invoices' => 'Eingangsrechnungen erfassen und bearbeiten',
+ 'Credit Note' => 'Gutschrift',
+ 'Customer' => 'Kunde',
+ 'Customer Number' => 'Kundennummer',
+ 'Customer details' => 'Kundendetails',
+ 'Customer missing!' => 'Kundenname fehlt!',
+ 'Customer not on file or locked!' => 'Dieser Kunde existiert nicht oder ist gesperrt.',
+ 'Customer not on file!' => 'Kunde ist nicht in der Datenbank!',
+ 'DATEV Export' => 'DATEV-Export',
+ 'DELETED' => 'Gelöscht',
+ 'DUNNING STARTED' => 'Mahnprozess gestartet',
+ 'Dataset upgrade' => 'Datenbankaktualisierung',
+ 'Date' => 'Datum',
+ 'Dec' => 'Dez',
+ 'December' => 'Dezember',
+ 'Delete delivery order' => 'Lieferschein löschen',
+ 'Delivered' => 'Geliefert',
+ 'Delivery Date' => 'Lieferdatum',
+ 'Delivery Order' => 'Lieferschein',
+ 'Delivery Order Date missing!' => 'Lieferscheindatum fehlt!',
+ 'Delivery Order Number' => 'Lieferscheinnummer',
+ 'Delivery Order deleted!' => 'Lieferschein gelöscht!',
+ 'Delivery Orders' => 'Lieferscheine',
+ 'Department' => 'Abteilung',
+ 'Dependency loop detected:' => 'Schleife in den Abhängigkeiten entdeckt:',
+ 'Description' => 'Beschreibung',
+ 'Directory' => 'Verzeichnis',
+ 'Discount' => 'Rabatt',
+ 'Dunning' => 'Mahnung',
+ 'E-mail' => 'eMail',
+ 'E-mail address missing!' => 'E-Mail-Adresse fehlt!',
+ 'EK' => 'EK',
+ 'ELSE' => 'Zusatz',
+ 'Edit Purchase Delivery Order' => 'Lieferschein (Einkauf) bearbeiten',
+ 'Edit Sales Delivery Order' => 'Lieferschein (Verkauf) bearbeiten',
+ 'Enter longdescription' => 'Langtext eingeben',
+ 'Error in database control file \'%s\': %s' => 'Fehler in Datenbankupgradekontrolldatei \'%s\': %s',
+ 'Error in position #1: You must either assign no stock at all or the full quantity of #2 #3.' => 'Fehler in Position #1: Sie müssen einer Position entweder gar keinen Lagereingang oder die vollständige im Lieferschein vermerkte Menge von #2 #3 zuweisen.',
+ 'Error in position #1: You must either assign no transfer at all or the full quantity of #2 #3.' => 'Fehler in Position #1: Sie müssen einer Position entweder gar keinen Lagerausgang oder die vollständige im Lieferschein vermerkte Menge von #2 #3 zuweisen.',
+ 'Error in row #1: The quantity you entered is bigger than the stocked quantity.' => 'Fehler in Zeile #1: Die angegebene Menge ist größer als die vorhandene Menge.',
+ 'Ertrag' => 'Ertrag',
+ 'Extended' => 'Gesamt',
+ 'Fax' => 'Fax',
+ 'Feb' => 'Feb',
+ 'February' => 'Februar',
+ 'File' => 'Datei',
+ 'From' => 'Von',
+ 'GL Transaction' => 'Dialogbuchung',
+ 'General ledger and cash' => 'Finanzbuchhaltung und Zahlungsverkehr',
+ 'Group' => 'Warengruppe',
+ 'History' => 'Historie',
+ 'ID' => 'Buchungsnummer',
+ 'In-line' => 'im Text',
+ 'Invoice' => 'Rechnung',
+ 'Invoice Date missing!' => 'Rechnungsdatum fehlt!',
+ 'Invoice Number missing!' => 'Rechnungsnummer fehlt!',
+ 'Jan' => 'Jan',
+ 'January' => 'Januar',
+ 'Jul' => 'Jul',
+ 'July' => 'Juli',
+ 'Jun' => 'Jun',
+ 'June' => 'Juni',
+ 'L' => 'L',
+ 'LP' => 'LP',
+ 'License' => 'Lizenz',
+ 'MAILED' => 'Gesendet',
+ 'Manage license keys' => 'Lizenzschlüssel verwalten',
+ 'Mar' => 'März',
+ 'March' => 'März',
+ 'Mark as paid?' => 'Als bezahlt markieren?',
+ 'Marked as paid' => 'Als bezahlt markiert',
+ 'Master Data' => 'Stammdaten',
+ 'May' => 'Mai',
+ 'May ' => 'Mai',
+ 'May set the BCC field when sending emails' => 'Beim Verschicken von Emails das Feld \'BCC\' setzen',
+ 'Message' => 'Nachricht',
+ 'Missing \'description\' field.' => 'Fehlendes Feld \'description\'.',
+ 'Missing \'tag\' field.' => 'Fehlendes Feld \'tag\'.',
+ 'Missing parameter #1 in call to sub #2.' => 'Fehlernder Parameter \'#1\' in Funktionsaufruf \'#2\'.',
+ 'More than one control file with the tag \'%s\' exist.' => 'Es gibt mehr als eine Kontrolldatei mit dem Tag \'%s\'.',
+ 'Name' => 'Name',
+ 'No' => 'Nein',
+ 'No %s was found matching the search parameters.' => 'Es wurde kein %s gefunden, auf den die Suchparameter zutreffen.',
+ 'No Customer was found matching the search parameters.' => 'Zu dem Suchbegriff wurde kein Endkunde gefunden',
+ 'No Vendor was found matching the search parameters.' => 'Zu dem Suchbegriff wurde kein Händler gefunden',
+ 'No customer has been selected yet.' => 'Es wurde noch kein Kunde ausgewählt.',
+ 'No or an unknown authenticantion module specified in "config/authentication.pl".' => 'Es wurde kein oder ein unbekanntes Authentifizierungsmodul in "config/authentication.pl" angegeben.',
+ 'No part was found matching the search parameters.' => 'Es wurde kein Artikel gefunden, auf den die Suchparameter zutreffen.',
+ 'No vendor has been selected yet.' => 'Es wurde noch kein Lieferant ausgewählt.',
+ 'No.' => 'Position',
+ 'Not delivered' => 'Nicht geliefert',
+ 'Nov' => 'Nov',
+ 'November' => 'November',
+ 'Number' => 'Nummer',
+ 'Number missing in Row' => 'Nummer fehlt in Zeile',
+ 'Oct' => 'Okt',
+ 'October' => 'Oktober',
+ 'Open' => 'Offen',
+ 'OpenDocument/OASIS' => 'OpenDocument/OASIS',
+ 'Order' => 'Auftrag',
+ 'Order Date missing!' => 'Auftragsdatum fehlt!',
+ 'Order Number' => 'Auftragsnummer',
+ 'Order Number missing!' => 'Auftragsnummer fehlt!',
+ 'Order Request Number' => 'Bestellanfragenummer',
+ 'Others' => 'Andere',
+ 'PAYMENT POSTED' => 'Rechung gebucht',
+ 'PDF' => 'PDF',
+ 'PDF (OpenDocument/OASIS)' => 'PDF (OpenDocument/OASIS)',
+ 'PDF export -- options' => 'PDF-Export -- Optionen',
+ 'POSTED' => 'Gebucht',
+ 'POSTED AS NEW' => 'Als neu gebucht',
+ 'PRINTED' => 'Gedruckt',
+ 'Packing List' => 'Lieferschein',
+ 'Packing List Date missing!' => 'Datum für Verpackungsliste fehlt!',
+ 'Packing List Number missing!' => 'Verpackungslistennummer fehlt!',
+ 'Part Description' => 'Artikelbeschreibung',
+ 'Part Number' => 'Artikelnummer',
+ 'Part description' => 'Artikelbeschreibung',
+ 'Phone' => 'Telefon',
+ 'Pick List' => 'Sammelliste',
+ 'Please enter values' => 'Bitte Werte eingeben',
+ 'Postscript' => 'Postscript',
+ 'Price' => 'Preis',
+ 'Price Factor' => 'Preisfaktor',
+ 'Pricegroup' => 'Preisgruppe',
+ 'Printer' => 'Drucker',
+ 'Proforma Invoice' => 'Proformarechnung',
+ 'Project' => 'Projekt',
+ 'Project Number' => 'Projektnummer',
+ 'Project not on file!' => 'Dieses Projekt ist nicht in der Datenbank!',
+ 'Purchase Order' => 'Lieferantenauftrag',
+ 'Qty' => 'Menge',
+ 'Queue' => 'Warteschlange',
+ 'Quotation' => 'Angebot',
+ 'Quotation Date missing!' => 'Angebotsdatum fehlt!',
+ 'Quotation Number missing!' => 'Angebotsnummer fehlt!',
+ 'RFQ' => 'Anfrage',
+ 'Receipt, payment, reconciliation' => 'Zahlungseingang, Zahlungsausgang, Kontenabgleich',
+ 'Release From Stock' => 'Lagerausgang',
+ 'Reports' => 'Berichte',
+ 'Reqdate' => 'Lieferdatum',
+ 'Request for Quotation' => 'Anfrage',
+ 'Request quotation' => 'Preisanfrage',
+ 'Required by' => 'Lieferdatum',
+ 'SAVED' => 'Gespeichert',
+ 'SAVED FOR DUNNING' => 'Gespeichert',
+ 'SCREENED' => 'Angezeigt',
+ 'Sales Invoice' => 'Rechnung',
+ 'Sales Order' => 'Kundenauftrag',
+ 'Sales quotation' => 'Angebot',
+ 'Salesperson' => 'Verkäufer',
+ 'Screen' => 'Bildschirm',
+ 'Select a Customer' => 'Endkunde auswählen',
+ 'Select a customer' => 'Einen Kunden auswählen',
+ 'Select a part' => 'Artikel auswählen',
+ 'Select a vendor' => 'Einen Lieferanten auswählen',
+ 'Select from one of the items below' => 'Wählen Sie einen der untenstehenden Einträge',
+ 'Select from one of the names below' => 'Wählen Sie einen der untenstehenden Namen',
+ 'Select from one of the projects below' => 'Wählen Sie eines der untenstehenden Projekte',
+ 'Select postscript or PDF!' => 'Postscript oder PDF auswählen!',
+ 'Sep' => 'Sep',
+ 'September' => 'September',
+ 'Serial No.' => 'Seriennummer',
+ 'Ship' => 'Lagerausgang',
+ 'Ship rcvd' => 'Lagereingang',
+ 'Ship to' => 'Lieferadresse',
+ 'Ship via' => 'Transportmittel',
+ 'Shipping Address' => 'Lieferadresse',
+ 'Show details' => 'Details anzeigen',
+ 'Stock' => 'Einlagern',
+ 'Storno Invoice' => 'Stornorechnung',
+ 'Storno Packing List' => 'Stornolieferschein',
+ 'Street' => 'Straße',
+ 'Subject' => 'Betreff',
+ 'Subtotal' => 'Zwischensumme',
+ 'The \'tag\' field must only consist of alphanumeric characters or the carachters - _ ( )' => 'Das Feld \'tag\' darf nur aus alphanumerischen Zeichen und den Zeichen - _ ( ) bestehen.',
+ 'The LDAP server "#1:#2" is unreachable. Please check config/authentication.pl.' => 'Der LDAP-Server "#1:#2" ist nicht erreichbar. Bitte überprüfen Sie die Angaben in config/authentication.pl.',
+ 'The config file "config/authentication.pl" contained invalid Perl code:' => 'Die Konfigurationsdatei "config/authentication.pl" enthielt ungütigen Perl-Code:',
+ 'The config file "config/authentication.pl" was not found.' => 'Die Konfigurationsdatei "config/authentication.pl" wurde nicht gefunden.',
+ 'The connection to the LDAP server cannot be encrypted (SSL/TLS startup failure). Please check config/authentication.pl.' => 'Die Verbindung zum LDAP-Server kann nicht verschlüsselt werden (Fehler bei SSL/TLS-Initialisierung). Bitte überprüfen Sie die Angaben in config/authentication.pl.',
+ 'The connection to the authentication database failed:' => 'Die Verbindung zur Authentifizierungsdatenbank schlug fehl:',
+ 'The connection to the template database failed:' => 'Die Verbindung zur Vorlagendatenbank schlug fehl:',
+ 'The creation of the authentication database failed:' => 'Das Anlegen der Authentifizierungsdatenbank schlug fehl:',
+ 'The delivery order has not been closed. The warehouse contents have not changed.' => 'Der Lieferschein wurde nicht abgeschlossen. Die Lagerinhalte wurden nicht verändert.',
+ 'The list has been printed.' => 'Die Liste wurde ausgedruckt.',
+ 'There is not enough available of \'#1\' at warehouse \'#2\', bin \'#3\', #4, for the transfer of #5.' => 'Von \'#1\' ist in Lager \'#2\', Lagerplatz \'#3\', #4, nicht genügend eingelagert, um insgesamt #5 auszulagern.',
+ 'To (email)' => 'An',
+ 'Transaction description' => 'Vorgangsbezeichnung',
+ 'Transactions, AR transactions, AP transactions' => 'Dialogbuchen, Debitorenrechnungen, Kreditorenrechnungen',
+ 'Transfer To Stock' => 'Lagereingang',
+ 'Trying to call a sub without a name' => 'Es wurde versucht, eine Unterfunktion ohne Namen aufzurufen.',
+ 'Unit' => 'Einheit',
+ 'Unknown dependency \'%s\'.' => 'Unbekannte Abhängigkeit \'%s\'.',
+ 'Value' => 'Wert',
+ 'Variable' => 'Variable',
+ 'Vendor' => 'Lieferant',
+ 'Vendor Invoice' => 'Einkaufsrechnung',
+ 'Vendor Number' => 'Lieferantennummer',
+ 'Vendor details' => 'Lieferantendetails',
+ 'Vendor missing!' => 'Lieferant fehlt!',
+ 'Vendor not on file or locked!' => 'Dieser Lieferant existiert nicht oder ist gesperrt.',
+ 'Vendor not on file!' => 'Lieferant ist nicht in der Datenbank!',
+ 'View warehouse content' => 'Lagerbestand ansehen',
+ 'Warehouse management' => 'Lagerverwaltung/Bestandsveränderung',
+ 'Yes' => 'Ja',
+ 'You do not have the permissions to access this function.' => 'Sie verfügen nicht über die notwendigen Rechte, um auf diese Funktion zuzugreifen.',
+ 'Zipcode' => 'PLZ',
+ '[email]' => '[email]',
+ 'bin_list' => 'Lagerliste',
+ 'chargenumber #1' => 'Chargennummer #1',
+ 'config/authentication.pl: Key "DB_config" is missing.' => 'config/authentication.pl: Das Schlüsselwort "DB_config" fehlt.',
+ 'config/authentication.pl: Key "LDAP_config" is missing.' => 'config/authentication.pl: Der Schlüssel "LDAP_config" fehlt.',
+ 'config/authentication.pl: Missing parameters in "DB_config". Required parameters are "host", "db" and "user".' => 'config/authentication.pl: Fehlende Parameter in "DB_config". Benötigte Parameter sind "host", "db" und "user".',
+ 'config/authentication.pl: Missing parameters in "LDAP_config". Required parameters are "host", "attribute" and "base_dn".' => 'config/authentication.pl: Fehlende Parameter in "LDAP_config". Benötigt werden "host", "attribute" und "base_dn".',
+ 'customer' => 'Kunde',
+ 'emailed to' => 'gemailt an',
+ 'invoice' => 'Rechnung',
+ 'no' => 'nein',
+ 'no chargenumber' => 'keine Chargennummer',
+ 'none (pricegroup)' => 'keine',
+ 'packing_list' => 'Versandliste',
+ 'pick_list' => 'Entnahmeliste',
+ 'proforma' => 'Proforma',
+ 'purchase_delivery_order_list' => 'lieferscheinliste_einkauf',
+ 'purchase_order' => 'Auftrag',
+ 'report_generator_dispatch_to is not defined.' => 'report_generator_dispatch_to ist nicht definiert.',
+ 'report_generator_nextsub is not defined.' => 'report_generator_nextsub ist nicht definiert.',
+ 'request_quotation' => 'Angebotsanforderung',
+ 'sales_delivery_order_list' => 'lieferscheinliste_verkauf',
+ 'sales_order' => 'Kundenauftrag',
+ 'sales_quotation' => 'Verkaufsangebot',
+ 'sent' => 'gesendet',
+ 'sent to printer' => 'an Drucker geschickt',
+ 'vendor' => 'Lieferant',
+ 'yes' => 'ja',
+};
+
+$self->{subs} = {
+ 'E' => 'E',
+ 'H' => 'H',
+ 'NTI' => 'NTI',
+ 'Q' => 'Q',
+ 'add' => 'add',
+ 'build_std_url' => 'build_std_url',
+ 'calculate_qty' => 'calculate_qty',
+ 'calculate_stock_in_out' => 'calculate_stock_in_out',
+ 'call_sub' => 'call_sub',
+ 'check_do_access' => 'check_do_access',
+ 'check_form' => 'check_form',
+ 'check_name' => 'check_name',
+ 'check_project' => 'check_project',
+ 'continue' => 'continue',
+ 'cov_selection_internal' => 'cov_selection_internal',
+ 'customer_details' => 'customer_details',
+ 'delete' => 'delete',
+ 'delete_delivery_order' => 'delete_delivery_order',
+ 'delivery_customer_selection' => 'delivery_customer_selection',
+ 'display_form' => 'display_form',
+ 'display_row' => 'display_row',
+ 'display_stock_in_form' => 'display_stock_in_form',
+ 'e_mail' => 'e_mail',
+ 'edit' => 'edit',
+ 'edit_e_mail' => 'edit_e_mail',
+ 'form_footer' => 'form_footer',
+ 'form_header' => 'form_header',
+ 'format_dates' => 'format_dates',
+ 'get_basic_bin_wh_info' => 'get_basic_bin_wh_info',
+ 'invoice' => 'invoice',
+ 'invoicetotal' => 'invoicetotal',
+ 'item_selected' => 'item_selected',
+ 'mark_as_paid_common' => 'mark_as_paid_common',
+ 'name_selected' => 'name_selected',
+ 'new_item' => 'new_item',
+ 'new_license' => 'new_license',
+ 'no' => 'no',
+ 'order' => 'order',
+ 'order_links' => 'order_links',
+ 'orders' => 'orders',
+ 'part_selection_internal' => 'part_selection_internal',
+ 'post_as_new' => 'post_as_new',
+ 'prepare_order' => 'prepare_order',
+ 'print' => 'print',
+ 'print_form' => 'print_form',
+ 'print_options' => 'print_options',
+ 'project_selected' => 'project_selected',
+ 'quotation' => 'quotation',
+ 'redo_stock_info' => 'redo_stock_info',
+ 'reformat_numbers' => 'reformat_numbers',
+ 'relink_accounts' => 'relink_accounts',
+ 'report_generator_back' => 'report_generator_back',
+ 'report_generator_dispatcher' => 'report_generator_dispatcher',
+ 'report_generator_do' => 'report_generator_do',
+ 'report_generator_export_as_csv' => 'report_generator_export_as_csv',
+ 'report_generator_export_as_pdf' => 'report_generator_export_as_pdf',
+ 'request_for_quotation' => 'request_for_quotation',
+ 'retrieve_partunits' => 'retrieve_partunits',
+ 'save' => 'save',
+ 'save_as_new' => 'save_as_new',
+ 'search' => 'search',
+ 'select_item' => 'select_item',
+ 'select_name' => 'select_name',
+ 'select_part' => 'select_part',
+ 'select_part_internal' => 'select_part_internal',
+ 'select_project' => 'select_project',
+ 'send_email' => 'send_email',
+ 'set_duedate' => 'set_duedate',
+ 'set_headings' => 'set_headings',
+ 'set_longdescription' => 'set_longdescription',
+ 'set_pricegroup' => 'set_pricegroup',
+ 'set_stock_in' => 'set_stock_in',
+ 'set_stock_out' => 'set_stock_out',
+ 'ship_to' => 'ship_to',
+ 'show_history' => 'show_history',
+ 'show_vc_details' => 'show_vc_details',
+ 'stock_in_form' => 'stock_in_form',
+ 'stock_in_out_form' => 'stock_in_out_form',
+ 'stock_out_form' => 'stock_out_form',
+ 'transfer_in_and_close' => 'transfer_in_and_close',
+ 'transfer_out_and_close' => 'transfer_out_and_close',
+ 'update' => 'update',
+ 'update_delivery_order' => 'update_delivery_order',
+ 'update_stock_in' => 'update_stock_in',
+ 'validate_items' => 'validate_items',
+ 'vendor_details' => 'vendor_details',
+ 'vendor_selection' => 'vendor_selection',
+ 'yes' => 'yes',
+ 'weiter' => 'continue',
+ 'löschen' => 'delete',
+ 'email' => 'e_mail',
+ 'rechnung' => 'invoice',
+ 'neue_ware' => 'new_part',
+ 'nein' => 'no',
+ 'drucken' => 'print',
+ 'speichern' => 'save',
+ 'als_neu_speichern' => 'save_as_new',
+ 'lieferadresse' => 'ship_to',
+ 'einlagern_und_abschließen' => 'transfer_in_and_close',
+ 'auslagern_und_abschließen' => 'transfer_out_and_close',
+ 'erneuern' => 'update',
+ 'ja' => 'yes',
+};
+
+1;
'Dataset upgrade' => 'Datenbankaktualisierung',
'Date' => 'Datum',
'Delete drafts' => 'Entwürfe löschen',
+ 'Delivery Order' => 'Lieferschein',
'Dependency loop detected:' => 'Schleife in den Abhängigkeiten entdeckt:',
'Directory' => 'Verzeichnis',
'Draft saved.' => 'Entwurf gespeichert.',
'DUNNING STARTED' => 'Mahnprozess gestartet',
'Dataset upgrade' => 'Datenbankaktualisierung',
'Date' => 'Datum',
+ 'Delivery Order' => 'Lieferschein',
'Dependency loop detected:' => 'Schleife in den Abhängigkeiten entdeckt:',
'Directory' => 'Verzeichnis',
'Done' => 'Fertig',
'Dec' => 'Dez',
'December' => 'Dezember',
'Delete' => 'Löschen',
+ 'Delivery Order' => 'Lieferschein',
'Department' => 'Abteilung',
'Dependency loop detected:' => 'Schleife in den Abhängigkeiten entdeckt:',
'Description' => 'Beschreibung',
'December' => 'Dezember',
'Delete' => 'Löschen',
'Delivery Date' => 'Lieferdatum',
+ 'Delivery Order' => 'Lieferschein',
'Department' => 'Abteilung',
'Dependency loop detected:' => 'Schleife in den Abhängigkeiten entdeckt:',
'Description must not be empty!' => 'Beschreibung darf nicht leer sein',
'RFQ' => 'Anfrage',
'ROP' => 'Mindestlagerbestand',
'Receipt, payment, reconciliation' => 'Zahlungseingang, Zahlungsausgang, Kontenabgleich',
+ 'Release From Stock' => 'Lagerausgang',
'Reports' => 'Berichte',
'Reqdate' => 'Lieferdatum',
'Request for Quotation' => 'Anfrage',
'Top 100 hinzufuegen' => 'Top 100 hinzufügen',
'Total' => 'Summe',
'Transactions, AR transactions, AP transactions' => 'Dialogbuchen, Debitorenrechnungen, Kreditorenrechnungen',
+ 'Transfer To Stock' => 'Lagereingang',
'Trying to call a sub without a name' => 'Es wurde versucht, eine Unterfunktion ohne Namen aufzurufen.',
'Unit' => 'Einheit',
'Unit of measure' => 'Maßeinheit',
'Dec' => 'Dez',
'December' => 'Dezember',
'Delivery Date' => 'Lieferdatum',
+ 'Delivery Order' => 'Lieferschein',
'Department' => 'Abteilung',
'Dependency loop detected:' => 'Schleife in den Abhängigkeiten entdeckt:',
'Directory' => 'Verzeichnis',
'Quotation Number missing!' => 'Angebotsnummer fehlt!',
'RFQ' => 'Anfrage',
'Receipt, payment, reconciliation' => 'Zahlungseingang, Zahlungsausgang, Kontenabgleich',
+ 'Release From Stock' => 'Lagerausgang',
'Reports' => 'Berichte',
'Reqdate' => 'Lieferdatum',
'Request for Quotation' => 'Anfrage',
'The creation of the authentication database failed:' => 'Das Anlegen der Authentifizierungsdatenbank schlug fehl:',
'To (email)' => 'An',
'Transactions, AR transactions, AP transactions' => 'Dialogbuchen, Debitorenrechnungen, Kreditorenrechnungen',
+ 'Transfer To Stock' => 'Lagereingang',
'Trying to call a sub without a name' => 'Es wurde versucht, eine Unterfunktion ohne Namen aufzurufen.',
'Unit' => 'Einheit',
'Unknown dependency \'%s\'.' => 'Unbekannte Abhängigkeit \'%s\'.',
'Delete' => 'Löschen',
'Delete drafts' => 'Entwürfe löschen',
'Delivery Date' => 'Lieferdatum',
+ 'Delivery Order' => 'Lieferschein',
'Department' => 'Abteilung',
'Dependency loop detected:' => 'Schleife in den Abhängigkeiten entdeckt:',
'Description' => 'Beschreibung',
'Receipt, payment, reconciliation' => 'Zahlungseingang, Zahlungsausgang, Kontenabgleich',
'Rechnungsnummer' => 'Rechnungsnummer',
'Record in' => 'Buchen auf',
+ 'Release From Stock' => 'Lagerausgang',
'Remaining' => 'Rest',
'Reports' => 'Berichte',
'Reqdate' => 'Lieferdatum',
'To (email)' => 'An',
'Total' => 'Summe',
'Transactions, AR transactions, AP transactions' => 'Dialogbuchen, Debitorenrechnungen, Kreditorenrechnungen',
+ 'Transfer To Stock' => 'Lagereingang',
'Trying to call a sub without a name' => 'Es wurde versucht, eine Unterfunktion ohne Namen aufzurufen.',
'Unit' => 'Einheit',
'Unknown dependency \'%s\'.' => 'Unbekannte Abhängigkeit \'%s\'.',
'Delete' => 'Löschen',
'Delete drafts' => 'Entwürfe löschen',
'Delivery Date' => 'Lieferdatum',
+ 'Delivery Order' => 'Lieferschein',
'Department' => 'Abteilung',
'Dependency loop detected:' => 'Schleife in den Abhängigkeiten entdeckt:',
'Description' => 'Beschreibung',
'RFQ' => 'Anfrage',
'Receipt, payment, reconciliation' => 'Zahlungseingang, Zahlungsausgang, Kontenabgleich',
'Record in' => 'Buchen auf',
+ 'Release From Stock' => 'Lagerausgang',
'Remaining' => 'Rest',
'Reports' => 'Berichte',
'Reqdate' => 'Lieferdatum',
'Trade Discount' => 'Rabatt',
'Transaction description' => 'Vorgangsbezeichnung',
'Transactions, AR transactions, AP transactions' => 'Dialogbuchen, Debitorenrechnungen, Kreditorenrechnungen',
+ 'Transfer To Stock' => 'Lagereingang',
'Trying to call a sub without a name' => 'Es wurde versucht, eine Unterfunktion ohne Namen aufzurufen.',
'Unit' => 'Einheit',
'Unknown dependency \'%s\'.' => 'Unbekannte Abhängigkeit \'%s\'.',
'DUNNING STARTED' => 'Mahnprozess gestartet',
'Dataset upgrade' => 'Datenbankaktualisierung',
'Date' => 'Datum',
+ 'Delivery Order' => 'Lieferschein',
'Dependency loop detected:' => 'Schleife in den Abhängigkeiten entdeckt:',
'Description' => 'Beschreibung',
'Directory' => 'Verzeichnis',
'Add Exchangerate' => 'Wechselkurs erfassen',
'Add Follow-Up' => 'Wiedervorlage erstellen',
'Add Follow-Up for #1' => 'Wiedervorlage für #1 erstellen',
+ 'Add Purchase Delivery Order' => 'Lieferschein (Einkauf) erfassen',
'Add Purchase Order' => 'Lieferantenauftrag erfassen',
'Add Quotation' => 'Angebot erfassen',
'Add Request for Quotation' => 'Anfrage erfassen',
+ 'Add Sales Delivery Order' => 'Lieferschein (Verkauf) erfassen',
'Add Sales Invoice' => 'Rechnung erfassen',
'Add Sales Order' => 'Auftrag erfassen',
'Add Vendor Invoice' => 'Einkaufsrechnung erfassen',
'Body' => 'Text',
'CANCELED' => 'Storniert',
'CSV export -- options' => 'CSV-Export -- Optionen',
+ 'Cannot delete delivery order!' => 'Lieferschein kann nicht gelöscht werden!',
'Cannot delete order!' => 'Auftrag kann nicht gelöscht werden!',
'Cannot delete quotation!' => 'Angebot kann nicht gelöscht werden!',
'Cannot save order!' => 'Auftrag kann nicht gespeichert werden!',
'Date' => 'Datum',
'Dec' => 'Dez',
'December' => 'Dezember',
+ 'Delete delivery order' => 'Lieferschein löschen',
'Delivered' => 'Geliefert',
'Delivery Date' => 'Lieferdatum',
+ 'Delivery Order' => 'Lieferschein',
+ 'Delivery Order Date missing!' => 'Lieferscheindatum fehlt!',
+ 'Delivery Order Number' => 'Lieferscheinnummer',
+ 'Delivery Order deleted!' => 'Lieferschein gelöscht!',
+ 'Delivery Orders' => 'Lieferscheine',
'Department' => 'Abteilung',
'Dependency loop detected:' => 'Schleife in den Abhängigkeiten entdeckt:',
'Description' => 'Beschreibung',
'Edit Access Rights for Follow-Ups' => 'Zugriffsrechte für Wiedervorlagen bearbeiten',
'Edit Follow-Up' => 'Wiedervorlage bearbeiten',
'Edit Follow-Up for #1' => 'Wiedervorlage für #1 bearbeiten',
+ 'Edit Purchase Delivery Order' => 'Lieferschein (Einkauf) bearbeiten',
'Edit Purchase Order' => 'Lieferantenaufrag bearbeiten',
'Edit Quotation' => 'Angebot bearbeiten',
'Edit Request for Quotation' => 'Anfrage bearbeiten',
+ 'Edit Sales Delivery Order' => 'Lieferschein (Verkauf) bearbeiten',
'Edit Sales Order' => 'Auftrag bearbeiten',
'Edit the purchase_order' => 'Bearbeiten des Lieferantenauftrags',
'Edit the request_quotation' => 'Bearbeiten der Preisanfrage',
'Employee' => 'Bearbeiter',
'Enter longdescription' => 'Langtext eingeben',
'Error in database control file \'%s\': %s' => 'Fehler in Datenbankupgradekontrolldatei \'%s\': %s',
+ 'Error in position #1: You must either assign no stock at all or the full quantity of #2 #3.' => 'Fehler in Position #1: Sie müssen einer Position entweder gar keinen Lagereingang oder die vollständige im Lieferschein vermerkte Menge von #2 #3 zuweisen.',
+ 'Error in position #1: You must either assign no transfer at all or the full quantity of #2 #3.' => 'Fehler in Position #1: Sie müssen einer Position entweder gar keinen Lagerausgang oder die vollständige im Lieferschein vermerkte Menge von #2 #3 zuweisen.',
+ 'Error in row #1: The quantity you entered is bigger than the stocked quantity.' => 'Fehler in Zeile #1: Die angegebene Menge ist größer als die vorhandene Menge.',
'Ertrag' => 'Ertrag',
'Ertrag prozentual' => 'Ertrag prozentual',
'Exchangerate' => 'Wechselkurs',
'Order Date missing!' => 'Auftragsdatum fehlt!',
'Order Number' => 'Auftragsnummer',
'Order Number missing!' => 'Auftragsnummer fehlt!',
+ 'Order Request Number' => 'Bestellanfragenummer',
'Order deleted!' => 'Auftrag gelöscht!',
'Other users\' follow-ups' => 'Wiedervorlagen anderer Benutzer',
'Others' => 'Andere',
'RFQ Number' => 'Anfragenummer',
'Receipt, payment, reconciliation' => 'Zahlungseingang, Zahlungsausgang, Kontenabgleich',
'Reference' => 'Referenz',
+ 'Release From Stock' => 'Lagerausgang',
'Reports' => 'Berichte',
'Reqdate' => 'Lieferdatum',
'Request for Quotation' => 'Anfrage',
'Sales Orders' => 'Aufträge',
'Sales quotation' => 'Angebot',
'Salesman' => 'Verkäufer/in',
+ 'Salesperson' => 'Verkäufer',
'Screen' => 'Bildschirm',
'Select a Customer' => 'Endkunde auswählen',
'Select a customer' => 'Einen Kunden auswählen',
'Ship to' => 'Lieferadresse',
'Ship via' => 'Transportmittel',
'Shipping Address' => 'Lieferadresse',
+ 'Show details' => 'Details anzeigen',
+ 'Stock' => 'Einlagern',
'Storno Invoice' => 'Stornorechnung',
'Storno Packing List' => 'Stornolieferschein',
'Street' => 'Straße',
'The connection to the authentication database failed:' => 'Die Verbindung zur Authentifizierungsdatenbank schlug fehl:',
'The connection to the template database failed:' => 'Die Verbindung zur Vorlagendatenbank schlug fehl:',
'The creation of the authentication database failed:' => 'Das Anlegen der Authentifizierungsdatenbank schlug fehl:',
+ 'The delivery order has not been closed. The warehouse contents have not changed.' => 'Der Lieferschein wurde nicht abgeschlossen. Die Lagerinhalte wurden nicht verändert.',
'The follow-up date is missing.' => 'Das Wiedervorlagedatum fehlt.',
'The list has been printed.' => 'Die Liste wurde ausgedruckt.',
'The session is invalid or has expired.' => 'Die Session ist ungültig oder abgelaufen.',
'The subject is missing.' => 'Der Betreff fehlt.',
+ 'There is not enough available of \'#1\' at warehouse \'#2\', bin \'#3\', #4, for the transfer of #5.' => 'Von \'#1\' ist in Lager \'#2\', Lagerplatz \'#3\', #4, nicht genügend eingelagert, um insgesamt #5 auszulagern.',
'To (email)' => 'An',
'Total' => 'Summe',
'Transaction description' => 'Vorgangsbezeichnung',
'Transactions, AR transactions, AP transactions' => 'Dialogbuchen, Debitorenrechnungen, Kreditorenrechnungen',
+ 'Transfer To Stock' => 'Lagereingang',
'Trying to call a sub without a name' => 'Es wurde versucht, eine Unterfunktion ohne Namen aufzurufen.',
'Unit' => 'Einheit',
'Unknown dependency \'%s\'.' => 'Unbekannte Abhängigkeit \'%s\'.',
'[email]' => '[email]',
'bin_list' => 'Lagerliste',
'button' => '?',
+ 'chargenumber #1' => 'Chargennummer #1',
'config/authentication.pl: Key "DB_config" is missing.' => 'config/authentication.pl: Das Schlüsselwort "DB_config" fehlt.',
'config/authentication.pl: Key "LDAP_config" is missing.' => 'config/authentication.pl: Der Schlüssel "LDAP_config" fehlt.',
'config/authentication.pl: Missing parameters in "DB_config". Required parameters are "host", "db" and "user".' => 'config/authentication.pl: Fehlende Parameter in "DB_config". Benötigte Parameter sind "host", "db" und "user".',
'follow_up_list' => 'wiedervorlageliste',
'invoice' => 'Rechnung',
'no' => 'nein',
+ 'no chargenumber' => 'keine Chargennummer',
'none (pricegroup)' => 'keine',
'packing_list' => 'Versandliste',
'pick_list' => 'Entnahmeliste',
'proforma' => 'Proforma',
+ 'purchase_delivery_order_list' => 'lieferscheinliste_einkauf',
'purchase_order' => 'Auftrag',
'purchase_order_list' => 'lieferantenauftragsliste',
'quotation_list' => 'angebotsliste',
'report_generator_nextsub is not defined.' => 'report_generator_nextsub ist nicht definiert.',
'request_quotation' => 'Angebotsanforderung',
'rfq_list' => 'anfragenliste',
+ 'sales_delivery_order_list' => 'lieferscheinliste_verkauf',
'sales_order' => 'Kundenauftrag',
'sales_order_list' => 'auftragsliste',
'sales_quotation' => 'Verkaufsangebot',
'backorder_exchangerate' => 'backorder_exchangerate',
'build_std_url' => 'build_std_url',
'calculate_qty' => 'calculate_qty',
+ 'calculate_stock_in_out' => 'calculate_stock_in_out',
'call_sub' => 'call_sub',
'check_delivered_flag' => 'check_delivered_flag',
+ 'check_do_access' => 'check_do_access',
'check_for_direct_delivery' => 'check_for_direct_delivery',
'check_for_direct_delivery_no' => 'check_for_direct_delivery_no',
'check_for_direct_delivery_yes' => 'check_for_direct_delivery_yes',
'create_todo_list' => 'create_todo_list',
'customer_details' => 'customer_details',
'delete' => 'delete',
+ 'delete_delivery_order' => 'delete_delivery_order',
'delete_order_quotation' => 'delete_order_quotation',
'delivery_customer_selection' => 'delivery_customer_selection',
+ 'delivery_order' => 'delivery_order',
'dispatcher' => 'dispatcher',
'display_form' => 'display_form',
'display_row' => 'display_row',
+ 'display_stock_in_form' => 'display_stock_in_form',
'e_mail' => 'e_mail',
'edit' => 'edit',
'edit_access_rights' => 'edit_access_rights',
'form_footer' => 'form_footer',
'form_header' => 'form_header',
'format_dates' => 'format_dates',
+ 'get_basic_bin_wh_info' => 'get_basic_bin_wh_info',
'invoice' => 'invoice',
'invoicetotal' => 'invoicetotal',
'item_selected' => 'item_selected',
'project_selected' => 'project_selected',
'purchase_order' => 'purchase_order',
'quotation' => 'quotation',
+ 'redo_stock_info' => 'redo_stock_info',
'reformat_numbers' => 'reformat_numbers',
'relink_accounts' => 'relink_accounts',
'report' => 'report',
'set_headings' => 'set_headings',
'set_longdescription' => 'set_longdescription',
'set_pricegroup' => 'set_pricegroup',
+ 'set_stock_in' => 'set_stock_in',
+ 'set_stock_out' => 'set_stock_out',
'ship_to' => 'ship_to',
'show_error' => 'show_error',
'show_history' => 'show_history',
'show_todo_list' => 'show_todo_list',
'show_vc_details' => 'show_vc_details',
+ 'stock_in_form' => 'stock_in_form',
+ 'stock_in_out_form' => 'stock_in_out_form',
+ 'stock_out_form' => 'stock_out_form',
'todo_list_follow_ups' => 'todo_list_follow_ups',
'todo_list_overdue_sales_quotations' => 'todo_list_overdue_sales_quotations',
+ 'transfer_in_and_close' => 'transfer_in_and_close',
+ 'transfer_out_and_close' => 'transfer_out_and_close',
'update' => 'update',
+ 'update_delivery_order' => 'update_delivery_order',
+ 'update_stock_in' => 'update_stock_in',
'validate_items' => 'validate_items',
'vendor_details' => 'vendor_details',
'vendor_selection' => 'vendor_selection',
'speichern_und_schließen' => 'save_and_close',
'als_neu_speichern' => 'save_as_new',
'lieferadresse' => 'ship_to',
+ 'einlagern_und_abschließen' => 'transfer_in_and_close',
+ 'auslagern_und_abschließen' => 'transfer_out_and_close',
'erneuern' => 'update',
'ja' => 'yes',
};
'Add Credit Note' => 'Gutschrift erfassen',
'Add Custom Variable' => 'Benutzerdefinierte Variable erfassen',
'Add Customer' => 'Kunde erfassen',
+ 'Add Delivery Order' => 'Lieferschein erfassen',
'Add Department' => 'Abteilung erfassen',
'Add Dunning' => 'Mahnung erzeugen',
'Add Follow-Up' => 'Wiedervorlage erstellen',
'DATEV Export' => 'DATEV-Export',
'Dataset upgrade' => 'Datenbankaktualisierung',
'Date' => 'Datum',
+ 'Delivery Orders' => 'Lieferscheine',
'Departments' => 'Abteilungen',
'Dependency loop detected:' => 'Schleife in den Abhängigkeiten entdeckt:',
'Dimension units' => 'Maßeinheiten',
'Add Credit Note' => 'Gutschrift erfassen',
'Add Custom Variable' => 'Benutzerdefinierte Variable erfassen',
'Add Customer' => 'Kunde erfassen',
+ 'Add Delivery Order' => 'Lieferschein erfassen',
'Add Department' => 'Abteilung erfassen',
'Add Dunning' => 'Mahnung erzeugen',
'Add Follow-Up' => 'Wiedervorlage erstellen',
'DATEV Export' => 'DATEV-Export',
'Dataset upgrade' => 'Datenbankaktualisierung',
'Date' => 'Datum',
+ 'Delivery Orders' => 'Lieferscheine',
'Departments' => 'Abteilungen',
'Dependency loop detected:' => 'Schleife in den Abhängigkeiten entdeckt:',
'Dimension units' => 'Maßeinheiten',
'AR' => 'Verkauf',
'AR Transaction' => 'Debitorenbuchung',
'Add Exchangerate' => 'Wechselkurs erfassen',
+ 'Add Purchase Delivery Order' => 'Lieferschein (Einkauf) erfassen',
'Add Purchase Order' => 'Lieferantenauftrag erfassen',
'Add Quotation' => 'Angebot erfassen',
'Add Request for Quotation' => 'Anfrage erfassen',
+ 'Add Sales Delivery Order' => 'Lieferschein (Verkauf) erfassen',
'Add Sales Invoice' => 'Rechnung erfassen',
'Add Sales Order' => 'Auftrag erfassen',
'Add Vendor Invoice' => 'Einkaufsrechnung erfassen',
'Bis' => 'bis',
'CANCELED' => 'Storniert',
'CSV export -- options' => 'CSV-Export -- Optionen',
+ 'Cannot delete delivery order!' => 'Lieferschein kann nicht gelöscht werden!',
'Cannot delete order!' => 'Auftrag kann nicht gelöscht werden!',
'Cannot delete quotation!' => 'Angebot kann nicht gelöscht werden!',
'Cannot save order!' => 'Auftrag kann nicht gespeichert werden!',
'Date' => 'Datum',
'Dec' => 'Dez',
'December' => 'Dezember',
+ 'Delete delivery order' => 'Lieferschein löschen',
'Delivered' => 'Geliefert',
'Delivery Date' => 'Lieferdatum',
+ 'Delivery Order' => 'Lieferschein',
+ 'Delivery Order Date missing!' => 'Lieferscheindatum fehlt!',
+ 'Delivery Order Number' => 'Lieferscheinnummer',
+ 'Delivery Order deleted!' => 'Lieferschein gelöscht!',
+ 'Delivery Orders' => 'Lieferscheine',
'Department' => 'Abteilung',
'Dependency loop detected:' => 'Schleife in den Abhängigkeiten entdeckt:',
'Description' => 'Beschreibung',
'E-mail address missing!' => 'E-Mail-Adresse fehlt!',
'EK' => 'EK',
'ELSE' => 'Zusatz',
+ 'Edit Purchase Delivery Order' => 'Lieferschein (Einkauf) bearbeiten',
'Edit Purchase Order' => 'Lieferantenaufrag bearbeiten',
'Edit Quotation' => 'Angebot bearbeiten',
'Edit Request for Quotation' => 'Anfrage bearbeiten',
+ 'Edit Sales Delivery Order' => 'Lieferschein (Verkauf) bearbeiten',
'Edit Sales Order' => 'Auftrag bearbeiten',
'Edit the purchase_order' => 'Bearbeiten des Lieferantenauftrags',
'Edit the request_quotation' => 'Bearbeiten der Preisanfrage',
'Employee' => 'Bearbeiter',
'Enter longdescription' => 'Langtext eingeben',
'Error in database control file \'%s\': %s' => 'Fehler in Datenbankupgradekontrolldatei \'%s\': %s',
+ 'Error in position #1: You must either assign no stock at all or the full quantity of #2 #3.' => 'Fehler in Position #1: Sie müssen einer Position entweder gar keinen Lagereingang oder die vollständige im Lieferschein vermerkte Menge von #2 #3 zuweisen.',
+ 'Error in position #1: You must either assign no transfer at all or the full quantity of #2 #3.' => 'Fehler in Position #1: Sie müssen einer Position entweder gar keinen Lagerausgang oder die vollständige im Lieferschein vermerkte Menge von #2 #3 zuweisen.',
+ 'Error in row #1: The quantity you entered is bigger than the stocked quantity.' => 'Fehler in Zeile #1: Die angegebene Menge ist größer als die vorhandene Menge.',
'Ertrag' => 'Ertrag',
'Ertrag prozentual' => 'Ertrag prozentual',
'Exchangerate' => 'Wechselkurs',
'Order Date missing!' => 'Auftragsdatum fehlt!',
'Order Number' => 'Auftragsnummer',
'Order Number missing!' => 'Auftragsnummer fehlt!',
+ 'Order Request Number' => 'Bestellanfragenummer',
'Order deleted!' => 'Auftrag gelöscht!',
'Others' => 'Andere',
'PAYMENT POSTED' => 'Rechung gebucht',
'RFQ' => 'Anfrage',
'RFQ Number' => 'Anfragenummer',
'Receipt, payment, reconciliation' => 'Zahlungseingang, Zahlungsausgang, Kontenabgleich',
+ 'Release From Stock' => 'Lagerausgang',
'Reports' => 'Berichte',
'Reqdate' => 'Lieferdatum',
'Request for Quotation' => 'Anfrage',
'Sales Orders' => 'Aufträge',
'Sales quotation' => 'Angebot',
'Salesman' => 'Verkäufer/in',
+ 'Salesperson' => 'Verkäufer',
'Screen' => 'Bildschirm',
'Select a Customer' => 'Endkunde auswählen',
'Select a customer' => 'Einen Kunden auswählen',
'Ship to' => 'Lieferadresse',
'Ship via' => 'Transportmittel',
'Shipping Address' => 'Lieferadresse',
+ 'Show details' => 'Details anzeigen',
+ 'Stock' => 'Einlagern',
'Storno Invoice' => 'Stornorechnung',
'Storno Packing List' => 'Stornolieferschein',
'Street' => 'Straße',
'The connection to the authentication database failed:' => 'Die Verbindung zur Authentifizierungsdatenbank schlug fehl:',
'The connection to the template database failed:' => 'Die Verbindung zur Vorlagendatenbank schlug fehl:',
'The creation of the authentication database failed:' => 'Das Anlegen der Authentifizierungsdatenbank schlug fehl:',
+ 'The delivery order has not been closed. The warehouse contents have not changed.' => 'Der Lieferschein wurde nicht abgeschlossen. Die Lagerinhalte wurden nicht verändert.',
'The list has been printed.' => 'Die Liste wurde ausgedruckt.',
+ 'There is not enough available of \'#1\' at warehouse \'#2\', bin \'#3\', #4, for the transfer of #5.' => 'Von \'#1\' ist in Lager \'#2\', Lagerplatz \'#3\', #4, nicht genügend eingelagert, um insgesamt #5 auszulagern.',
'To (email)' => 'An',
'Total' => 'Summe',
'Transaction description' => 'Vorgangsbezeichnung',
'Transactions, AR transactions, AP transactions' => 'Dialogbuchen, Debitorenrechnungen, Kreditorenrechnungen',
+ 'Transfer To Stock' => 'Lagereingang',
'Trying to call a sub without a name' => 'Es wurde versucht, eine Unterfunktion ohne Namen aufzurufen.',
'Unit' => 'Einheit',
'Unknown dependency \'%s\'.' => 'Unbekannte Abhängigkeit \'%s\'.',
'[email]' => '[email]',
'bin_list' => 'Lagerliste',
'button' => '?',
+ 'chargenumber #1' => 'Chargennummer #1',
'config/authentication.pl: Key "DB_config" is missing.' => 'config/authentication.pl: Das Schlüsselwort "DB_config" fehlt.',
'config/authentication.pl: Key "LDAP_config" is missing.' => 'config/authentication.pl: Der Schlüssel "LDAP_config" fehlt.',
'config/authentication.pl: Missing parameters in "DB_config". Required parameters are "host", "db" and "user".' => 'config/authentication.pl: Fehlende Parameter in "DB_config". Benötigte Parameter sind "host", "db" und "user".',
'emailed to' => 'gemailt an',
'invoice' => 'Rechnung',
'no' => 'nein',
+ 'no chargenumber' => 'keine Chargennummer',
'none (pricegroup)' => 'keine',
'packing_list' => 'Versandliste',
'pick_list' => 'Entnahmeliste',
'proforma' => 'Proforma',
+ 'purchase_delivery_order_list' => 'lieferscheinliste_einkauf',
'purchase_order' => 'Auftrag',
'purchase_order_list' => 'lieferantenauftragsliste',
'quotation_list' => 'angebotsliste',
'report_generator_nextsub is not defined.' => 'report_generator_nextsub ist nicht definiert.',
'request_quotation' => 'Angebotsanforderung',
'rfq_list' => 'anfragenliste',
+ 'sales_delivery_order_list' => 'lieferscheinliste_verkauf',
'sales_order' => 'Kundenauftrag',
'sales_order_list' => 'auftragsliste',
'sales_quotation' => 'Verkaufsangebot',
'backorder_exchangerate' => 'backorder_exchangerate',
'build_std_url' => 'build_std_url',
'calculate_qty' => 'calculate_qty',
+ 'calculate_stock_in_out' => 'calculate_stock_in_out',
'call_sub' => 'call_sub',
'check_delivered_flag' => 'check_delivered_flag',
+ 'check_do_access' => 'check_do_access',
'check_for_direct_delivery' => 'check_for_direct_delivery',
'check_for_direct_delivery_no' => 'check_for_direct_delivery_no',
'check_for_direct_delivery_yes' => 'check_for_direct_delivery_yes',
'create_subtotal_row' => 'create_subtotal_row',
'customer_details' => 'customer_details',
'delete' => 'delete',
+ 'delete_delivery_order' => 'delete_delivery_order',
'delete_order_quotation' => 'delete_order_quotation',
'delivery_customer_selection' => 'delivery_customer_selection',
+ 'delivery_order' => 'delivery_order',
'display_form' => 'display_form',
'display_row' => 'display_row',
+ 'display_stock_in_form' => 'display_stock_in_form',
'e_mail' => 'e_mail',
'edit' => 'edit',
'edit_e_mail' => 'edit_e_mail',
'form_footer' => 'form_footer',
'form_header' => 'form_header',
'format_dates' => 'format_dates',
+ 'get_basic_bin_wh_info' => 'get_basic_bin_wh_info',
'invoice' => 'invoice',
'invoicetotal' => 'invoicetotal',
'item_selected' => 'item_selected',
'project_selected' => 'project_selected',
'purchase_order' => 'purchase_order',
'quotation' => 'quotation',
+ 'redo_stock_info' => 'redo_stock_info',
'reformat_numbers' => 'reformat_numbers',
'relink_accounts' => 'relink_accounts',
'report_for_todo_list' => 'report_for_todo_list',
'set_headings' => 'set_headings',
'set_longdescription' => 'set_longdescription',
'set_pricegroup' => 'set_pricegroup',
+ 'set_stock_in' => 'set_stock_in',
+ 'set_stock_out' => 'set_stock_out',
'ship_to' => 'ship_to',
'show_history' => 'show_history',
'show_vc_details' => 'show_vc_details',
+ 'stock_in_form' => 'stock_in_form',
+ 'stock_in_out_form' => 'stock_in_out_form',
+ 'stock_out_form' => 'stock_out_form',
+ 'transfer_in_and_close' => 'transfer_in_and_close',
+ 'transfer_out_and_close' => 'transfer_out_and_close',
'update' => 'update',
+ 'update_delivery_order' => 'update_delivery_order',
+ 'update_stock_in' => 'update_stock_in',
'validate_items' => 'validate_items',
'vendor_details' => 'vendor_details',
'vendor_selection' => 'vendor_selection',
'speichern_und_schließen' => 'save_and_close',
'als_neu_speichern' => 'save_as_new',
'lieferadresse' => 'ship_to',
+ 'einlagern_und_abschließen' => 'transfer_in_and_close',
+ 'auslagern_und_abschließen' => 'transfer_out_and_close',
'erneuern' => 'update',
'ja' => 'yes',
};
'Dataset upgrade' => 'Datenbankaktualisierung',
'Date' => 'Datum',
'Delete' => 'Löschen',
+ 'Delivery Order' => 'Lieferschein',
'Dependency loop detected:' => 'Schleife in den Abhängigkeiten entdeckt:',
'Description' => 'Beschreibung',
'Directory' => 'Verzeichnis',
'Dataset upgrade' => 'Datenbankaktualisierung',
'Date' => 'Datum',
'Decrease' => 'Verringern',
+ 'Delivery Order' => 'Lieferschein',
'Dependency loop detected:' => 'Schleife in den Abhängigkeiten entdeckt:',
'Deposit' => 'Gutschrift',
'Description' => 'Beschreibung',
'DUNNING STARTED' => 'Mahnprozess gestartet',
'Dataset upgrade' => 'Datenbankaktualisierung',
'Date' => 'Datum',
+ 'Delivery Order' => 'Lieferschein',
'Dependency loop detected:' => 'Schleife in den Abhängigkeiten entdeckt:',
'Directory' => 'Verzeichnis',
'ELSE' => 'Zusatz',
'Dec' => 'Dez',
'December' => 'Dezember',
'Decimalplaces' => 'Dezimalstellen',
+ 'Delivery Order' => 'Lieferschein',
'Department' => 'Abteilung',
'Dependency loop detected:' => 'Schleife in den Abhängigkeiten entdeckt:',
'Description' => 'Beschreibung',
'Add Exchangerate' => 'Wechselkurs erfassen',
'Add Follow-Up' => 'Wiedervorlage erstellen',
'Add Follow-Up for #1' => 'Wiedervorlage für #1 erstellen',
+ 'Add Purchase Delivery Order' => 'Lieferschein (Einkauf) erfassen',
'Add Purchase Order' => 'Lieferantenauftrag erfassen',
'Add Quotation' => 'Angebot erfassen',
'Add Request for Quotation' => 'Anfrage erfassen',
+ 'Add Sales Delivery Order' => 'Lieferschein (Verkauf) erfassen',
'Add Sales Invoice' => 'Rechnung erfassen',
'Add Sales Order' => 'Auftrag erfassen',
'Add Vendor Invoice' => 'Einkaufsrechnung erfassen',
'Body' => 'Text',
'CANCELED' => 'Storniert',
'CSV export -- options' => 'CSV-Export -- Optionen',
+ 'Cannot delete delivery order!' => 'Lieferschein kann nicht gelöscht werden!',
'Cannot delete order!' => 'Auftrag kann nicht gelöscht werden!',
'Cannot delete quotation!' => 'Angebot kann nicht gelöscht werden!',
'Cannot save order!' => 'Auftrag kann nicht gespeichert werden!',
'Date' => 'Datum',
'Dec' => 'Dez',
'December' => 'Dezember',
+ 'Delete delivery order' => 'Lieferschein löschen',
'Delivered' => 'Geliefert',
'Delivery Date' => 'Lieferdatum',
+ 'Delivery Order' => 'Lieferschein',
+ 'Delivery Order Date missing!' => 'Lieferscheindatum fehlt!',
+ 'Delivery Order Number' => 'Lieferscheinnummer',
+ 'Delivery Order deleted!' => 'Lieferschein gelöscht!',
+ 'Delivery Orders' => 'Lieferscheine',
'Department' => 'Abteilung',
'Dependency loop detected:' => 'Schleife in den Abhängigkeiten entdeckt:',
'Description' => 'Beschreibung',
'Edit Access Rights for Follow-Ups' => 'Zugriffsrechte für Wiedervorlagen bearbeiten',
'Edit Follow-Up' => 'Wiedervorlage bearbeiten',
'Edit Follow-Up for #1' => 'Wiedervorlage für #1 bearbeiten',
+ 'Edit Purchase Delivery Order' => 'Lieferschein (Einkauf) bearbeiten',
'Edit Purchase Order' => 'Lieferantenaufrag bearbeiten',
'Edit Quotation' => 'Angebot bearbeiten',
'Edit Request for Quotation' => 'Anfrage bearbeiten',
+ 'Edit Sales Delivery Order' => 'Lieferschein (Verkauf) bearbeiten',
'Edit Sales Order' => 'Auftrag bearbeiten',
'Edit the purchase_order' => 'Bearbeiten des Lieferantenauftrags',
'Edit the request_quotation' => 'Bearbeiten der Preisanfrage',
'Employee' => 'Bearbeiter',
'Enter longdescription' => 'Langtext eingeben',
'Error in database control file \'%s\': %s' => 'Fehler in Datenbankupgradekontrolldatei \'%s\': %s',
+ 'Error in position #1: You must either assign no stock at all or the full quantity of #2 #3.' => 'Fehler in Position #1: Sie müssen einer Position entweder gar keinen Lagereingang oder die vollständige im Lieferschein vermerkte Menge von #2 #3 zuweisen.',
+ 'Error in position #1: You must either assign no transfer at all or the full quantity of #2 #3.' => 'Fehler in Position #1: Sie müssen einer Position entweder gar keinen Lagerausgang oder die vollständige im Lieferschein vermerkte Menge von #2 #3 zuweisen.',
+ 'Error in row #1: The quantity you entered is bigger than the stocked quantity.' => 'Fehler in Zeile #1: Die angegebene Menge ist größer als die vorhandene Menge.',
'Ertrag' => 'Ertrag',
'Ertrag prozentual' => 'Ertrag prozentual',
'Exchangerate' => 'Wechselkurs',
'Order Date missing!' => 'Auftragsdatum fehlt!',
'Order Number' => 'Auftragsnummer',
'Order Number missing!' => 'Auftragsnummer fehlt!',
+ 'Order Request Number' => 'Bestellanfragenummer',
'Order deleted!' => 'Auftrag gelöscht!',
'Other users\' follow-ups' => 'Wiedervorlagen anderer Benutzer',
'Others' => 'Andere',
'RFQ Number' => 'Anfragenummer',
'Receipt, payment, reconciliation' => 'Zahlungseingang, Zahlungsausgang, Kontenabgleich',
'Reference' => 'Referenz',
+ 'Release From Stock' => 'Lagerausgang',
'Reports' => 'Berichte',
'Reqdate' => 'Lieferdatum',
'Request for Quotation' => 'Anfrage',
'Sales Orders' => 'Aufträge',
'Sales quotation' => 'Angebot',
'Salesman' => 'Verkäufer/in',
+ 'Salesperson' => 'Verkäufer',
'Screen' => 'Bildschirm',
'Select a Customer' => 'Endkunde auswählen',
'Select a customer' => 'Einen Kunden auswählen',
'Ship to' => 'Lieferadresse',
'Ship via' => 'Transportmittel',
'Shipping Address' => 'Lieferadresse',
+ 'Show details' => 'Details anzeigen',
+ 'Stock' => 'Einlagern',
'Storno Invoice' => 'Stornorechnung',
'Storno Packing List' => 'Stornolieferschein',
'Street' => 'Straße',
'The connection to the authentication database failed:' => 'Die Verbindung zur Authentifizierungsdatenbank schlug fehl:',
'The connection to the template database failed:' => 'Die Verbindung zur Vorlagendatenbank schlug fehl:',
'The creation of the authentication database failed:' => 'Das Anlegen der Authentifizierungsdatenbank schlug fehl:',
+ 'The delivery order has not been closed. The warehouse contents have not changed.' => 'Der Lieferschein wurde nicht abgeschlossen. Die Lagerinhalte wurden nicht verändert.',
'The follow-up date is missing.' => 'Das Wiedervorlagedatum fehlt.',
'The list has been printed.' => 'Die Liste wurde ausgedruckt.',
'The subject is missing.' => 'Der Betreff fehlt.',
+ 'There is not enough available of \'#1\' at warehouse \'#2\', bin \'#3\', #4, for the transfer of #5.' => 'Von \'#1\' ist in Lager \'#2\', Lagerplatz \'#3\', #4, nicht genügend eingelagert, um insgesamt #5 auszulagern.',
'To (email)' => 'An',
'Total' => 'Summe',
'Transaction description' => 'Vorgangsbezeichnung',
'Transactions, AR transactions, AP transactions' => 'Dialogbuchen, Debitorenrechnungen, Kreditorenrechnungen',
+ 'Transfer To Stock' => 'Lagereingang',
'Trying to call a sub without a name' => 'Es wurde versucht, eine Unterfunktion ohne Namen aufzurufen.',
'Unit' => 'Einheit',
'Unknown dependency \'%s\'.' => 'Unbekannte Abhängigkeit \'%s\'.',
'[email]' => '[email]',
'bin_list' => 'Lagerliste',
'button' => '?',
+ 'chargenumber #1' => 'Chargennummer #1',
'config/authentication.pl: Key "DB_config" is missing.' => 'config/authentication.pl: Das Schlüsselwort "DB_config" fehlt.',
'config/authentication.pl: Key "LDAP_config" is missing.' => 'config/authentication.pl: Der Schlüssel "LDAP_config" fehlt.',
'config/authentication.pl: Missing parameters in "DB_config". Required parameters are "host", "db" and "user".' => 'config/authentication.pl: Fehlende Parameter in "DB_config". Benötigte Parameter sind "host", "db" und "user".',
'follow_up_list' => 'wiedervorlageliste',
'invoice' => 'Rechnung',
'no' => 'nein',
+ 'no chargenumber' => 'keine Chargennummer',
'none (pricegroup)' => 'keine',
'packing_list' => 'Versandliste',
'pick_list' => 'Entnahmeliste',
'proforma' => 'Proforma',
+ 'purchase_delivery_order_list' => 'lieferscheinliste_einkauf',
'purchase_order' => 'Auftrag',
'purchase_order_list' => 'lieferantenauftragsliste',
'quotation_list' => 'angebotsliste',
'report_generator_nextsub is not defined.' => 'report_generator_nextsub ist nicht definiert.',
'request_quotation' => 'Angebotsanforderung',
'rfq_list' => 'anfragenliste',
+ 'sales_delivery_order_list' => 'lieferscheinliste_verkauf',
'sales_order' => 'Kundenauftrag',
'sales_order_list' => 'auftragsliste',
'sales_quotation' => 'Verkaufsangebot',
'backorder_exchangerate' => 'backorder_exchangerate',
'build_std_url' => 'build_std_url',
'calculate_qty' => 'calculate_qty',
+ 'calculate_stock_in_out' => 'calculate_stock_in_out',
'call_sub' => 'call_sub',
'check_delivered_flag' => 'check_delivered_flag',
+ 'check_do_access' => 'check_do_access',
'check_for_direct_delivery' => 'check_for_direct_delivery',
'check_for_direct_delivery_no' => 'check_for_direct_delivery_no',
'check_for_direct_delivery_yes' => 'check_for_direct_delivery_yes',
'create_todo_list' => 'create_todo_list',
'customer_details' => 'customer_details',
'delete' => 'delete',
+ 'delete_delivery_order' => 'delete_delivery_order',
'delete_order_quotation' => 'delete_order_quotation',
'delivery_customer_selection' => 'delivery_customer_selection',
+ 'delivery_order' => 'delivery_order',
'dispatcher' => 'dispatcher',
'display_form' => 'display_form',
'display_row' => 'display_row',
+ 'display_stock_in_form' => 'display_stock_in_form',
'e_mail' => 'e_mail',
'edit' => 'edit',
'edit_access_rights' => 'edit_access_rights',
'form_footer' => 'form_footer',
'form_header' => 'form_header',
'format_dates' => 'format_dates',
+ 'get_basic_bin_wh_info' => 'get_basic_bin_wh_info',
'invoice' => 'invoice',
'invoicetotal' => 'invoicetotal',
'item_selected' => 'item_selected',
'project_selected' => 'project_selected',
'purchase_order' => 'purchase_order',
'quotation' => 'quotation',
+ 'redo_stock_info' => 'redo_stock_info',
'reformat_numbers' => 'reformat_numbers',
'relink_accounts' => 'relink_accounts',
'report' => 'report',
'set_headings' => 'set_headings',
'set_longdescription' => 'set_longdescription',
'set_pricegroup' => 'set_pricegroup',
+ 'set_stock_in' => 'set_stock_in',
+ 'set_stock_out' => 'set_stock_out',
'ship_to' => 'ship_to',
'show_history' => 'show_history',
'show_todo_list' => 'show_todo_list',
'show_vc_details' => 'show_vc_details',
+ 'stock_in_form' => 'stock_in_form',
+ 'stock_in_out_form' => 'stock_in_out_form',
+ 'stock_out_form' => 'stock_out_form',
'todo_list_follow_ups' => 'todo_list_follow_ups',
'todo_list_overdue_sales_quotations' => 'todo_list_overdue_sales_quotations',
+ 'transfer_in_and_close' => 'transfer_in_and_close',
+ 'transfer_out_and_close' => 'transfer_out_and_close',
'update' => 'update',
+ 'update_delivery_order' => 'update_delivery_order',
+ 'update_stock_in' => 'update_stock_in',
'validate_items' => 'validate_items',
'vendor_details' => 'vendor_details',
'vendor_selection' => 'vendor_selection',
'speichern_und_schließen' => 'save_and_close',
'als_neu_speichern' => 'save_as_new',
'lieferadresse' => 'ship_to',
+ 'einlagern_und_abschließen' => 'transfer_in_and_close',
+ 'auslagern_und_abschließen' => 'transfer_out_and_close',
'erneuern' => 'update',
'ja' => 'yes',
};
'Date' => 'Datum',
'Dec' => 'Dez',
'December' => 'Dezember',
+ 'Delivery Order' => 'Lieferschein',
'Dependency loop detected:' => 'Schleife in den Abhängigkeiten entdeckt:',
'Directory' => 'Verzeichnis',
'ELSE' => 'Zusatz',
'DUNNING STARTED' => 'Mahnprozess gestartet',
'Dataset upgrade' => 'Datenbankaktualisierung',
'Date' => 'Datum',
+ 'Delivery Order' => 'Lieferschein',
'Dependency loop detected:' => 'Schleife in den Abhängigkeiten entdeckt:',
'Description' => 'Beschreibung',
'Directory' => 'Verzeichnis',
action=add
type=sales_order
+[AR--Add Delivery Order]
+ACCESS=sales_delivery_order_edit
+module=do.pl
+action=add
+type=sales_delivery_order
+
[AR--Add Sales Invoice]
ACCESS=invoice_edit
module=is.pl
action=search
type=sales_order
+[AR--Reports--Delivery Orders]
+ACCESS=sales_delivery_order_edit
+module=do.pl
+action=search
+type=sales_delivery_order
+
[AR--Reports--Invoices]
ACCESS=invoice_edit
module=ar.pl
action=add
type=purchase_order
+[AP--Add Delivery Order]
+ACCESS=purchase_delivery_order_edit
+module=do.pl
+action=add
+type=purchase_delivery_order
+
[AP--Add Vendor Invoice]
ACCESS=vendor_invoice_edit
module=ir.pl
action=search
type=purchase_order
+[AP--Reports--Delivery Orders]
+ACCESS=purchase_delivery_order_edit
+module=do.pl
+action=search
+type=purchase_delivery_order
+
[AP--Reports--Vendor Invoices]
ACCESS=vendor_invoice_edit
module=ap.pl
--- /dev/null
+-- @tag: delivery_orders
+-- @description: Lieferscheine als eigener Beleg
+-- @depends: release_2_4_3 price_factors
+CREATE TABLE delivery_orders (
+ id integer NOT NULL DEFAULT nextval('id'),
+ donumber text NOT NULL,
+ ordnumber text,
+ transdate date DEFAULT now(),
+ vendor_id integer,
+ customer_id integer,
+ reqdate date,
+ shippingpoint text,
+ notes text,
+ intnotes text,
+ employee_id integer,
+ closed boolean DEFAULT false,
+ delivered boolean DEFAULT false,
+ cusordnumber text,
+ oreqnumber text,
+ department_id integer,
+ shipvia text,
+ cp_id integer,
+ language_id integer,
+ shipto_id integer,
+ globalproject_id integer,
+ salesman_id integer,
+ transaction_description text,
+ is_sales boolean,
+
+ itime timestamp DEFAULT now(),
+ mtime timestamp,
+
+ PRIMARY KEY (id),
+ FOREIGN KEY (vendor_id) REFERENCES vendor (id),
+ FOREIGN KEY (customer_id) REFERENCES customer (id),
+ FOREIGN KEY (employee_id) REFERENCES employee (id),
+ FOREIGN KEY (cp_id) REFERENCES contacts (cp_id),
+ FOREIGN KEY (language_id) REFERENCES language (id),
+ FOREIGN KEY (globalproject_id) REFERENCES project (id),
+ FOREIGN KEY (salesman_id) REFERENCES employee (id)
+);
+
+CREATE TRIGGER mtime_delivery_orders BEFORE UPDATE ON delivery_orders
+ FOR EACH ROW EXECUTE PROCEDURE set_mtime();
+
+CREATE SEQUENCE delivery_order_items_id;
+
+CREATE TABLE delivery_order_items (
+ id integer NOT NULL DEFAULT nextval('delivery_order_items_id'),
+ delivery_order_id integer NOT NULL,
+ parts_id integer NOT NULL,
+ description text,
+ qty numeric(25,5),
+ sellprice numeric(15,5),
+ discount real,
+ project_id integer,
+ reqdate date,
+ serialnumber text,
+ ordnumber text,
+ transdate text,
+ cusordnumber text,
+ unit varchar(20),
+ base_qty real,
+ longdescription text,
+ lastcost numeric(15,5),
+ price_factor_id integer,
+ price_factor numeric(15,5) DEFAULT 1,
+ marge_price_factor numeric(15,5) DEFAULT 1,
+
+ itime timestamp DEFAULT now(),
+ mtime timestamp,
+
+ PRIMARY KEY (id),
+ FOREIGN KEY (delivery_order_id) REFERENCES delivery_orders (id),
+ FOREIGN KEY (parts_id) REFERENCES parts (id),
+ FOREIGN KEY (project_id) REFERENCES project (id),
+ FOREIGN KEY (price_factor_id) REFERENCES price_factors (id)
+);
+
+CREATE TRIGGER mtime_delivery_order_items_id BEFORE UPDATE ON delivery_order_items
+ FOR EACH ROW EXECUTE PROCEDURE set_mtime();
+
+ALTER TABLE defaults ADD COLUMN pdonumber text;
+ALTER TABLE defaults ADD COLUMN sdonumber text;
+UPDATE defaults SET pdonumber = '0', sdonumber = '0';
+
+CREATE TABLE delivery_order_items_stock (
+ id integer NOT NULL DEFAULT nextval('id'),
+ delivery_order_item_id integer NOT NULL,
+
+ qty numeric(15,5) NOT NULL,
+ unit varchar(20) NOT NULL,
+ warehouse_id integer NOT NULL,
+ bin_id integer NOT NULL,
+ chargenumber text,
+
+ itime timestamp DEFAULT now(),
+ mtime timestamp,
+
+ PRIMARY KEY (id),
+ FOREIGN KEY (delivery_order_item_id) REFERENCES delivery_order_items (id),
+ FOREIGN KEY (warehouse_id) REFERENCES warehouse (id),
+ FOREIGN KEY (bin_id) REFERENCES bin (id)
+);
+
+CREATE TRIGGER mtime_delivery_order_items_stock BEFORE UPDATE ON delivery_order_items_stock
+ FOR EACH ROW EXECUTE PROCEDURE set_mtime();
--- /dev/null
+[% USE HTML %][% USE LxERP %]<body>
+
+ <div class="listtop">Lieferschein löschen</div>
+
+ <form method="post" action="do.pl">
+
+ <h2 class="confirm">Bestätigen</h2>
+
+ <p>[% LxERP.format_string('Sind Sie sicher, dass Sie Lieferschein #1 löschen wollen?', donumber) %]</p>
+
+ [%- FOREACH row = VARIABLES %]
+ <input type="hidden" name="[% HTML.escape(row.key) %]" value="[% HTML.escape(row.value) %]">
+ [%- END %]
+
+ <input type="hidden" name="yes_nextsub" value="delete_delivery_order">
+ <input type="hidden" name="no_nextsub" value="update">
+ <input name="action" class="submit" type="submit" value="Ja">
+ <input name="action" class="submit" type="submit" value="Nein">
+ </form>
+
+</body>
+</html>
--- /dev/null
+[% USE HTML %][% USE LxERP %]<body>
+
+ <div class="listtop"><translate>Delete delivery order</translate></div>
+
+ <form method="post" action="do.pl">
+
+ <h2 class="confirm"><translate>Confirm</translate></h2>
+
+ <p>[% LxERP.format_string('<translate>Are you sure you want to delete Delivery Order Number #1?</translate>', donumber) %]</p>
+
+ [%- FOREACH row = VARIABLES %]
+ <input type="hidden" name="[% HTML.escape(row.key) %]" value="[% HTML.escape(row.value) %]">
+ [%- END %]
+
+ <input type="hidden" name="yes_nextsub" value="delete_delivery_order">
+ <input type="hidden" name="no_nextsub" value="update">
+ <input name="action" class="submit" type="submit" value="<translate>Yes</translate>">
+ <input name="action" class="submit" type="submit" value="<translate>No</translate>">
+ </form>
+
+</body>
+</html>
--- /dev/null
+[% USE HTML %][% USE LxERP %]<!-- <body> -->
+<!-- <form> -->
+<!-- <p> -->
+<!-- <table> -->
+
+ [%- IF closed %]
+ [%- SET RO = ' readonly' %]
+ [%- END %]
+
+ <tr>
+ <td>
+ <table>
+ <tr valign="bottom">
+ <th align="left">Bemerkungen</th>
+ <th align="left">interne Bemerkungen</th>
+ </tr>
+
+ <tr valign="top">
+ <td><textarea name="notes" rows="[% LxERP.numtextrows(notes, 25, 8, 2) %]" cols="25" wrap="soft"[% RO %]>[% HTML.escape(notes) %]</textarea></td>
+ <td><textarea name="intnotes" rows="[% LxERP.numtextrows(intnotes, 35, 8, 2) %]" cols="35" wrap="soft"[% RO %]>[% HTML.escape(intnotes) %]</textarea></td>
+ </tr>
+ </table>
+
+ </td>
+ </tr>
+ </table>
+ </p>
+
+ <hr size="3" noshade>
+
+ [%- IF conf_webdav %]
+ <div class="listtop" align="left">Dokumente im WebDAV-Repository</div>
+
+ <p>
+ <table width="100%">
+ <tr>
+ <td align="left" width="30%"><b>Dateiname</b></td>
+ <td align="left" width="70%"><b>WebDAV-Link</b></td>
+ </tr>
+
+ [%- FOREACH file = WEBDAV %]
+ <tr>
+ <td align="left">[% HTML.escape(file.name) %]</td>
+ <td align="left"><a href="[% HTML.escape(file.link) %]">[% HTML.escape(file.type) %]</a></td>
+ </tr>
+ [%- END %]
+
+ </table>
+ </p>
+
+ <hr size="3" noshade>
+ [%- END %]
+
+ <p>[% PRINT_OPTIONS %]</p>
+
+ <p>
+ Lieferschein bearbeiten<br>
+ <input class="submit" type="submit" name="action" id="update_button" value="Erneuern">
+ [%- UNLESS closed %]
+ [%- IF vc == 'customer' %]
+ <input class="submit" type="submit" name="action" value="Lieferadresse">
+ [%- END %]
+ [%- END %]
+ <input class="submit" type="submit" name="action" value="Drucken">
+ <input class="submit" type="submit" name="action" value="eMail">
+ [%- UNLESS closed %]
+ <input class="submit" type="submit" name="action" value="Speichern">
+ [%- IF vc == 'customer' %]
+ <input class="submit" type="submit" name="action" value="Auslagern und abschließen">
+ [%- ELSE %]
+ <input class="submit" type="submit" name="action" value="Einlagern und abschließen">
+ [%- END %]
+ [%- END %]
+ [%- IF id %]
+ <input type="button" class="submit" onclick="set_history_window([% id %]);" name="history" id="history" value="Historie">
+ [%- END %]
+ </p>
+
+ [%- IF id %]
+ <p>
+ Workflow Lieferschein<br>
+ <input class="submit" type="submit" name="action" value="als neu speichern">
+ [% UNLESS closed %]
+ <input class="submit" type="submit" name="action" value="Löschen">
+ [% END %]
+ <input class="submit" type="submit" name="action" value="Rechnung">
+ </p>
+ [%- END %]
+
+ <input type="hidden" name="rowcount" value="[% HTML.escape(rowcount) %]">
+ <input name="callback" type="hidden" value="[% HTML.escape(callback) %]">
+
+ </form>
+
+</body>
+</html>
--- /dev/null
+[% USE HTML %][% USE LxERP %]<!-- <body> -->
+<!-- <form> -->
+<!-- <p> -->
+<!-- <table> -->
+
+ [%- IF closed %]
+ [%- SET RO = ' readonly' %]
+ [%- END %]
+
+ <tr>
+ <td>
+ <table>
+ <tr valign="bottom">
+ <th align="left"><translate>Notes</translate></th>
+ <th align="left"><translate>Internal Notes</translate></th>
+ </tr>
+
+ <tr valign="top">
+ <td><textarea name="notes" rows="[% LxERP.numtextrows(notes, 25, 8, 2) %]" cols="25" wrap="soft"[% RO %]>[% HTML.escape(notes) %]</textarea></td>
+ <td><textarea name="intnotes" rows="[% LxERP.numtextrows(intnotes, 35, 8, 2) %]" cols="35" wrap="soft"[% RO %]>[% HTML.escape(intnotes) %]</textarea></td>
+ </tr>
+ </table>
+
+ </td>
+ </tr>
+ </table>
+ </p>
+
+ <hr size="3" noshade>
+
+ [%- IF conf_webdav %]
+ <div class="listtop" align="left"><translate>Documents in the WebDAV repository</translate></div>
+
+ <p>
+ <table width="100%">
+ <tr>
+ <td align="left" width="30%"><b><translate>File name</translate></b></td>
+ <td align="left" width="70%"><b><translate>WebDAV link</translate></b></td>
+ </tr>
+
+ [%- FOREACH file = WEBDAV %]
+ <tr>
+ <td align="left">[% HTML.escape(file.name) %]</td>
+ <td align="left"><a href="[% HTML.escape(file.link) %]">[% HTML.escape(file.type) %]</a></td>
+ </tr>
+ [%- END %]
+
+ </table>
+ </p>
+
+ <hr size="3" noshade>
+ [%- END %]
+
+ <p>[% PRINT_OPTIONS %]</p>
+
+ <p>
+ <translate>Edit the Delivery Order</translate><br>
+ <input class="submit" type="submit" name="action" id="update_button" value="<translate>Update</translate>">
+ [%- UNLESS closed %]
+ [%- IF vc == 'customer' %]
+ <input class="submit" type="submit" name="action" value="<translate>Ship to</translate>">
+ [%- END %]
+ [%- END %]
+ <input class="submit" type="submit" name="action" value="<translate>Print</translate>">
+ <input class="submit" type="submit" name="action" value="<translate>E-mail</translate>">
+ [%- UNLESS closed %]
+ <input class="submit" type="submit" name="action" value="<translate>Save</translate>">
+ [%- IF vc == 'customer' %]
+ <input class="submit" type="submit" name="action" value="<translate>Transfer out and close</translate>">
+ [%- ELSE %]
+ <input class="submit" type="submit" name="action" value="<translate>Transfer in and close</translate>">
+ [%- END %]
+ [%- END %]
+ [%- IF id %]
+ <input type="button" class="submit" onclick="set_history_window([% id %]);" name="history" id="history" value="<translate>history</translate>">
+ [%- END %]
+ </p>
+
+ [%- IF id %]
+ <p>
+ <translate>Workflow Delivery Order</translate><br>
+ <input class="submit" type="submit" name="action" value="<translate>Save as new</translate>">
+ [% UNLESS closed %]
+ <input class="submit" type="submit" name="action" value="<translate>Delete</translate>">
+ [% END %]
+ <input class="submit" type="submit" name="action" value="<translate>Invoice</translate>">
+ </p>
+ [%- END %]
+
+ <input type="hidden" name="rowcount" value="[% HTML.escape(rowcount) %]">
+ <input name="callback" type="hidden" value="[% HTML.escape(callback) %]">
+
+ </form>
+
+</body>
+</html>
--- /dev/null
+[% USE HTML %][% USE LxERP %]<body onload="on_load()">
+
+ <script type="text/javascript" src="js/show_form_details.js"></script>
+ <script type="text/javascript" src="js/show_history.js"></script>
+ <script type="text/javascript" src="js/show_vc_details.js"></script>
+ <script type="text/javascript" src="js/common.js"></script>
+ <script type="text/javascript" src="js/delivery_customer_selection.js"></script>
+ <script type="text/javascript" src="js/vendor_selection.js"></script>
+ <script type="text/javascript" src="js/calculate_qty.js"></script>
+ <script type="text/javascript" src="js/stock_in_out.js"></script>
+
+ <script type="text/javascript">
+ <!--
+ function on_load() {
+ [% IF onload %][% onload %];[% END %]
+ setupDateFormat('[% myconfig_dateformat %]', 'Falsches Datumsformat!');
+ setupPoints('[% myconfig_numberformat %]', 'Falsches Format');
+
+ [%- UNLESS closed %]
+ Calendar.setup({ inputField : "transdate", ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "transdate_trigger" });
+ [%- END %]
+ }
+ -->
+ </script>
+
+ <style type="text/css">
+ .fixed_width {
+ width: 250px;
+ }
+ </style>
+
+ [%- IF vc == 'customer' %]
+ [%- SET vc = 'customer' %]
+ [%- SET the_vc_id = customer_id %]
+ [%- SET the_vc = customer %]
+ [%- SET the_oldvc = oldcustomer %]
+ [%- SET is_customer = '1' %]
+ [%- ELSE %]
+ [%- SET vc = 'vendor' %]
+ [%- SET the_vc_id = vendor_id %]
+ [%- SET the_vc = vendor %]
+ [%- SET the_oldvc = oldvendor %]
+ [%- SET is_customer = '0' %]
+ [%- END %]
+ [%- IF closed %]
+ [%- SET RO = ' readonly' %]
+ [%- SET DISABLED = ' disabled' %]
+ [%- END %]
+
+ <div class="listtop">[% title %]</div>
+
+ [%- IF ERRORS && ERRORS.size %]
+ <p><font color="#ff0000">[% ERRORS.join('<br>') %]</font></p>
+ [%- END %]
+
+ <form method="post" name="do" action="do.pl">
+
+ <input type="hidden" name="action" value="[% HTML.escape(action) %]">
+ <input type="hidden" name="bcc" value="[% HTML.escape(bcc) %]">
+ <input type="hidden" name="business" value="[% HTML.escape(business) %]">
+ <input type="hidden" name="cc" value="[% HTML.escape(cc) %]">
+ <input type="hidden" name="closed" value="[% HTML.escape(closed) %]">
+ <input type="hidden" name="customer_klass" value="[% HTML.escape(customer_klass) %]">
+ <input type="hidden" name="discount" value="[% HTML.escape(discount) %]">
+ <input type="hidden" name="dunning_amount" value="[% HTML.escape(dunning_amount) %]">
+ <input type="hidden" name="email" value="[% HTML.escape(email) %]">
+ <input type="hidden" name="emailed" value="[% HTML.escape(emailed) %]">
+ <input type="hidden" name="format" value="[% HTML.escape(format) %]">
+ <input type="hidden" name="formname" value="[% HTML.escape(formname) %]">
+ <input type="hidden" name="id" value="[% HTML.escape(id) %]">
+ <input type="hidden" name="max_dunning_level" value="[% HTML.escape(max_dunning_level) %]">
+ <input type="hidden" name="media" value="[% HTML.escape(media) %]">
+ <input type="hidden" name="message" value="[% HTML.escape(message) %]">
+ <input type="hidden" name="printed" value="[% HTML.escape(printed) %]">
+ <input type="hidden" name="proforma" value="[% HTML.escape(proforma) %]">
+ <input type="hidden" name="queued" value="[% HTML.escape(queued) %]">
+ <input type="hidden" name="saved_donumber" value="[% HTML.escape(saved_donumber) %]">
+ <input type="hidden" name="shiptocity" value="[% HTML.escape(shiptocity) %]">
+ <input type="hidden" name="shiptocontact" value="[% HTML.escape(shiptocontact) %]">
+ <input type="hidden" name="shiptocountry" value="[% HTML.escape(shiptocountry) %]">
+ <input type="hidden" name="shiptodepartment_1" value="[% HTML.escape(shiptodepartment_1) %]">
+ <input type="hidden" name="shiptodepartment_2" value="[% HTML.escape(shiptodepartment_2) %]">
+ <input type="hidden" name="shiptoemail" value="[% HTML.escape(shiptoemail) %]">
+ <input type="hidden" name="shiptofax" value="[% HTML.escape(shiptofax) %]">
+ <input type="hidden" name="shiptoname" value="[% HTML.escape(shiptoname) %]">
+ <input type="hidden" name="shiptophone" value="[% HTML.escape(shiptophone) %]">
+ <input type="hidden" name="shiptostreet" value="[% HTML.escape(shiptostreet) %]">
+ <input type="hidden" name="shiptozipcode" value="[% HTML.escape(shiptozipcode) %]">
+ <input type="hidden" name="subject" value="[% HTML.escape(subject) %]">
+ <input type="hidden" name="title" value="[% HTML.escape(title) %]">
+ <input type="hidden" name="type" value="[% HTML.escape(type) %]">
+ <input type="hidden" name="vc" value="[% HTML.escape(vc) %]">
+
+ <p>
+ <table width="100%">
+ <tr valign="top">
+ <td>
+ <table width="100%">
+ <tr>
+ <input type="hidden" name="[% vc %]_id" value="[% HTML.escape(the_vc_id) %]">
+ <input type="hidden" name="old[% vc %]" value="[% HTML.escape(the_oldvc) %]">
+ <th align="right">[% IF is_customer %]Kunde[% ELSE %]Lieferant[% END %]</th>
+ <td>
+ [%- UNLESS !closed && SHOW_VC_DROP_DOWN %]
+ <input type="text" value="[% HTML.escape(oldvcname) %]" name="[% HTML.escape(vc) %]"[% RO %]>
+ [%- ELSE %]
+ <select name="[% vc %]" class="fixed_width" onchange="document.do.update_button.click();"[% RO %]>
+ [%- FOREACH row = ALL_VC %]
+ <option value="[% HTML.escape(row.value) %]" [% IF the_oldvc == row.value %] selected[% END %]>[% HTML.escape(row.name) %]</option>
+ [%- END %]
+ </select>
+ <input type="hidden" name="select[% vc %]" value="1">
+ [%- END %]
+ <input type="button" value="?" onclick="show_vc_details('[% vc %]')">
+ </td>
+
+ [%- IF ALL_CONTACTS.size %]
+ <tr>
+ <th align="right">Ansprechpartner</th>
+ <td>
+ [%- IF closed %]
+ <input type="hidden" name="cp_id" value="[% HTML.escape(cp_id) %]">
+ [%- IF cp_id == row.cp_id %]
+ [%- HTML.escape(row.cp_name) %][%- IF row.cp_abteilung %] ([% HTML.escape(row.cp_abteilung) %])[% END -%]
+ [%- END %]
+ [%- ELSE %]
+ <select name="cp_id" class="fixed_width" >
+ <option></option>
+ [%- FOREACH row = ALL_CONTACTS %]
+ <option value="[% HTML.escape(row.cp_id) %]"[% IF cp_id == row.cp_id %] selected[% END %]>
+ [%- HTML.escape(row.cp_name) %][%- IF row.cp_abteilung %] ([% HTML.escape(row.cp_abteilung) %])[% END -%]
+ </option>
+ [%- END %]
+ </select>
+ [%- END %]
+ </td>
+ </tr>
+ [%- END %]
+
+ [%- IF ALL_SHIPTO.size %]
+ <tr>
+ <th align="right">Lieferadresse</th>
+ <td>
+ [%- IF closed %]
+ <input type="hidden" name="shipto_id" value="[% HTML.escape(shipto_id) %]">
+ [%- FOREACH row = ALL_SHIPTO %]
+ [%- IF shipto_id == row.shipto_id %]
+ [%- HTML.escape(row.shiptoname) -%]
+ [%- IF row.shiptodepartment_1 %]; [% HTML.escape(row.shiptodepartment_1) -%][% END -%]
+ [%- IF row.shiptostreet %]; [% HTML.escape(row.shiptostreet) -%][% END -%]
+ [%- IF row.shiptocity %]; [% HTML.escape(row.shiptocity) -%][% END -%]
+ [%- END %]
+ [%- END %]
+
+ [%- ELSE %]
+ <select name="shipto_id" class="fixed_width" >
+ <option></option>
+ [%- FOREACH row = ALL_SHIPTO %]
+ <option value="[% HTML.escape(row.shipto_id) %]"[% IF shipto_id == row.shipto_id %] selected[% END %]>
+ [%- HTML.escape(row.shiptoname) -%]
+ [%- IF row.shiptodepartment_1 %]; [% HTML.escape(row.shiptodepartment_1) -%][% END -%]
+ [%- IF row.shiptostreet %]; [% HTML.escape(row.shiptostreet) -%][% END -%]
+ [%- IF row.shiptocity %]; [% HTML.escape(row.shiptocity) -%][% END -%]
+ </option>
+ [%- END %]
+ </select>
+ [%- END %]
+ </td>
+ </tr>
+ [%- END %]
+
+ [%- IF business %]
+ <tr>
+ <th align="right">[% IF is_customer %]Kundentyp[% ELSE %]Lieferantentyp[% END %]</th>
+ <td>[% HTML.escape(business) %]</td>
+ </tr>
+ [%- END %]
+
+ [%- IF max_dunning_level %]
+ <tr>
+ <th align="right">höchste Mahnstufe</th>
+ <td>
+ <b>[% HTML.escape(max_dunning_level) %]</b>; gemahnter Betrag:
+ <b>[% HTML.escape(LxERP.format_amount(dunning_amount, 2)) %]</b>
+ </td>
+ </tr>
+ [%- END %]
+ </tr>
+
+ [%- IF ALL_DEPARTMENTS.size %]
+ <tr>
+ <th align="right" nowrap>Abteilung</th>
+ <td colspan="3">
+ [%- IF closed %]
+ <input type="hidden" name="department" value="[% HTML.escape(department) %]">
+ [%- FOREACH row = ALL_DEPARTMENTS %]
+ [% IF department == row.value %][% HTML.escape(row.description) %]--[% HTML.escape(row.id) %][% END %]
+ [%- END %]
+ [%- ELSE %]
+ <select name="department" class="fixed_width">
+ <option></option>
+ [%- FOREACH row = ALL_DEPARTMENTS %]
+ <option[% IF department == row.value %] selected[% END %]>[% HTML.escape(row.description) %]--[% HTML.escape(row.id) %]</option>
+ [%- END %]
+ </select>
+ [%- END %]
+ </td>
+ </tr>
+ [%- END %]
+
+ <tr>
+ <th align="right">Versandort</th>
+ <td colspan="3"><input name="shippingpoint" size="35" value="[% HTML.escape(shippingpoint) %]"[% RO %]></td>
+ </tr>
+
+ <tr>
+ <th align="right">Transportmittel</th>
+ <td colspan="3"><input name="shipvia" size="35" value="[% HTML.escape(shipvia) %]"[% RO %]></td>
+ </tr>
+
+ <tr>
+ <th align="right">Vorgangsbezeichnung</th>
+ <td colspan="3"><input name="transaction_description" size="35" value="[% HTML.escape(transaction_description) %]"[% RO %]></td>
+ </tr>
+
+ </table>
+ </td>
+
+ <td align="right">
+ <table>
+
+ [%- IF vc == 'customer' %]
+ <tr>
+ <td colspan="2" align="center">
+ <input name="delivered" id="delivered" type="checkbox" class="checkbox" value="1"[% IF delivered %] checked[% END %][% DISABLED %]>
+ <label for="delivered">Geliefert</label>
+ [%- IF closed %]
+ <input type="hidden" name="delivered" value="1">
+ [%- END %]
+ </td>
+ </tr>
+ [%- ELSE %]
+ <input type="hidden" name="delivered" value="[% HTML.escape(delivered) %]">
+ [%- END %]
+
+ <tr>
+ <th align="right">Bearbeiter</th>
+ <td>
+ [%- IF closed %]
+ <input type="hidden" name="employee_id" value="[% HTML.escape(employee_id) %]">
+ [%- FOREACH row = ALL_EMPLOYEES %]
+ [% IF row.id == employee_id %][%- IF row.name %][%- HTML.escape(row.name) %][%- ELSE %][% HTML.escape(row.login) %][%- END %][% END %]
+ [%- END %]
+ [%- ELSE %]
+ <select name="employee_id">
+ [%- FOREACH row = ALL_EMPLOYEES %]
+ <option value="[% HTML.escape(row.id) %]"[% IF row.id == employee_id %] selected[% END %]>
+ [%- IF row.name %][%- HTML.escape(row.name) %][%- ELSE %][% HTML.escape(row.login) %][%- END %]
+ </option>
+ [%- END %]
+ </select>
+ [%- END %]
+ </td>
+ </tr>
+
+ [%- IF is_customer %]
+ [%- IF salesman_id %]
+ [%- SET the_salesman_id = salesman_id %]
+ [%- ELSE %]
+ [%- SET the_salesman_id = employee_id %]
+ [%- END %]
+ <tr>
+ <th align="right">Verkäufer/in</th>
+ <td>
+ [%- IF closed %]
+ <input type="hidden" name="salesman_id" value="[% HTML.escape(salesman_id) %]">
+ [%- FOREACH row = ALL_SALESMEN %]
+ [% IF row.id == the_salesman_id %][%- IF row.name %][%- HTML.escape(row.name) %][%- ELSE %][% HTML.escape(row.login) %][%- END %][% END %]
+ [%- END %]
+ [%- ELSE %]
+ <select name="salesman_id">
+ [%- FOREACH row = ALL_SALESMEN %]
+ <option value="[% HTML.escape(row.id) %]"[% IF row.id == the_salesman_id %] selected[% END %]>
+ [%- IF row.name %][%- HTML.escape(row.name) %][%- ELSE %][% HTML.escape(row.login) %][%- END %]
+ </option>
+ [%- END %]
+ </select>
+ [%- END %]
+ </td>
+ </tr>
+ [%- END %]
+
+ <tr>
+ <th width="70%" align="right" nowrap>Lieferscheinnummer</th>
+ <td><input name="donumber" size="11" value="[% HTML.escape(donumber) %]"[% RO %]></td>
+ </tr>
+
+ <tr>
+ <th width="70%" align="right" nowrap>Auftragsnummer</th>
+ <td><input name="ordnumber" size="11" value="[% HTML.escape(ordnumber) %]"[% RO %]></td>
+ </tr>
+
+ <tr>
+ <th width="70%" align="right" nowrap>Bestellnummer des Kunden</th>
+ <td><input name="cusordnumber" size="11" value="[% HTML.escape(cusordnumber) %]"[% RO %]></td>
+ </tr>
+
+ [%- UNLESS is_customer %]
+ <tr>
+ <th width="70%" align="right" nowrap>Bestellanfragenummer</th>
+ <td><input name="oreqnumber" size="11" value="[% HTML.escape(oreqnumber) %]"[% RO %]></td>
+ </tr>
+ [%- END %]
+
+ <tr>
+ <th align="right" nowrap>Lieferscheindatum</th>
+ <td nowrap>
+ <input name="transdate" id="transdate" size="11" title="[% HTML.escape(myconfig_dateformat) %]" value="[% HTML.escape(transdate) %]"
+ onBlur="check_right_date_format(this)"[% RO %]>
+ [% UNLESS closed %]<input type="button" name="b_transdate" id="transdate_trigger" value="?">[% END %]
+ </td>
+ </tr>
+
+ <tr>
+ <th width="70%" align="right" nowrap>Projektnummer</th>
+ <td>
+ [%- IF closed %]
+ <input type="hidden" name="globalproject_id" value="[% HTML.escape(globalproject_id) %]">
+ [%- FOREACH row = ALL_PROJECTS %]
+ [% IF globalproject_id == row.id %][% HTML.escape(row.projectnumber) %][% END %]
+ [%- END %]
+ [%- ELSE %]
+ <select name="globalproject_id">
+ <option></option>
+ [%- FOREACH row = ALL_PROJECTS %]
+ <option value="[% HTML.escape(row.id) %]"[% IF globalproject_id == row.id %] selected[% END %]>[% HTML.escape(row.projectnumber) %]</option>
+ [%- END %]
+ </select>
+ [%- END %]
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
--- /dev/null
+[% USE HTML %][% USE LxERP %]<body onload="on_load()">
+
+ <script type="text/javascript" src="js/show_form_details.js"></script>
+ <script type="text/javascript" src="js/show_history.js"></script>
+ <script type="text/javascript" src="js/show_vc_details.js"></script>
+ <script type="text/javascript" src="js/common.js"></script>
+ <script type="text/javascript" src="js/delivery_customer_selection.js"></script>
+ <script type="text/javascript" src="js/vendor_selection.js"></script>
+ <script type="text/javascript" src="js/calculate_qty.js"></script>
+ <script type="text/javascript" src="js/stock_in_out.js"></script>
+
+ <script type="text/javascript">
+ <!--
+ function on_load() {
+ [% IF onload %][% onload %];[% END %]
+ setupDateFormat('[% myconfig_dateformat %]', '<translate>Falsches Datumsformat!</translate>');
+ setupPoints('[% myconfig_numberformat %]', '<translate>wrongformat</translate>');
+
+ [%- UNLESS closed %]
+ Calendar.setup({ inputField : "transdate", ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "transdate_trigger" });
+ [%- END %]
+ }
+ -->
+ </script>
+
+ <style type="text/css">
+ .fixed_width {
+ width: 250px;
+ }
+ </style>
+
+ [%- IF vc == 'customer' %]
+ [%- SET vc = 'customer' %]
+ [%- SET the_vc_id = customer_id %]
+ [%- SET the_vc = customer %]
+ [%- SET the_oldvc = oldcustomer %]
+ [%- SET is_customer = '1' %]
+ [%- ELSE %]
+ [%- SET vc = 'vendor' %]
+ [%- SET the_vc_id = vendor_id %]
+ [%- SET the_vc = vendor %]
+ [%- SET the_oldvc = oldvendor %]
+ [%- SET is_customer = '0' %]
+ [%- END %]
+ [%- IF closed %]
+ [%- SET RO = ' readonly' %]
+ [%- SET DISABLED = ' disabled' %]
+ [%- END %]
+
+ <div class="listtop">[% title %]</div>
+
+ [%- IF ERRORS && ERRORS.size %]
+ <p><font color="#ff0000">[% ERRORS.join('<br>') %]</font></p>
+ [%- END %]
+
+ <form method="post" name="do" action="do.pl">
+
+ <input type="hidden" name="action" value="[% HTML.escape(action) %]">
+ <input type="hidden" name="bcc" value="[% HTML.escape(bcc) %]">
+ <input type="hidden" name="business" value="[% HTML.escape(business) %]">
+ <input type="hidden" name="cc" value="[% HTML.escape(cc) %]">
+ <input type="hidden" name="closed" value="[% HTML.escape(closed) %]">
+ <input type="hidden" name="customer_klass" value="[% HTML.escape(customer_klass) %]">
+ <input type="hidden" name="discount" value="[% HTML.escape(discount) %]">
+ <input type="hidden" name="dunning_amount" value="[% HTML.escape(dunning_amount) %]">
+ <input type="hidden" name="email" value="[% HTML.escape(email) %]">
+ <input type="hidden" name="emailed" value="[% HTML.escape(emailed) %]">
+ <input type="hidden" name="format" value="[% HTML.escape(format) %]">
+ <input type="hidden" name="formname" value="[% HTML.escape(formname) %]">
+ <input type="hidden" name="id" value="[% HTML.escape(id) %]">
+ <input type="hidden" name="max_dunning_level" value="[% HTML.escape(max_dunning_level) %]">
+ <input type="hidden" name="media" value="[% HTML.escape(media) %]">
+ <input type="hidden" name="message" value="[% HTML.escape(message) %]">
+ <input type="hidden" name="printed" value="[% HTML.escape(printed) %]">
+ <input type="hidden" name="proforma" value="[% HTML.escape(proforma) %]">
+ <input type="hidden" name="queued" value="[% HTML.escape(queued) %]">
+ <input type="hidden" name="saved_donumber" value="[% HTML.escape(saved_donumber) %]">
+ <input type="hidden" name="shiptocity" value="[% HTML.escape(shiptocity) %]">
+ <input type="hidden" name="shiptocontact" value="[% HTML.escape(shiptocontact) %]">
+ <input type="hidden" name="shiptocountry" value="[% HTML.escape(shiptocountry) %]">
+ <input type="hidden" name="shiptodepartment_1" value="[% HTML.escape(shiptodepartment_1) %]">
+ <input type="hidden" name="shiptodepartment_2" value="[% HTML.escape(shiptodepartment_2) %]">
+ <input type="hidden" name="shiptoemail" value="[% HTML.escape(shiptoemail) %]">
+ <input type="hidden" name="shiptofax" value="[% HTML.escape(shiptofax) %]">
+ <input type="hidden" name="shiptoname" value="[% HTML.escape(shiptoname) %]">
+ <input type="hidden" name="shiptophone" value="[% HTML.escape(shiptophone) %]">
+ <input type="hidden" name="shiptostreet" value="[% HTML.escape(shiptostreet) %]">
+ <input type="hidden" name="shiptozipcode" value="[% HTML.escape(shiptozipcode) %]">
+ <input type="hidden" name="subject" value="[% HTML.escape(subject) %]">
+ <input type="hidden" name="title" value="[% HTML.escape(title) %]">
+ <input type="hidden" name="type" value="[% HTML.escape(type) %]">
+ <input type="hidden" name="vc" value="[% HTML.escape(vc) %]">
+
+ <p>
+ <table width="100%">
+ <tr valign="top">
+ <td>
+ <table width="100%">
+ <tr>
+ <input type="hidden" name="[% vc %]_id" value="[% HTML.escape(the_vc_id) %]">
+ <input type="hidden" name="old[% vc %]" value="[% HTML.escape(the_oldvc) %]">
+ <th align="right">[% IF is_customer %]<translate>Customer</translate>[% ELSE %]<translate>Vendor</translate>[% END %]</th>
+ <td>
+ [%- UNLESS !closed && SHOW_VC_DROP_DOWN %]
+ <input type="text" value="[% HTML.escape(oldvcname) %]" name="[% HTML.escape(vc) %]"[% RO %]>
+ [%- ELSE %]
+ <select name="[% vc %]" class="fixed_width" onchange="document.do.update_button.click();"[% RO %]>
+ [%- FOREACH row = ALL_VC %]
+ <option value="[% HTML.escape(row.value) %]" [% IF the_oldvc == row.value %] selected[% END %]>[% HTML.escape(row.name) %]</option>
+ [%- END %]
+ </select>
+ <input type="hidden" name="select[% vc %]" value="1">
+ [%- END %]
+ <input type="button" value="?" onclick="show_vc_details('[% vc %]')">
+ </td>
+
+ [%- IF ALL_CONTACTS.size %]
+ <tr>
+ <th align="right"><translate>Contact Person</translate></th>
+ <td>
+ [%- IF closed %]
+ <input type="hidden" name="cp_id" value="[% HTML.escape(cp_id) %]">
+ [%- IF cp_id == row.cp_id %]
+ [%- HTML.escape(row.cp_name) %][%- IF row.cp_abteilung %] ([% HTML.escape(row.cp_abteilung) %])[% END -%]
+ [%- END %]
+ [%- ELSE %]
+ <select name="cp_id" class="fixed_width" >
+ <option></option>
+ [%- FOREACH row = ALL_CONTACTS %]
+ <option value="[% HTML.escape(row.cp_id) %]"[% IF cp_id == row.cp_id %] selected[% END %]>
+ [%- HTML.escape(row.cp_name) %][%- IF row.cp_abteilung %] ([% HTML.escape(row.cp_abteilung) %])[% END -%]
+ </option>
+ [%- END %]
+ </select>
+ [%- END %]
+ </td>
+ </tr>
+ [%- END %]
+
+ [%- IF ALL_SHIPTO.size %]
+ <tr>
+ <th align="right"><translate>Shipping Address</translate></th>
+ <td>
+ [%- IF closed %]
+ <input type="hidden" name="shipto_id" value="[% HTML.escape(shipto_id) %]">
+ [%- FOREACH row = ALL_SHIPTO %]
+ [%- IF shipto_id == row.shipto_id %]
+ [%- HTML.escape(row.shiptoname) -%]
+ [%- IF row.shiptodepartment_1 %]; [% HTML.escape(row.shiptodepartment_1) -%][% END -%]
+ [%- IF row.shiptostreet %]; [% HTML.escape(row.shiptostreet) -%][% END -%]
+ [%- IF row.shiptocity %]; [% HTML.escape(row.shiptocity) -%][% END -%]
+ [%- END %]
+ [%- END %]
+
+ [%- ELSE %]
+ <select name="shipto_id" class="fixed_width" >
+ <option></option>
+ [%- FOREACH row = ALL_SHIPTO %]
+ <option value="[% HTML.escape(row.shipto_id) %]"[% IF shipto_id == row.shipto_id %] selected[% END %]>
+ [%- HTML.escape(row.shiptoname) -%]
+ [%- IF row.shiptodepartment_1 %]; [% HTML.escape(row.shiptodepartment_1) -%][% END -%]
+ [%- IF row.shiptostreet %]; [% HTML.escape(row.shiptostreet) -%][% END -%]
+ [%- IF row.shiptocity %]; [% HTML.escape(row.shiptocity) -%][% END -%]
+ </option>
+ [%- END %]
+ </select>
+ [%- END %]
+ </td>
+ </tr>
+ [%- END %]
+
+ [%- IF business %]
+ <tr>
+ <th align="right">[% IF is_customer %]<translate>Customer type</translate>[% ELSE %]<translate>Vendor type</translate>[% END %]</th>
+ <td>[% HTML.escape(business) %]</td>
+ </tr>
+ [%- END %]
+
+ [%- IF max_dunning_level %]
+ <tr>
+ <th align="right"><translate>Max. Dunning Level</translate></th>
+ <td>
+ <b>[% HTML.escape(max_dunning_level) %]</b>; <translate>Dunning Amount</translate>:
+ <b>[% HTML.escape(LxERP.format_amount(dunning_amount, 2)) %]</b>
+ </td>
+ </tr>
+ [%- END %]
+ </tr>
+
+ [%- IF ALL_DEPARTMENTS.size %]
+ <tr>
+ <th align="right" nowrap><translate>Department</translate></th>
+ <td colspan="3">
+ [%- IF closed %]
+ <input type="hidden" name="department" value="[% HTML.escape(department) %]">
+ [%- FOREACH row = ALL_DEPARTMENTS %]
+ [% IF department == row.value %][% HTML.escape(row.description) %]--[% HTML.escape(row.id) %][% END %]
+ [%- END %]
+ [%- ELSE %]
+ <select name="department" class="fixed_width">
+ <option></option>
+ [%- FOREACH row = ALL_DEPARTMENTS %]
+ <option[% IF department == row.value %] selected[% END %]>[% HTML.escape(row.description) %]--[% HTML.escape(row.id) %]</option>
+ [%- END %]
+ </select>
+ [%- END %]
+ </td>
+ </tr>
+ [%- END %]
+
+ <tr>
+ <th align="right"><translate>Shipping Point</translate></th>
+ <td colspan="3"><input name="shippingpoint" size="35" value="[% HTML.escape(shippingpoint) %]"[% RO %]></td>
+ </tr>
+
+ <tr>
+ <th align="right"><translate>Ship via</translate></th>
+ <td colspan="3"><input name="shipvia" size="35" value="[% HTML.escape(shipvia) %]"[% RO %]></td>
+ </tr>
+
+ <tr>
+ <th align="right"><translate>Transaction description</translate></th>
+ <td colspan="3"><input name="transaction_description" size="35" value="[% HTML.escape(transaction_description) %]"[% RO %]></td>
+ </tr>
+
+ </table>
+ </td>
+
+ <td align="right">
+ <table>
+
+ [%- IF vc == 'customer' %]
+ <tr>
+ <td colspan="2" align="center">
+ <input name="delivered" id="delivered" type="checkbox" class="checkbox" value="1"[% IF delivered %] checked[% END %][% DISABLED %]>
+ <label for="delivered"><translate>Delivered</translate></label>
+ [%- IF closed %]
+ <input type="hidden" name="delivered" value="1">
+ [%- END %]
+ </td>
+ </tr>
+ [%- ELSE %]
+ <input type="hidden" name="delivered" value="[% HTML.escape(delivered) %]">
+ [%- END %]
+
+ <tr>
+ <th align="right"><translate>Employee</translate></th>
+ <td>
+ [%- IF closed %]
+ <input type="hidden" name="employee_id" value="[% HTML.escape(employee_id) %]">
+ [%- FOREACH row = ALL_EMPLOYEES %]
+ [% IF row.id == employee_id %][%- IF row.name %][%- HTML.escape(row.name) %][%- ELSE %][% HTML.escape(row.login) %][%- END %][% END %]
+ [%- END %]
+ [%- ELSE %]
+ <select name="employee_id">
+ [%- FOREACH row = ALL_EMPLOYEES %]
+ <option value="[% HTML.escape(row.id) %]"[% IF row.id == employee_id %] selected[% END %]>
+ [%- IF row.name %][%- HTML.escape(row.name) %][%- ELSE %][% HTML.escape(row.login) %][%- END %]
+ </option>
+ [%- END %]
+ </select>
+ [%- END %]
+ </td>
+ </tr>
+
+ [%- IF is_customer %]
+ [%- IF salesman_id %]
+ [%- SET the_salesman_id = salesman_id %]
+ [%- ELSE %]
+ [%- SET the_salesman_id = employee_id %]
+ [%- END %]
+ <tr>
+ <th align="right"><translate>Salesman</translate></th>
+ <td>
+ [%- IF closed %]
+ <input type="hidden" name="salesman_id" value="[% HTML.escape(salesman_id) %]">
+ [%- FOREACH row = ALL_SALESMEN %]
+ [% IF row.id == the_salesman_id %][%- IF row.name %][%- HTML.escape(row.name) %][%- ELSE %][% HTML.escape(row.login) %][%- END %][% END %]
+ [%- END %]
+ [%- ELSE %]
+ <select name="salesman_id">
+ [%- FOREACH row = ALL_SALESMEN %]
+ <option value="[% HTML.escape(row.id) %]"[% IF row.id == the_salesman_id %] selected[% END %]>
+ [%- IF row.name %][%- HTML.escape(row.name) %][%- ELSE %][% HTML.escape(row.login) %][%- END %]
+ </option>
+ [%- END %]
+ </select>
+ [%- END %]
+ </td>
+ </tr>
+ [%- END %]
+
+ <tr>
+ <th width="70%" align="right" nowrap><translate>Delivery Order Number</translate></th>
+ <td><input name="donumber" size="11" value="[% HTML.escape(donumber) %]"[% RO %]></td>
+ </tr>
+
+ <tr>
+ <th width="70%" align="right" nowrap><translate>Order Number</translate></th>
+ <td><input name="ordnumber" size="11" value="[% HTML.escape(ordnumber) %]"[% RO %]></td>
+ </tr>
+
+ <tr>
+ <th width="70%" align="right" nowrap><translate>Customer Order Number</translate></th>
+ <td><input name="cusordnumber" size="11" value="[% HTML.escape(cusordnumber) %]"[% RO %]></td>
+ </tr>
+
+ [%- UNLESS is_customer %]
+ <tr>
+ <th width="70%" align="right" nowrap><translate>Order Request Number</translate></th>
+ <td><input name="oreqnumber" size="11" value="[% HTML.escape(oreqnumber) %]"[% RO %]></td>
+ </tr>
+ [%- END %]
+
+ <tr>
+ <th align="right" nowrap><translate>Delivery Order Date</translate></th>
+ <td nowrap>
+ <input name="transdate" id="transdate" size="11" title="[% HTML.escape(myconfig_dateformat) %]" value="[% HTML.escape(transdate) %]"
+ onBlur="check_right_date_format(this)"[% RO %]>
+ [% UNLESS closed %]<input type="button" name="b_transdate" id="transdate_trigger" value="?">[% END %]
+ </td>
+ </tr>
+
+ <tr>
+ <th width="70%" align="right" nowrap><translate>Project Number</translate></th>
+ <td>
+ [%- IF closed %]
+ <input type="hidden" name="globalproject_id" value="[% HTML.escape(globalproject_id) %]">
+ [%- FOREACH row = ALL_PROJECTS %]
+ [% IF globalproject_id == row.id %][% HTML.escape(row.projectnumber) %][% END %]
+ [%- END %]
+ [%- ELSE %]
+ <select name="globalproject_id">
+ <option></option>
+ [%- FOREACH row = ALL_PROJECTS %]
+ <option value="[% HTML.escape(row.id) %]"[% IF globalproject_id == row.id %] selected[% END %]>[% HTML.escape(row.projectnumber) %]</option>
+ [%- END %]
+ </select>
+ [%- END %]
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
--- /dev/null
+[% USE HTML %][% USE LxERP %]<body onload="on_load();">
+
+ [%- IF vc == 'customer' %]
+ [%- SET is_customer = '1' %]
+ [%- ELSE %]
+ [%- SET is_customer = '0' %]
+ [%- END %]
+
+ <script type="text/javascript">
+ <!--
+ function on_load() {
+ Calendar.setup({ inputField : "transdatefrom", ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "transdatefrom_trigger" });
+ Calendar.setup({ inputField : "transdateto", ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "transdateto_trigger" });
+ document.Form.donumber.focus();
+ }
+ -->
+ </script>
+
+ <style type="text/css">
+ .fixed_width {
+ width: 250px;
+ }
+ </style>
+
+ <form method="post" action="do.pl" name="Form">
+
+ <div class="listtop">[% title %]</div>
+
+ <p>
+ <table>
+ <tr>
+ <th align="right">[% IF is_customer %]Kunde[% ELSE %]Lieferant[% END %]</th>
+ <td colspan="3">
+ [%- UNLESS SHOW_VC_DROP_DOWN %]
+ <input type="text" name="[% HTML.escape(vc) %]" class="fixed_width">
+ [%- ELSE %]
+ <select name="[% vc %]" class="fixed_width">
+ <option></option>
+ [%- FOREACH row = ALL_VC %]
+ <option>[% HTML.escape(row.name) %]--[% HTML.escape(row.id) %]</option>
+ [%- END %]
+ </select>
+ <input type="hidden" name="select[% vc %]" value="1">
+ [%- END %]
+ </td>
+ </tr>
+
+ <tr>
+ <th align="right">Lieferscheinnummer</th>
+ <td colspan="3"><input name="donumber" class="fixed_width"></td>
+ </tr>
+
+ <tr>
+ <th align="right">Auftragsnummer</th>
+ <td colspan="3"><input name="ordnumber" class="fixed_width"></td>
+ </tr>
+
+ [%- UNLESS is_customer %]
+ <tr>
+ <th align="right">Bestellanfragenummer</th>
+ <td colspan="3"><input name="oreqnumber" class="fixed_width"></td>
+ </tr>
+ [%- END %]
+
+ [%- IF ALL_DEPARTMENTS.size %]
+ <tr>
+ <th align="right" nowrap>Abteilung</th>
+ <td colspan="3">
+ <select name="department" class="fixed_width">
+ <option></option>
+ [%- FOREACH row = ALL_DEPARTMENTS %]
+ <option[% IF department == row.value %] selected[% END %]>[% HTML.escape(row.description) %]--[% HTML.escape(row.id) %]</option>
+ [%- END %]
+ </select>
+ </td>
+ </tr>
+ [%- END %]
+
+ <tr>
+ <th align="right">Bearbeiter</th>
+ <td>
+ <select name="employee_id" class="fixed_width">
+ <option></option>
+ [%- FOREACH row = ALL_EMPLOYEES %]
+ <option value="[% HTML.escape(row.id) %]">[% IF row.name %][% HTML.escape(row.name) %][% ELSE %][% HTML.escape(row.login) %][% END %]</option>
+ [%- END %]
+ </select>
+ </td>
+ </tr>
+
+ [%- IF is_customer %]
+ <tr>
+ <th align="right">Verkäufer/in</th>
+ <td>
+ <select name="salesman_id" class="fixed_width">
+ <option></option>
+ [%- FOREACH row = ALL_SALESMEN %]
+ <option value="[% HTML.escape(row.id) %]">[% IF row.name %][% HTML.escape(row.name) %][% ELSE %][% HTML.escape(row.login) %][% END %]</option>
+ [%- END %]
+ </select>
+ </td>
+ </tr>
+ [%- END %]
+
+ <tr>
+ <th align="right">Vorgangsbezeichnung</th>
+ <td colspan="3"><input name="transaction_description" class="fixed_width"></td>
+ </tr>
+
+ <tr>
+ <th align="right">Bestellnummer des Kunden</th>
+ <td colspan="3"><input name="cusordnumber" class="fixed_width"></td>
+ </tr>
+
+ <tr>
+ <th align="right">Projektnummer</th>
+ <td colspan="3">
+ <select name="project_id" class="fixed_width">
+ <option></option>
+ [%- FOREACH row = ALL_PROJECTS %]
+ <option value="[% HTML.escape(row.id) %]">[% HTML.escape(row.projectnumber) %]</option>
+ [%- END %]
+ </select>
+ </td>
+ </tr>
+
+ <tr>
+ <th align="right">Von</th>
+ <td>
+ <input name="transdatefrom" id="transdatefrom" size="11" title="[% myconfig_dateformat %]" onBlur="check_right_date_format(this)">
+ <input type="button" name="transdatefrom_button" id="transdatefrom_trigger" value="?">
+ </td>
+ <th align="right">bis</th>
+ <td>
+ <input name="transdateto" id="transdateto" size="11" title="[% myconfig_dateformat %]" onBlur="check_right_date_format(this)">
+ <input type="button" name="transdateto_button" id="transdateto_trigger" value="?">
+ </td>
+ </tr>
+
+ <tr>
+ <th align="right">In Bericht aufnehmen</th>
+ <td colspan="5">
+ <table>
+ <tr>
+ <td>
+ <input type="checkbox" name="open" value="1" id="open" checked>
+ <label for="open">Offen</label>
+ </td>
+ <td>
+ <input type="checkbox" name="closed" value="1" id="closed">
+ <label for="closed">Geschlossen</label>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <input name="notdelivered" id="notdelivered" class="checkbox" type="checkbox" value="1" checked>
+ <label for="notdelivered">Nicht geliefert</label>
+ </td>
+ <td>
+ <input name="delivered" id="delivered" class="checkbox" type="checkbox" value="1" checked>
+ <label for="delivered">Geliefert</label></td>
+ </tr>
+
+ <tr>
+ <td>
+ <input name="l_id" id="l_id" class="checkbox" type="checkbox" value="Y">
+ <label for="l_id">Buchungsnummer</label>
+ </td>
+
+ <td>
+ <input name="l_donumber" id="l_donumber" class="checkbox" type="checkbox" value="Y" checked>
+ <label for="l_donumber">Lieferscheinnummer</label>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <input name="l_ordnumber" id="l_ordnumber" class="checkbox" type="checkbox" value="Y" checked>
+ <label for="l_ordnumber">Auftragsnummer</label>
+ </td>
+
+ <td>
+ <input name="l_cusordnumber" id="l_cusordnumber" class="checkbox" type="checkbox" value="Y">
+ <label for="l_cusordnumber">Bestellnummer des Kunden</label>
+ </td>
+
+ [%- UNLESS is_customer %]
+ <td>
+ <input name="l_oreqnumber" id="l_oreqnumber" class="checkbox" type="checkbox" value="Y" checked>
+ <label for="l_oreqnumber">Bestellanfragenummer</label>
+ </td>
+ [%- END %]
+ </tr>
+
+ <tr>
+ <td>
+ <input name="l_transdate" id="l_transdate" class="checkbox" type="checkbox" value="Y" checked>
+ <label for="l_transdate">Datum</label>
+ </td>
+
+ <td>
+ <input name="l_name" id="l_name" class="checkbox" type="checkbox" value="Y" checked>
+ <label for="l_name">[% IF is_customer %]Kunde[% ELSE %]Lieferant[% END %]</label>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <input name="l_employee" id="l_employee" class="checkbox" type="checkbox" value="Y" checked>
+ <label for="l_employee">Bearbeiter</label>
+ </td>
+
+ <td>
+ <input name="l_salesman" id="l_salesman" class="checkbox" type="checkbox" value="Y">
+ <label for="l_salesman">Verkäufer/in</label>
+ </td>
+
+ <td>
+ <input name="l_shipvia" id="l_shipvia" class="checkbox" type="checkbox" value="Y">
+ <label for="l_shipvia">Transportmittel</label>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <input name="l_globalprojectnumber" id="l_globalprojectnumber" class="checkbox" type="checkbox" value="Y">
+ <label for="l_globalprojectnumber">Projektnummer</label>
+ </td>
+
+ <td>
+ <input name="l_transaction_description" id="l_transaction_description" class="checkbox" type="checkbox" value="Y">
+ <label for="l_transaction_description">Vorgangsbezeichnung</label>
+ </td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+ </table>
+ </p>
+
+ <hr size="3" noshade>
+
+ <p>
+ <input type="hidden" name="nextsub" value="orders">
+ <input type="hidden" name="vc" value="[% HTML.escape(vc) %]">
+ <input type="hidden" name="type" value="[% HTML.escape(type) %]">
+
+ <input class="submit" type="submit" name="action" value="Weiter">
+ </p>
+ </form>
+
+</body>
+</html>
+
--- /dev/null
+[% USE HTML %][% USE LxERP %]<body onload="on_load();">
+
+ [%- IF vc == 'customer' %]
+ [%- SET is_customer = '1' %]
+ [%- ELSE %]
+ [%- SET is_customer = '0' %]
+ [%- END %]
+
+ <script type="text/javascript">
+ <!--
+ function on_load() {
+ Calendar.setup({ inputField : "transdatefrom", ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "transdatefrom_trigger" });
+ Calendar.setup({ inputField : "transdateto", ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "transdateto_trigger" });
+ document.Form.donumber.focus();
+ }
+ -->
+ </script>
+
+ <style type="text/css">
+ .fixed_width {
+ width: 250px;
+ }
+ </style>
+
+ <form method="post" action="do.pl" name="Form">
+
+ <div class="listtop">[% title %]</div>
+
+ <p>
+ <table>
+ <tr>
+ <th align="right">[% IF is_customer %]<translate>Customer</translate>[% ELSE %]<translate>Vendor</translate>[% END %]</th>
+ <td colspan="3">
+ [%- UNLESS SHOW_VC_DROP_DOWN %]
+ <input type="text" name="[% HTML.escape(vc) %]" class="fixed_width">
+ [%- ELSE %]
+ <select name="[% vc %]" class="fixed_width">
+ <option></option>
+ [%- FOREACH row = ALL_VC %]
+ <option>[% HTML.escape(row.name) %]--[% HTML.escape(row.id) %]</option>
+ [%- END %]
+ </select>
+ <input type="hidden" name="select[% vc %]" value="1">
+ [%- END %]
+ </td>
+ </tr>
+
+ <tr>
+ <th align="right"><translate>Delivery Order Number</translate></th>
+ <td colspan="3"><input name="donumber" class="fixed_width"></td>
+ </tr>
+
+ <tr>
+ <th align="right"><translate>Order Number</translate></th>
+ <td colspan="3"><input name="ordnumber" class="fixed_width"></td>
+ </tr>
+
+ [%- UNLESS is_customer %]
+ <tr>
+ <th align="right"><translate>Order Request Number</translate></th>
+ <td colspan="3"><input name="oreqnumber" class="fixed_width"></td>
+ </tr>
+ [%- END %]
+
+ [%- IF ALL_DEPARTMENTS.size %]
+ <tr>
+ <th align="right" nowrap><translate>Department</translate></th>
+ <td colspan="3">
+ <select name="department" class="fixed_width">
+ <option></option>
+ [%- FOREACH row = ALL_DEPARTMENTS %]
+ <option[% IF department == row.value %] selected[% END %]>[% HTML.escape(row.description) %]--[% HTML.escape(row.id) %]</option>
+ [%- END %]
+ </select>
+ </td>
+ </tr>
+ [%- END %]
+
+ <tr>
+ <th align="right"><translate>Employee</translate></th>
+ <td>
+ <select name="employee_id" class="fixed_width">
+ <option></option>
+ [%- FOREACH row = ALL_EMPLOYEES %]
+ <option value="[% HTML.escape(row.id) %]">[% IF row.name %][% HTML.escape(row.name) %][% ELSE %][% HTML.escape(row.login) %][% END %]</option>
+ [%- END %]
+ </select>
+ </td>
+ </tr>
+
+ [%- IF is_customer %]
+ <tr>
+ <th align="right"><translate>Salesman</translate></th>
+ <td>
+ <select name="salesman_id" class="fixed_width">
+ <option></option>
+ [%- FOREACH row = ALL_SALESMEN %]
+ <option value="[% HTML.escape(row.id) %]">[% IF row.name %][% HTML.escape(row.name) %][% ELSE %][% HTML.escape(row.login) %][% END %]</option>
+ [%- END %]
+ </select>
+ </td>
+ </tr>
+ [%- END %]
+
+ <tr>
+ <th align="right"><translate>Transaction description</translate></th>
+ <td colspan="3"><input name="transaction_description" class="fixed_width"></td>
+ </tr>
+
+ <tr>
+ <th align="right"><translate>Customer Order Number</translate></th>
+ <td colspan="3"><input name="cusordnumber" class="fixed_width"></td>
+ </tr>
+
+ <tr>
+ <th align="right"><translate>Project Number</translate></th>
+ <td colspan="3">
+ <select name="project_id" class="fixed_width">
+ <option></option>
+ [%- FOREACH row = ALL_PROJECTS %]
+ <option value="[% HTML.escape(row.id) %]">[% HTML.escape(row.projectnumber) %]</option>
+ [%- END %]
+ </select>
+ </td>
+ </tr>
+
+ <tr>
+ <th align="right"><translate>From</translate></th>
+ <td>
+ <input name="transdatefrom" id="transdatefrom" size="11" title="[% myconfig_dateformat %]" onBlur="check_right_date_format(this)">
+ <input type="button" name="transdatefrom_button" id="transdatefrom_trigger" value="?">
+ </td>
+ <th align="right"><translate>Bis</translate></th>
+ <td>
+ <input name="transdateto" id="transdateto" size="11" title="[% myconfig_dateformat %]" onBlur="check_right_date_format(this)">
+ <input type="button" name="transdateto_button" id="transdateto_trigger" value="?">
+ </td>
+ </tr>
+
+ <tr>
+ <th align="right"><translate>Include in Report</translate></th>
+ <td colspan="5">
+ <table>
+ <tr>
+ <td>
+ <input type="checkbox" name="open" value="1" id="open" checked>
+ <label for="open"><translate>Open</translate></label>
+ </td>
+ <td>
+ <input type="checkbox" name="closed" value="1" id="closed">
+ <label for="closed"><translate>Closed</translate></label>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <input name="notdelivered" id="notdelivered" class="checkbox" type="checkbox" value="1" checked>
+ <label for="notdelivered"><translate>Not delivered</translate></label>
+ </td>
+ <td>
+ <input name="delivered" id="delivered" class="checkbox" type="checkbox" value="1" checked>
+ <label for="delivered"><translate>Delivered</translate></label></td>
+ </tr>
+
+ <tr>
+ <td>
+ <input name="l_id" id="l_id" class="checkbox" type="checkbox" value="Y">
+ <label for="l_id"><translate>ID</translate></label>
+ </td>
+
+ <td>
+ <input name="l_donumber" id="l_donumber" class="checkbox" type="checkbox" value="Y" checked>
+ <label for="l_donumber"><translate>Delivery Order Number</translate></label>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <input name="l_ordnumber" id="l_ordnumber" class="checkbox" type="checkbox" value="Y" checked>
+ <label for="l_ordnumber"><translate>Order Number</translate></label>
+ </td>
+
+ <td>
+ <input name="l_cusordnumber" id="l_cusordnumber" class="checkbox" type="checkbox" value="Y">
+ <label for="l_cusordnumber"><translate>Customer Order Number</translate></label>
+ </td>
+
+ [%- UNLESS is_customer %]
+ <td>
+ <input name="l_oreqnumber" id="l_oreqnumber" class="checkbox" type="checkbox" value="Y" checked>
+ <label for="l_oreqnumber"><translate>Order Request Number</translate></label>
+ </td>
+ [%- END %]
+ </tr>
+
+ <tr>
+ <td>
+ <input name="l_transdate" id="l_transdate" class="checkbox" type="checkbox" value="Y" checked>
+ <label for="l_transdate"><translate>Date</translate></label>
+ </td>
+
+ <td>
+ <input name="l_name" id="l_name" class="checkbox" type="checkbox" value="Y" checked>
+ <label for="l_name">[% IF is_customer %]<translate>Customer</translate>[% ELSE %]<translate>Vendor</translate>[% END %]</label>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <input name="l_employee" id="l_employee" class="checkbox" type="checkbox" value="Y" checked>
+ <label for="l_employee"><translate>Employee</translate></label>
+ </td>
+
+ <td>
+ <input name="l_salesman" id="l_salesman" class="checkbox" type="checkbox" value="Y">
+ <label for="l_salesman"><translate>Salesman</translate></label>
+ </td>
+
+ <td>
+ <input name="l_shipvia" id="l_shipvia" class="checkbox" type="checkbox" value="Y">
+ <label for="l_shipvia"><translate>Ship via</translate></label>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <input name="l_globalprojectnumber" id="l_globalprojectnumber" class="checkbox" type="checkbox" value="Y">
+ <label for="l_globalprojectnumber"><translate>Project Number</translate></label>
+ </td>
+
+ <td>
+ <input name="l_transaction_description" id="l_transaction_description" class="checkbox" type="checkbox" value="Y">
+ <label for="l_transaction_description"><translate>Transaction description</translate></label>
+ </td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+ </table>
+ </p>
+
+ <hr size="3" noshade>
+
+ <p>
+ <input type="hidden" name="nextsub" value="orders">
+ <input type="hidden" name="vc" value="[% HTML.escape(vc) %]">
+ <input type="hidden" name="type" value="[% HTML.escape(type) %]">
+
+ <input class="submit" type="submit" name="action" value="<translate>Continue</translate>">
+ </p>
+ </form>
+
+</body>
+</html>
+
--- /dev/null
+[% USE HTML %]<body onload="on_load();">
+
+ <script type="text/javascript">
+ <!--
+ function on_load() {
+ var row = document.getElementsByName("row")[0].value;
+ var stock = document.getElementsByName("stock")[0].value;
+ var in_out = document.getElementsByName("in_out")[0].value;
+
+ window.opener.document.getElementsByName("stock_" + in_out + "_" + row)[0].value = stock;
+
+ window.close();
+ }
+ -->
+ </script>
+
+ <form name="data">
+ <input type="hidden" name="row" value="[% HTML.escape(row) %]">
+ <input type="hidden" name="stock" value="[% HTML.escape(stock) %]">
+ <input type="hidden" name="in_out" value="[% HTML.escape(in_out) %]">
+ </form>
+
+</body>
+</html>
--- /dev/null
+[% USE HTML %]<body onload="on_load();">
+
+ <script type="text/javascript">
+ <!--
+ function on_load() {
+ var row = document.getElementsByName("row")[0].value;
+ var stock = document.getElementsByName("stock")[0].value;
+ var in_out = document.getElementsByName("in_out")[0].value;
+
+ window.opener.document.getElementsByName("stock_" + in_out + "_" + row)[0].value = stock;
+
+ window.close();
+ }
+ -->
+ </script>
+
+ <form name="data">
+ <input type="hidden" name="row" value="[% HTML.escape(row) %]">
+ <input type="hidden" name="stock" value="[% HTML.escape(stock) %]">
+ <input type="hidden" name="in_out" value="[% HTML.escape(in_out) %]">
+ </form>
+
+</body>
+</html>
--- /dev/null
+[% USE HTML %][% USE LxERP %][% USE JavaScript %]<body[% UNLESS closed %] onload="on_load();"[% END %]>
+
+ [%- UNLESS closed %]
+ <script type="text/javascript">
+ <!--
+ warehouses = new Array();
+ [% USE WAREHOUSES_it = Iterator(WAREHOUSES) %][% FOREACH wh = WAREHOUSES_it %]
+ warehouses[[% WAREHOUSES_it.count - 1 %]] = new Array();
+ [% USE BINS_it = Iterator(wh.BINS) %][% FOREACH bin = BINS_it %]warehouses[[% WAREHOUSES_it.count - 1 %]][[% BINS_it.count - 1 %]] = ["[% JavaScript.escape(bin.description) %]", "[% JavaScript.escape(bin.id) %]"];
+ [% END %]
+ [% END %]
+
+ function warehouse_selected(row, index, initial_bin_index) {
+ var cname = "bin_id_" + row;
+ var control = document.getElementById(cname);
+
+ for (var i = control.options.length - 1; i >= 0; i--) {
+ control.options[i] = null;
+ }
+
+ for (i = 0; i < warehouses[index].length; i++) {
+ control.options[i] = new Option(warehouses[index][i][0], warehouses[index][i][1]);
+ }
+
+ if (!initial_bin_index)
+ initial_bin_index = 0;
+ control.options[initial_bin_index].selected = true;
+ }
+
+ function on_load() {
+ [%- USE STOCK_INFO_it = Iterator(STOCK_INFO) %][%- FOREACH si = STOCK_INFO_it %]
+ // new si for wh [% si.warehouse_id %] bin [% si.bin_id %]
+ [%- SET warehouse_selected = '0' %]
+ [%- USE WAREHOUSES_it = Iterator(WAREHOUSES) %][%- FOREACH wh = WAREHOUSES_it %]
+ // wh [% wh.id %]
+ [%- USE BINS_it = Iterator(wh.BINS) %][%- FOREACH bin = BINS_it %]
+ // bin [% bin.id %]
+ [%- IF bin.id == si.bin_id %]
+ warehouse_selected([% STOCK_INFO_it.count %], [% WAREHOUSES_it.count - 1 %], [% BINS_it.count - 1%]);
+ [%- SET warehouse_selected = '1' %]
+ [%- END %]
+ [%- END %]
+ [%- END %]
+ [%- UNLESS warehouse_selected %]
+ warehouse_selected([% STOCK_INFO_it.count %], 0);
+ [%- END %]
+ [%- END %]
+ }
+ -->
+ </script>
+ [%- END %]
+
+ <form method="post" action="do.pl" name="Form">
+
+ <div class="listtop">[% title %]</div>
+
+ [%- IF ERRORS && ERRORS.size %]
+ <p><font color="#ff0000">[% ERRORS.join('<br>') %]</font></p>
+ [%- END %]
+
+ <p>
+ <table>
+ <tr>
+ <td>Artikelnummer</td>
+ <td>[% HTML.escape(PART_INFO.partnumber) %]</td>
+ </tr>
+ <tr>
+ <td>Beschreibung</td>
+ <td>[% HTML.escape(PART_INFO.description) %]</td>
+ </tr>
+ <tr>
+ <td>Menge laut Lieferschein</td>
+ <td>[% HTML.escape(do_qty) %] [% HTML.escape(do_unit) %]</td>
+ </tr>
+ </table>
+ </p>
+
+ <input type="hidden" name="nextsub" value="set_stock_in">
+ <input type="hidden" name="update_nextsub" value="update_stock_in">
+ <input type="hidden" name="rowcount" value="[% HTML.escape(STOCK_INFO.size) %]">
+ <input type="hidden" name="in_out" value="in">
+ <input type="hidden" name="parts_id" value="[% HTML.escape(parts_id) %]">
+ <input type="hidden" name="partunit" value="[% HTML.escape(PART_INFO.unit) %]">
+ <input type="hidden" name="do_qty" value="[% HTML.escape(do_qty) %]">
+ <input type="hidden" name="do_unit" value="[% HTML.escape(do_unit) %]">
+ <input type="hidden" name="row" value="[% HTML.escape(row) %]">
+
+ <p>
+ <table>
+ <tr class="listheading">
+ <th class="listheading"> </th>
+ <th class="listheading">Lager</th>
+ <th class="listheading">Lagerplatz</th>
+ <th class="listheading">Chargennummer</th>
+ <th align="right" class="listheading">Menge</th>
+ <th align="right" class="listheading">Einheit</th>
+ </tr>
+
+ [%- FOREACH row = STOCK_INFO %]
+ <tr [% IF row.stock_error %] class="tr_error"[% ELSE %]class="listrow[% loop.count % 2 %]"[% END %]>
+ <td>[% loop.count %]</td>
+
+ [%- IF closed %]
+
+ <td>[% HTML.escape(row.warehouse_description) %]</td>
+ <td>[% HTML.escape(row.bin_description) %]</td>
+ <td>[% HTML.escape(row.chargenumber) %]</td>
+ <td>[% HTML.escape(LxERP.format_amount(row.qty)) %]</td>
+ <td>[% HTML.escape(row.unit) %]</td>
+
+ [%- ELSE %]
+
+ <td>
+ <select name="warehouse_id_[% loop.count %]" onchange="warehouse_selected([% loop.count %], this.selectedIndex)">
+ [%- FOREACH wh = WAREHOUSES %]
+ <option value="[% HTML.escape(wh.id) %]"[% IF wh.id == row.warehouse_id %] selected[% END %]>[% HTML.escape(wh.description) %]</option>
+ [%- END %]
+ </select>
+ </td>
+
+ <td><select name="bin_id_[% loop.count %]" id="bin_id_[% loop.count %]"></select></td>
+ <td><input name="chargenumber_[% loop.count %]" value="[% HTML.escape(row.chargenumber) %]"></td>
+ <td><input name="qty_[% loop.count %]" size="12" value="[% HTML.escape(LxERP.format_amount(row.qty)) %]"></td>
+
+ <td>
+ <select name="unit_[% loop.count %]">
+ [%- FOREACH unit = UNITS %]
+ <option[% IF unit.name == row.unit %] selected[% END %]>[% HTML.escape(unit.name) %]</option>
+ [%- END %]
+ </select>
+ </td>
+
+ [%- END %]
+ </tr>
+
+ [%- END %]
+ </table>
+ </p>
+
+ <hr size="3" noshade>
+
+ <p>
+ [%- IF closed %]
+ <button type="button" class="submit" name="action" onclick="window.close()">Fenster Schließen</button>
+ [%- ELSE %]
+ <input class="submit" type="submit" name="action" value="Erneuern">
+ <input class="submit" type="submit" name="action" value="Weiter">
+ [%- END %]
+ </p>
+ </form>
+
+</body>
+</html>
+
--- /dev/null
+[% USE HTML %][% USE LxERP %][% USE JavaScript %]<body[% UNLESS closed %] onload="on_load();"[% END %]>
+
+ [%- UNLESS closed %]
+ <script type="text/javascript">
+ <!--
+ warehouses = new Array();
+ [% USE WAREHOUSES_it = Iterator(WAREHOUSES) %][% FOREACH wh = WAREHOUSES_it %]
+ warehouses[[% WAREHOUSES_it.count - 1 %]] = new Array();
+ [% USE BINS_it = Iterator(wh.BINS) %][% FOREACH bin = BINS_it %]warehouses[[% WAREHOUSES_it.count - 1 %]][[% BINS_it.count - 1 %]] = ["[% JavaScript.escape(bin.description) %]", "[% JavaScript.escape(bin.id) %]"];
+ [% END %]
+ [% END %]
+
+ function warehouse_selected(row, index, initial_bin_index) {
+ var cname = "bin_id_" + row;
+ var control = document.getElementById(cname);
+
+ for (var i = control.options.length - 1; i >= 0; i--) {
+ control.options[i] = null;
+ }
+
+ for (i = 0; i < warehouses[index].length; i++) {
+ control.options[i] = new Option(warehouses[index][i][0], warehouses[index][i][1]);
+ }
+
+ if (!initial_bin_index)
+ initial_bin_index = 0;
+ control.options[initial_bin_index].selected = true;
+ }
+
+ function on_load() {
+ [%- USE STOCK_INFO_it = Iterator(STOCK_INFO) %][%- FOREACH si = STOCK_INFO_it %]
+ // new si for wh [% si.warehouse_id %] bin [% si.bin_id %]
+ [%- SET warehouse_selected = '0' %]
+ [%- USE WAREHOUSES_it = Iterator(WAREHOUSES) %][%- FOREACH wh = WAREHOUSES_it %]
+ // wh [% wh.id %]
+ [%- USE BINS_it = Iterator(wh.BINS) %][%- FOREACH bin = BINS_it %]
+ // bin [% bin.id %]
+ [%- IF bin.id == si.bin_id %]
+ warehouse_selected([% STOCK_INFO_it.count %], [% WAREHOUSES_it.count - 1 %], [% BINS_it.count - 1%]);
+ [%- SET warehouse_selected = '1' %]
+ [%- END %]
+ [%- END %]
+ [%- END %]
+ [%- UNLESS warehouse_selected %]
+ warehouse_selected([% STOCK_INFO_it.count %], 0);
+ [%- END %]
+ [%- END %]
+ }
+ -->
+ </script>
+ [%- END %]
+
+ <form method="post" action="do.pl" name="Form">
+
+ <div class="listtop">[% title %]</div>
+
+ [%- IF ERRORS && ERRORS.size %]
+ <p><font color="#ff0000">[% ERRORS.join('<br>') %]</font></p>
+ [%- END %]
+
+ <p>
+ <table>
+ <tr>
+ <td><translate>Part Number</translate></td>
+ <td>[% HTML.escape(PART_INFO.partnumber) %]</td>
+ </tr>
+ <tr>
+ <td><translate>Description</translate></td>
+ <td>[% HTML.escape(PART_INFO.description) %]</td>
+ </tr>
+ <tr>
+ <td><translate>Qty according to delivery order</translate></td>
+ <td>[% HTML.escape(do_qty) %] [% HTML.escape(do_unit) %]</td>
+ </tr>
+ </table>
+ </p>
+
+ <input type="hidden" name="nextsub" value="set_stock_in">
+ <input type="hidden" name="update_nextsub" value="update_stock_in">
+ <input type="hidden" name="rowcount" value="[% HTML.escape(STOCK_INFO.size) %]">
+ <input type="hidden" name="in_out" value="in">
+ <input type="hidden" name="parts_id" value="[% HTML.escape(parts_id) %]">
+ <input type="hidden" name="partunit" value="[% HTML.escape(PART_INFO.unit) %]">
+ <input type="hidden" name="do_qty" value="[% HTML.escape(do_qty) %]">
+ <input type="hidden" name="do_unit" value="[% HTML.escape(do_unit) %]">
+ <input type="hidden" name="row" value="[% HTML.escape(row) %]">
+
+ <p>
+ <table>
+ <tr class="listheading">
+ <th class="listheading"> </th>
+ <th class="listheading"><translate>Warehouse</translate></th>
+ <th class="listheading"><translate>Bin</translate></th>
+ <th class="listheading"><translate>Charge Number</translate></th>
+ <th align="right" class="listheading"><translate>Qty</translate></th>
+ <th align="right" class="listheading"><translate>Unit</translate></th>
+ </tr>
+
+ [%- FOREACH row = STOCK_INFO %]
+ <tr [% IF row.stock_error %] class="tr_error"[% ELSE %]class="listrow[% loop.count % 2 %]"[% END %]>
+ <td>[% loop.count %]</td>
+
+ [%- IF closed %]
+
+ <td>[% HTML.escape(row.warehouse_description) %]</td>
+ <td>[% HTML.escape(row.bin_description) %]</td>
+ <td>[% HTML.escape(row.chargenumber) %]</td>
+ <td>[% HTML.escape(LxERP.format_amount(row.qty)) %]</td>
+ <td>[% HTML.escape(row.unit) %]</td>
+
+ [%- ELSE %]
+
+ <td>
+ <select name="warehouse_id_[% loop.count %]" onchange="warehouse_selected([% loop.count %], this.selectedIndex)">
+ [%- FOREACH wh = WAREHOUSES %]
+ <option value="[% HTML.escape(wh.id) %]"[% IF wh.id == row.warehouse_id %] selected[% END %]>[% HTML.escape(wh.description) %]</option>
+ [%- END %]
+ </select>
+ </td>
+
+ <td><select name="bin_id_[% loop.count %]" id="bin_id_[% loop.count %]"></select></td>
+ <td><input name="chargenumber_[% loop.count %]" value="[% HTML.escape(row.chargenumber) %]"></td>
+ <td><input name="qty_[% loop.count %]" size="12" value="[% HTML.escape(LxERP.format_amount(row.qty)) %]"></td>
+
+ <td>
+ <select name="unit_[% loop.count %]">
+ [%- FOREACH unit = UNITS %]
+ <option[% IF unit.name == row.unit %] selected[% END %]>[% HTML.escape(unit.name) %]</option>
+ [%- END %]
+ </select>
+ </td>
+
+ [%- END %]
+ </tr>
+
+ [%- END %]
+ </table>
+ </p>
+
+ <hr size="3" noshade>
+
+ <p>
+ [%- IF closed %]
+ <button type="button" class="submit" name="action" onclick="window.close()"><translate>Close Window</translate></button>
+ [%- ELSE %]
+ <input class="submit" type="submit" name="action" value="<translate>Update</translate>">
+ <input class="submit" type="submit" name="action" value="<translate>Continue</translate>">
+ [%- END %]
+ </p>
+ </form>
+
+</body>
+</html>
+
--- /dev/null
+[% USE HTML %][% USE LxERP %]<body>
+
+ [%- IF closed %]
+ [%- SET RO = ' readonly' %]
+ [%- END %]
+
+ <style type="text/css">
+ .tr_error {
+ background-color: #ffc9c9;
+ }
+ </style>
+
+ <form method="post" action="do.pl" name="Form">
+
+ <div class="listtop">[% title %]</div>
+
+ [%- IF ERRORS && ERRORS.size %]
+ <p><font color="#ff0000">[% ERRORS.join('<br>') %]</font></p>
+ [%- END %]
+
+ <p>
+ <table>
+ <tr>
+ <td>Artikelnummer</td>
+ <td>[% HTML.escape(PART_INFO.partnumber) %]</td>
+ </tr>
+ <tr>
+ <td>Beschreibung</td>
+ <td>[% HTML.escape(PART_INFO.description) %]</td>
+ </tr>
+ <tr>
+ <td>Menge laut Lieferschein</td>
+ <td>[% HTML.escape(do_qty) %] [% HTML.escape(do_unit) %]</td>
+ </tr>
+ </table>
+ </p>
+
+ [%- UNLESS WHCONTENTS.size %]
+ <p>Dieser Artikel ist nicht eingelagert.</p>
+
+ <p><button type="button" onclick="window.close()">Übernehmen</button></p>
+
+ [%- ELSE %]
+
+ <input type="hidden" name="nextsub" value="set_stock_out">
+ <input type="hidden" name="rowcount" value="[% HTML.escape(WHCONTENTS.size) %]">
+ <input type="hidden" name="in_out" value="out">
+ <input type="hidden" name="parts_id" value="[% HTML.escape(parts_id) %]">
+ <input type="hidden" name="partunit" value="[% HTML.escape(PART_INFO.unit) %]">
+ <input type="hidden" name="do_qty" value="[% HTML.escape(do_qty) %]">
+ <input type="hidden" name="do_unit" value="[% HTML.escape(do_unit) %]">
+ <input type="hidden" name="row" value="[% HTML.escape(row) %]">
+ <input type="hidden" name="closed" value="[% HTML.escape(closed) %]">
+
+ <p>
+ <table>
+ <tr class="listheading">
+ <th class="listheading"> </th>
+ <th class="listheading">Lager</th>
+ <th class="listheading">Lagerplatz</th>
+ <th class="listheading">Chargennummer</th>
+ [%- UNLESS closed %]
+ <th align="right" class="listheading">Lagerbestand</th>
+ [%- END %]
+ <th align="right" class="listheading">Menge</th>
+ <th align="right" class="listheading">Einheit</th>
+ </tr>
+
+ [%- FOREACH row = WHCONTENTS %]
+ <tr [% IF row.stock_error %] class="tr_error"[% ELSE %]class="listrow[% loop.count % 2 %]"[% END %]>
+ <td>[% loop.count %]</td>
+ <td>[% HTML.escape(row.warehousedescription) %]</td>
+ <td>[% HTML.escape(row.bindescription) %]</td>
+ <td>[% HTML.escape(row.chargenumber) %]</td>
+
+ [%- IF closed %]
+
+ <td>[% HTML.escape(LxERP.format_amount(row.stock_qty)) %]</td>
+ <td>[% HTML.escape(row.stock_unit) %]</td>
+
+ [%- ELSE %]
+
+ <td>[% HTML.escape(row.available_qty) %]</td>
+ <td><input name="qty_[% loop.count %]" style="text-align: right;" size="12"
+ value="[% IF row.stock_qty %][% HTML.escape(LxERP.format_amount(row.stock_qty)) %][% END %]"></td>
+ <td>
+ <select name="unit_[% loop.count %]">
+ [%- FOREACH unit = UNITS %]
+ <option[% IF unit.name == row.stock_unit %] selected[% END %]>[% HTML.escape(unit.name) %]</option>
+ [%- END %]
+ </select>
+ </td>
+
+ [%- END %]
+ </tr>
+
+ <input type="hidden" name="warehouse_id_[% loop.count %]" value="[% HTML.escape(row.warehouse_id) %]">
+ <input type="hidden" name="bin_id_[% loop.count %]" value="[% HTML.escape(row.bin_id) %]">
+ <input type="hidden" name="chargenumber_[% loop.count %]" value="[% HTML.escape(row.chargenumber) %]">
+ [%- END %]
+ </table>
+ </p>
+
+ <hr size="3" noshade>
+
+ <p>
+ [%- IF closed %]
+ <button type="button" class="submit" name="action" onclick="window.close()">Fenster Schließen</button>
+ [%- ELSE %]
+ <input class="submit" type="submit" name="action" value="Weiter">
+ [%- END %]
+ </p>
+
+ [%- END %]
+ </form>
+
+</body>
+</html>
+
--- /dev/null
+[% USE HTML %][% USE LxERP %]<body>
+
+ [%- IF closed %]
+ [%- SET RO = ' readonly' %]
+ [%- END %]
+
+ <style type="text/css">
+ .tr_error {
+ background-color: #ffc9c9;
+ }
+ </style>
+
+ <form method="post" action="do.pl" name="Form">
+
+ <div class="listtop">[% title %]</div>
+
+ [%- IF ERRORS && ERRORS.size %]
+ <p><font color="#ff0000">[% ERRORS.join('<br>') %]</font></p>
+ [%- END %]
+
+ <p>
+ <table>
+ <tr>
+ <td><translate>Part Number</translate></td>
+ <td>[% HTML.escape(PART_INFO.partnumber) %]</td>
+ </tr>
+ <tr>
+ <td><translate>Description</translate></td>
+ <td>[% HTML.escape(PART_INFO.description) %]</td>
+ </tr>
+ <tr>
+ <td><translate>Qty according to delivery order</translate></td>
+ <td>[% HTML.escape(do_qty) %] [% HTML.escape(do_unit) %]</td>
+ </tr>
+ </table>
+ </p>
+
+ [%- UNLESS WHCONTENTS.size %]
+ <p><translate>There are no items in stock.</translate></p>
+
+ <p><button type="button" onclick="window.close()"><translate>Close</translate></button></p>
+
+ [%- ELSE %]
+
+ <input type="hidden" name="nextsub" value="set_stock_out">
+ <input type="hidden" name="rowcount" value="[% HTML.escape(WHCONTENTS.size) %]">
+ <input type="hidden" name="in_out" value="out">
+ <input type="hidden" name="parts_id" value="[% HTML.escape(parts_id) %]">
+ <input type="hidden" name="partunit" value="[% HTML.escape(PART_INFO.unit) %]">
+ <input type="hidden" name="do_qty" value="[% HTML.escape(do_qty) %]">
+ <input type="hidden" name="do_unit" value="[% HTML.escape(do_unit) %]">
+ <input type="hidden" name="row" value="[% HTML.escape(row) %]">
+ <input type="hidden" name="closed" value="[% HTML.escape(closed) %]">
+
+ <p>
+ <table>
+ <tr class="listheading">
+ <th class="listheading"> </th>
+ <th class="listheading"><translate>Warehouse</translate></th>
+ <th class="listheading"><translate>Bin</translate></th>
+ <th class="listheading"><translate>Charge Number</translate></th>
+ [%- UNLESS closed %]
+ <th align="right" class="listheading"><translate>Available qty</translate></th>
+ [%- END %]
+ <th align="right" class="listheading"><translate>Qty</translate></th>
+ <th align="right" class="listheading"><translate>Unit</translate></th>
+ </tr>
+
+ [%- FOREACH row = WHCONTENTS %]
+ <tr [% IF row.stock_error %] class="tr_error"[% ELSE %]class="listrow[% loop.count % 2 %]"[% END %]>
+ <td>[% loop.count %]</td>
+ <td>[% HTML.escape(row.warehousedescription) %]</td>
+ <td>[% HTML.escape(row.bindescription) %]</td>
+ <td>[% HTML.escape(row.chargenumber) %]</td>
+
+ [%- IF closed %]
+
+ <td>[% HTML.escape(LxERP.format_amount(row.stock_qty)) %]</td>
+ <td>[% HTML.escape(row.stock_unit) %]</td>
+
+ [%- ELSE %]
+
+ <td>[% HTML.escape(row.available_qty) %]</td>
+ <td><input name="qty_[% loop.count %]" style="text-align: right;" size="12"
+ value="[% IF row.stock_qty %][% HTML.escape(LxERP.format_amount(row.stock_qty)) %][% END %]"></td>
+ <td>
+ <select name="unit_[% loop.count %]">
+ [%- FOREACH unit = UNITS %]
+ <option[% IF unit.name == row.stock_unit %] selected[% END %]>[% HTML.escape(unit.name) %]</option>
+ [%- END %]
+ </select>
+ </td>
+
+ [%- END %]
+ </tr>
+
+ <input type="hidden" name="warehouse_id_[% loop.count %]" value="[% HTML.escape(row.warehouse_id) %]">
+ <input type="hidden" name="bin_id_[% loop.count %]" value="[% HTML.escape(row.bin_id) %]">
+ <input type="hidden" name="chargenumber_[% loop.count %]" value="[% HTML.escape(row.chargenumber) %]">
+ [%- END %]
+ </table>
+ </p>
+
+ <hr size="3" noshade>
+
+ <p>
+ [%- IF closed %]
+ <button type="button" class="submit" name="action" onclick="window.close()"><translate>Close Window</translate></button>
+ [%- ELSE %]
+ <input class="submit" type="submit" name="action" value="<translate>Continue</translate>">
+ [%- END %]
+ </p>
+
+ [%- END %]
+ </form>
+
+</body>
+</html>
+