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, | .
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;
}
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"},
$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"}) {
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"}),
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);
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,
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 | .
}
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;
}
$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"},
$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;
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},
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);
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 | .
<td align=right><input name="l_shipvia" class=checkbox type=checkbox value=Y></td>
<td nowrap>| . $locale->text('Ship via') . qq|</td>
</tr>
+ <tr>
+ <td align=right><input name="l_marge_total" class=checkbox type=checkbox value=Y></td><td> |
+ . $locale->text('Ertrag') . qq|</td>
+ <td align=right><input name="l_marge_percent" class=checkbox type=checkbox value=Y></td><td> |
+ . $locale->text('Ertrag prozentual') . qq|</td>
+ </tr>
<tr>
<td align=right><input name="l_subtotal" class=checkbox type=checkbox value=Y></td>
<td nowrap>| . $locale->text('Subtotal') . qq|</td>
@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);
'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
# 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;
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;
$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"} }) {
$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 = "<font color=\"#ff0000\">";
+ $marge_font_end = "</font>";
+ }
+ } 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 }
"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 #
my $subtotalchecked = ($form->{"subtotal_$i"}) ? "checked" : "";
print qq|
<b>|.$locale->text('Subtotal').qq|</b> <input type="checkbox" name="subtotal_$i" value="1" "$subtotalchecked">
+|;
+
+ print qq|
+ ${marge_font_start}<b>|.$locale->text('Ertrag').qq|</b> $form->{"marge_absolut_$i"} $form->{"marge_percent_$i"} % ${marge_font_end}
+ <b>|.$locale->text('LP').qq|</b> |.$form->format_amount(\%myconfig,$form->{"listprice_$i"},2).qq|
+ <b>|.$locale->text('EK').qq|</b> |.$form->format_amount(\%myconfig,$form->{"lastcost_$i"},2).qq|
</td>
</tr>
-
|;
############## ENDE Neueintrag ##################
</tr>
|;
+ if (0 != ($form->{sellprice_total} * 1)) {
+ $form->{marge_percent} = ($form->{sellprice_total} - $form->{lastcost_total}) / $form->{sellprice_total} * 100;
+ }
+
$lxdebug->leave_sub();
}
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;
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 )
);
</tr>
</table>
</td>
- <td align="right" width="100%">
+ <td>
+ <table>
+ <tr>
+ <th align=left>| . $locale->text('Ertrag') . qq|</th>
+ <td>| . $form->format_amount(\%myconfig, $form->{marge_total}, 2, 0) . qq|</td>
+ </tr>
+ <tr>
+ <th align=left>| . $locale->text('Ertrag prozentual') . qq|</th>
+ <td>| . $form->format_amount(\%myconfig, $form->{marge_percent}, 2, 0) . qq| %</td>
+ </tr>
+ <input type=hidden name="marge_total" value="$form->{"marge_total"}">
+ <input type=hidden name="marge_percent" value="$form->{"marge_percent"}">
+ </table>
+ </td>
+ <td align="right">
$taxincluded
- <table width="100%">
+ <table>
$subtotal
$tax
<tr>
</tr>
</table>
</td>
- <td align=right width=100%>
+ <td>
+ <table>
+ <tr>
+ <th align=left>| . $locale->text('Ertrag') . qq|</th>
+ <td>| . $form->format_amount(\%myconfig, $form->{marge_total}, 2, 0) . qq|</td>
+ </tr>
+ <tr>
+ <th align=left>| . $locale->text('Ertrag prozentual') . qq|</th>
+ <td>| . $form->format_amount(\%myconfig, $form->{marge_percent}, 2, 0) . qq| %</td>
+ </tr>
+ <input type=hidden name="marge_total" value="$form->{"marge_total"}">
+ <input type=hidden name="marge_percent" value="$form->{"marge_percent"}">
+ </table>
+ </td>
+ <td align=right>
$taxincluded
- <table width=100%>
+ <table>
$subtotal
$tax
<tr>
. $locale->text('Total') . qq|</td>
</tr>
<tr>
+ <td><input name="l_marge_total" class=checkbox type=checkbox value=Y> |
+ . $locale->text('Ertrag') . qq|</td>
+ <td><input name="l_marge_percent" class=checkbox type=checkbox value=Y> |
+ . $locale->text('Ertrag prozentual') . qq|</td>
+ </tr>
+ <tr>
<td><input name="l_globalprojectnumber" class=checkbox type=checkbox value=Y> |
. $locale->text('Project Number') . qq|</td>
<td><input name="l_transaction_description" class=checkbox type=checkbox value=Y> |
"curr", "employee",
"shipvia", "globalprojectnumber",
"transaction_description", "open",
- "delivered"
+ "delivered", "marge_total", "marge_percent"
);
# only show checkboxes if gotten here via sales_order form.
'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)) {
# 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;
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 = { };
'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',
'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',
'Korrektur' => 'Korrektur',
'Kundennummer' => 'Kundennummer',
'L' => 'L',
+ 'LP' => 'LP',
'LaTeX Templates' => 'LaTeX-Vorlagen',
'Landscape' => 'Querformat',
'Language' => 'Sprache',
'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!',
'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',
'Jun' => 'Jun',
'June' => 'Juni',
'L' => 'L',
+ 'LP' => 'LP',
'License' => 'Lizenz',
'MAILED' => 'Gesendet',
'Mar' => 'März',
'E-mail address missing!' => 'E-Mail-Adresse fehlt!',
'EAN' => 'EAN',
'EAN-Code' => 'EAN-Code',
+ 'EK' => 'EK',
'ELSE' => 'Zusatz',
'Edit ' => 'Bearbeiten',
'Edit Assembly' => 'Erzeugnis bearbeiten',
'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',
'Jun' => 'Jun',
'June' => 'Juni',
'L' => 'L',
+ 'LP' => 'LP',
'Language Values' => 'Sprachübersetzungen',
'Last Cost' => 'Einkaufspreis',
'License' => 'Lizenz',
'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',
'Jun' => 'Jun',
'June' => 'Juni',
'L' => 'L',
+ 'LP' => 'LP',
'License' => 'Lizenz',
'MAILED' => 'Gesendet',
'Mar' => 'März',
'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!',
'Jun' => 'Jun',
'June' => 'Juni',
'L' => 'L',
+ 'LP' => 'LP',
'License' => 'Lizenz',
'MAILED' => 'Gesendet',
'Mar' => 'März',
'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',
'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!',
'Jun' => 'Jun',
'June' => 'Juni',
'L' => 'L',
+ 'LP' => 'LP',
'License' => 'Lizenz',
'MAILED' => 'Gesendet',
'Mar' => 'März',
'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',
'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',
'Jun' => 'Jun',
'June' => 'Juni',
'L' => 'L',
+ 'LP' => 'LP',
'License' => 'Lizenz',
'MAILED' => 'Gesendet',
'Mar' => 'März',
--- /dev/null
+-- @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);