Revision b3eb24ef
Von Jan Büren vor mehr als 15 Jahren hinzugefügt
SL/IC.pm | ||
---|---|---|
79 | 79 |
# retrieve assembly items |
80 | 80 |
$query = |
81 | 81 |
qq|SELECT p.id, p.partnumber, p.description, |
82 |
p.sellprice, p.weight, a.qty, a.bom, p.unit, |
|
82 |
p.sellprice, p.lastcost, p.weight, a.qty, a.bom, p.unit,
|
|
83 | 83 |
pg.partsgroup |
84 | 84 |
FROM parts p |
85 | 85 |
JOIN assembly a ON (a.parts_id = p.id) |
bin/mozilla/ic.pl | ||
---|---|---|
1515 | 1515 |
our ($deliverydate); # ToDO: cjeck if this indeed comes from global context |
1516 | 1516 |
|
1517 | 1517 |
@column_index = |
1518 |
qw(runningnumber qty unit bom partnumber description partsgroup total); |
|
1518 |
qw(runningnumber qty unit bom partnumber description partsgroup lastcost total);
|
|
1519 | 1519 |
|
1520 | 1520 |
if ($form->{previousform}) { |
1521 | 1521 |
$nochange = 1; |
... | ... | |
1544 | 1544 |
$form->{callback} = $callback; |
1545 | 1545 |
|
1546 | 1546 |
$form->{assemblytotal} = 0; |
1547 |
$form->{assembly_purchase_price_total} = 0; |
|
1547 | 1548 |
$form->{weight} = 0; |
1548 | 1549 |
|
1549 | 1550 |
} |
... | ... | |
1559 | 1560 |
. qq|</th>|; |
1560 | 1561 |
$column_header{description} = |
1561 | 1562 |
qq|<th nowrap width=50%>| . $locale->text('Part Description') . qq|</th>|; |
1563 |
$column_header{lastcost} = |
|
1564 |
qq|<th nowrap width=50%>| . $locale->text('Purchase Price') . qq|</th>|; |
|
1562 | 1565 |
$column_header{total} = |
1563 | 1566 |
qq|<th align=right nowrap>| . $locale->text('Extended') . qq|</th>|; |
1564 | 1567 |
$column_header{bom} = qq|<th>| . $locale->text('BOM') . qq|</th>|; |
... | ... | |
1585 | 1588 |
|
1586 | 1589 |
$linetotal = |
1587 | 1590 |
$form->round_amount($form->{"sellprice_$i"} * $form->{"qty_$i"}, 2); |
1591 |
$line_purchase_price = |
|
1592 |
$form->round_amount($form->{"lastcost_$i"} * $form->{"qty_$i"}, 2); #lastcost == purchase_price | ungenaue datenbankfeld-übersetzung |
|
1588 | 1593 |
$form->{assemblytotal} += $linetotal; |
1594 |
$form->{assembly_purchase_price_total} += $line_purchase_price; |
|
1589 | 1595 |
|
1590 | 1596 |
$form->{"qty_$i"} = $form->format_amount(\%myconfig, $form->{"qty_$i"}); |
1591 | 1597 |
|
1592 | 1598 |
$linetotal = $form->format_amount(\%myconfig, $linetotal, 2); |
1599 |
$line_purchase_price = $form->format_amount(\%myconfig, $line_purchase_price, 2); |
|
1593 | 1600 |
|
1594 | 1601 |
if (($i >= 1) && ($i == $numrows)) { |
1595 | 1602 |
|
... | ... | |
1651 | 1658 |
qq|<td><input type=hidden name="description_$i" value="$form->{"description_$i"}">$form->{"description_$i"}</td>|; |
1652 | 1659 |
} |
1653 | 1660 |
|
1661 |
$column_data{lastcost} = qq|<td align=right>$line_purchase_price</td>|; |
|
1654 | 1662 |
$column_data{total} = qq|<td align=right>$linetotal</td>|; |
1655 | 1663 |
|
1656 | 1664 |
$column_data{deliverydate} = qq|<td align=right>$deliverydate</td>|; |
templates/webpages/ic/form_footer_de.html | ||
---|---|---|
3 | 3 |
[%- IF item == 'assembly' %] |
4 | 4 |
<tr> |
5 | 5 |
<td> |
6 |
<table width="100%"> |
|
6 |
<table border="0" width="100%">
|
|
7 | 7 |
<tr> |
8 |
<th colspan="2" align="right">Summe</th>
|
|
9 |
<th align="right">[% LxERP.format_amount(assemblytotal, 2) %]</th>
|
|
8 |
<th colspan="2" align=right>Summe </th>
|
|
9 |
<th align=right>Purchase Price:[% LxERP.format_amount(assembly_purchase_price_total, 2) %] Verkaufspreis: [% LxERP.format_amount(assemblytotal, 2) %]</th>
|
|
10 | 10 |
</tr> |
11 | 11 |
</table> |
12 | 12 |
</td> |
templates/webpages/ic/form_footer_master.html | ||
---|---|---|
3 | 3 |
[%- IF item == 'assembly' %] |
4 | 4 |
<tr> |
5 | 5 |
<td> |
6 |
<table width="100%"> |
|
6 |
<table border="0" width="100%">
|
|
7 | 7 |
<tr> |
8 |
<th colspan="2" align="right"><translate>Total</translate></th>
|
|
9 |
<th align="right">[% LxERP.format_amount(assemblytotal, 2) %]</th>
|
|
8 |
<th colspan="2" align=right><translate>Total</translate> </th>
|
|
9 |
<th align=right><translate>Purchase Price</translate>:[% LxERP.format_amount(assembly_purchase_price_total, 2) %] <translate>Sell Price</translate>: [% LxERP.format_amount(assemblytotal, 2) %]</th>
|
|
10 | 10 |
</tr> |
11 | 11 |
</table> |
12 | 12 |
</td> |
Auch abrufbar als: Unified diff
Bei Erzeugnissen wurde bisher nur der VK addiert und ferner dann noch der VK-Preis obendrauf für die Gesamtsumme. Interessant ist aber 'laut Kundenmeinung' und 1h Diskussion, ob sich um einen Produktfehler handelt und was EDV-Dienstleistung gewährleistet und was nicht, der EK und der VK ist demnach ein Fehler. ;-). Gut. Erweitert wurde die Maske Erzeugnis um die Anzeige des EKs der Einzelwaren und die Summierung, analog zu dem 'alten' VK