From: Moritz Bunkus Date: Fri, 18 Jan 2008 17:01:49 +0000 (+0000) Subject: Lieferscheine im Einkauf und Verkauf. Bisher nur gemerget, noch nicht getestet. X-Git-Tag: release-2.6.0beta1~325 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=d707f7ac60b9dbe7da50d733db1e73eae84952f7;p=kivitendo-erp.git Lieferscheine im Einkauf und Verkauf. Bisher nur gemerget, noch nicht getestet. --- diff --git a/SL/DO.pm b/SL/DO.pm new file mode 100644 index 000000000..e96a6adb8 --- /dev/null +++ b/SL/DO.pm @@ -0,0 +1,881 @@ +#==================================================================== +# 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; diff --git a/SL/Form.pm b/SL/Form.pm index db7372539..d7da58c16 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -53,7 +53,7 @@ use SL::Menu; 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; @@ -1257,18 +1257,20 @@ sub get_formname_translation { $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} @@ -1278,10 +1280,11 @@ sub generate_attachment_filename { 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"} diff --git a/SL/User.pm b/SL/User.pm index ea1896377..212175aac 100644 --- a/SL/User.pm +++ b/SL/User.pm @@ -955,7 +955,8 @@ sub config_vars { 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(); diff --git a/bin/mozilla/do.pl b/bin/mozilla/do.pl new file mode 100644 index 000000000..b26250059 --- /dev/null +++ b/bin/mozilla/do.pl @@ -0,0 +1,1145 @@ +# #===================================================================== +# 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||; + #/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| |; + + $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'); +} diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl index c5fc66103..081bc3f61 100644 --- a/bin/mozilla/io.pl +++ b/bin/mozilla/io.pl @@ -96,13 +96,28 @@ sub display_row { $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); @@ -118,11 +133,12 @@ sub display_row { { 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; @@ -153,7 +169,7 @@ sub display_row { $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; @@ -261,6 +277,10 @@ sub display_row { $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 @@ -305,6 +325,12 @@ sub display_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 => $_}, ( @@ -633,7 +659,8 @@ sub check_form { 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') { @@ -999,7 +1026,8 @@ sub print_options { $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 = @_; @@ -1030,8 +1058,6 @@ sub print_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, @@ -1040,12 +1066,15 @@ sub print_options { ($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; @@ -1152,7 +1181,8 @@ sub print_form { $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) = @_; @@ -1214,13 +1244,6 @@ sub print_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"; @@ -1264,6 +1287,14 @@ sub print_form { $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", @@ -1412,7 +1443,7 @@ sub print_form { $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 diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index 2c613a896..2a90fc6df 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -1967,6 +1967,53 @@ sub poso { $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(); @@ -2003,6 +2050,8 @@ sub display_form { 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"})) { diff --git a/do.pl b/do.pl new file mode 120000 index 000000000..385000d1b --- /dev/null +++ b/do.pl @@ -0,0 +1 @@ +am.pl \ No newline at end of file diff --git a/locale/de/admin b/locale/de/admin index 45cc5acef..966708ec1 100644 --- a/locale/de/admin +++ b/locale/de/admin @@ -53,6 +53,7 @@ $self->{texts} = { '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', diff --git a/locale/de/all b/locale/de/all index f1255be29..a01295ad7 100644 --- a/locale/de/all +++ b/locale/de/all @@ -104,6 +104,7 @@ $self->{texts} = { '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', @@ -120,10 +121,12 @@ $self->{texts} = { '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', @@ -165,6 +168,7 @@ $self->{texts} = { '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?', @@ -253,6 +257,7 @@ aktualisieren wollen?', '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!', @@ -300,6 +305,7 @@ aktualisieren wollen?', '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', @@ -307,6 +313,7 @@ aktualisieren wollen?', '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', @@ -429,10 +436,17 @@ aktualisieren wollen?', '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.', @@ -460,6 +474,7 @@ aktualisieren wollen?', '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 limit your search?' => 'Wollen Sie Ihre Suche spezialisieren?', '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.', @@ -530,9 +545,11 @@ aktualisieren wollen?', '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', @@ -551,6 +568,7 @@ aktualisieren wollen?', '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', @@ -567,6 +585,9 @@ aktualisieren wollen?', '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', @@ -603,6 +624,7 @@ aktualisieren wollen?', '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', @@ -1080,6 +1102,7 @@ aktualisieren wollen?', '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.', @@ -1112,6 +1135,7 @@ aktualisieren wollen?', 'Record in' => 'Buchen auf', 'Reference' => 'Referenz', 'Reference missing!' => 'Referenz fehlt!', + 'Release From Stock' => 'Lagerausgang', 'Remaining' => 'Rest', 'Removal' => 'Entnahme', 'Removal from Warehouse' => 'Lagerentnahme', @@ -1330,6 +1354,7 @@ aktualisieren wollen?', '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', @@ -1395,9 +1420,11 @@ aktualisieren wollen?', '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.', @@ -1439,7 +1466,10 @@ aktualisieren wollen?', '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', @@ -1521,10 +1551,12 @@ aktualisieren wollen?', '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 term you\'re looking for?' => 'Nach welchem Begriff 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', @@ -1577,6 +1609,7 @@ aktualisieren wollen?', 'bis' => 'bis', 'button' => '?', 'cash' => 'E/Ü-Rechnung (Ist-Versteuerung)', + 'chargenumber #1' => 'Chargennummer #1', 'chart_of_accounts' => 'kontenuebersicht', 'choice' => 'auswählen', 'choice part' => 'Artikel auswählen', @@ -1626,6 +1659,7 @@ aktualisieren wollen?', 'month' => 'Monatliche Abgabe', 'new Window' => 'neues Fenster', 'no' => 'nein', + 'no chargenumber' => 'keine Chargennummer', 'none (pricegroup)' => 'keine', 'number' => 'Nummer', 'order' => 'Reihenfolge', @@ -1641,6 +1675,7 @@ aktualisieren wollen?', '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', @@ -1652,6 +1687,7 @@ aktualisieren wollen?', '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', diff --git a/locale/de/am b/locale/de/am index 97f687aed..0079ac547 100644 --- a/locale/de/am +++ b/locale/de/am @@ -118,6 +118,7 @@ $self->{texts} = { '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', diff --git a/locale/de/amcvar b/locale/de/amcvar index 9267fdff9..45925483b 100644 --- a/locale/de/amcvar +++ b/locale/de/amcvar @@ -37,6 +37,7 @@ $self->{texts} = { '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', diff --git a/locale/de/amtemplates b/locale/de/amtemplates index 31171c089..ba13aedbe 100644 --- a/locale/de/amtemplates +++ b/locale/de/amtemplates @@ -39,6 +39,7 @@ $self->{texts} = { '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', diff --git a/locale/de/ap b/locale/de/ap index 92d33488f..db6c676c4 100644 --- a/locale/de/ap +++ b/locale/de/ap @@ -74,6 +74,7 @@ $self->{texts} = { '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', diff --git a/locale/de/ar b/locale/de/ar index 0d49eab30..8608db8e6 100644 --- a/locale/de/ar +++ b/locale/de/ar @@ -77,6 +77,7 @@ $self->{texts} = { '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', diff --git a/locale/de/arap b/locale/de/arap index 5af4d700b..0498897f0 100644 --- a/locale/de/arap +++ b/locale/de/arap @@ -39,6 +39,7 @@ $self->{texts} = { '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', diff --git a/locale/de/bp b/locale/de/bp index fc2d7c40a..4673bb70b 100644 --- a/locale/de/bp +++ b/locale/de/bp @@ -44,6 +44,7 @@ $self->{texts} = { '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', diff --git a/locale/de/ca b/locale/de/ca index f06fdf5d9..e56b7881c 100644 --- a/locale/de/ca +++ b/locale/de/ca @@ -47,6 +47,7 @@ $self->{texts} = { 'Debit' => 'Soll', 'Dec' => 'Dez', 'December' => 'Dezember', + 'Delivery Order' => 'Lieferschein', 'Department' => 'Abteilung', 'Dependency loop detected:' => 'Schleife in den Abhängigkeiten entdeckt:', 'Description' => 'Beschreibung', diff --git a/locale/de/common b/locale/de/common index b5c8c5b27..38b565b7e 100644 --- a/locale/de/common +++ b/locale/de/common @@ -36,6 +36,7 @@ $self->{texts} = { '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', diff --git a/locale/de/cp b/locale/de/cp index 0f250f426..16bb41775 100644 --- a/locale/de/cp +++ b/locale/de/cp @@ -49,6 +49,7 @@ $self->{texts} = { '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', diff --git a/locale/de/ct b/locale/de/ct index ad88ce7b1..5aa02c6cc 100644 --- a/locale/de/ct +++ b/locale/de/ct @@ -52,6 +52,7 @@ $self->{texts} = { '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', diff --git a/locale/de/datev b/locale/de/datev index 4cf653960..74875a01c 100644 --- a/locale/de/datev +++ b/locale/de/datev @@ -48,6 +48,7 @@ $self->{texts} = { 'Date' => 'Datum', 'Datum von' => 'Datum von', 'December' => 'Dezember', + 'Delivery Order' => 'Lieferschein', 'Dependency loop detected:' => 'Schleife in den Abhängigkeiten entdeckt:', 'Directory' => 'Verzeichnis', 'ELSE' => 'Zusatz', diff --git a/locale/de/dn b/locale/de/dn index aee0277a8..5641b7144 100644 --- a/locale/de/dn +++ b/locale/de/dn @@ -69,6 +69,7 @@ $self->{texts} = { 'Dec' => 'Dez', 'December' => 'Dezember', 'Delivery Date' => 'Lieferdatum', + 'Delivery Order' => 'Lieferschein', 'Department' => 'Abteilung', 'Dependency loop detected:' => 'Schleife in den Abhängigkeiten entdeckt:', 'Directory' => 'Verzeichnis', @@ -186,6 +187,7 @@ $self->{texts} = { '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', @@ -233,6 +235,7 @@ $self->{texts} = { '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\'.', diff --git a/locale/de/do b/locale/de/do new file mode 100644 index 000000000..122f3952a --- /dev/null +++ b/locale/de/do @@ -0,0 +1,404 @@ +#!/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; diff --git a/locale/de/drafts b/locale/de/drafts index b3c3a4831..2bf4f105e 100644 --- a/locale/de/drafts +++ b/locale/de/drafts @@ -37,6 +37,7 @@ $self->{texts} = { '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.', diff --git a/locale/de/fu b/locale/de/fu index 02e6fd8d6..7ef5e3ecf 100644 --- a/locale/de/fu +++ b/locale/de/fu @@ -45,6 +45,7 @@ $self->{texts} = { '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', diff --git a/locale/de/gl b/locale/de/gl index 40c343841..ad9ad91cb 100644 --- a/locale/de/gl +++ b/locale/de/gl @@ -79,6 +79,7 @@ $self->{texts} = { 'Dec' => 'Dez', 'December' => 'Dezember', 'Delete' => 'Löschen', + 'Delivery Order' => 'Lieferschein', 'Department' => 'Abteilung', 'Dependency loop detected:' => 'Schleife in den Abhängigkeiten entdeckt:', 'Description' => 'Beschreibung', diff --git a/locale/de/ic b/locale/de/ic index 7fcf2abb2..ff3055df3 100644 --- a/locale/de/ic +++ b/locale/de/ic @@ -78,6 +78,7 @@ $self->{texts} = { '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', @@ -217,6 +218,7 @@ $self->{texts} = { 'RFQ' => 'Anfrage', 'ROP' => 'Mindestlagerbestand', 'Receipt, payment, reconciliation' => 'Zahlungseingang, Zahlungsausgang, Kontenabgleich', + 'Release From Stock' => 'Lagerausgang', 'Reports' => 'Berichte', 'Reqdate' => 'Lieferdatum', 'Request for Quotation' => 'Anfrage', @@ -273,6 +275,7 @@ $self->{texts} = { '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', diff --git a/locale/de/io b/locale/de/io index 22c0e8103..87c6af758 100644 --- a/locale/de/io +++ b/locale/de/io @@ -59,6 +59,7 @@ $self->{texts} = { 'Dec' => 'Dez', 'December' => 'Dezember', 'Delivery Date' => 'Lieferdatum', + 'Delivery Order' => 'Lieferschein', 'Department' => 'Abteilung', 'Dependency loop detected:' => 'Schleife in den Abhängigkeiten entdeckt:', 'Directory' => 'Verzeichnis', @@ -158,6 +159,7 @@ $self->{texts} = { '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', @@ -199,6 +201,7 @@ $self->{texts} = { '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\'.', diff --git a/locale/de/ir b/locale/de/ir index 5223f35fb..c83a94737 100644 --- a/locale/de/ir +++ b/locale/de/ir @@ -77,6 +77,7 @@ $self->{texts} = { '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', @@ -207,6 +208,7 @@ $self->{texts} = { 'Receipt, payment, reconciliation' => 'Zahlungseingang, Zahlungsausgang, Kontenabgleich', 'Rechnungsnummer' => 'Rechnungsnummer', 'Record in' => 'Buchen auf', + 'Release From Stock' => 'Lagerausgang', 'Remaining' => 'Rest', 'Reports' => 'Berichte', 'Reqdate' => 'Lieferdatum', @@ -259,6 +261,7 @@ $self->{texts} = { '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\'.', diff --git a/locale/de/is b/locale/de/is index 0f9b0df6b..95b610168 100644 --- a/locale/de/is +++ b/locale/de/is @@ -87,6 +87,7 @@ $self->{texts} = { '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', @@ -229,6 +230,7 @@ $self->{texts} = { 'RFQ' => 'Anfrage', 'Receipt, payment, reconciliation' => 'Zahlungseingang, Zahlungsausgang, Kontenabgleich', 'Record in' => 'Buchen auf', + 'Release From Stock' => 'Lagerausgang', 'Remaining' => 'Rest', 'Reports' => 'Berichte', 'Reqdate' => 'Lieferdatum', @@ -286,6 +288,7 @@ $self->{texts} = { '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\'.', diff --git a/locale/de/licenses b/locale/de/licenses index 00febcd31..43351b139 100644 --- a/locale/de/licenses +++ b/locale/de/licenses @@ -44,6 +44,7 @@ $self->{texts} = { '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', diff --git a/locale/de/login b/locale/de/login index 7b5403353..94772d2de 100644 --- a/locale/de/login +++ b/locale/de/login @@ -13,9 +13,11 @@ $self->{texts} = { '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', @@ -40,6 +42,7 @@ $self->{texts} = { '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!', @@ -92,8 +95,14 @@ $self->{texts} = { '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', @@ -108,9 +117,11 @@ $self->{texts} = { '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', @@ -119,6 +130,9 @@ $self->{texts} = { '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', @@ -198,6 +212,7 @@ $self->{texts} = { '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', @@ -240,6 +255,7 @@ $self->{texts} = { 'RFQ Number' => 'Anfragenummer', 'Receipt, payment, reconciliation' => 'Zahlungseingang, Zahlungsausgang, Kontenabgleich', 'Reference' => 'Referenz', + 'Release From Stock' => 'Lagerausgang', 'Reports' => 'Berichte', 'Reqdate' => 'Lieferdatum', 'Request for Quotation' => 'Anfrage', @@ -254,6 +270,7 @@ $self->{texts} = { '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', @@ -271,6 +288,8 @@ $self->{texts} = { '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', @@ -287,14 +306,17 @@ $self->{texts} = { '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\'.', @@ -324,6 +346,7 @@ $self->{texts} = { '[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".', @@ -333,10 +356,12 @@ $self->{texts} = { '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', @@ -344,6 +369,7 @@ $self->{texts} = { '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', @@ -365,8 +391,10 @@ $self->{subs} = { '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', @@ -382,11 +410,14 @@ $self->{subs} = { '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', @@ -395,6 +426,7 @@ $self->{subs} = { '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', @@ -419,6 +451,7 @@ $self->{subs} = { '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', @@ -448,14 +481,23 @@ $self->{subs} = { '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', @@ -479,6 +521,8 @@ $self->{subs} = { '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', }; diff --git a/locale/de/menu b/locale/de/menu index c93fd66e8..ff2fc13af 100644 --- a/locale/de/menu +++ b/locale/de/menu @@ -15,6 +15,7 @@ $self->{texts} = { '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', @@ -75,6 +76,7 @@ $self->{texts} = { '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', diff --git a/locale/de/menunew b/locale/de/menunew index fdf90f36a..bb322fa8f 100644 --- a/locale/de/menunew +++ b/locale/de/menunew @@ -14,6 +14,7 @@ $self->{texts} = { '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', @@ -74,6 +75,7 @@ $self->{texts} = { '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', diff --git a/locale/de/oe b/locale/de/oe index 0218054ab..167e196fa 100644 --- a/locale/de/oe +++ b/locale/de/oe @@ -10,9 +10,11 @@ $self->{texts} = { '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', @@ -36,6 +38,7 @@ $self->{texts} = { '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!', @@ -85,8 +88,14 @@ $self->{texts} = { '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', @@ -97,9 +106,11 @@ $self->{texts} = { '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', @@ -108,6 +119,9 @@ $self->{texts} = { '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', @@ -177,6 +191,7 @@ $self->{texts} = { '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', @@ -217,6 +232,7 @@ $self->{texts} = { 'RFQ' => 'Anfrage', 'RFQ Number' => 'Anfragenummer', 'Receipt, payment, reconciliation' => 'Zahlungseingang, Zahlungsausgang, Kontenabgleich', + 'Release From Stock' => 'Lagerausgang', 'Reports' => 'Berichte', 'Reqdate' => 'Lieferdatum', 'Request for Quotation' => 'Anfrage', @@ -231,6 +247,7 @@ $self->{texts} = { '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', @@ -248,6 +265,8 @@ $self->{texts} = { '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', @@ -262,11 +281,14 @@ $self->{texts} = { '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\'.', @@ -292,6 +314,7 @@ $self->{texts} = { '[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".', @@ -300,10 +323,12 @@ $self->{texts} = { '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', @@ -311,6 +336,7 @@ $self->{texts} = { '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', @@ -331,8 +357,10 @@ $self->{subs} = { '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', @@ -346,16 +374,20 @@ $self->{subs} = { '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', @@ -377,6 +409,7 @@ $self->{subs} = { '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', @@ -403,10 +436,19 @@ $self->{subs} = { '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', @@ -427,6 +469,8 @@ $self->{subs} = { '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', }; diff --git a/locale/de/pe b/locale/de/pe index 9afcc6583..f23f1f531 100644 --- a/locale/de/pe +++ b/locale/de/pe @@ -45,6 +45,7 @@ $self->{texts} = { 'Dataset upgrade' => 'Datenbankaktualisierung', 'Date' => 'Datum', 'Delete' => 'Löschen', + 'Delivery Order' => 'Lieferschein', 'Dependency loop detected:' => 'Schleife in den Abhängigkeiten entdeckt:', 'Description' => 'Beschreibung', 'Directory' => 'Verzeichnis', diff --git a/locale/de/rc b/locale/de/rc index 42e802b9c..926374310 100644 --- a/locale/de/rc +++ b/locale/de/rc @@ -41,6 +41,7 @@ $self->{texts} = { 'Dataset upgrade' => 'Datenbankaktualisierung', 'Date' => 'Datum', 'Decrease' => 'Verringern', + 'Delivery Order' => 'Lieferschein', 'Dependency loop detected:' => 'Schleife in den Abhängigkeiten entdeckt:', 'Deposit' => 'Gutschrift', 'Description' => 'Beschreibung', diff --git a/locale/de/reportgenerator b/locale/de/reportgenerator index 47d608fb3..6adb2a636 100644 --- a/locale/de/reportgenerator +++ b/locale/de/reportgenerator @@ -36,6 +36,7 @@ $self->{texts} = { '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', diff --git a/locale/de/rp b/locale/de/rp index d16577cb5..7b1ae483f 100644 --- a/locale/de/rp +++ b/locale/de/rp @@ -70,6 +70,7 @@ $self->{texts} = { 'Dec' => 'Dez', 'December' => 'Dezember', 'Decimalplaces' => 'Dezimalstellen', + 'Delivery Order' => 'Lieferschein', 'Department' => 'Abteilung', 'Dependency loop detected:' => 'Schleife in den Abhängigkeiten entdeckt:', 'Description' => 'Beschreibung', diff --git a/locale/de/todo b/locale/de/todo index 3730c9228..7f02fb7e5 100644 --- a/locale/de/todo +++ b/locale/de/todo @@ -12,9 +12,11 @@ $self->{texts} = { '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', @@ -39,6 +41,7 @@ $self->{texts} = { '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!', @@ -91,8 +94,14 @@ $self->{texts} = { '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', @@ -107,9 +116,11 @@ $self->{texts} = { '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', @@ -118,6 +129,9 @@ $self->{texts} = { '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', @@ -195,6 +209,7 @@ $self->{texts} = { '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', @@ -237,6 +252,7 @@ $self->{texts} = { 'RFQ Number' => 'Anfragenummer', 'Receipt, payment, reconciliation' => 'Zahlungseingang, Zahlungsausgang, Kontenabgleich', 'Reference' => 'Referenz', + 'Release From Stock' => 'Lagerausgang', 'Reports' => 'Berichte', 'Reqdate' => 'Lieferdatum', 'Request for Quotation' => 'Anfrage', @@ -251,6 +267,7 @@ $self->{texts} = { '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', @@ -268,6 +285,8 @@ $self->{texts} = { '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', @@ -284,13 +303,16 @@ $self->{texts} = { '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\'.', @@ -317,6 +339,7 @@ $self->{texts} = { '[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".', @@ -326,10 +349,12 @@ $self->{texts} = { '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', @@ -337,6 +362,7 @@ $self->{texts} = { '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', @@ -358,8 +384,10 @@ $self->{subs} = { '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', @@ -374,11 +402,14 @@ $self->{subs} = { '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', @@ -387,6 +418,7 @@ $self->{subs} = { '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', @@ -408,6 +440,7 @@ $self->{subs} = { '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', @@ -437,13 +470,22 @@ $self->{subs} = { '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', @@ -466,6 +508,8 @@ $self->{subs} = { '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', }; diff --git a/locale/de/ustva b/locale/de/ustva index 58c17f7c4..d49f574d7 100644 --- a/locale/de/ustva +++ b/locale/de/ustva @@ -53,6 +53,7 @@ $self->{texts} = { 'Date' => 'Datum', 'Dec' => 'Dez', 'December' => 'Dezember', + 'Delivery Order' => 'Lieferschein', 'Dependency loop detected:' => 'Schleife in den Abhängigkeiten entdeckt:', 'Directory' => 'Verzeichnis', 'ELSE' => 'Zusatz', diff --git a/locale/de/wh b/locale/de/wh index 81fafeb26..9f7ec371c 100644 --- a/locale/de/wh +++ b/locale/de/wh @@ -49,6 +49,7 @@ $self->{texts} = { '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', diff --git a/menu.ini b/menu.ini index 859e4bd55..c2bcf058a 100644 --- a/menu.ini +++ b/menu.ini @@ -114,6 +114,12 @@ module=oe.pl 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 @@ -149,6 +155,12 @@ module=oe.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 @@ -174,6 +186,12 @@ module=oe.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 @@ -199,6 +217,12 @@ module=oe.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 diff --git a/sql/Pg-upgrade2/delivery_orders.sql b/sql/Pg-upgrade2/delivery_orders.sql new file mode 100644 index 000000000..83a47e1f8 --- /dev/null +++ b/sql/Pg-upgrade2/delivery_orders.sql @@ -0,0 +1,107 @@ +-- @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(); diff --git a/templates/webpages/do/delete_de.html b/templates/webpages/do/delete_de.html new file mode 100644 index 000000000..afb8e3e8d --- /dev/null +++ b/templates/webpages/do/delete_de.html @@ -0,0 +1,22 @@ +[% USE HTML %][% USE LxERP %] + +
Lieferschein löschen
+ +
+ +

Bestätigen

+ +

[% LxERP.format_string('Sind Sie sicher, dass Sie Lieferschein #1 löschen wollen?', donumber) %]

+ + [%- FOREACH row = VARIABLES %] + + [%- END %] + + + + + +
+ + + diff --git a/templates/webpages/do/delete_master.html b/templates/webpages/do/delete_master.html new file mode 100644 index 000000000..cf550d346 --- /dev/null +++ b/templates/webpages/do/delete_master.html @@ -0,0 +1,22 @@ +[% USE HTML %][% USE LxERP %] + +
Delete delivery order
+ +
+ +

Confirm

+ +

[% LxERP.format_string('Are you sure you want to delete Delivery Order Number #1?', donumber) %]

+ + [%- FOREACH row = VARIABLES %] + + [%- END %] + + + + + +
+ + + diff --git a/templates/webpages/do/form_footer_de.html b/templates/webpages/do/form_footer_de.html new file mode 100644 index 000000000..b96f99c25 --- /dev/null +++ b/templates/webpages/do/form_footer_de.html @@ -0,0 +1,96 @@ +[% USE HTML %][% USE LxERP %] + + + + + [%- IF closed %] + [%- SET RO = ' readonly' %] + [%- END %] + + + + + + + + + + + + + +
Bemerkungeninterne Bemerkungen
+ + + + +

+ +
+ + [%- IF conf_webdav %] +
Dokumente im WebDAV-Repository
+ +

+ + + + + + + [%- FOREACH file = WEBDAV %] + + + + + [%- END %] + +
DateinameWebDAV-Link
[% HTML.escape(file.name) %][% HTML.escape(file.type) %]
+

+ +
+ [%- END %] + +

[% PRINT_OPTIONS %]

+ +

+ Lieferschein bearbeiten
+ + [%- UNLESS closed %] + [%- IF vc == 'customer' %] + + [%- END %] + [%- END %] + + + [%- UNLESS closed %] + + [%- IF vc == 'customer' %] + + [%- ELSE %] + + [%- END %] + [%- END %] + [%- IF id %] + + [%- END %] +

+ + [%- IF id %] +

+ Workflow Lieferschein
+ + [% UNLESS closed %] + + [% END %] + +

+ [%- END %] + + + + + + + + diff --git a/templates/webpages/do/form_footer_master.html b/templates/webpages/do/form_footer_master.html new file mode 100644 index 000000000..554a369e7 --- /dev/null +++ b/templates/webpages/do/form_footer_master.html @@ -0,0 +1,96 @@ +[% USE HTML %][% USE LxERP %] + + + + + [%- IF closed %] + [%- SET RO = ' readonly' %] + [%- END %] + + + + + + + + + + + + + +
NotesInternal Notes
+ + + + +

+ +
+ + [%- IF conf_webdav %] +
Documents in the WebDAV repository
+ +

+ + + + + + + [%- FOREACH file = WEBDAV %] + + + + + [%- END %] + +
File nameWebDAV link
[% HTML.escape(file.name) %][% HTML.escape(file.type) %]
+

+ +
+ [%- END %] + +

[% PRINT_OPTIONS %]

+ +

+ Edit the Delivery Order
+ + [%- UNLESS closed %] + [%- IF vc == 'customer' %] + + [%- END %] + [%- END %] + + + [%- UNLESS closed %] + + [%- IF vc == 'customer' %] + + [%- ELSE %] + + [%- END %] + [%- END %] + [%- IF id %] + + [%- END %] +

+ + [%- IF id %] +

+ Workflow Delivery Order
+ + [% UNLESS closed %] + + [% END %] + +

+ [%- END %] + + + + + + + + diff --git a/templates/webpages/do/form_header_de.html b/templates/webpages/do/form_header_de.html new file mode 100644 index 000000000..e26976b38 --- /dev/null +++ b/templates/webpages/do/form_header_de.html @@ -0,0 +1,345 @@ +[% USE HTML %][% USE LxERP %] + + + + + + + + + + + + + + + [%- 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 %] + +
[% title %]
+ + [%- IF ERRORS && ERRORS.size %] +

[% ERRORS.join('
') %]

+ [%- END %] + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + + +
+ + + + + + + + [%- IF ALL_CONTACTS.size %] + + + + + [%- END %] + + [%- IF ALL_SHIPTO.size %] + + + + + [%- END %] + + [%- IF business %] + + + + + [%- END %] + + [%- IF max_dunning_level %] + + + + + [%- END %] + + + [%- IF ALL_DEPARTMENTS.size %] + + + + + [%- END %] + + + + + + + + + + + + + + + + +
[% IF is_customer %]Kunde[% ELSE %]Lieferant[% END %] + [%- UNLESS !closed && SHOW_VC_DROP_DOWN %] + + [%- ELSE %] + + + [%- END %] + +
Ansprechpartner + [%- IF closed %] + + [%- IF cp_id == row.cp_id %] + [%- HTML.escape(row.cp_name) %][%- IF row.cp_abteilung %] ([% HTML.escape(row.cp_abteilung) %])[% END -%] + [%- END %] + [%- ELSE %] + + [%- END %] +
Lieferadresse + [%- IF closed %] + + [%- 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 %] + + [%- END %] +
[% IF is_customer %]Kundentyp[% ELSE %]Lieferantentyp[% END %][% HTML.escape(business) %]
höchste Mahnstufe + [% HTML.escape(max_dunning_level) %]; gemahnter Betrag: + [% HTML.escape(LxERP.format_amount(dunning_amount, 2)) %] +
Abteilung + [%- IF closed %] + + [%- FOREACH row = ALL_DEPARTMENTS %] + [% IF department == row.value %][% HTML.escape(row.description) %]--[% HTML.escape(row.id) %][% END %] + [%- END %] + [%- ELSE %] + + [%- END %] +
Versandort
Transportmittel
Vorgangsbezeichnung
+
+ + + [%- IF vc == 'customer' %] + + + + [%- ELSE %] + + [%- END %] + + + + + + + [%- IF is_customer %] + [%- IF salesman_id %] + [%- SET the_salesman_id = salesman_id %] + [%- ELSE %] + [%- SET the_salesman_id = employee_id %] + [%- END %] + + + + + [%- END %] + + + + + + + + + + + + + + + + + [%- UNLESS is_customer %] + + + + + [%- END %] + + + + + + + + + + +
+ + + [%- IF closed %] + + [%- END %] +
Bearbeiter + [%- IF closed %] + + [%- 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 %] + + [%- END %] +
Verkäufer/in + [%- IF closed %] + + [%- 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 %] + + [%- END %] +
Lieferscheinnummer
Auftragsnummer
Bestellnummer des Kunden
Bestellanfragenummer
Lieferscheindatum + + [% UNLESS closed %][% END %] +
Projektnummer + [%- IF closed %] + + [%- FOREACH row = ALL_PROJECTS %] + [% IF globalproject_id == row.id %][% HTML.escape(row.projectnumber) %][% END %] + [%- END %] + [%- ELSE %] + + [%- END %] +
+
diff --git a/templates/webpages/do/form_header_master.html b/templates/webpages/do/form_header_master.html new file mode 100644 index 000000000..4829637d3 --- /dev/null +++ b/templates/webpages/do/form_header_master.html @@ -0,0 +1,345 @@ +[% USE HTML %][% USE LxERP %] + + + + + + + + + + + + + + + [%- 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 %] + +

[% title %]
+ + [%- IF ERRORS && ERRORS.size %] +

[% ERRORS.join('
') %]

+ [%- END %] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + + +
+ + + + + + + + [%- IF ALL_CONTACTS.size %] + + + + + [%- END %] + + [%- IF ALL_SHIPTO.size %] + + + + + [%- END %] + + [%- IF business %] + + + + + [%- END %] + + [%- IF max_dunning_level %] + + + + + [%- END %] + + + [%- IF ALL_DEPARTMENTS.size %] + + + + + [%- END %] + + + + + + + + + + + + + + + + +
[% IF is_customer %]Customer[% ELSE %]Vendor[% END %] + [%- UNLESS !closed && SHOW_VC_DROP_DOWN %] + + [%- ELSE %] + + + [%- END %] + +
Contact Person + [%- IF closed %] + + [%- IF cp_id == row.cp_id %] + [%- HTML.escape(row.cp_name) %][%- IF row.cp_abteilung %] ([% HTML.escape(row.cp_abteilung) %])[% END -%] + [%- END %] + [%- ELSE %] + + [%- END %] +
Shipping Address + [%- IF closed %] + + [%- 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 %] + + [%- END %] +
[% IF is_customer %]Customer type[% ELSE %]Vendor type[% END %][% HTML.escape(business) %]
Max. Dunning Level + [% HTML.escape(max_dunning_level) %]; Dunning Amount: + [% HTML.escape(LxERP.format_amount(dunning_amount, 2)) %] +
Department + [%- IF closed %] + + [%- FOREACH row = ALL_DEPARTMENTS %] + [% IF department == row.value %][% HTML.escape(row.description) %]--[% HTML.escape(row.id) %][% END %] + [%- END %] + [%- ELSE %] + + [%- END %] +
Shipping Point
Ship via
Transaction description
+
+ + + [%- IF vc == 'customer' %] + + + + [%- ELSE %] + + [%- END %] + + + + + + + [%- IF is_customer %] + [%- IF salesman_id %] + [%- SET the_salesman_id = salesman_id %] + [%- ELSE %] + [%- SET the_salesman_id = employee_id %] + [%- END %] + + + + + [%- END %] + + + + + + + + + + + + + + + + + [%- UNLESS is_customer %] + + + + + [%- END %] + + + + + + + + + + +
+ + + [%- IF closed %] + + [%- END %] +
Employee + [%- IF closed %] + + [%- 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 %] + + [%- END %] +
Salesman + [%- IF closed %] + + [%- 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 %] + + [%- END %] +
Delivery Order Number
Order Number
Customer Order Number
Order Request Number
Delivery Order Date + + [% UNLESS closed %][% END %] +
Project Number + [%- IF closed %] + + [%- FOREACH row = ALL_PROJECTS %] + [% IF globalproject_id == row.id %][% HTML.escape(row.projectnumber) %][% END %] + [%- END %] + [%- ELSE %] + + [%- END %] +
+
diff --git a/templates/webpages/do/search_de.html b/templates/webpages/do/search_de.html new file mode 100644 index 000000000..1dbc5a983 --- /dev/null +++ b/templates/webpages/do/search_de.html @@ -0,0 +1,256 @@ +[% USE HTML %][% USE LxERP %] + + [%- IF vc == 'customer' %] + [%- SET is_customer = '1' %] + [%- ELSE %] + [%- SET is_customer = '0' %] + [%- END %] + + + + + + + +

[% title %]
+ +

+ + + + + + + + + + + + + + + + + [%- UNLESS is_customer %] + + + + + [%- END %] + + [%- IF ALL_DEPARTMENTS.size %] + + + + + [%- END %] + + + + + + + [%- IF is_customer %] + + + + + [%- END %] + + + + + + + + + + + + + + + + + + + + + + + + + + + +
[% IF is_customer %]Kunde[% ELSE %]Lieferant[% END %] + [%- UNLESS SHOW_VC_DROP_DOWN %] + + [%- ELSE %] + + + [%- END %] +
Lieferscheinnummer
Auftragsnummer
Bestellanfragenummer
Abteilung + +
Bearbeiter + +
Verkäufer/in + +
Vorgangsbezeichnung
Bestellnummer des Kunden
Projektnummer + +
Von + + + bis + + +
In Bericht aufnehmen + + + + + + + + + + + + + + + + + + + + + + + [%- UNLESS is_customer %] + + [%- END %] + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ + + + +
+ + + + + +
+ + + + + + + + +
+ + + + + +
+ + + + + + + + +
+ + + + + +
+
+

+ +
+ +

+ + + + + +

+
+ + + + diff --git a/templates/webpages/do/search_master.html b/templates/webpages/do/search_master.html new file mode 100644 index 000000000..54594e664 --- /dev/null +++ b/templates/webpages/do/search_master.html @@ -0,0 +1,256 @@ +[% USE HTML %][% USE LxERP %] + + [%- IF vc == 'customer' %] + [%- SET is_customer = '1' %] + [%- ELSE %] + [%- SET is_customer = '0' %] + [%- END %] + + + + + +
+ +
[% title %]
+ +

+ + + + + + + + + + + + + + + + + [%- UNLESS is_customer %] + + + + + [%- END %] + + [%- IF ALL_DEPARTMENTS.size %] + + + + + [%- END %] + + + + + + + [%- IF is_customer %] + + + + + [%- END %] + + + + + + + + + + + + + + + + + + + + + + + + + + + +
[% IF is_customer %]Customer[% ELSE %]Vendor[% END %] + [%- UNLESS SHOW_VC_DROP_DOWN %] + + [%- ELSE %] + + + [%- END %] +
Delivery Order Number
Order Number
Order Request Number
Department + +
Employee + +
Salesman + +
Transaction description
Customer Order Number
Project Number + +
From + + + Bis + + +
Include in Report + + + + + + + + + + + + + + + + + + + + + + + [%- UNLESS is_customer %] + + [%- END %] + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ + + + +
+ + + + + +
+ + + + + + + + +
+ + + + + +
+ + + + + + + + +
+ + + + + +
+
+

+ +
+ +

+ + + + + +

+
+ + + + diff --git a/templates/webpages/do/set_stock_in_out_de.html b/templates/webpages/do/set_stock_in_out_de.html new file mode 100644 index 000000000..36bbf7ff0 --- /dev/null +++ b/templates/webpages/do/set_stock_in_out_de.html @@ -0,0 +1,24 @@ +[% USE HTML %] + + + +
+ + + +
+ + + diff --git a/templates/webpages/do/set_stock_in_out_master.html b/templates/webpages/do/set_stock_in_out_master.html new file mode 100644 index 000000000..36bbf7ff0 --- /dev/null +++ b/templates/webpages/do/set_stock_in_out_master.html @@ -0,0 +1,24 @@ +[% USE HTML %] + + + +
+ + + +
+ + + diff --git a/templates/webpages/do/stock_in_form_de.html b/templates/webpages/do/stock_in_form_de.html new file mode 100644 index 000000000..8845b7b52 --- /dev/null +++ b/templates/webpages/do/stock_in_form_de.html @@ -0,0 +1,154 @@ +[% USE HTML %][% USE LxERP %][% USE JavaScript %] + + [%- UNLESS closed %] + + [%- END %] + +
+ +
[% title %]
+ + [%- IF ERRORS && ERRORS.size %] +

[% ERRORS.join('
') %]

+ [%- END %] + +

+ + + + + + + + + + + + + +
Artikelnummer[% HTML.escape(PART_INFO.partnumber) %]
Beschreibung[% HTML.escape(PART_INFO.description) %]
Menge laut Lieferschein[% HTML.escape(do_qty) %] [% HTML.escape(do_unit) %]
+

+ + + + + + + + + + + +

+ + + + + + + + + + + [%- FOREACH row = STOCK_INFO %] + + + + [%- IF closed %] + + + + + + + + [%- ELSE %] + + + + + + + + + + [%- END %] + + + [%- END %] +
 LagerLagerplatzChargennummerMengeEinheit
[% loop.count %][% HTML.escape(row.warehouse_description) %][% HTML.escape(row.bin_description) %][% HTML.escape(row.chargenumber) %][% HTML.escape(LxERP.format_amount(row.qty)) %][% HTML.escape(row.unit) %] + + + +
+

+ +
+ +

+ [%- IF closed %] + + [%- ELSE %] + + + [%- END %] +

+
+ + + + diff --git a/templates/webpages/do/stock_in_form_master.html b/templates/webpages/do/stock_in_form_master.html new file mode 100644 index 000000000..8233a7dc8 --- /dev/null +++ b/templates/webpages/do/stock_in_form_master.html @@ -0,0 +1,154 @@ +[% USE HTML %][% USE LxERP %][% USE JavaScript %] + + [%- UNLESS closed %] + + [%- END %] + +
+ +
[% title %]
+ + [%- IF ERRORS && ERRORS.size %] +

[% ERRORS.join('
') %]

+ [%- END %] + +

+ + + + + + + + + + + + + +
Part Number[% HTML.escape(PART_INFO.partnumber) %]
Description[% HTML.escape(PART_INFO.description) %]
Qty according to delivery order[% HTML.escape(do_qty) %] [% HTML.escape(do_unit) %]
+

+ + + + + + + + + + + +

+ + + + + + + + + + + [%- FOREACH row = STOCK_INFO %] + + + + [%- IF closed %] + + + + + + + + [%- ELSE %] + + + + + + + + + + [%- END %] + + + [%- END %] +
 WarehouseBinCharge NumberQtyUnit
[% loop.count %][% HTML.escape(row.warehouse_description) %][% HTML.escape(row.bin_description) %][% HTML.escape(row.chargenumber) %][% HTML.escape(LxERP.format_amount(row.qty)) %][% HTML.escape(row.unit) %] + + + +
+

+ +
+ +

+ [%- IF closed %] + + [%- ELSE %] + + + [%- END %] +

+
+ + + + diff --git a/templates/webpages/do/stock_out_form_de.html b/templates/webpages/do/stock_out_form_de.html new file mode 100644 index 000000000..268612fdf --- /dev/null +++ b/templates/webpages/do/stock_out_form_de.html @@ -0,0 +1,119 @@ +[% USE HTML %][% USE LxERP %] + + [%- IF closed %] + [%- SET RO = ' readonly' %] + [%- END %] + + + +
+ +
[% title %]
+ + [%- IF ERRORS && ERRORS.size %] +

[% ERRORS.join('
') %]

+ [%- END %] + +

+ + + + + + + + + + + + + +
Artikelnummer[% HTML.escape(PART_INFO.partnumber) %]
Beschreibung[% HTML.escape(PART_INFO.description) %]
Menge laut Lieferschein[% HTML.escape(do_qty) %] [% HTML.escape(do_unit) %]
+

+ + [%- UNLESS WHCONTENTS.size %] +

Dieser Artikel ist nicht eingelagert.

+ +

+ + [%- ELSE %] + + + + + + + + + + + +

+ + + + + + + [%- UNLESS closed %] + + [%- END %] + + + + + [%- FOREACH row = WHCONTENTS %] + + + + + + + [%- IF closed %] + + + + + [%- ELSE %] + + + + + + [%- END %] + + + + + + [%- END %] +
 LagerLagerplatzChargennummerLagerbestandMengeEinheit
[% loop.count %][% HTML.escape(row.warehousedescription) %][% HTML.escape(row.bindescription) %][% HTML.escape(row.chargenumber) %][% HTML.escape(LxERP.format_amount(row.stock_qty)) %][% HTML.escape(row.stock_unit) %][% HTML.escape(row.available_qty) %] + +
+

+ +
+ +

+ [%- IF closed %] + + [%- ELSE %] + + [%- END %] +

+ + [%- END %] +
+ + + + diff --git a/templates/webpages/do/stock_out_form_master.html b/templates/webpages/do/stock_out_form_master.html new file mode 100644 index 000000000..2eaeef91e --- /dev/null +++ b/templates/webpages/do/stock_out_form_master.html @@ -0,0 +1,119 @@ +[% USE HTML %][% USE LxERP %] + + [%- IF closed %] + [%- SET RO = ' readonly' %] + [%- END %] + + + +
+ +
[% title %]
+ + [%- IF ERRORS && ERRORS.size %] +

[% ERRORS.join('
') %]

+ [%- END %] + +

+ + + + + + + + + + + + + +
Part Number[% HTML.escape(PART_INFO.partnumber) %]
Description[% HTML.escape(PART_INFO.description) %]
Qty according to delivery order[% HTML.escape(do_qty) %] [% HTML.escape(do_unit) %]
+

+ + [%- UNLESS WHCONTENTS.size %] +

There are no items in stock.

+ +

+ + [%- ELSE %] + + + + + + + + + + + +

+ + + + + + + [%- UNLESS closed %] + + [%- END %] + + + + + [%- FOREACH row = WHCONTENTS %] + + + + + + + [%- IF closed %] + + + + + [%- ELSE %] + + + + + + [%- END %] + + + + + + [%- END %] +
 WarehouseBinCharge NumberAvailable qtyQtyUnit
[% loop.count %][% HTML.escape(row.warehousedescription) %][% HTML.escape(row.bindescription) %][% HTML.escape(row.chargenumber) %][% HTML.escape(LxERP.format_amount(row.stock_qty)) %][% HTML.escape(row.stock_unit) %][% HTML.escape(row.available_qty) %] + +
+

+ +
+ +

+ [%- IF closed %] + + [%- ELSE %] + + [%- END %] +

+ + [%- END %] +
+ + + +