X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fic.pl;h=f5e581d6f49bd6e320f3948d483227e6d30daf20;hb=a8109605459d614e11b7fcf86cd0b070e0a233d0;hp=33a78b94dbe452263aaa16456a7c2fa75194c6ad;hpb=d319704a66e9be64da837ccea10af6774c2b0838;p=kivitendo-erp.git diff --git a/bin/mozilla/ic.pl b/bin/mozilla/ic.pl index 33a78b94d..f5e581d6f 100644 --- a/bin/mozilla/ic.pl +++ b/bin/mozilla/ic.pl @@ -32,6 +32,7 @@ #====================================================================== use SL::IC; +#use SL::PE; require "$form->{path}/io.pl"; @@ -50,7 +51,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 +85,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 +131,7 @@ sub search { $l_serialnumber = qq|  | - . $locale->text('Serial Number') - . qq| + . $locale->text('Serial Number') . qq| |; } @@ -272,8 +270,7 @@ sub search { | - . $locale->text('Part Description') - . qq| + . $locale->text('Part Description') . qq| @@ -310,71 +307,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 +412,9 @@ sub choice { + . $locale->text('Part Number') . qq| + . $locale->text('Part Description') . qq| @@ -527,7 +504,7 @@ sub choice { print qq| + . $locale->text('list') . qq|"> @@ -858,10 +835,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"; @@ -1262,7 +1238,7 @@ sub addtop100 { print qq| - + |; @@ -1441,10 +1417,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 +1896,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| |; @@ -2143,8 +2130,7 @@ sub form_header { + . $form->format_amount(\%myconfig, $form->{onhand}) . qq| |; @@ -2173,14 +2159,12 @@ sub form_header { $vegv = qq| + . $locale->text('Verrechnungseinheit') . qq| + . $locale->text('Geschäftsvolumen') . qq| |; @@ -2217,8 +2201,7 @@ sub form_header { $obsolete .= qq| + . $locale->text('Shopartikel') . qq| |; @@ -2239,8 +2222,7 @@ sub form_header { $button1 = qq| + . $locale->text('button') . qq|> |; #write Trigger @@ -2259,7 +2241,7 @@ sub form_header { print qq| - + {script}> @@ -2304,8 +2286,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 @@ -2322,10 +2303,9 @@ sub form_header {
| - . $locale->text('Link Accounts') - . qq|
+ . $locale->text('Updated') . qq| $button1 - + @@ -2351,7 +2331,7 @@ sub form_header { $imagelinks - + $jsscript |; $lxdebug->leave_sub(); @@ -2368,11 +2348,9 @@ sub form_footer {
| - . $locale->text('Updated') - . qq|
| . $locale->text('List Price') . qq| {listprice}>
+ . $locale->text('Total') . qq|  + . $form->format_amount(\%myconfig, $form->{assemblytotal}, 2) . qq|
| - . $locale->text('Total') - . qq|  | - . $form->format_amount(\%myconfig, $form->{assemblytotal}, 2) - . qq|
@@ -2405,6 +2383,9 @@ sub form_footer { |; } + print qq| + {price_rows}>|; + print qq| |; @@ -2708,7 +2689,6 @@ sub update { if ($form->{item} eq 'service') { map { $form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) } qw(sellprice listprice); - &form_header; &form_footer; } @@ -2738,6 +2718,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!')); @@ -2792,11 +2773,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"}; @@ -2817,6 +2797,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; @@ -2838,7 +2822,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; @@ -2888,15 +2872,13 @@ sub stock_assembly { + . $locale->text('Part Number') . qq| + . $locale->text('Part Description') . qq|
| - . $locale->text('Part Number') - . qq|  
| - . $locale->text('Part Description') - . qq|
@@ -3043,5 +3025,37 @@ sub restock_assemblies { $lxdebug->leave_sub(); } -sub continue { &{ $form->{nextsub} } } +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|
{"pricegroup_$i"}>$form->{"pricegroup_$i"}
+ + +|; + + $lxdebug->leave_sub(); +} + +sub continue { &{ $form->{nextsub} } }