X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fic.pl;h=b2a4da64a9da486cb8a38a97677ea9be11798207;hb=8e58d69a5a65f4887c7722dfae72a658b883eeec;hp=df6e2cab6f322866864936241b130469540b647c;hpb=792d1cf7bf650a84b7a82956cdfeda5ae0fbaf86;p=kivitendo-erp.git diff --git a/bin/mozilla/ic.pl b/bin/mozilla/ic.pl index df6e2cab6..b2a4da64a 100644 --- a/bin/mozilla/ic.pl +++ b/bin/mozilla/ic.pl @@ -33,6 +33,7 @@ #$locale->text('ea'); use SL::IC; + #use SL::PE; require "$form->{path}/io.pl"; @@ -355,6 +356,8 @@ sub search { . $locale->text('Subtotal') . qq|  | . $locale->text('soldtotal') . qq| +  | + . $locale->text('deliverydate') . qq| @@ -1418,8 +1421,12 @@ sub generate_report { $option .= $locale->text('soldtotal') . qq| : $form->{soldtotal}
|; } + if ($form->{l_deliverydate}) { + $callback .= "&deliverydate=$form->{deliverydate}"; + } + @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) + 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 deliverydate) ); if ($form->{l_linetotal}) { @@ -1556,6 +1563,11 @@ sub generate_report { . $locale->text('soldtotal') . qq||; + $column_header{deliverydate} = + qq|{revers}&lastsort=$form->{lastsort}>| + . $locale->text('deliverydate') + . qq||; + $form->header; $colspan = $#column_index + 1; @@ -1707,6 +1719,8 @@ sub generate_report { . $form->format_amount(\%myconfig, $ref->{soldtotal}, '', " ") . ""; + $column_data{deliverydate} = "$ref->{deliverydate}"; + $i++; $i %= 2; print ""; @@ -1934,7 +1948,7 @@ sub form_header { $lxdebug->enter_sub(); my $dec = ''; - + #decimalplaces for listprice ($dec) = ($form->{listprice} =~ /\.(\d+)/); $dec = length $dec; @@ -2045,7 +2059,7 @@ sub form_header { - | . $locale->text('COGS') . qq| + | . $locale->text('Expense') . qq| @@ -2228,8 +2242,7 @@ sub form_header { #write Trigger $jsscript = - Form->write_trigger(\%myconfig, "1", "priceupdate", "BL", "trigger1", "", - "", ""); + Form->write_trigger(\%myconfig, "1", "priceupdate", "BL", "trigger1"); } else { # without JavaScript Calendar @@ -2612,6 +2625,8 @@ sub assembly_row { $column_data{total} = qq|$linetotal|; + $column_data{deliverydate} = qq|$deliverydate|; + print qq| |; @@ -2700,9 +2715,12 @@ sub update { sub save { $lxdebug->enter_sub(); - # check if there is a part number + # check if there is a part number - commented out, cause there is an automatic allocation of numbers # $form->isblank("partnumber", $locale->text(ucfirst $form->{item}." Part Number missing!")); + # check if there is a description + $form->isblank("description", $locale->text("Part Description missing!")); + if ($form->{obsolete}) { $form->error( $locale->text( @@ -2719,7 +2737,8 @@ sub save { # $locale->text('Assembly Number missing!') # save part - $lxdebug->message(LXDebug::DEBUG1, "ic.pl: sellprice in save = $form->{sellprice}\n"); + $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!')); @@ -2777,7 +2796,9 @@ sub save { if ($form->{exchangerate} != 0) { $form->{"sellprice_$i"} /= $form->{exchangerate}; } - $lxdebug->message(LXDebug::DEBUG1, qq|sellprice_$i in previousform 2 = |.$form->{"sellprice_$i"}.qq|\n|); + $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"}; @@ -2798,10 +2819,12 @@ 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); + # 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; @@ -2823,7 +2846,10 @@ sub save { } $form->{callback} = $callback; } - $lxdebug->message(LXDebug::DEBUG1, qq|ic.pl: sellprice_$i nach sub save = |.$form->{"sellprice_$i"}.qq|\n|); + $lxdebug->message(LXDebug::DEBUG1, + qq|ic.pl: sellprice_$i nach sub save = | + . $form->{"sellprice_$i"} . qq|\n|); + # redirect $form->redirect;