X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fap.pl;h=88c450d351a100256ae2700c0da53788af7f8e54;hb=8482e69b2e36af353705a84e4465668f7431dddf;hp=c5393a7e53676f360514fcdbd7341a0f08232776;hpb=be4e11d36f40d90622fdf35eb07ab207422b5455;p=kivitendo-erp.git diff --git a/bin/mozilla/ap.pl b/bin/mozilla/ap.pl index c5393a7e5..88c450d35 100644 --- a/bin/mozilla/ap.pl +++ b/bin/mozilla/ap.pl @@ -35,7 +35,7 @@ use SL::AP; use SL::IR; use SL::PE; -require "$form->{path}/arap.pl"; +require "bin/mozilla/arap.pl"; require "bin/mozilla/common.pl"; require "bin/mozilla/drafts.pl"; @@ -79,7 +79,7 @@ sub add { $form->{title} = "Add"; $form->{callback} = - "$form->{script}?action=add&path=$form->{path}&login=$form->{login}&password=$form->{password}" + "$form->{script}?action=add&login=$form->{login}&password=$form->{password}" unless $form->{callback}; AP->get_transdate(\%myconfig, $form); @@ -93,9 +93,6 @@ sub add { sub edit { $lxdebug->enter_sub(); - # show history button - $form->{javascript} = qq||; - #/show hhistory button $form->{title} = "Edit"; @@ -319,6 +316,9 @@ sub form_header { }; //--> |; + # show history button + $form->{javascript} .= qq||; + #/show hhistory button # set option selected foreach $item (qw(vendor currency department)) { @@ -461,12 +461,12 @@ selectvendor } | # with JavaScript Calendar $button1 = qq| - {transdate} onBlur=\"check_right_date_format(this)\"> $readonly + $readonly text('button') . qq|> |; $button2 = qq| - {duedate} onBlur=\"check_right_date_format(this)\"> $readonly + $readonly text('button') . qq|> |; @@ -479,9 +479,9 @@ selectvendor } | # without JavaScript Calendar $button1 = - qq|{transdate} onBlur=\"check_right_date_format(this)\"> $readonly|; + qq| $readonly|; $button2 = - qq|{duedate} onBlur=\"check_right_date_format(this)\"> $readonly|; + qq| $readonly|; } $form->{javascript} .= qq||; $form->header; @@ -776,12 +776,12 @@ $jsscript |; $column_data{"paid_$i"} = - qq|{"paid_$i"} onBlur=\"check_right_number_format(this)\">|; + qq||; $column_data{"AP_paid_$i"} = qq|${selectAP_paid}|; $column_data{"exchangerate_$i"} = qq|$exchangerate|; $column_data{"datepaid_$i"} = - qq|{"datepaid_$i"} onBlur=\"check_right_date_format(this)\"> + qq| |; $column_data{"source_$i"} = qq||; @@ -826,7 +826,6 @@ sub form_footer { -{path}> {login}> {password}> | @@ -881,11 +880,11 @@ sub form_footer { # button for saving history if($form->{id} ne "") { print qq| - |; } # /button for saving history print " @@ -1075,6 +1074,7 @@ sub post { if (AP->post_transaction(\%myconfig, \%$form)) { # saving the history if(!exists $form->{addition} && $form->{id} ne "") { + $form->{snumbers} = qq|invnumber_| . $form->{invnumber}; $form->{addition} = "POSTED"; $form->save_history($form->dbconnect(\%myconfig)); } @@ -1093,6 +1093,7 @@ sub post_as_new { $form->{postasnew} = 1; # saving the history if(!exists $form->{addition} && $form->{id} ne "") { + $form->{snumbers} = qq|invnumber_| . $form->{invnumber}; $form->{addition} = "POSTED AS NEW"; $form->save_history($form->dbconnect(\%myconfig)); } @@ -1157,6 +1158,7 @@ sub yes { if (AP->delete_transaction(\%myconfig, \%$form, $spool)) { # saving the history if(!exists $form->{addition}) { + $form->{snumbers} = qq|invnumber_| . $form->{invnumber}; $form->{addition} = "DELETED"; $form->save_history($form->dbconnect(\%myconfig)); } @@ -1363,7 +1365,6 @@ $jsscript
{nextsub}> -{path}> {login}> {password}> @@ -1387,7 +1388,7 @@ sub ap_transactions { AP->ap_transactions(\%myconfig, \%$form); $callback = - "$form->{script}?action=ap_transactions&path=$form->{path}&login=$form->{login}&password=$form->{password}"; + "$form->{script}?action=ap_transactions&login=$form->{login}&password=$form->{password}"; $href = $callback; if ($form->{vendor}) { @@ -1455,9 +1456,11 @@ sub ap_transactions { } @columns = - qw(transdate id invnumber ordnumber name netamount tax amount paid datepaid + qw(transdate id type invnumber ordnumber name netamount tax amount paid datepaid due duedate notes employee globalprojectnumber); + $form->{"l_type"} = "Y"; + foreach $item (@columns) { if ($form->{"l_$item"} eq "Y") { push @column_index, $item; @@ -1481,6 +1484,8 @@ sub ap_transactions { qq|| . $locale->text('Date') . qq||; + $column_header{type} = + "" . $locale->text('Type') . ""; $column_header{duedate} = qq|| . $locale->text('Due Date') @@ -1595,13 +1600,17 @@ sub ap_transactions { $subtotaldue += ($ap->{amount} - $ap->{paid}); $column_data{transdate} = "$ap->{transdate} "; + $column_data{type} = "" . + ($ap->{invoice} ? $locale->text("Invoice (one letter abbreviation)") : + $locale->text("AP Transaction (abbreviation)")) + . ""; $column_data{duedate} = "$ap->{duedate} "; $column_data{datepaid} = "$ap->{datepaid} "; $module = ($ap->{invoice}) ? "ir.pl" : $form->{script}; $column_data{invnumber} = - qq|$ap->{invnumber}|; + qq|$ap->{invnumber}|; $column_data{id} = "$ap->{id}"; $column_data{ordnumber} = "$ap->{ordnumber} "; $column_data{name} = "$ap->{name}"; @@ -1670,7 +1679,6 @@ sub ap_transactions { -{path}> {login}> {password}>