X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fic.pl;h=d6ecbb5c5fe9483019b2949c4855cf737d3ebd52;hb=c068de1b9ec5eebe34ba76af1e1445dbb9564c70;hp=eeed7e9b1c39f0c1f13ab29bcd54eaae00b7ca14;hpb=db8722a48f574db5bc34b6682a54af7ae6f0181c;p=kivitendo-erp.git diff --git a/bin/mozilla/ic.pl b/bin/mozilla/ic.pl index eeed7e9b1..d6ecbb5c5 100644 --- a/bin/mozilla/ic.pl +++ b/bin/mozilla/ic.pl @@ -1056,6 +1056,8 @@ sub generate_report { 'transdate' => { 'text' => $locale->text('Transdate'), }, 'unit' => { 'text' => $locale->text('Unit'), }, 'weight' => { 'text' => $locale->text('Weight'), }, + 'projectnumber' => { 'text' => $locale->text('Project Number'), }, + 'projectdescription' => { 'text' => $locale->text('Project Description'), }, ); $revers = $form->{revers}; @@ -1198,13 +1200,24 @@ sub generate_report { } } + # soldtotal doesn't make sense with more than one bsooqr option. + # so reset it to sold (the most common option), and issue a warning + my @bsooqr = qw(sold bought onorder ordered rfq quoted); + if ($form->{l_subtotal} && 1 < grep { $form->{$_} } @bsooqr) { + my $enabled = first { $form->{$_} } @bsooqr; + $form->{$_} = '' for @bsooqr; + $form->{$enabled} = 'Y'; + + push @options, $::locale->text('Subtotal cannot distinguish betweens record types. Only one of the selected record types will be displayed: #1', $optiontexts{$enabled}); + } + IC->all_parts(\%myconfig, \%$form); my @columns = qw( partnumber description partsgroup bin onhand rop soldtotal unit listprice linetotallistprice sellprice linetotalsellprice lastcost linetotallastcost priceupdate weight image drawing microfiche invnumber ordnumber quonumber - transdate name serialnumber deliverydate ean + transdate name serialnumber deliverydate ean projectnumber projectdescription ); my @includeable_custom_variables = grep { $_->{includeable} } @{ $cvar_configs }; @@ -1322,9 +1335,16 @@ sub generate_report { # set module stuff if ($ref->{module} eq 'oe') { - my $edit_oe_link = build_std_url("script=oe.pl", 'action=edit', 'type=' . E($ref->{cv} eq 'vendor' ? 'purchase_order' : 'sales_order'), 'id=' . E($ref->{trans_id}), 'callback'); - $row->{ordnumber}{link} = $edit_oe_link; - $row->{quonumber}{link} = $edit_oe_link if (!$ref->{ordnumber}); + # für oe gibt es vier fälle, jeweils nach kunde oder lieferant unterschiedlich: + # + # | ist bestellt | Vom Kunde bestellt | -> edit_oe_ord_link + # | Anfrage | Angebot | -> edit_oe_quo_link + + my $edit_oe_ord_link = build_std_url("script=oe.pl", 'action=edit', 'type=' . E($ref->{cv} eq 'vendor' ? 'purchase_order' : 'sales_order'), 'id=' . E($ref->{trans_id}), 'callback'); + my $edit_oe_quo_link = build_std_url("script=oe.pl", 'action=edit', 'type=' . E($ref->{cv} eq 'vendor' ? 'request_quotation' : 'sales_quotation'), 'id=' . E($ref->{trans_id}), 'callback'); + + $row->{ordnumber}{link} = $edit_oe_ord_link; + $row->{quonumber}{link} = $edit_oe_quo_link if (!$ref->{ordnumber}); } else { $row->{invnumber}{link} = build_std_url("script=$ref->{module}.pl", 'action=edit', 'type=invoice', 'id=' . E($ref->{trans_id}), 'callback'); @@ -1831,7 +1851,7 @@ sub save { qw(weight listprice sellprice rop); $form->{assembly_rows}--; - $i = $newform{rowcount}; + $i = $form->{assembly_rows}; $form->{"qty_$i"} = 1 unless ($form->{"qty_$i"}); $form->{sellprice} -= $form->{"sellprice_$i"} * $form->{"qty_$i"}; @@ -1996,6 +2016,10 @@ sub parts_language_selection { $language->{translation} = $translation; $language->{longdescription} = $longdescription; + + $language->{translation_area} = ($language->{translation_rows} = $form->numtextrows($language->{translation}, 40)) > 1; + $language->{longdescription_rows} = max 4, $form->numtextrows($language->{longdescription}, 40); + last; } } @@ -2042,6 +2066,9 @@ sub ajax_autocomplete { sub back_to_record { _check_io_auth(); + + delete @{$::form}{qw(action action_add action_back_to_record back_sub description item notes partnumber sellprice taxaccount2 unit vc)}; + $::auth->restore_form_from_session($::form->{previousform}, clobber => 1); $::form->{rowcount}--; $::form->{action} = 'display_form';