From: Philip Reetz Date: Tue, 19 Jun 2007 09:42:37 +0000 (+0000) Subject: Erweiterung um Anzeige des Ertrages im Verkauf X-Git-Tag: release-2.4.3^2~99 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=4d8a65151cff0399654ea47c196ab38361a976e8;p=kivitendo-erp.git Erweiterung um Anzeige des Ertrages im Verkauf --- diff --git a/SL/AR.pm b/SL/AR.pm index b716b208c..cd4063695 100644 --- a/SL/AR.pm +++ b/SL/AR.pm @@ -412,6 +412,7 @@ sub ar_transactions { qq| a.duedate, a.netamount, a.amount, a.paid, | . qq| a.invoice, a.datepaid, a.terms, a.notes, a.shipvia, | . qq| a.shippingpoint, a.storno, a.globalproject_id, | . + qq| a.marge_total, a.marge_percent, | . qq| a.transaction_description, | . qq| pr.projectnumber AS globalprojectnumber, | . qq| c.name, | . diff --git a/SL/IS.pm b/SL/IS.pm index b47944bdc..261c7c1e4 100644 --- a/SL/IS.pm +++ b/SL/IS.pm @@ -551,6 +551,10 @@ sub post_invoice { my $basefactor; my $basqty; + $form->{"marge_percent_$i"} = $form->parse_amount($myconfig, $form->{"marge_percent_$i"}) * 1; + $form->{"marge_absolut_$i"} = $form->parse_amount($myconfig, $form->{"marge_absolut_$i"}) * 1; + $form->{"lastcost_$i"} = $form->{"lastcost_$i"} * 1; + if ($form->{storno}) { $form->{"qty_$i"} *= -1; } @@ -688,8 +692,9 @@ sub post_invoice { qq|INSERT INTO invoice (trans_id, parts_id, description, longdescription, qty, sellprice, fxsellprice, discount, allocated, assemblyitem, unit, deliverydate, project_id, serialnumber, pricegroup_id, - ordnumber, transdate, cusordnumber, base_qty, subtotal) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)|; + ordnumber, transdate, cusordnumber, base_qty, subtotal, + marge_percent, marge_total, lastcost) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)|; @values = (conv_i($form->{id}), conv_i($form->{"id_$i"}), $form->{"description_$i"}, $form->{"longdescription_$i"}, $form->{"qty_$i"}, @@ -698,7 +703,9 @@ sub post_invoice { $form->{"unit_$i"}, conv_date($form->{"deliverydate_$i"}), conv_i($form->{"project_id_$i"}), $form->{"serialnumber_$i"}, conv_i($pricegroup_id), $form->{"ordnumber_$i"}, conv_date($form->{"transdate_$i"}), - $form->{"cusordnumber_$i"}, $baseqty, $subtotal); + $form->{"cusordnumber_$i"}, $baseqty, $subtotal, + $form->{"marge_percent_$i"}, $form->{"marge_absolut_$i"}, + $form->{"lastcost_$i"}); do_query($form, $dbh, $query, @values); if ($form->{lizenzen} && $form->{"licensenumber_$i"}) { @@ -986,7 +993,9 @@ Message: $form->{message}\r| if $form->{message}; storno = ?, globalproject_id = ?, cp_id = ?, - transaction_description = ? + transaction_description = ?, + marge_total = ?, + marge_percent = ? WHERE id = ?|; @values = ($form->{"invnumber"}, $form->{"ordnumber"}, $form->{"quonumber"}, $form->{"cusordnumber"}, conv_date($form->{"invdate"}), conv_date($form->{"orddate"}), conv_date($form->{"quodate"}), @@ -1001,6 +1010,7 @@ Message: $form->{message}\r| if $form->{message}; conv_i($form->{"employee_id"}), conv_i($form->{"salesman_id"}), $form->{"storno"} ? 't' : 'f', conv_i($form->{"globalproject_id"}), conv_i($form->{"cp_id"}), $form->{transaction_description}, + $form->{marge_total}, $form->{marge_percent}, conv_i($form->{"id"})); do_query($form, $dbh, $query, @values); @@ -1477,7 +1487,7 @@ sub retrieve_invoice { i.description, i.longdescription, i.qty, i.fxsellprice AS sellprice, i.discount, i.parts_id AS id, i.unit, i.deliverydate, i.project_id, i.serialnumber, i.id AS invoice_pos, i.pricegroup_id, - i.ordnumber, i.transdate, i.cusordnumber, i.subtotal, + i.ordnumber, i.transdate, i.cusordnumber, i.subtotal, i.lastcost, p.partnumber, p.assembly, p.bin, p.notes AS partnotes, p.inventory_accno_id AS part_inventory_accno_id, p.formel, diff --git a/SL/OE.pm b/SL/OE.pm index 32ba235d9..5da147800 100644 --- a/SL/OE.pm +++ b/SL/OE.pm @@ -67,6 +67,7 @@ sub transactions { qq| o.amount, ct.name, o.netamount, o.${vc}_id, o.globalproject_id, | . qq| o.closed, o.delivered, o.quonumber, o.shippingpoint, o.shipvia, | . qq| o.transaction_description, | . + qq| o.marge_total, o.marge_percent, | . qq| ex.$rate AS exchangerate, | . qq| pr.projectnumber AS globalprojectnumber, | . qq| e.name AS employee | . @@ -246,6 +247,10 @@ sub save { } my $baseqty = $form->{"qty_$i"} * $basefactor; + $form->{"marge_percent_$i"} = $form->parse_amount($myconfig, $form->{"marge_percent_$i"}) * 1; + $form->{"marge_absolut_$i"} = $form->parse_amount($myconfig, $form->{"marge_absolut_$i"}) * 1; + $form->{"lastcost_$i"} = $form->{"lastcost_$i"} * 1; + # set values to 0 if nothing entered $form->{"discount_$i"} = $form->parse_amount($myconfig, $form->{"discount_$i"}) / 100; @@ -335,13 +340,14 @@ sub save { } $query .= qq|trans_id, parts_id, description, longdescription, qty, base_qty, | . qq|sellprice, discount, unit, reqdate, project_id, serialnumber, ship, | . - qq|pricegroup_id, ordnumber, transdate, cusordnumber, subtotal) | . + qq|pricegroup_id, ordnumber, transdate, cusordnumber, subtotal, | . + qq|marge_percent, marge_total, lastcost) | . qq|VALUES (|; if($form->{"orderitems_id_$i"}) { $query .= qq|?,|; push(@values, $form->{"orderitems_id_$i"}); } - $query .= qq|?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)|; + $query .= qq|?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)|; push(@values, conv_i($form->{id}), conv_i($form->{"id_$i"}), $form->{"description_$i"}, $form->{"longdescription_$i"}, @@ -350,7 +356,9 @@ sub save { $form->{"unit_$i"}, conv_date($reqdate), conv_i($form->{"project_id_$i"}), $form->{"serialnumber_$i"}, $form->{"ship_$i"}, conv_i($pricegroup_id), $form->{"ordnumber_$i"}, conv_date($form->{"transdate_$i"}), - $form->{"cusordnumber_$i"}, $subtotal); + $form->{"cusordnumber_$i"}, $subtotal, + $form->{"marge_percent_$i"}, $form->{"marge_absolut_$i"}, + $form->{"lastcost_$i"}); do_query($form, $dbh, $query, @values); $form->{"sellprice_$i"} = $fxsellprice; @@ -419,7 +427,7 @@ Message: $form->{message}\r| if $form->{message}; qq|shippingpoint = ?, shipvia = ?, notes = ?, intnotes = ?, curr = ?, closed = ?, | . qq|delivered = ?, proforma = ?, quotation = ?, department_id = ?, language_id = ?, | . qq|taxzone_id = ?, shipto_id = ?, payment_id = ?, delivery_vendor_id = ?, delivery_customer_id = ?, | . - qq|globalproject_id = ?, employee_id = ?, salesman_id = ?, cp_id = ?, transaction_description = ? | . + qq|globalproject_id = ?, employee_id = ?, salesman_id = ?, cp_id = ?, transaction_description = ?, marge_total = ?, marge_percent = ?| . qq|WHERE id = ?|; @values = ($form->{ordnumber}, $form->{quonumber}, @@ -438,6 +446,7 @@ Message: $form->{message}\r| if $form->{message}; conv_i($form->{globalproject_id}), conv_i($form->{employee_id}), conv_i($form->{salesman_id}), conv_i($form->{cp_id}), $form->{transaction_description}, + $form->{marge_total}, $form->{marge_percent}, conv_i($form->{id})); do_query($form, $dbh, $query, @values); @@ -767,7 +776,7 @@ sub retrieve { qq| oe.ordnumber AS ordnumber_oe, oe.transdate AS transdate_oe, oe.cusordnumber AS cusordnumber_oe, | . qq| p.partnumber, p.assembly, o.description, o.qty, | . qq| o.sellprice, o.parts_id AS id, o.unit, o.discount, p.bin, p.notes AS partnotes, p.inventory_accno_id AS part_inventory_accno_id, | . - qq| o.reqdate, o.project_id, o.serialnumber, o.ship, | . + qq| o.reqdate, o.project_id, o.serialnumber, o.ship, o.lastcost, | . qq| o.ordnumber, o.transdate, o.cusordnumber, o.subtotal, o.longdescription, | . qq| pr.projectnumber, p.formel, | . qq| pg.partsgroup, o.pricegroup_id, (SELECT pricegroup FROM pricegroup WHERE id=o.pricegroup_id) as pricegroup | . diff --git a/bin/mozilla/ar.pl b/bin/mozilla/ar.pl index 411b3f934..699cb7dee 100644 --- a/bin/mozilla/ar.pl +++ b/bin/mozilla/ar.pl @@ -1340,6 +1340,12 @@ sub search { | . $locale->text('Ship via') . qq| + + | + . $locale->text('Ertrag') . qq| + | + . $locale->text('Ertrag prozentual') . qq| + | . $locale->text('Subtotal') . qq| @@ -1417,7 +1423,7 @@ sub ar_transactions { @columns = qw(transdate id type invnumber ordnumber name netamount tax amount paid datepaid due duedate transaction_description notes employee shippingpoint shipvia - globalprojectnumber); + marge_total marge_percent globalprojectnumber); my @hidden_variables = map { "l_${_}" } @columns; push @hidden_variables, "l_subtotal", qw(open closed customer invnumber ordnumber transaction_description notes project_id transdatefrom transdateto); @@ -1444,6 +1450,8 @@ sub ar_transactions { 'shippingpoint' => { 'text' => $locale->text('Shipping Point'), }, 'shipvia' => { 'text' => $locale->text('Ship via'), }, 'globalprojectnumber' => { 'text' => $locale->text('Project Number'), }, + 'marge_total' => { 'text' => $locale->text('Ertrag'), }, + 'marge_percent' => { 'text' => $locale->text('Ertrag prozentual'), }, ); foreach my $name (qw(id transdate duedate invnumber ordnumber name datepaid @@ -1510,7 +1518,7 @@ sub ar_transactions { # escape callback for href $callback = $form->escape($href); - my @subtotal_columns = qw(netamount amount paid due); + my @subtotal_columns = qw(netamount amount paid due marge_total); my %totals = map { $_ => 0 } @subtotal_columns; my %subtotals = map { $_ => 0 } @subtotal_columns; @@ -1524,7 +1532,7 @@ sub ar_transactions { map { $subtotals{$_} += $ar->{$_}; $totals{$_} += $ar->{$_} } @subtotal_columns; - map { $ar->{$_} = $form->format_amount(\%myconfig, $ar->{$_}, 2) } qw(netamount tax amount paid due); + map { $ar->{$_} = $form->format_amount(\%myconfig, $ar->{$_}, 2) } qw(netamount tax amount paid due marge_total marge_percent); my $is_storno = $ar->{storno} && IS->is_storno(\%myconfig, $form, 'ar'); my $has_storno = $ar->{storno} && !$is_storno; diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl index 8eb6363cf..1a018a5cb 100644 --- a/bin/mozilla/io.pl +++ b/bin/mozilla/io.pl @@ -241,6 +241,9 @@ sub display_row { $delvar = 'reqdate'; } + $form->{marge_total} = 0; + $form->{sellprice_total} = 0; + $form->{lastcost_total} = 0; my %projectnumber_labels = (); my @projectnumber_values = (""); foreach my $item (@{ $form->{"ALL_PROJECTS"} }) { @@ -300,6 +303,37 @@ sub display_row { $linetotal = $form->round_amount($form->{"sellprice_$i"} - $discount, $decimalplaces); $linetotal = $form->round_amount($linetotal * $form->{"qty_$i"}, 2); + my $real_sellprice = $form->{"sellprice_$i"} - $discount; + + # marge calculations + my ($marge_font_start, $marge_font_end); + $form->{"lastcost_$i"} *= 1; + if ($real_sellprice && ($form->{"qty_$i"} * 1)) { + $form->{"marge_percent_$i"} = + ($real_sellprice - $form->{"lastcost_$i"}) * 100 / $real_sellprice; + + $myconfig{"marge_percent_warn"} = 15 + unless (defined($myconfig{"marge_percent_warn"})); + if ($form->{"id_$i"} && + ($form->{"marge_percent_$i"} < + (1 * $myconfig{"marge_percent_warn"}))) { + $marge_font_start = ""; + $marge_font_end = ""; + } + } else { + $form->{"marge_percent_$i"} = 0; + } + $form->{"marge_absolut_$i"} = + ($real_sellprice - $form->{"lastcost_$i"}) * $form->{"qty_$i"}; + $form->{"marge_total"} += $form->{"marge_absolut_$i"}; + $form->{"lastcost_total"} += $form->{"lastcost_$i"} * $form->{"qty_$i"}; + $form->{"sellprice_total"} += $real_sellprice * $form->{"qty_$i"}; + + map { + $form->{"${_}_$i"} = + $form->format_amount(\%myconfig, $form->{"${_}_$i"}, + 2) + } qw(marge_absolut marge_percent); # convert " to " map { $form->{"${_}_$i"} =~ s/\"/"/g } @@ -439,7 +473,7 @@ sub display_row { "id_$i", "inventory_accno_$i", "bin_$i", "partsgroup_$i", "partnotes_$i", "income_accno_$i", "expense_accno_$i", "listprice_$i", "assembly_$i", "taxaccounts_$i", "ordnumber_$i", "transdate_$i", "cusordnumber_$i", - "longdescription_$i", "basefactor_$i")); + "longdescription_$i", "basefactor_$i", "marge_absolut_$i", "marge_percent_$i", "lastcost_$i")); ######################################## # Eintrag fuer Version 2.2.0 geaendert # @@ -492,9 +526,14 @@ sub display_row { my $subtotalchecked = ($form->{"subtotal_$i"}) ? "checked" : ""; print qq| |.$locale->text('Subtotal').qq|  +|; + + print qq| + ${marge_font_start}|.$locale->text('Ertrag').qq| $form->{"marge_absolut_$i"}  $form->{"marge_percent_$i"} % ${marge_font_end} +  |.$locale->text('LP').qq| |.$form->format_amount(\%myconfig,$form->{"listprice_$i"},2).qq| +  |.$locale->text('EK').qq| |.$form->format_amount(\%myconfig,$form->{"lastcost_$i"},2).qq| - |; ############## ENDE Neueintrag ################## @@ -511,6 +550,10 @@ sub display_row { |; + if (0 != ($form->{sellprice_total} * 1)) { + $form->{marge_percent} = ($form->{sellprice_total} - $form->{lastcost_total}) / $form->{sellprice_total} * 100; + } + $lxdebug->leave_sub(); } @@ -647,7 +690,7 @@ sub select_item { my @new_fields = qw(bin listprice inventory_accno income_accno expense_accno unit weight assembly taxaccounts partsgroup formel longdescription not_discountable - part_payment_id partnotes id); + part_payment_id partnotes id lastcost); push(@new_fields, "lizenzen") if ($lizenzen); print join "\n", map { $cgi->hidden("-name" => "new_${_}_$i", "-value" => $ref->{$_}) } @new_fields; @@ -946,7 +989,7 @@ sub check_form { my @a = (); my $count = 0; my @flds = ( - qw(id partnumber description qty ship sellprice unit discount inventory_accno income_accno expense_accno listprice taxaccounts bin assembly weight projectnumber project_id oldprojectnumber runningnumber serialnumber partsgroup payment_id not_discountable shop ve gv buchungsgruppen_id language_values sellprice_pg pricegroup_old price_old price_new unit_old ordnumber transdate longdescription basefactor) + qw(id partnumber description qty ship sellprice unit discount inventory_accno income_accno expense_accno listprice taxaccounts bin assembly weight projectnumber project_id oldprojectnumber runningnumber serialnumber partsgroup payment_id not_discountable shop ve gv buchungsgruppen_id language_values sellprice_pg pricegroup_old price_old price_new unit_old ordnumber transdate longdescription basefactor marge_absolut marge_percent lastcost ) ); diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index 0b7e00088..9b1d61c90 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -923,9 +923,23 @@ sub form_footer { - + + + + + + + + + + + + +
| . $locale->text('Ertrag') . qq|| . $form->format_amount(\%myconfig, $form->{marge_total}, 2, 0) . qq|
| . $locale->text('Ertrag prozentual') . qq|| . $form->format_amount(\%myconfig, $form->{marge_percent}, 2, 0) . qq| %
+ + $taxincluded - +
$subtotal $tax diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index df883fc21..52463623e 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -1010,9 +1010,23 @@ sub form_footer {
- + + + + + + + + + + + + +
| . $locale->text('Ertrag') . qq|| . $form->format_amount(\%myconfig, $form->{marge_total}, 2, 0) . qq|
| . $locale->text('Ertrag prozentual') . qq|| . $form->format_amount(\%myconfig, $form->{marge_percent}, 2, 0) . qq| %
+ + $taxincluded - +
$subtotal $tax @@ -1534,6 +1548,12 @@ sub search { . $locale->text('Total') . qq| + + + +
| + . $locale->text('Ertrag') . qq| | + . $locale->text('Ertrag prozentual') . qq|
| . $locale->text('Project Number') . qq| | @@ -1611,7 +1631,7 @@ sub orders { "curr", "employee", "shipvia", "globalprojectnumber", "transaction_description", "open", - "delivered" + "delivered", "marge_total", "marge_percent" ); # only show checkboxes if gotten here via sales_order form. @@ -1669,6 +1689,8 @@ sub orders { 'transaction_description' => { 'text' => $locale->text('Transaction description'), }, 'open' => { 'text' => $locale->text('Open'), }, 'delivered' => { 'text' => $locale->text('Delivered'), }, + 'marge_total' => { 'text' => $locale->text('Ertrag'), }, + 'marge_percent' => { 'text' => $locale->text('Ertrag prozentual'), } ); foreach my $name (qw(id transdate reqdate quonumber ordnumber name employee shipvia)) { @@ -1742,7 +1764,7 @@ sub orders { # escape callback for href $callback = $form->escape($href); - my @subtotal_columns = qw(netamount amount); + my @subtotal_columns = qw(netamount amount marge_total); my %totals = map { $_ => 0 } @subtotal_columns; my %subtotals = map { $_ => 0 } @subtotal_columns; @@ -1761,7 +1783,7 @@ sub orders { map { $subtotals{$_} += $oe->{$_}; $totals{$_} += $oe->{$_} } @subtotal_columns; - map { $oe->{$_} = $form->format_amount(\%myconfig, $oe->{$_}, 2) } qw(netamount tax amount); + map { $oe->{$_} = $form->format_amount(\%myconfig, $oe->{$_}, 2) } qw(netamount tax amount marge_total marge_percent); my $row = { }; diff --git a/locale/de/all b/locale/de/all index 1f69bc957..d19fcd7ff 100644 --- a/locale/de/all +++ b/locale/de/all @@ -413,6 +413,7 @@ aktualisieren wollen?', 'E-mail address missing!' => 'E-Mail-Adresse fehlt!', 'EAN' => 'EAN', 'EAN-Code' => 'EAN-Code', + 'EK' => 'EK', 'ELSE' => 'Zusatz', 'ELSTER Export (Taxbird)' => 'ELSTER-Export nach Taxbird', 'ELSTER Export (Winston)' => 'ELSTER Export nach Winston', @@ -475,6 +476,8 @@ aktualisieren wollen?', 'Error' => 'Fehler', 'Error in database control file \'%s\': %s' => 'Fehler in Datenbankupgradekontrolldatei \'%s\': %s', 'Error!' => 'Fehler!', + 'Ertrag' => 'Ertrag', + 'Ertrag prozentual' => 'Ertrag prozentual', 'Escape character' => 'Escape-Zeichen', 'Exch' => 'Wechselkurs.', 'Exchangerate' => 'Wechselkurs', @@ -618,6 +621,7 @@ aktualisieren wollen?', 'Korrektur' => 'Korrektur', 'Kundennummer' => 'Kundennummer', 'L' => 'L', + 'LP' => 'LP', 'LaTeX Templates' => 'LaTeX-Vorlagen', 'Landscape' => 'Querformat', 'Language' => 'Sprache', diff --git a/locale/de/ar b/locale/de/ar index d51a87364..31991494e 100644 --- a/locale/de/ar +++ b/locale/de/ar @@ -61,6 +61,8 @@ $self->{texts} = { 'Edit Accounts Receivables Transaction' => 'Debitorenbuchung bearbeiten', 'Enter longdescription' => 'Langtext eingeben', 'Error in database control file \'%s\': %s' => 'Fehler in Datenbankupgradekontrolldatei \'%s\': %s', + 'Ertrag' => 'Ertrag', + 'Ertrag prozentual' => 'Ertrag prozentual', 'Exch' => 'Wechselkurs.', 'Exchangerate' => 'Wechselkurs', 'Exchangerate for payment missing!' => 'Es fehlt der Wechselkurs für die Bezahlung!', diff --git a/locale/de/dn b/locale/de/dn index 286acbb76..a56aa3732 100644 --- a/locale/de/dn +++ b/locale/de/dn @@ -58,10 +58,12 @@ $self->{texts} = { 'Dunning overview' => 'Mahnungsübersicht', 'E-mail' => 'eMail', 'E-mail address missing!' => 'E-Mail-Adresse fehlt!', + 'EK' => 'EK', 'ELSE' => 'Zusatz', 'Edit Dunning Process Config' => 'Mahnwesenkonfiguration bearbeiten', 'Enter longdescription' => 'Langtext eingeben', 'Error in database control file \'%s\': %s' => 'Fehler in Datenbankupgradekontrolldatei \'%s\': %s', + 'Ertrag' => 'Ertrag', 'Extended' => 'Gesamt', 'Falsches Datumsformat!' => 'Falsches Datumsformat!', 'Fax' => 'Fax', @@ -85,6 +87,7 @@ $self->{texts} = { 'Jun' => 'Jun', 'June' => 'Juni', 'L' => 'L', + 'LP' => 'LP', 'License' => 'Lizenz', 'MAILED' => 'Gesendet', 'Mar' => 'März', diff --git a/locale/de/ic b/locale/de/ic index 46f21bcfe..4892d8e72 100644 --- a/locale/de/ic +++ b/locale/de/ic @@ -61,6 +61,7 @@ aktualisieren wollen?', 'E-mail address missing!' => 'E-Mail-Adresse fehlt!', 'EAN' => 'EAN', 'EAN-Code' => 'EAN-Code', + 'EK' => 'EK', 'ELSE' => 'Zusatz', 'Edit ' => 'Bearbeiten', 'Edit Assembly' => 'Erzeugnis bearbeiten', @@ -68,6 +69,7 @@ aktualisieren wollen?', 'Edit Service' => 'Dienstleistung bearbeiten', 'Enter longdescription' => 'Langtext eingeben', 'Error in database control file \'%s\': %s' => 'Fehler in Datenbankupgradekontrolldatei \'%s\': %s', + 'Ertrag' => 'Ertrag', 'Expense' => 'Aufwandskonto', 'Extended' => 'Gesamt', 'Fax' => 'Fax', @@ -98,6 +100,7 @@ aktualisieren wollen?', 'Jun' => 'Jun', 'June' => 'Juni', 'L' => 'L', + 'LP' => 'LP', 'Language Values' => 'Sprachübersetzungen', 'Last Cost' => 'Einkaufspreis', 'License' => 'Lizenz', diff --git a/locale/de/io b/locale/de/io index 00540cb22..c3abce933 100644 --- a/locale/de/io +++ b/locale/de/io @@ -37,9 +37,11 @@ $self->{texts} = { 'Discount' => 'Rabatt', 'E-mail' => 'eMail', 'E-mail address missing!' => 'E-Mail-Adresse fehlt!', + 'EK' => 'EK', 'ELSE' => 'Zusatz', 'Enter longdescription' => 'Langtext eingeben', 'Error in database control file \'%s\': %s' => 'Fehler in Datenbankupgradekontrolldatei \'%s\': %s', + 'Ertrag' => 'Ertrag', 'Extended' => 'Gesamt', 'Fax' => 'Fax', 'Feb' => 'Feb', @@ -58,6 +60,7 @@ $self->{texts} = { 'Jun' => 'Jun', 'June' => 'Juni', 'L' => 'L', + 'LP' => 'LP', 'License' => 'Lizenz', 'MAILED' => 'Gesendet', 'Mar' => 'März', diff --git a/locale/de/ir b/locale/de/ir index 051c94b7c..57c703f71 100644 --- a/locale/de/ir +++ b/locale/de/ir @@ -59,11 +59,13 @@ $self->{texts} = { 'Due Date' => 'Fälligkeitsdatum', 'E-mail' => 'eMail', 'E-mail address missing!' => 'E-Mail-Adresse fehlt!', + 'EK' => 'EK', 'ELSE' => 'Zusatz', 'Edit Vendor Invoice' => 'Einkaufsrechnung bearbeiten', 'Employee' => 'Bearbeiter', 'Enter longdescription' => 'Langtext eingeben', 'Error in database control file \'%s\': %s' => 'Fehler in Datenbankupgradekontrolldatei \'%s\': %s', + 'Ertrag' => 'Ertrag', 'Exch' => 'Wechselkurs.', 'Exchangerate' => 'Wechselkurs', 'Exchangerate for payment missing!' => 'Es fehlt der Wechselkurs für die Bezahlung!', @@ -92,6 +94,7 @@ $self->{texts} = { 'Jun' => 'Jun', 'June' => 'Juni', 'L' => 'L', + 'LP' => 'LP', 'License' => 'Lizenz', 'MAILED' => 'Gesendet', 'Mar' => 'März', diff --git a/locale/de/is b/locale/de/is index 0f0c67d88..8f6a2d5c5 100644 --- a/locale/de/is +++ b/locale/de/is @@ -71,6 +71,7 @@ $self->{texts} = { 'Dunning Amount' => 'gemahnter Betrag', 'E-mail' => 'eMail', 'E-mail address missing!' => 'E-Mail-Adresse fehlt!', + 'EK' => 'EK', 'ELSE' => 'Zusatz', 'Edit Credit Note' => 'Gutschrift bearbeiten', 'Edit Sales Invoice' => 'Rechnung bearbeiten', @@ -79,6 +80,8 @@ $self->{texts} = { 'Employee' => 'Bearbeiter', 'Enter longdescription' => 'Langtext eingeben', 'Error in database control file \'%s\': %s' => 'Fehler in Datenbankupgradekontrolldatei \'%s\': %s', + 'Ertrag' => 'Ertrag', + 'Ertrag prozentual' => 'Ertrag prozentual', 'Exch' => 'Wechselkurs.', 'Exchangerate' => 'Wechselkurs', 'Exchangerate for payment missing!' => 'Es fehlt der Wechselkurs für die Bezahlung!', @@ -108,6 +111,7 @@ $self->{texts} = { 'Jun' => 'Jun', 'June' => 'Juni', 'L' => 'L', + 'LP' => 'LP', 'License' => 'Lizenz', 'MAILED' => 'Gesendet', 'Mar' => 'März', diff --git a/locale/de/oe b/locale/de/oe index 37d7a81fc..347efd675 100644 --- a/locale/de/oe +++ b/locale/de/oe @@ -75,6 +75,7 @@ $self->{texts} = { 'Dunning Amount' => 'gemahnter Betrag', 'E-mail' => 'eMail', 'E-mail address missing!' => 'E-Mail-Adresse fehlt!', + 'EK' => 'EK', 'ELSE' => 'Zusatz', 'Edit Purchase Order' => 'Lieferantenaufrag bearbeiten', 'Edit Quotation' => 'Angebot bearbeiten', @@ -87,6 +88,8 @@ $self->{texts} = { 'Employee' => 'Bearbeiter', 'Enter longdescription' => 'Langtext eingeben', 'Error in database control file \'%s\': %s' => 'Fehler in Datenbankupgradekontrolldatei \'%s\': %s', + 'Ertrag' => 'Ertrag', + 'Ertrag prozentual' => 'Ertrag prozentual', 'Exchangerate' => 'Wechselkurs', 'Exchangerate missing!' => 'Es fehlt der Wechselkurs!', 'Extended' => 'Gesamt', @@ -112,6 +115,7 @@ $self->{texts} = { 'Jun' => 'Jun', 'June' => 'Juni', 'L' => 'L', + 'LP' => 'LP', 'License' => 'Lizenz', 'MAILED' => 'Gesendet', 'Mar' => 'März', diff --git a/sql/Pg-upgrade2/marge_initial.sql b/sql/Pg-upgrade2/marge_initial.sql new file mode 100644 index 000000000..76e716a4d --- /dev/null +++ b/sql/Pg-upgrade2/marge_initial.sql @@ -0,0 +1,16 @@ +-- @tag: marge_initial +-- @description: Anzeigen des Ertrages pro Position bei Rechnungen und Auftraegen +-- @depends: status_history +ALTER TABLE ar add column marge_total NUMERIC(15,5); +ALTER TABLE ar add column marge_percent NUMERIC(15,5); + +ALTER TABLE oe add column marge_total NUMERIC(15,5); +ALTER TABLE oe add column marge_percent NUMERIC(15,5); + +ALTER TABLE invoice add column marge_total NUMERIC(15,5); +ALTER TABLE invoice add column marge_percent NUMERIC(15,5); +ALTER TABLE invoice add column lastcost NUMERIC(15,5); + +ALTER TABLE orderitems add column marge_total NUMERIC(15,5); +ALTER TABLE orderitems add column marge_percent NUMERIC(15,5); +ALTER TABLE orderitems add column lastcost NUMERIC(15,5);