From: Jan Büren Date: Tue, 10 Jan 2012 14:59:30 +0000 (+0100) Subject: Merge branch 'master' of vc.linet-services.de:public/lx-office-erp X-Git-Tag: release-2.7.0beta1~69^2~1^2~1 X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/commitdiff_plain/2518d79ae7e13a07036dab0877f46c9945ba3c1f?hp=1a0c73d30bcd5d1ceeeef5f84d94de466abf6fcc Merge branch 'master' of vc.linet-services.de:public/lx-office-erp --- diff --git a/SL/DN.pm b/SL/DN.pm index b00a83b44..797588adf 100644 --- a/SL/DN.pm +++ b/SL/DN.pm @@ -718,6 +718,7 @@ sub print_dunning { ar.transdate, ar.duedate, ar.customer_id, ar.invnumber, ar.ordnumber, ar.cp_id, ar.amount, ar.netamount, ar.paid, + ar.curr, ar.amount - ar.paid AS open_amount, ar.amount - ar.paid + da.fee + da.interest AS linetotal @@ -746,11 +747,13 @@ sub print_dunning { c.country, c.department_1, c.department_2, c.email, c.customernumber, c.greeting, c.contact, c.phone, c.fax, c.homepage, c.email, c.taxincluded, c.business_id, c.taxnumber, c.iban, + c,ustid, e.name as salesman_name, co.* FROM dunning d LEFT JOIN ar ON (d.trans_id = ar.id) LEFT JOIN customer c ON (ar.customer_id = c.id) LEFT JOIN contacts co ON (ar.cp_id = co.cp_id) + LEFT JOIN employee e ON (ar.salesman_id = e.id) WHERE (d.dunning_id = ?) LIMIT 1|; my $ref = selectfirst_hashref_query($form, $dbh, $query, $dunning_id); diff --git a/SL/DO.pm b/SL/DO.pm index 8e126941b..8d61b0f1f 100644 --- a/SL/DO.pm +++ b/SL/DO.pm @@ -251,9 +251,9 @@ sub save { 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) + lastcost, price_factor_id, price_factor, marge_price_factor, pricegroup_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, - (SELECT factor FROM price_factors WHERE id = ?), ?)|; + (SELECT factor FROM price_factors WHERE id = ?), ?, ?)|; my $h_item = prepare_query($form, $dbh, $q_item); my $q_item_stock = @@ -300,7 +300,8 @@ sub save { $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"})); + conv_i($form->{"marge_price_factor_$i"}), + conv_i($form->{"pricegroup_id_$i"})); do_statement($form, $h_item, $q_item, @values); my $stock_info = DO->unpack_stock_information('packed' => $form->{"stock_${in_out}_$i"}); @@ -668,7 +669,7 @@ sub retrieve { 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.price_factor_id, doi.price_factor, doi.marge_price_factor, doi.pricegroup_id, pr.projectnumber, dord.transdate AS dord_transdate, pg.partsgroup FROM delivery_order_items doi diff --git a/SL/Form.pm b/SL/Form.pm index 6852236b4..d537d2838 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -1106,15 +1106,20 @@ sub parse_template { close $temp_fh; if ($template->uses_temp_file() || $self->{media} eq 'email') { - $out = $self->{OUT}; - $out_mode = $self->{OUT_MODE} || '>'; - $self->{OUT} = "$self->{tmpfile}"; + $out = $self->{OUT}; + $out_mode = $self->{OUT_MODE} || '>'; + $self->{OUT} = "$self->{tmpfile}"; $self->{OUT_MODE} = '>'; } my $result; + my $command_formatter = sub { + my ($out_mode, $out) = @_; + return $out_mode eq '|-' ? SL::Template::create(type => 'ShellCommand', form => $self)->parse($out) : $out; + }; if ($self->{OUT}) { + $self->{OUT} = $command_formatter->($self->{OUT_MODE}, $self->{OUT}); open(OUT, $self->{OUT_MODE}, $self->{OUT}) or $self->error("error on opening $self->{OUT} with mode $self->{OUT_MODE} : $!"); } else { *OUT = ($::dispatcher->get_standard_filehandles)[1]; @@ -1154,19 +1159,15 @@ sub parse_template { # if we send html or plain text inline if (($self->{format} eq 'html') && ($self->{sendmode} eq 'inline')) { - $mail->{contenttype} = "text/html"; - - $mail->{message} =~ s/\r//g; - $mail->{message} =~ s/\n/
\n/g; - $myconfig->{signature} =~ s/\n/
\n/g; - $mail->{message} .= "
\n--
\n$myconfig->{signature}\n
"; + $mail->{contenttype} = "text/html"; + $mail->{message} =~ s/\r//g; + $mail->{message} =~ s/\n/
\n/g; + $myconfig->{signature} =~ s/\n/
\n/g; + $mail->{message} .= "
\n--
\n$myconfig->{signature}\n
"; open(IN, "<", $self->{tmpfile}) or $self->error($self->cleanup . "$self->{tmpfile} : $!"); - while () { - $mail->{message} .= $_; - } - + $mail->{message} .= $_ while ; close(IN); } else { @@ -1203,10 +1204,12 @@ sub parse_template { #print(STDERR "OUT $self->{OUT}\n"); for my $i (1 .. $self->{copies}) { if ($self->{OUT}) { - open OUT, $self->{OUT_MODE}, $self->{OUT} or $self->error($self->cleanup . "$self->{OUT} : $!"); + $self->{OUT} = $command_formatter->($self->{OUT_MODE}, $self->{OUT}); + + open OUT, $self->{OUT_MODE}, $self->{OUT} or $self->error($self->cleanup . "$self->{OUT} : $!"); print OUT $_ while ; close OUT; - seek IN, 0, 0; + seek IN, 0, 0; } else { $self->{attachment_filename} = ($self->{attachment_filename}) diff --git a/SL/IC.pm b/SL/IC.pm index 5396c7add..9b224d62e 100644 --- a/SL/IC.pm +++ b/SL/IC.pm @@ -1007,12 +1007,6 @@ sub all_parts { $joins_needed{apoe} = 1 if $joins_needed{cv} || grep { $form->{$_} || $form->{"l_$_"} } @apoe_filters; $joins_needed{invoice_oi} = 1 if $joins_needed{apoe} || grep { $form->{$_} || $form->{"l_$_"} } @invoice_oi_filters; - # in bsoorq, use qtys instead of onhand - if ($joins_needed{invoice_oi}) { - $renamed_columns{onhand} = 'onhand_before_bsooqr'; - $renamed_columns{qty} = 'onhand'; - } - # special case for description search. # up in the simple filter section the description filter got interpreted as something like: WHERE description ILIKE '%$form->{description}%' # now we'd like to search also for the masked description entered in orderitems and invoice, so... @@ -1083,6 +1077,13 @@ sub all_parts { map { $_->{onhand} *= 1 } @{ $form->{parts} }; + # fix qty sign in ap. those are saved negative + if ($bsooqr && $form->{bought}) { + for my $row (@{ $form->{parts} }) { + $row->{qty} *= -1 if $row->{module} eq 'ir'; + } + } + # post processing for assembly parts lists (bom) # for each part get the assembly parts and add them into the partlist. my @assemblies; diff --git a/SL/Template.pm b/SL/Template.pm index df18e706e..ab499e99d 100644 --- a/SL/Template.pm +++ b/SL/Template.pm @@ -16,6 +16,7 @@ use SL::Template::HTML; use SL::Template::LaTeX; use SL::Template::OpenDocument; use SL::Template::PlainText; +use SL::Template::ShellCommand; use SL::Template::XML; sub create { diff --git a/SL/Template/ShellCommand.pm b/SL/Template/ShellCommand.pm new file mode 100644 index 000000000..082412909 --- /dev/null +++ b/SL/Template/ShellCommand.pm @@ -0,0 +1,51 @@ +package SL::Template::ShellCommand; + +use parent qw(SL::Template::LaTeX); + +use strict; + +use String::ShellQuote; + +sub new { + my $type = shift; + + return $type->SUPER::new(@_); +} + +sub substitute_vars { + my ($self, $text, @indices) = @_; + + my $form = $self->{"form"}; + + while ($text =~ /$self->{substitute_vars_re}/) { + my ($tag_pos, $tag_len) = ($-[0], $+[0] - $-[0]); + my ($var, @option_list) = split(/\s+/, $1); + my %options = map { ($_ => 1) } @option_list; + + my $value = $self->_get_loop_variable($var, 0, @indices); + $value = $form->parse_amount({ numberformat => $::myconfig{output_numberformat} || $::myconfig{numberformat} }, $value) if $options{NOFORMAT}; + $value = $self->format_string($value); # Don't allow NOESCAPE for arguments passed to shell commands. + + substr($text, $tag_pos, $tag_len, $value); + } + + return $text; +} + +sub format_string { + my ($self, $variable) = @_; + + return shell_quote_best_effort($variable); +} + +sub get_mime_type { + return "text/plain"; +} + +sub parse { + my ($self, $text) = @_; + + return $self->parse_block($text); +} + +1; diff --git a/SL/User.pm b/SL/User.pm index 49ba33924..5d58b5dac 100644 --- a/SL/User.pm +++ b/SL/User.pm @@ -738,7 +738,7 @@ sub create_employee_entry { do_query($form, $dbh, $query, ($self->{login}, $myconfig->{name}, $myconfig->{tel}, "user")); } elsif ($update_existing) { - my $query = qq|UPDATE employee SET name = ?, workphone = ?, role = 'user' WHERE id = ?|; + my $query = qq|UPDATE employee SET name = ?, workphone = ?, role = 'user', deleted = 'f' WHERE id = ?|; do_query($form, $dbh, $query, $myconfig->{name}, $myconfig->{tel}, $id); } diff --git a/bin/mozilla/ar.pl b/bin/mozilla/ar.pl index 1522339b8..a6e122067 100644 --- a/bin/mozilla/ar.pl +++ b/bin/mozilla/ar.pl @@ -1046,13 +1046,12 @@ sub update { $form->{invdate} = $form->{transdate}; - my %saved_variables = map +( $_ => $form->{$_} ), qw(AR AR_amount_1 taxchart_1 oldcustomer); + my %saved_variables = map +( $_ => $form->{$_} ), qw(AR AR_amount_1 taxchart_1 customer_id); &check_name("customer"); - # check_name ruft get_customer auf, oldcustomer wird überschrieben, daher wird dies vorher gemerkt - # get_customer holt Bemerkungen als intnotes, für Debitorenbuchungen gibt es aber nur das Feld notes - $form->{notes} = $form->{intnotes} if $saved_variables{oldcustomer} ne $form->{customer}; + # check_name loads customer notes into notes, but ar only knows intnotes, so copy them + $form->{notes} = $form->{intnotes} if $saved_variables{customer_id} != $form->{customer_id}; $form->{AR} = $saved_variables{AR}; if ($saved_variables{AR_amount_1} =~ m/.--./) { diff --git a/bin/mozilla/dn.pl b/bin/mozilla/dn.pl index 132286fbd..6c3492b98 100644 --- a/bin/mozilla/dn.pl +++ b/bin/mozilla/dn.pl @@ -368,7 +368,7 @@ sub show_dunning { duedate amount dunning_date dunning_duedate fee interest salesman)); $report->set_sort_indicator($form->{sort}, $form->{sortdir}); - my $edit_url = build_std_url('script=is.pl', 'action=edit', 'callback') . '&id='; + my $edit_url = sub { build_std_url('script=' . ($_[0]->{invoice} ? 'is' : 'ar') . '.pl', 'action=edit', 'callback') . '&id=' . $::form->escape($_[0]->{id}) }; my $print_url = build_std_url('action=print_dunning', 'format=pdf', 'media=screen') . '&dunning_id='; my $sort_url = build_std_url('action=show_dunning', grep { $form->{$_} } @filter_field_list); @@ -403,8 +403,9 @@ sub show_dunning { 'align' => $alignment{$column}, - 'link' => ($column eq 'invnumber' ? $edit_url . E($ref->{id}) : - $column eq 'dunning_description' ? $print_url . E($ref->{dunning_id}) : ''), + 'link' => ( $column eq 'invnumber' ? $edit_url->($ref) + : $column eq 'dunning_description' ? $print_url . E($ref->{dunning_id}) + : ''), }; } diff --git a/bin/mozilla/do.pl b/bin/mozilla/do.pl index 4011c5e88..17b9fcc1d 100644 --- a/bin/mozilla/do.pl +++ b/bin/mozilla/do.pl @@ -173,7 +173,7 @@ sub order_links { DO->retrieve('vc' => $form->{vc}, 'ids' => $form->{id}); - $form->backup_vars(qw(payment_id language_id taxzone_id salesman_id taxincluded cp_id intnotes)); + $form->backup_vars(qw(payment_id language_id taxzone_id salesman_id taxincluded cp_id intnotes currency)); $form->{shipto} = 1 if $form->{id}; # get customer / vendor @@ -186,6 +186,7 @@ sub order_links { } $form->restore_vars(qw(payment_id language_id taxzone_id intnotes cp_id)); + $form->restore_vars(qw(currency)) if ($form->{id} || $form->{convert_from_oe_ids}); $form->restore_vars(qw(taxincluded)) if $form->{id}; $form->restore_vars(qw(salesman_id)) if $editing; @@ -826,6 +827,13 @@ sub invoice { } + # show pricegroup in newly loaded invoice when creating invoice from delivery order + for my $i (1 .. $form->{rowcount}) { + $form->{"sellprice_pg_$i"} = join /--/, $form->{"sellprice_$i"}, $form->{"pricegroup_id_$i"}; + } + IS->get_pricegroups_for_parts(\%myconfig, \%$form); + set_pricegroup($_) for 1 .. $form->{rowcount}; + display_form(); $main::lxdebug->leave_sub(); @@ -924,6 +932,14 @@ sub invoice_multi { invoice_links(); prepare_invoice(); + + # show pricegroup in newly loaded invoice when creating invoice from delivery order + for my $i (1 .. $form->{rowcount}) { + $form->{"sellprice_pg_$i"} = join /--/, $form->{"sellprice_$i"}, $form->{"pricegroup_id_$i"}; + } + IS->get_pricegroups_for_parts(\%myconfig, \%$form); + set_pricegroup($_) for 1 .. $form->{rowcount}; + display_form(); $main::lxdebug->leave_sub(); @@ -992,14 +1008,16 @@ sub calculate_stock_in_out { my $in_out = $form->{type} =~ /^sales/ ? 'out' : 'in'; my $sinfo = DO->unpack_stock_information('packed' => $form->{"stock_${in_out}_${i}"}); + my $do_qty = AM->sum_with_unit($::form->{"qty_$i"}, $::form->{"unit_$i"}); my $sum = AM->sum_with_unit(map { $_->{qty}, $_->{unit} } @{ $sinfo }); + my $matches = $do_qty == $sum; my $content = $form->format_amount_units('amount' => $sum * 1, 'part_unit' => $form->{"partunit_$i"}, 'amount_unit' => $all_units->{$form->{"partunit_$i"}}->{base_unit}, 'conv_units' => 'convertible_not_smaller', 'max_places' => 2); - $content = qq|${content} |; + $content = qq|${content} |; $main::lxdebug->leave_sub(); @@ -1154,8 +1172,13 @@ sub set_stock_in { _stock_in_out_set_qty_display($stock_info); + my $do_qty = AM->sum_with_unit($::form->parse_amount(\%::myconfig, $::form->{do_qty}), $::form->{do_unit}); + my $transfer_qty = AM->sum_with_unit(map { $_->{qty}, $_->{unit} } @{ $stock_info }); + $form->header(); - print $form->parse_html_template('do/set_stock_in_out'); + print $form->parse_html_template('do/set_stock_in_out', { + qty_matches => $do_qty == $transfer_qty, + }); $main::lxdebug->leave_sub(); } @@ -1249,8 +1272,13 @@ sub set_stock_out { } else { _stock_in_out_set_qty_display($stock_info); + my $do_qty = AM->sum_with_unit($::form->parse_amount(\%::myconfig, $::form->{do_qty}), $::form->{do_unit}); + my $transfer_qty = AM->sum_with_unit(map { $_->{qty}, $_->{unit} } @{ $stock_info }); + $form->header(); - print $form->parse_html_template('do/set_stock_in_out'); + print $form->parse_html_template('do/set_stock_in_out', { + qty_matches => $do_qty == $transfer_qty, + }); } $main::lxdebug->leave_sub(); diff --git a/bin/mozilla/ic.pl b/bin/mozilla/ic.pl index c6714e6b4..b02e19d3e 100644 --- a/bin/mozilla/ic.pl +++ b/bin/mozilla/ic.pl @@ -1043,7 +1043,7 @@ sub generate_report { 'listprice' => { 'text' => $locale->text('List Price'), }, 'microfiche' => { 'text' => $locale->text('Microfiche'), }, 'name' => { 'text' => $locale->text('Name'), }, - 'onhand' => { 'text' => $locale->text('Qty'), }, + 'onhand' => { 'text' => $locale->text('Stocked Qty'), }, 'ordnumber' => { 'text' => $locale->text('Order Number'), }, 'partnumber' => { 'text' => $locale->text('Part Number'), }, 'partsgroup' => { 'text' => $locale->text('Group'), }, @@ -1052,7 +1052,7 @@ sub generate_report { 'rop' => { 'text' => $locale->text('ROP'), }, 'sellprice' => { 'text' => $locale->text('Sell Price'), }, 'serialnumber' => { 'text' => $locale->text('Serial Number'), }, - 'soldtotal' => { 'text' => $locale->text('soldtotal'), }, + 'soldtotal' => { 'text' => $locale->text('Qty in Selected Records'), }, 'transdate' => { 'text' => $locale->text('Transdate'), }, 'unit' => { 'text' => $locale->text('Unit'), }, 'weight' => { 'text' => $locale->text('Weight'), }, @@ -1136,7 +1136,7 @@ sub generate_report { model => $locale->text('Model') . ": '$form->{model}'", drawing => $locale->text('Drawing') . ": '$form->{drawing}'", microfiche => $locale->text('Microfiche') . ": '$form->{microfiche}'", - l_soldtotal => $locale->text('soldtotal'), + l_soldtotal => $locale->text('Qty in Selected Records'), ean => $locale->text('EAN') . ": '$form->{ean}'", ); @@ -1171,7 +1171,7 @@ sub generate_report { } if ($form->{l_linetotal}) { - $form->{l_onhand} = "Y"; + $form->{l_qty} = "Y"; $form->{l_linetotalsellprice} = "Y" if $form->{l_sellprice}; $form->{l_linetotallastcost} = $form->{searchitems} eq 'assembly' && !$form->{bom} ? "" : 'Y' if $form->{l_lastcost}; $form->{l_linetotallistprice} = "Y" if $form->{l_listprice}; @@ -1191,20 +1191,31 @@ sub generate_report { || $form->{ordered} || $form->{rfq} || $form->{quoted}) { - $form->{l_onhand} = "Y"; +# $form->{l_onhand} = "Y"; } else { $form->{l_linetotalsellprice} = ""; $form->{l_linetotallastcost} = ""; } } + # soldtotal doesn't make sense with more than one bsooqr option. + # so reset it to sold (the most common option), and issue a warning + my @bsooqr = qw(sold bought onorder ordered rfq quoted); + if ($form->{l_subtotal} && 1 < grep { $form->{$_} } @bsooqr) { + my $enabled = first { $form->{$_} } @bsooqr; + $form->{$_} = '' for @bsooqr; + $form->{$enabled} = 'Y'; + + push @options, $::locale->text('Subtotal cannot distinguish betweens record types. Only one of the selected record types will be displayed: #1', $optiontexts{$enabled}); + } + IC->all_parts(\%myconfig, \%$form); my @columns = qw( - partnumber description partsgroup bin onhand rop unit listprice + partnumber description partsgroup bin onhand rop soldtotal unit listprice linetotallistprice sellprice linetotalsellprice lastcost linetotallastcost priceupdate weight image drawing microfiche invnumber ordnumber quonumber - transdate name serialnumber soldtotal deliverydate ean + transdate name serialnumber deliverydate ean ); my @includeable_custom_variables = grep { $_->{includeable} } @{ $cvar_configs }; @@ -1290,12 +1301,12 @@ sub generate_report { $ref->{lastcost} *= $ref->{exchangerate} / $ref->{price_factor}; # use this for assemblies - my $onhand = $ref->{onhand}; + my $soldtotal = $ref->{soldtotal}; if ($ref->{assemblyitem}) { $row->{partnumber}{align} = 'right'; - $row->{onhand}{data} = 0; - $onhand = 0 if ($form->{sold}); + $row->{soldtotal}{data} = 0; + $soldtotal = 0 if ($form->{sold}); } my $edit_link = build_std_url('action=edit', 'id=' . E($ref->{id}), 'callback'); @@ -1313,11 +1324,11 @@ sub generate_report { if (!$ref->{assemblyitem}) { foreach my $col (@subtotal_columns) { - $totals{$col} += $onhand * $ref->{$col}; - $subtotals{$col} += $onhand * $ref->{$col}; + $totals{$col} += $soldtotal * $ref->{$col}; + $subtotals{$col} += $soldtotal * $ref->{$col}; } - $subtotals{onhand} += $onhand; + $subtotals{soldtotal} += $soldtotal; } # set module stuff @@ -1348,11 +1359,11 @@ sub generate_report { my $row = { map { $_ => { 'class' => 'listsubtotal', } } @columns }; if (($form->{searchitems} ne 'assembly') || !$form->{bom}) { - $row->{onhand}->{data} = $form->format_amount(\%myconfig, $subtotals{onhand}); + $row->{soldtotal}->{data} = $form->format_amount(\%myconfig, $subtotals{soldtotal}); } map { $row->{"linetotal$_"}->{data} = $form->format_amount(\%myconfig, $subtotals{$_}, 2) } @subtotal_columns; - map { $subtotals{$_} = 0 } ('onhand', @subtotal_columns); + map { $subtotals{$_} = 0 } ('soldtotal', @subtotal_columns); $report->add_data($row); diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl index 18058437f..dbefff3be 100644 --- a/bin/mozilla/io.pl +++ b/bin/mozilla/io.pl @@ -400,7 +400,7 @@ sub display_row { if ($is_delivery_order) { map { $form->{"${_}_${i}"} = $form->format_amount(\%myconfig, $form->{"${_}_${i}"}) } qw(sellprice discount lastcost); - push @hidden_vars, qw(sellprice discount not_discountable price_factor_id lastcost); + push @hidden_vars, qw(sellprice discount not_discountable price_factor_id lastcost pricegroup_id); push @hidden_vars, "stock_${stock_in_out}_sum_qty", "stock_${stock_in_out}"; } @@ -1517,7 +1517,6 @@ sub print_form { delete $form->{OUT}; if ($form->{media} eq 'printer') { - #$form->{OUT} = "| $form->{printer_command} &>/dev/null"; $form->{OUT} = $form->{printer_command}; $form->{OUT_MODE} = '|-'; $form->{printed} .= " $form->{formname}"; diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index 59479931f..dd1d8e2c7 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -318,7 +318,7 @@ sub form_header { # openclosed checkboxes my @tmp; push @tmp, sprintf qq||, - $form->{"delivered"} ? "checked" : "", $locale->text('Delivered') if $form->{"type"} =~ /_order$/; + $form->{"delivered"} ? "checked" : "", $locale->text('Delivery Order created') if $form->{"type"} =~ /_order$/; push @tmp, sprintf qq||, $form->{"closed"} ? "checked" : "", $locale->text('Closed') if $form->{id}; $TMPL_VAR{openclosed} = sprintf qq|%s\n|, 2 * scalar @tmp, join "\n", @tmp if @tmp; @@ -833,7 +833,7 @@ sub orders { 'globalprojectnumber' => { 'text' => $locale->text('Project Number'), }, 'transaction_description' => { 'text' => $locale->text('Transaction description'), }, 'open' => { 'text' => $locale->text('Open'), }, - 'delivered' => { 'text' => $locale->text('Delivered'), }, + 'delivered' => { 'text' => $locale->text('Delivery Order created'), }, 'marge_total' => { 'text' => $locale->text('Ertrag'), }, 'marge_percent' => { 'text' => $locale->text('Ertrag prozentual'), }, 'vcnumber' => { 'text' => $form->{vc} eq 'customer' ? $locale->text('Customer Number') : $locale->text('Vendor Number'), }, @@ -879,7 +879,7 @@ sub orders { }; push @options, $locale->text('Open') if $form->{open}; push @options, $locale->text('Closed') if $form->{closed}; - push @options, $locale->text('Delivered') if $form->{delivered}; + push @options, $locale->text('Delivery Order created') if $form->{delivered}; push @options, $locale->text('Not delivered') if $form->{notdelivered}; push @options, $locale->text('Periodic invoices active') if $form->{periodic_invoices_actibe}; @@ -1849,6 +1849,9 @@ sub delivery_order { map { $form->{$_} = $old_values{$_} if ($old_values{$_}) } keys %old_values; + for my $i (1 .. $form->{rowcount}) { + (my $dummy, $form->{"pricegroup_id_$i"}) = split /--/, $form->{"sellprice_pg_$i"}; + } update(); $main::lxdebug->leave_sub(); diff --git a/doc/COPYING b/doc/COPYING index 083bb4150..7edebd1ea 100644 --- a/doc/COPYING +++ b/doc/COPYING @@ -1,13 +1,3 @@ - - - -GNU General Public License - - - - - -
                     GNU GENERAL PUBLIC LICENSE
                        Version 2, June 1991
 
@@ -301,8 +291,8 @@ to attach them to the start of each source file to most effectively
 convey the exclusion of warranty; and each file should have at least
 the "copyright" line and a pointer to where the full notice is found.
 
-    <one line to give the program's name and a brief idea of what it does.>
-    Copyright (C) 19yy  <name of author>
+    
+    Copyright (C) 19yy  
 
     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
@@ -340,7 +330,7 @@ necessary.  Here is a sample; alter the names:
   Yoyodyne, Inc., hereby disclaims all copyright interest in the program
   `Gnomovision' (which makes passes at compilers) written by James Hacker.
 
-  <signature of Ty Coon>, 1 April 1989
+  , 1 April 1989
   Ty Coon, President of Vice
 
 This General Public License does not permit incorporating your program into
@@ -348,8 +338,3 @@ proprietary programs.  If your program is a subroutine library, you may
 consider it more useful to permit linking proprietary applications with the
 library.  If this is what you want to do, use the GNU Library General
 Public License instead of this License.
-
-
-
-
-
diff --git a/doc/changelog b/doc/changelog
index 43f6a01b6..479c59eda 100644
--- a/doc/changelog
+++ b/doc/changelog
@@ -76,8 +76,15 @@
   - Bugfix 1738:  Entwürfe können nicht gelöscht werden
   - Bugfix 1759: Währung bei Kunden / Lieferanten vorbelegen
   - Bugfix 1770: Währung / currency überlebt Workflow über Lieferschein nicht
+  - Bugfix 1770: (zweiter Teil) Preisgruppen überleben Workflow nicht
   - Bugfix 1773: SQL Fehler bei Anzeige von Angeboten
+  - Bugfix 1725: In Mahnungen steht currency nicht als Variable zur Verfügung?
   - Bugfix 1771: Zahlungsausgang: Lieferant wird nicht ausgewählt, wenn Name 2 Leerzeichen hintereinander enthält
+  - Bugfix 1566: Variablen für Verkäufer und USTID in Mahnungsdruck hinzugefügt
+  - Bugfix 1588: Einzelteile eines Erzeugnisses von Verkaufsbericht ausnehmen
+  - Bugfix 1756: Ertrag in Bruttorechnungen korrekt berechnen
+
+
 
 
 2011-06-15 - Release 2.6.3
diff --git a/doc/copyright b/doc/copyright
index 70cdbabcf..3b87ce78a 100644
--- a/doc/copyright
+++ b/doc/copyright
@@ -1,6 +1,6 @@
 ######################################################################
-# Lx-Office ERP                                                  
-# distributed from Linet Services GbR - Braunschweig
+# Lx-Office ERP
+# distributed from Linet Services GmbH - Braunschweig
 #
 # based von SQL-Ledger - Author: Dieter Simander
 #
diff --git a/doc/dbschema.dia b/doc/dbschema.dia
deleted file mode 100644
index 7d6eb0742..000000000
Binary files a/doc/dbschema.dia and /dev/null differ
diff --git a/doc/dokumentenvorlagen-und-variablen.html b/doc/dokumentenvorlagen-und-variablen.html
index 1e0503292..e1dac111b 100644
--- a/doc/dokumentenvorlagen-und-variablen.html
+++ b/doc/dokumentenvorlagen-und-variablen.html
@@ -51,6 +51,9 @@ td {
   
  • Variablen ausgeben
  • +
  • Verwendung in Druckbefehlen +
  • +
  • Anfang und Ende der Tags verändern
  • @@ -229,6 +232,31 @@ td { zum Inhaltsverzeichnis

    +

    Verwendung in Druckbefehlen

    + +

    + In der Admininstration können Drucker definiert werden. Auch im dort + eingebbaren Druckbefehl können die hier aufgelisteten Variablen und + Kontrollstrukturen verwendet werden. Ihr Inhalt wird dabei nach den + Regeln der gängigen Shells formatiert, sodass Sonderzeichen + wie `...` nicht zu unerwünschtem Verhalten führen. +

    + +

    + Dies erlaubt z.B. die Definition eines Faxes als Druckerbefehl, für + das die Telefonnummer eines Ansprechpartners als Teil der + Kommandozeile verwendet wird. Für ein fiktives Kommando könnte das + z.B. wie folgt aussehen: +

    + +

    + send_fax --number <%if cp_phone2%><%cp_phone2%><%else%><%cp_phone1%><%end%> +

    + + + zum Inhaltsverzeichnis
    +
    +

    Anfang und Ende der Tags verändern

    @@ -598,7 +626,7 @@ td { ustid - Usatzsteuer-Identifikationsnummer + Umsatzsteuer-Identifikationsnummer @@ -1196,6 +1224,11 @@ td { dn_transdate Rechnungsdatum + + dn_curr + Währung, in der die Rechnung erstellt wurde. (Die Rechnungsbeträge + sind aber immer in der Hauptwährung) +

    diff --git a/js/checkbox_utils.js b/js/checkbox_utils.js deleted file mode 100644 index b5d4e61d7..000000000 --- a/js/checkbox_utils.js +++ /dev/null @@ -1,15 +0,0 @@ -function checkbox_check_all(cb_name, prefix, start, end) { - var i; - - var control = document.getElementsByName(cb_name)[0]; - if (!control) - return; - - var checked = control.checked; - - for (i = start; i <= end; i++) { - control = document.getElementsByName(prefix + i)[0]; - if (control) - control.checked = checked; - } -} diff --git a/locale/de/all b/locale/de/all index 971c2ac4c..ebc2f8481 100644 --- a/locale/de/all +++ b/locale/de/all @@ -347,7 +347,7 @@ $self->{texts} = { 'Cannot delete quotation!' => 'Angebot kann nicht gelöscht werden!', 'Cannot delete transaction!' => 'Buchung kann nicht gelöscht werden!', 'Cannot delete vendor!' => 'Lieferant kann nicht gelöscht werden!', - 'Cannot find matching template for this print request. Please contact your template maintainer. I tried these: #1.' => '', + 'Cannot find matching template for this print request. Please contact your template maintainer. I tried these: #1.' => 'Konnte keine passende Vorlage für diesen Druckauftrag finden. Bitte benachrichtigen Sie Ihren Vorlagenadministrator. Die folgenden Pfade wurden durchsucht: #1 ', 'Cannot have a value in both Debit and Credit!' => 'Es kann nicht gleichzeitig Soll und Haben gebucht werden!', 'Cannot post Payment!' => 'Zahlung kann nicht gebucht werden!', 'Cannot post Receipt!' => 'Beleg kann nicht gebucht werden!', @@ -577,6 +577,7 @@ $self->{texts} = { 'Delivery Order Date' => 'Lieferscheindatum', 'Delivery Order Date missing!' => 'Lieferscheindatum fehlt!', 'Delivery Order Number' => 'Lieferscheinnummer', + 'Delivery Order created' => 'Lieferschein erstellt', 'Delivery Order deleted!' => 'Lieferschein gelöscht!', 'Delivery Orders' => 'Lieferscheine', 'Department' => 'Abteilung', @@ -1428,6 +1429,7 @@ $self->{texts} = { 'Purpose' => 'Verwendungszweck', 'Qty' => 'Menge', 'Qty according to delivery order' => 'Menge laut Lieferschein', + 'Qty in Selected Records' => 'Menge in gewählten Belegen', 'Qty in stock' => 'Lagerbestand', 'Quantity' => 'Menge', 'Quantity missing.' => 'Die Mengenangabe fehlt.', @@ -1652,6 +1654,7 @@ $self->{texts} = { 'Steuersatz' => 'Steuersatz', 'Stock' => 'Einlagern', 'Stock value' => 'Bestandswert', + 'Stocked Qty' => 'Lagermenge', 'Storno' => 'Storno', 'Storno (one letter abbreviation)' => 'S', 'Storno Invoice' => 'Stornorechnung', @@ -1660,6 +1663,7 @@ $self->{texts} = { 'Subject' => 'Betreff', 'Subject:' => 'Betreff:', 'Subtotal' => 'Zwischensumme', + 'Subtotal cannot distinguish betweens record types. Only one of the selected record types will be displayed: #1' => 'Zwischensummen können nicht zwischen den einzelnen Belegen unterscheiden, es wird nur "#1" angezeigt', 'Such entries cannot be exported into the DATEV format and have to be fixed as well.' => 'Solche Einträge sind aber nicht DATEV-exportiertbar und müssen ebenfalls korrigiert werden.', 'Sum Credit' => 'Summe Haben', 'Sum Debit' => 'Summe Soll', @@ -1878,6 +1882,7 @@ $self->{texts} = { '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 still transfers not matching the qty of the delivery order. Stock operations can not be changed later. Do you really want to proceed?' => 'Einige der Lagerbewegungen sind nicht vollständig und Lagerbewegungen können nachträglich nicht mehr verändert werden. Wollen Sie wirklich fortfahren?', 'There are usually three ways to install Perl modules.' => 'Es gibt normalerweise drei Arten, ein Perlmodul zu installieren.', 'There is at least one sales or purchase invoice for which Lx-Office recorded an inventory transaction with taxkeys even though no tax was recorded.' => 'Es gibt mindestens eine Einkaufs- oder Verkaufsrechnung, für die Lx-Office einen Steuerschlüssel ungleich 0 verzeichnet hat, obwohl für Warenbestandsbuchugen bei Rechnungen nie Steuern gebucht werden.', 'There is at least one transaction for which the user has chosen a logically wrong taxkey.' => 'Es gibt mindestens eine Buchung, bei der ein logisch nicht passender Steuerschlüssel ausgewählt wurde.', diff --git a/locale/de_DE/all b/locale/de_DE/all index 365799921..6ab32d51a 100644 --- a/locale/de_DE/all +++ b/locale/de_DE/all @@ -539,6 +539,7 @@ $self->{texts} = { 'Delivered' => 'Geliefert', 'Delivery Date' => 'Lieferdatum', 'Delivery Order' => 'Lieferschein', + 'Delivery Order created' => 'Lieferschein erstellt', 'Delivery Order Date' => 'Lieferscheindatum', 'Delivery Order Date missing!' => 'Lieferscheindatum fehlt!', 'Delivery Order Number' => 'Lieferscheinnummer', diff --git a/sql/Pg-upgrade2/delivery_order_items_add_pricegroup_id.sql b/sql/Pg-upgrade2/delivery_order_items_add_pricegroup_id.sql new file mode 100644 index 000000000..4d896d11a --- /dev/null +++ b/sql/Pg-upgrade2/delivery_order_items_add_pricegroup_id.sql @@ -0,0 +1,5 @@ +-- @tag: delivery_order_items_add_pricegroup_id +-- @description: Spalten für Preisgruppen-Id für Lieferscheine +-- @depends: release_2_6_3 +-- @charset: utf-8 +ALTER TABLE delivery_order_items ADD COLUMN pricegroup_id integer; diff --git a/sql/Pg-upgrade2/employee_deleted.sql b/sql/Pg-upgrade2/employee_deleted.sql new file mode 100644 index 000000000..939580eed --- /dev/null +++ b/sql/Pg-upgrade2/employee_deleted.sql @@ -0,0 +1,5 @@ +-- @tag: employee_deleted +-- @description: Benutzer löschbar machen +-- @depends: release_2_6_3 + +ALTER TABLE employee ADD COLUMN deleted BOOLEAN DEFAULT 'f'; diff --git a/templates/webpages/admin/create_dataset.html b/templates/webpages/admin/create_dataset.html index 00768f1d8..ba2d72414 100644 --- a/templates/webpages/admin/create_dataset.html +++ b/templates/webpages/admin/create_dataset.html @@ -58,7 +58,9 @@ + * für die Bestandsmethode gibt es Einschränkungen, siehe Bemerkungen in EUR Umstellung in Mandant. + diff --git a/templates/webpages/admin/list_users.html b/templates/webpages/admin/list_users.html index eb55dc51c..2e6228fb9 100644 --- a/templates/webpages/admin/list_users.html +++ b/templates/webpages/admin/list_users.html @@ -40,8 +40,8 @@ - + [% IF LOCKED %] [% ELSE %] diff --git a/templates/webpages/do/form_footer.html b/templates/webpages/do/form_footer.html index b81ce8cfe..a6a51299e 100644 --- a/templates/webpages/do/form_footer.html +++ b/templates/webpages/do/form_footer.html @@ -68,9 +68,9 @@ [%- UNLESS delivered %] [%- IF vc == 'customer' %] - + [%- ELSE %] - + [%- END %] [%- END %] [%- IF id %] @@ -96,6 +96,22 @@ - + diff --git a/templates/webpages/do/set_stock_in_out.html b/templates/webpages/do/set_stock_in_out.html index 07e084d4d..811059444 100644 --- a/templates/webpages/do/set_stock_in_out.html +++ b/templates/webpages/do/set_stock_in_out.html @@ -9,6 +9,7 @@ var row = $('#row').attr('value'); window.opener.document.getElementsByName("stock_" + $('#in_out').attr('value') + "_" + row)[0].value = $('#stock').attr('value'); $(window.opener.document.getElementById("stock_in_out_qty_display_" + row)).html($('#qty_display').attr('value')); + $(window.opener.document.getElementById("stock_in_out_qty_matches_" + row)).val([% qty_matches %]); window.close(); } diff --git a/templates/webpages/dunning/show_invoices.html b/templates/webpages/dunning/show_invoices.html index db6b1adfd..cd8c43422 100644 --- a/templates/webpages/dunning/show_invoices.html +++ b/templates/webpages/dunning/show_invoices.html @@ -1,6 +1,10 @@ [%- USE T8 %] -[% USE HTML %] - +[% USE HTML %] +[% USE L %] +[% L.javascript_tag('jquery.checkall') %] +[% SET all_active = 1 %][% FOREACH row = DUNNINGS %][% IF !row.active %][% SET all_active = 0 %][% LAST %][% END %][% END %] +[% SET all_email = 1 %][% FOREACH row = DUNNINGS %][% IF !row.email %][% SET all_email = 0 %][% LAST %][% END %][% END %] + @@ -14,12 +18,12 @@ [% 'Current / Next Level' | $T8 %] - + [% L.checkbox_tag('selectall_active', checkall='INPUT[name*=active_]', checked=all_active) %] - + [% L.checkbox_tag('selectall_email', checkall='INPUT[name*=email_]', checked=all_email) %] diff --git a/templates/webpages/ic/search.html b/templates/webpages/ic/search.html index 1d94fe808..18ef3d293 100644 --- a/templates/webpages/ic/search.html +++ b/templates/webpages/ic/search.html @@ -258,7 +258,7 @@ - + @@ -266,6 +266,13 @@ + + + + + + + [% CUSTOM_VARIABLES_INCLUSION_CODE %] diff --git a/templates/webpages/oe/search.html b/templates/webpages/oe/search.html index 788a1a283..22d83b017 100644 --- a/templates/webpages/oe/search.html +++ b/templates/webpages/oe/search.html @@ -148,7 +148,7 @@ - + [%- END %]