X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fap.pl;h=c8a3ba6d6a32e910cec77597aec74707f4c2abad;hb=c1d8418b5244d224298431369c69ea971a69f3c2;hp=43a025fd25c2d8afd28c8bc20143100c1fd3b233;hpb=a0f6a00c1db8152633841777a95f5420b56b42ee;p=kivitendo-erp.git
diff --git a/bin/mozilla/ap.pl b/bin/mozilla/ap.pl
index 43a025fd2..c8a3ba6d6 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);
@@ -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}>
|
@@ -1075,7 +1074,7 @@ sub post {
if (AP->post_transaction(\%myconfig, \%$form)) {
# saving the history
if(!exists $form->{addition} && $form->{id} ne "") {
- $form->{snumber} = qq|invnumber_| . $form->{invnumber};
+ $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
$form->{addition} = "POSTED";
$form->save_history($form->dbconnect(\%myconfig));
}
@@ -1094,7 +1093,7 @@ sub post_as_new {
$form->{postasnew} = 1;
# saving the history
if(!exists $form->{addition} && $form->{id} ne "") {
- $form->{snumber} = qq|invnumber_| . $form->{invnumber};
+ $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
$form->{addition} = "POSTED AS NEW";
$form->save_history($form->dbconnect(\%myconfig));
}
@@ -1159,7 +1158,7 @@ sub yes {
if (AP->delete_transaction(\%myconfig, \%$form, $spool)) {
# saving the history
if(!exists $form->{addition}) {
- $form->{snumber} = qq|invnumber_| . $form->{invnumber};
+ $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
$form->{addition} = "DELETED";
$form->save_history($form->dbconnect(\%myconfig));
}
@@ -1366,7 +1365,6 @@ $jsscript
{nextsub}>
-{path}>
{login}>
{password}>
@@ -1390,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}) {
@@ -1458,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;
@@ -1484,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')
@@ -1598,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} | ";
@@ -1673,7 +1679,6 @@ sub ap_transactions {
-{path}>
{login}>
{password}>