From b3eb24ef367a8702a5535558cfaa8ebc5d297f2e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Mon, 11 May 2009 18:31:09 +0000 Subject: [PATCH] =?utf8?q?Bei=20Erzeugnissen=20wurde=20bisher=20nur=20der?= =?utf8?q?=20VK=20addiert=20und=20ferner=20dann=20noch=20der=20VK-Preis=20?= =?utf8?q?obendrauf=20f=C3=BCr=20die=20Gesamtsumme.=20Interessant=20ist=20?= =?utf8?q?aber=20'laut=20Kundenmeinung'=20und=201h=20Diskussion,=20ob=20si?= =?utf8?q?ch=20um=20einen=20Produktfehler=20handelt=20und=20was=20EDV-Dien?= =?utf8?q?stleistung=20gew=C3=A4hrleistet=20und=20was=20nicht,=20der=20EK?= =?utf8?q?=20und=20der=20VK=20ist=20demnach=20ein=20Fehler.=20;-).=20Gut.?= =?utf8?q?=20Erweitert=20wurde=20die=20Maske=20Erzeugnis=20um=20die=20Anze?= =?utf8?q?ige=20des=20EKs=20der=20Einzelwaren=20und=20die=20Summierung,=20?= =?utf8?q?analog=20zu=20dem=20'alten'=20VK?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/IC.pm | 2 +- bin/mozilla/ic.pl | 10 +++++++++- templates/webpages/ic/form_footer_de.html | 6 +++--- templates/webpages/ic/form_footer_master.html | 6 +++--- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/SL/IC.pm b/SL/IC.pm index 6fa45dc10..f025663da 100644 --- a/SL/IC.pm +++ b/SL/IC.pm @@ -79,7 +79,7 @@ sub get_part { # retrieve assembly items $query = qq|SELECT p.id, p.partnumber, p.description, - p.sellprice, p.weight, a.qty, a.bom, p.unit, + p.sellprice, p.lastcost, p.weight, a.qty, a.bom, p.unit, pg.partsgroup FROM parts p JOIN assembly a ON (a.parts_id = p.id) diff --git a/bin/mozilla/ic.pl b/bin/mozilla/ic.pl index 5f16184e8..547acf7df 100644 --- a/bin/mozilla/ic.pl +++ b/bin/mozilla/ic.pl @@ -1515,7 +1515,7 @@ sub assembly_row { our ($deliverydate); # ToDO: cjeck if this indeed comes from global context @column_index = - qw(runningnumber qty unit bom partnumber description partsgroup total); + qw(runningnumber qty unit bom partnumber description partsgroup lastcost total); if ($form->{previousform}) { $nochange = 1; @@ -1544,6 +1544,7 @@ sub assembly_row { $form->{callback} = $callback; $form->{assemblytotal} = 0; + $form->{assembly_purchase_price_total} = 0; $form->{weight} = 0; } @@ -1559,6 +1560,8 @@ sub assembly_row { . qq||; $column_header{description} = qq|| . $locale->text('Part Description') . qq||; + $column_header{lastcost} = + qq|| . $locale->text('Purchase Price') . qq||; $column_header{total} = qq|| . $locale->text('Extended') . qq||; $column_header{bom} = qq|| . $locale->text('BOM') . qq||; @@ -1585,11 +1588,15 @@ sub assembly_row { $linetotal = $form->round_amount($form->{"sellprice_$i"} * $form->{"qty_$i"}, 2); + $line_purchase_price = + $form->round_amount($form->{"lastcost_$i"} * $form->{"qty_$i"}, 2); #lastcost == purchase_price | ungenaue datenbankfeld-übersetzung $form->{assemblytotal} += $linetotal; + $form->{assembly_purchase_price_total} += $line_purchase_price; $form->{"qty_$i"} = $form->format_amount(\%myconfig, $form->{"qty_$i"}); $linetotal = $form->format_amount(\%myconfig, $linetotal, 2); + $line_purchase_price = $form->format_amount(\%myconfig, $line_purchase_price, 2); if (($i >= 1) && ($i == $numrows)) { @@ -1651,6 +1658,7 @@ sub assembly_row { qq|$form->{"description_$i"}|; } + $column_data{lastcost} = qq|$line_purchase_price|; $column_data{total} = qq|$linetotal|; $column_data{deliverydate} = qq|$deliverydate|; diff --git a/templates/webpages/ic/form_footer_de.html b/templates/webpages/ic/form_footer_de.html index a065eb352..78247e9d3 100644 --- a/templates/webpages/ic/form_footer_de.html +++ b/templates/webpages/ic/form_footer_de.html @@ -3,10 +3,10 @@ [%- IF item == 'assembly' %] - +
- - + +
Summe[% LxERP.format_amount(assemblytotal, 2) %]Summe Purchase Price:[% LxERP.format_amount(assembly_purchase_price_total, 2) %] Verkaufspreis: [% LxERP.format_amount(assemblytotal, 2) %]
diff --git a/templates/webpages/ic/form_footer_master.html b/templates/webpages/ic/form_footer_master.html index d041971b0..d5904f2c0 100644 --- a/templates/webpages/ic/form_footer_master.html +++ b/templates/webpages/ic/form_footer_master.html @@ -3,10 +3,10 @@ [%- IF item == 'assembly' %] - +
- - + +
Total[% LxERP.format_amount(assemblytotal, 2) %]Total Purchase Price:[% LxERP.format_amount(assembly_purchase_price_total, 2) %] Sell Price: [% LxERP.format_amount(assemblytotal, 2) %]
-- 2.20.1