X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fic.pl;h=7ecd3a24cff3a0dbf679738de0617ed0b70c7c61;hb=da10bf753ae49b8322e79fc1bb9276a092403b9a;hp=16205a7b183fe7ddcb68a10f2f71a4589a8431c8;hpb=5b60c0df87a1150394dddfdf5c4b0c130a9e004a;p=kivitendo-erp.git diff --git a/bin/mozilla/ic.pl b/bin/mozilla/ic.pl index 16205a7b1..7ecd3a24c 100644 --- a/bin/mozilla/ic.pl +++ b/bin/mozilla/ic.pl @@ -397,7 +397,6 @@ $jsscript $lxdebug->leave_sub(); } #end search() - sub search_update_prices { $lxdebug->enter_sub(); @@ -2056,7 +2055,9 @@ sub parts_subtotal { sub edit { $lxdebug->enter_sub(); - + # show history button + $form->{javascript} = qq||; + #/show hhistory button IC->get_part(\%myconfig, \%$form); $form->{"original_partnumber"} = $form->{"partnumber"}; @@ -2714,9 +2715,26 @@ sub form_footer { } } + if (!$form->{previousform}) { + if ($form->{menubar}) { + require "$form->{path}/menu.pl"; + &menubar; + } + } +# button for saving history + if($form->{id} ne "") { + print qq| + {id} + . qq|); name=history id=history value=| + . $locale->text('history') + . qq|>|; + } +# /button for saving history print qq| + @@ -2982,8 +3000,8 @@ sub update { } if ($form->{item} eq 'service') { - map { $form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) } - qw(sellprice listprice); + map({ $form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) } + qw(sellprice listprice lastcost)); &form_header; &price_row; &form_footer; @@ -3032,6 +3050,12 @@ sub save { if ($rc == 3) { $form->error($locale->text('Partnumber not unique!')); } + # saving the history + if(!exists $form->{addition}) { + $form->{addition} = "SAVED"; + $form->save_history($form->dbconnect(\%myconfig)); + } + # /saving the history $parts_id = $form->{id}; # load previous variables @@ -3148,19 +3172,29 @@ sub save { sub save_as_new { $lxdebug->enter_sub(); + # saving the history + if(!exists $form->{addition}) { + $form->{addition} = "SAVED AS NEW"; + $form->save_history($form->dbconnect(\%myconfig)); + } + # /saving the history $form->{id} = 0; if ($form->{"original_partnumber"} && ($form->{"partnumber"} eq $form->{"original_partnumber"})) { $form->{partnumber} = ""; } &save; - $lxdebug->leave_sub(); } sub delete { $lxdebug->enter_sub(); - + # saving the history + if(!exists $form->{addition}) { + $form->{addition} = "DELETED"; + $form->save_history($form->dbconnect(\%myconfig)); + } + # /saving the history $rc = IC->delete(\%myconfig, \%$form); # redirect @@ -3203,7 +3237,6 @@ sub price_row { $lxdebug->leave_sub(); } - sub parts_language_selection { $lxdebug->enter_sub();