X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Far.pl;h=1e5aa98f26379b2dfee3846d90f97ad23c5cd842;hb=ebef09a8bde1d401fc7b0d60cfe09393e9a84c0f;hp=17f37f4cff2f7d6176eef4f8523984541ee9503b;hpb=98764afac6fd1dc1b04d912079672aa90d0b21f8;p=kivitendo-erp.git diff --git a/bin/mozilla/ar.pl b/bin/mozilla/ar.pl index 17f37f4cf..1e5aa98f2 100644 --- a/bin/mozilla/ar.pl +++ b/bin/mozilla/ar.pl @@ -37,6 +37,7 @@ use SL::PE; use Data::Dumper; require "$form->{path}/arap.pl"; +require "bin/mozilla/common.pl"; 1; @@ -72,20 +73,30 @@ require "$form->{path}/arap.pl"; sub add { $lxdebug->enter_sub(); - + + # saving the history + if(!exists $form->{addition} && ($form->{id} ne "")) { + $form->{addition} = "ADDED"; + $form->save_history($form->dbconnect(\%myconfig)); + } + # /saving the history + $form->{title} = "Add"; $form->{callback} = "$form->{script}?action=add&path=$form->{path}&login=$form->{login}&password=$form->{password}" unless $form->{callback}; &create_links; + AR->get_transdate(\%myconfig, $form); &display_form; - $lxdebug->leave_sub(); } sub edit { $lxdebug->enter_sub(); + # show history button + $form->{javascript} = qq||; + #/show hhistory button $form->{title} = "Edit"; @@ -121,7 +132,7 @@ sub create_links { $form->{rowcount} = 1; # currencies - @curr = split /:/, $form->{currencies}; + @curr = split(/:/, $form->{currencies}); chomp $curr[0]; $form->{defaultcurrency} = $curr[0]; @@ -202,6 +213,7 @@ sub create_links { $form->{"forex_$j"} = $form->{"exchangerate_$i"} = $form->{acc_trans}{$key}->[$i - 1]->{exchangerate}; $form->{"AR_paid_$j"} = "$form->{acc_trans}{$key}->[$i-1]->{accno}"; + $form->{"paid_project_id_$j"} = $form->{acc_trans}{$key}->[$i - 1]->{project_id}; $form->{paidaccounts}++; } else { @@ -251,9 +263,9 @@ sub create_links { "$form->{acc_trans}{$key}->[$i-1]->{accno}--$form->{acc_trans}{$key}->[$i-1]->{description}"; $form->{"${key}_$i"} = "$form->{acc_trans}{$key}->[$i-1]->{accno}--$form->{acc_trans}{$key}->[$i-1]->{description}"; + my $q_description = quotemeta($form->{acc_trans}{$key}->[$i-1]->{description}); $form->{"select${key}"} =~ - /