X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fic.pl;h=df6e2cab6f322866864936241b130469540b647c;hb=e2f6b9d3965445c69b2efb2b3fd4a025b3c1b37c;hp=6d49eab28470e98fb81eb0a15f6a0610b2c1cdc6;hpb=becc49b1374f60cd4c8b389490859e92a99ae572;p=kivitendo-erp.git diff --git a/bin/mozilla/ic.pl b/bin/mozilla/ic.pl index 6d49eab28..df6e2cab6 100644 --- a/bin/mozilla/ic.pl +++ b/bin/mozilla/ic.pl @@ -30,8 +30,10 @@ # Inventory Control module # #====================================================================== +#$locale->text('ea'); use SL::IC; +#use SL::PE; require "$form->{path}/io.pl"; @@ -50,7 +52,7 @@ sub add { $form->{unit} = ($form->{item} eq 'service') ? $locale->text('hr') : $locale->text('ea'); - + IC->get_pricegroups(\%myconfig, \%$form); &link_part; &display_form; @@ -84,14 +86,12 @@ sub search { $button1 = qq| text('button') - . qq|> + . $locale->text('button') . qq|> |; $button2 = qq| text('button') - . qq|> + . $locale->text('button') . qq|> |; #write Trigger @@ -132,8 +132,7 @@ sub search { $l_serialnumber = qq|  | - . $locale->text('Serial Number') - . qq| + . $locale->text('Serial Number') . qq| |; } @@ -272,8 +271,7 @@ sub search { | - . $locale->text('Part Description') - . qq| + . $locale->text('Part Description') . qq| @@ -310,71 +308,53 @@ sub search { | - . $locale->text('Include in Report') - . qq| + . $locale->text('Include in Report') . qq| + . $locale->text('Part Number') . qq| + . $locale->text('Part Description') . qq| $l_serialnumber + . $locale->text('Unit of measure') . qq| + . $locale->text('List Price') . qq| + . $locale->text('Sell Price') . qq| + . $locale->text('Last Cost') . qq| + . $locale->text('Line Total') . qq| + . $locale->text('Updated') . qq| + . $locale->text('Bin') . qq| + . $locale->text('ROP') . qq| + . $locale->text('Weight') . qq| + . $locale->text('Image') . qq| + . $locale->text('Drawing') . qq| + . $locale->text('Microfiche') . qq| + . $locale->text('Group') . qq| + . $locale->text('Subtotal') . qq| + . $locale->text('soldtotal') . qq|
 | - . $locale->text('Part Number') - . qq|  | - . $locale->text('Part Description') - . qq| | - . $locale->text('Unit of measure') - . qq|
 | - . $locale->text('List Price') - . qq|  | - . $locale->text('Sell Price') - . qq|  | - . $locale->text('Last Cost') - . qq|  | - . $locale->text('Line Total') - . qq|
 | - . $locale->text('Updated') - . qq|  | - . $locale->text('Bin') - . qq|  | - . $locale->text('ROP') - . qq|  | - . $locale->text('Weight') - . qq|
 | - . $locale->text('Image') - . qq|  | - . $locale->text('Drawing') - . qq|  | - . $locale->text('Microfiche') - . qq|  | - . $locale->text('Group') - . qq|
 | - . $locale->text('Subtotal') - . qq|  | - . $locale->text('soldtotal') - . qq|
@@ -433,11 +413,9 @@ sub choice { + . $locale->text('Part Number') . qq| + . $locale->text('Part Description') . qq| @@ -858,10 +836,9 @@ sub addtop100 { $option .= $locale->text('soldtotal') . qq| : $form->{soldtotal}
|; } - @columns = - $form->sort_columns( + @columns = $form->sort_columns( qw(number partnumber description partsgroup bin onhand rop unit listprice linetotallistprice sellprice linetotalsellprice lastcost linetotallastcost priceupdate weight image drawing microfiche invnumber ordnumber quonumber name serialnumber soldtotal) - ); + ); if ($form->{l_linetotal}) { $form->{l_onhand} = "Y"; @@ -1441,10 +1418,9 @@ sub generate_report { $option .= $locale->text('soldtotal') . qq| : $form->{soldtotal}
|; } - @columns = - $form->sort_columns( + @columns = $form->sort_columns( qw(partnumber description partsgroup bin onhand rop unit listprice linetotallistprice sellprice linetotalsellprice lastcost linetotallastcost priceupdate weight image drawing microfiche invnumber ordnumber quonumber name serialnumber soldtotal) - ); + ); if ($form->{l_linetotal}) { $form->{l_onhand} = "Y"; @@ -1921,7 +1897,9 @@ sub link_part { delete $form->{amount}; $form->get_partsgroup(\%myconfig, { all => 1 }); + $form->{partsgroup} = "$form->{partsgroup}--$form->{partsgroup_id}"; + if (@{ $form->{all_partsgroup} }) { $form->{selectpartsgroup} = qq| + . $locale->text('Last Cost') . qq| |; @@ -2153,8 +2131,7 @@ sub form_header { + . $form->format_amount(\%myconfig, $form->{onhand}) . qq| |; @@ -2183,14 +2160,12 @@ sub form_header { $vegv = qq| + . $locale->text('Verrechnungseinheit') . qq| + . $locale->text('Geschäftsvolumen') . qq| |; @@ -2227,8 +2202,7 @@ sub form_header { $obsolete .= qq| + . $locale->text('Shopartikel') . qq| |; @@ -2249,8 +2223,7 @@ sub form_header { $button1 = qq| + . $locale->text('button') . qq|> |; #write Trigger @@ -2314,8 +2287,7 @@ sub form_header {
| - . $locale->text('Part Number') - . qq| | - . $locale->text('Part Description') - . qq|
| - . $locale->text('Last Cost') - . qq| {lastcost}>
| . $locale->text('On Hand') . qq|  | - . $form->format_amount(\%myconfig, $form->{onhand}) - . qq|
| - . $locale->text('Verrechnungseinheit') - . qq| {ve}>
| - . $locale->text('Geschäftsvolumen') - . qq| {gv}>
| - . $locale->text('Shopartikel') - . qq|
text('button') - . qq|>
+ . $locale->text('Link Accounts') . qq| $linkaccounts @@ -2332,8 +2304,7 @@ sub form_header {
| - . $locale->text('Link Accounts') - . qq|
+ . $locale->text('Updated') . qq| $button1 @@ -2378,11 +2349,9 @@ sub form_footer {
| - . $locale->text('Updated') - . qq|
+ . $locale->text('Total') . qq|  + . $form->format_amount(\%myconfig, $form->{assemblytotal}, 2) . qq|
| - . $locale->text('Total') - . qq|  | - . $form->format_amount(\%myconfig, $form->{assemblytotal}, 2) - . qq|
@@ -2415,6 +2384,9 @@ sub form_footer { |; } + print qq| + {price_rows}>|; + print qq| |; @@ -2718,7 +2690,6 @@ sub update { if ($form->{item} eq 'service') { map { $form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) } qw(sellprice listprice); - &form_header; &form_footer; } @@ -2748,6 +2719,7 @@ sub save { # $locale->text('Assembly Number missing!') # save part + $lxdebug->message(LXDebug::DEBUG1, "ic.pl: sellprice in save = $form->{sellprice}\n"); $rc = IC->save(\%myconfig, \%$form); if ($rc == 3) { $form->error($locale->text('Partnumber not unique!')); @@ -2802,11 +2774,10 @@ sub save { map { $form->{"${_}_$i"} = $newform{$_} } qw(partnumber description bin unit listprice inventory_accno income_accno expense_accno sellprice); $form->{"sellprice_$i"} = $newform{lastcost} if ($form->{vendor_id}); - if ($form->{exchangerate} != 0) { $form->{"sellprice_$i"} /= $form->{exchangerate}; } - + $lxdebug->message(LXDebug::DEBUG1, qq|sellprice_$i in previousform 2 = |.$form->{"sellprice_$i"}.qq|\n|); map { $form->{"taxaccounts_$i"} .= "$_ " } split / /, $newform{taxaccount}; chop $form->{"taxaccounts_$i"}; @@ -2827,6 +2798,10 @@ sub save { $form->{creditremaining} -= $amount; + # redo number formatting, because invoice parse them! + $i = $form->{rowcount}; + map { $form->{"${_}_$i"} = $form->format_amount(\%myconfig, $form->{"${_}_$i"}) } + qw(weight listprice sellprice rop); } $form->{"id_$i"} = $parts_id; @@ -2848,7 +2823,7 @@ sub save { } $form->{callback} = $callback; } - + $lxdebug->message(LXDebug::DEBUG1, qq|ic.pl: sellprice_$i nach sub save = |.$form->{"sellprice_$i"}.qq|\n|); # redirect $form->redirect; @@ -2898,15 +2873,13 @@ sub stock_assembly { + . $locale->text('Part Number') . qq| + . $locale->text('Part Description') . qq|
| - . $locale->text('Part Number') - . qq|  
| - . $locale->text('Part Description') - . qq|
@@ -3053,4 +3026,37 @@ sub restock_assemblies { $lxdebug->leave_sub(); } +sub price_row { + $lxdebug->enter_sub(); + + my ($numrows) = @_; + + print qq| + + + + + + + +|; + for $i (1 .. $numrows) { + print qq| + + + + + +|; + } + + print qq| +
| . $locale->text('Preisklasse') . qq|| . $locale->text('Preis') . qq|
$form->{"pricegroup_$i"}
+ + +|; + + $lxdebug->leave_sub(); +} + sub continue { &{ $form->{nextsub} } }