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
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);
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 =
$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"});
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
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];
# 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/<br>\n/g;
- $myconfig->{signature} =~ s/\n/<br>\n/g;
- $mail->{message} .= "<br>\n-- <br>\n$myconfig->{signature}\n<br>";
+ $mail->{contenttype} = "text/html";
+ $mail->{message} =~ s/\r//g;
+ $mail->{message} =~ s/\n/<br>\n/g;
+ $myconfig->{signature} =~ s/\n/<br>\n/g;
+ $mail->{message} .= "<br>\n-- <br>\n$myconfig->{signature}\n<br>";
open(IN, "<", $self->{tmpfile})
or $self->error($self->cleanup . "$self->{tmpfile} : $!");
- while (<IN>) {
- $mail->{message} .= $_;
- }
-
+ $mail->{message} .= $_ while <IN>;
close(IN);
} else {
#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 <IN>;
close OUT;
- seek IN, 0, 0;
+ seek IN, 0, 0;
} else {
$self->{attachment_filename} = ($self->{attachment_filename})
$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...
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;
use SL::Template::LaTeX;
use SL::Template::OpenDocument;
use SL::Template::PlainText;
+use SL::Template::ShellCommand;
use SL::Template::XML;
sub create {
--- /dev/null
+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;
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);
}
$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/.--./) {
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);
'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})
+ : ''),
};
}
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
}
$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;
}
+ # 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();
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();
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|<span id="stock_in_out_qty_display_${i}">${content}</span> <input type="button" onclick="open_stock_in_out_window('${in_out}', $i);" value="?">|;
+ $content = qq|<span id="stock_in_out_qty_display_${i}">${content}</span><input type=hidden id='stock_in_out_qty_matches_$i' value='$matches'> <input type="button" onclick="open_stock_in_out_window('${in_out}', $i);" value="?">|;
$main::lxdebug->leave_sub();
_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();
}
} 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();
'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'), },
'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'), },
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}'",
);
}
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};
|| $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 };
$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');
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
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);
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}";
}
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}";
# openclosed checkboxes
my @tmp;
push @tmp, sprintf qq|<input name="delivered" id="delivered" type="checkbox" class="checkbox" value="1" %s><label for="delivered">%s</label>|,
- $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|<input name="closed" id="closed" type="checkbox" class="checkbox" value="1" %s><label for="closed">%s</label>|,
$form->{"closed"} ? "checked" : "", $locale->text('Closed') if $form->{id};
$TMPL_VAR{openclosed} = sprintf qq|<tr><td colspan=%d align=center>%s</td></tr>\n|, 2 * scalar @tmp, join "\n", @tmp if @tmp;
'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'), },
};
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};
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();
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
-<HTML>
-<HEAD>
-<TITLE>GNU General Public License</TITLE>
-</HEAD>
-
-<BODY BGCOLOR=ffffff>
-
-
-<pre>
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
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>
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) 19yy <name of author>
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
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
+ <signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
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.
-
-
-</BODY>
-</HTML>
-
- 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
######################################################################
-# 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
#
<li><a href="#variablen_ausgeben">Variablen ausgeben</a>
</li>
+ <li><a href="#verwendung_in_druckbefehlen">Verwendung in Druckbefehlen</a>
+ </li>
+
<li><a href="dokumentenvorlagen-und-variablen.html#tag_style">
Anfang und Ende der Tags verändern</a></li>
zum Inhaltsverzeichnis</a></small><br>
<hr>
+ <h2><a name="verwendung_in_druckbefehlen">Verwendung in Druckbefehlen</a></h2>
+
+ <p>
+ 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 <code>`...`</code> nicht zu unerwünschtem Verhalten führen.
+ </p>
+
+ <p>
+ 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:
+ </p>
+
+ <p>
+ <code>send_fax --number <%if cp_phone2%><%cp_phone2%><%else%><%cp_phone1%><%end%></code>
+ </p>
+
+ <small><a href="dokumentenvorlagen-und-variablen.html#inhaltsverzeichnis">
+ zum Inhaltsverzeichnis</a></small><br>
+ <hr>
+
<h2><a name="tag_style">
Anfang und Ende der Tags verändern</a></h2>
</tr>
<tr>
<td><code>ustid</code></td>
- <td>Usatzsteuer-Identifikationsnummer</td>
+ <td>Umsatzsteuer-Identifikationsnummer</td>
</tr>
<tr>
<tr>
<td><code>dn_transdate</code></td>
<td>Rechnungsdatum</td>
</tr>
+ <tr>
+ <td><code>dn_curr</code></td>
+ <td>Währung, in der die Rechnung erstellt wurde. (Die Rechnungsbeträge
+ sind aber immer in der Hauptwährung)</td>
+ </tr>
</table>
</p>
+++ /dev/null
-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;
- }
-}
'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!',
'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',
'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.',
'Steuersatz' => 'Steuersatz',
'Stock' => 'Einlagern',
'Stock value' => 'Bestandswert',
+ 'Stocked Qty' => 'Lagermenge',
'Storno' => 'Storno',
'Storno (one letter abbreviation)' => 'S',
'Storno Invoice' => 'Stornorechnung',
'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',
'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.',
'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',
--- /dev/null
+-- @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;
--- /dev/null
+-- @tag: employee_deleted
+-- @description: Benutzer löschbar machen
+-- @depends: release_2_6_3
+
+ALTER TABLE employee ADD COLUMN deleted BOOLEAN DEFAULT 'f';
<select name="inventory_system">
[% FOREACH row = INVENTORY_SYSTEMS %]<option value=[% HTML.escape(row.name) %] [% IF row.selected %]selected[% END %]>[% HTML.escape(row.name) | $T8 %]</option>[% END %]
</select>
+ * für die Bestandsmethode gibt es Einschränkungen, siehe Bemerkungen in <a href="doc/umstellung_eur.txt">EUR Umstellung in Mandant</a>.
</td>
+
</tr>
<tr>
<input type="submit" class="submit" name="action" value="[% 'Add User' | $T8 %]">
<input type="submit" class="submit" name="action" value="[% 'Edit groups' | $T8 %]">
- <input type="submit" class="submit" name="action" value="[% 'Printer Management' | $T8 %]">
<input type="submit" class="submit" name="action" value="[% 'Pg Database Administration' | $T8 %]">
+ <input type="submit" class="submit" name="action" value="[% 'Printer Management' | $T8 %]">
[% IF LOCKED %]
<input type="submit" class="submit" name="action" value="[% 'Unlock System' | $T8 %]">
[% ELSE %]
[%- UNLESS delivered %]
<input class="submit" type="submit" name="action_save" value="[% 'Save' | $T8 %]">
[%- IF vc == 'customer' %]
- <input class="submit" type="submit" name="action_transfer_out" value="[% 'Transfer out' | $T8 %]">
+ <input class="submit" type="submit" name="action_transfer_out" onclick="return check_transfer_qty()" value="[% 'Transfer out' | $T8 %]">
[%- ELSE %]
- <input class="submit" type="submit" name="action_transfer_in" value="[% 'Transfer in' | $T8 %]">
+ <input class="submit" type="submit" name="action_transfer_in" onclick="return check_transfer_qty()" value="[% 'Transfer in' | $T8 %]">
[%- END %]
[%- END %]
[%- IF id %]
<input name="callback" type="hidden" value="[% HTML.escape(callback) %]">
</form>
-
+<script type='text/javascript'>
+ function check_transfer_qty() {
+ var all_match = true;
+ var rowcount = $('input[name=rowcount]').val();
+ for (var i = 1; i < rowcount; i++) {
+ if ($('#stock_in_out_qty_matches_' + i).val() != 1) {
+ all_match = false;
+ }
+ }
+
+ if (all_match) {
+ return true;
+ } else {
+ return confirm("[% '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?' | $T8 %]");
+ }
+ }
+</script>
</body>
</html>
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();
}
[%- USE T8 %]
-[% USE HTML %]<body>
- <script type="text/javascript" src="js/checkbox_utils.js"></script>
+[% 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 %]
+<body>
<script type="text/javascript" src="js/common.js"></script>
<script type="text/javascript" src="js/dunning.js"></script>
<th class="listheading" colspan="2">[% 'Current / Next Level' | $T8 %]</th>
<th class="listheading">
- <input type="checkbox" name="selectall_active" id="selectall_active" onclick="checkbox_check_all('selectall_active', 'active_', 1, [% rowcount %]);">
+ [% L.checkbox_tag('selectall_active', checkall='INPUT[name*=active_]', checked=all_active) %]
<label for="selectall_active">[% 'Active?' | $T8 %]</label>
</th>
<th class="listheading">
- <input type="checkbox" name="selectall_email" id="selectall_email" onclick="checkbox_check_all('selectall_email', 'email_', 1, [% rowcount %]);">
+ [% L.checkbox_tag('selectall_email', checkall='INPUT[name*=email_]', checked=all_email) %]
<label for="selectall_email">[% 'eMail?' | $T8 %]</label>
</th>
</td>
<td>
<input name="l_soldtotal" id="l_soldtotal" class="checkbox" type="checkbox" value="Y">
- <label for="l_soldtotal">[% 'soldtotal' | $T8 %]</label>
+ <label for="l_soldtotal">[% 'Qty in Selected Records' | $T8 %]</label>
</td>
<td>
<input name="l_ean" id="l_ean" class="checkbox" type="checkbox" value="Y">
</td>
</tr>
+ <tr>
+ <td>
+ <input name="l_onhand" id="l_onhand" class="checkbox" type="checkbox" value="Y">
+ <label for="l_onhand">[% 'Stocked Qty' | $T8 %]</label>
+ </td>
+ </tr>
+
[% CUSTOM_VARIABLES_INCLUSION_CODE %]
</table>
</td>
</td>
<td>
<input name="delivered" id="delivered" class="checkbox" type="checkbox" value="1" checked>
- <label for="delivered">[% 'Delivered' | $T8 %]</label>
+ <label for="delivered">[% 'Delivery Order created' | $T8 %]</label>
</td>
</tr>
[%- END %]