X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Far.pl;h=382e733d3624e01e1386c62d66e5fa081b60e938;hb=8482e69b2e36af353705a84e4465668f7431dddf;hp=05c541b6163564258601d55b5092ba986923d1cf;hpb=a0f6a00c1db8152633841777a95f5420b56b42ee;p=kivitendo-erp.git
diff --git a/bin/mozilla/ar.pl b/bin/mozilla/ar.pl
index 05c541b61..382e733d3 100644
--- a/bin/mozilla/ar.pl
+++ b/bin/mozilla/ar.pl
@@ -36,7 +36,7 @@ use SL::IS;
use SL::PE;
use Data::Dumper;
-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 {
# saving the history
if(!exists $form->{addition} && ($form->{id} ne "")) {
- $form->{snumber} = qq|invnumber_| . $form->{invnumber};
+ $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
$form->{addition} = "ADDED";
$form->save_history($form->dbconnect(\%myconfig));
}
@@ -87,7 +87,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};
AR->get_transdate(\%myconfig, $form);
@@ -477,12 +477,12 @@ selectcustomer}|
# with JavaScript Calendar
$button1 = qq|
-
{transdate} onBlur=\"check_right_date_format(this)\"> |
+ |
text('button') . qq|> |
|;
$button2 = qq|
- {duedate} onBlur=\"check_right_date_format(this)\"> |
+ |
text('button') . qq|> |
|;
@@ -495,9 +495,9 @@ selectcustomer}|
# without JavaScript Calendar
$button1 =
- qq|{transdate} onBlur=\"check_right_date_format(this)\"> | |;
+ qq| | |;
$button2 =
- qq|{duedate} onBlur=\"check_right_date_format(this)\"> | |;
+ qq| | |;
}
$form->header;
@@ -790,12 +790,12 @@ $jsscript
|;
$column_data{paid} =
- qq|{"paid_$i"} onBlur=\"check_right_number_format(this)\"> | |;
+ qq| | |;
$column_data{AR_paid} =
qq|${selectAR_paid} | |;
$column_data{exchangerate} = qq|$exchangerate | |;
$column_data{datepaid} =
- qq|{"datepaid_$i"} onBlur=\"check_right_date_format(this)\">
+ qq| |
| |;
$column_data{source} =
qq| | |;
@@ -843,7 +843,6 @@ sub form_footer {
-{path}>
{login}>
{password}>
|
@@ -899,7 +898,7 @@ sub form_footer {
}
if ($form->{menubar}) {
- require "$form->{path}/menu.pl";
+ require "bin/mozilla/menu.pl";
&menubar;
}
# button for saving history
@@ -1093,7 +1092,7 @@ sub post {
if (AR->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));
}
@@ -1112,7 +1111,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));
}
@@ -1177,7 +1176,7 @@ sub yes {
if (AR->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));
}
@@ -1296,6 +1295,10 @@ sub search {
| . $locale->text('Order Number') . qq| |
|
+
+ | . $locale->text('Transaction description') . qq| |
+ |
+
| . $locale->text('Notes') . qq| |
|
@@ -1372,6 +1375,8 @@ sub search {
| . $locale->text('Subtotal') . qq| |
|
| . $locale->text('Project Number') . qq| |
+ |
+ | . $locale->text('Transaction description') . qq| |
@@ -1386,7 +1391,6 @@ sub search {
{nextsub}>
-{path}>
{login}>
{password}>
@@ -1415,7 +1419,7 @@ sub ar_transactions {
AR->ar_transactions(\%myconfig, \%$form);
$callback =
- "$form->{script}?action=ar_transactions&path=$form->{path}&login=$form->{login}&password=$form->{password}";
+ "$form->{script}?action=ar_transactions&login=$form->{login}&password=$form->{password}";
$href = $callback;
if ($form->{customer}) {
@@ -1448,6 +1452,12 @@ sub ar_transactions {
$option .= "\n
" if $option;
$option .= $locale->text('Notes') . " : $form->{notes}";
}
+ if ($form->{transaction_description}) {
+ $callback .= "&transaction_description=" . $form->escape($form->{transaction_description}, 1);
+ $href .= "&transaction_description=" . $form->escape($form->{transaction_description});
+ $option .= "\n
" if $option;
+ $option .= $locale->text('Transaction description') . " : $form->{transaction_description}";
+ }
if ($form->{transdatefrom}) {
$callback .= "&transdatefrom=$form->{transdatefrom}";
@@ -1484,7 +1494,7 @@ sub ar_transactions {
@columns =
qw(transdate id type invnumber ordnumber name netamount tax amount paid
- datepaid due duedate notes employee shippingpoint shipvia
+ datepaid due duedate transaction_description notes employee shippingpoint shipvia
globalprojectnumber);
$form->{"l_type"} = "Y";
@@ -1560,6 +1570,8 @@ sub ar_transactions {
. "";
$column_header{globalprojectnumber} =
qq|| . $locale->text('Project Number') . qq| | |;
+ $column_header{transaction_description} =
+ "" . $locale->text('Transaction description') . " | ";
$form->{title} = $locale->text('AR Transactions');
@@ -1645,12 +1657,18 @@ sub ar_transactions {
$module = ($ar->{invoice}) ? "is.pl" : $form->{script};
$column_data{invnumber} =
- "{id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ar->{invnumber} | ";
+ "{id}&login=$form->{login}&password=$form->{password}&callback=$callback>$ar->{invnumber} | ";
+
+ my $is_storno = $ar->{storno} && ($ar->{invnumber} =~ /^Storno zu/);
+ my $has_storno = $ar->{storno} && !$is_storno;
+
$column_data{type} = "" .
- ($ar->{storno} ? $locale->text("Storno (one letter abbreviation)") :
- $ar->{amount} < 0 ?
- $locale->text("Credit note (one letter abbreviation)") :
- $locale->text("Invoice (one letter abbreviation)")) . " | ";
+ ($has_storno ? $locale->text("Invoice with Storno (abbreviation)") :
+ $is_storno ? $locale->text("Storno (one letter abbreviation)") :
+ $ar->{amount} < 0 ? $locale->text("Credit note (one letter abbreviation)") :
+ $ar->{invoice} ? $locale->text("Invoice (one letter abbreviation)") :
+ $locale->text("AR Transaction (abbreviation)"))
+ . "";
$column_data{ordnumber} = "$ar->{ordnumber} | ";
$column_data{name} = "$ar->{name} | ";
$ar->{notes} =~ s/\r\n/
/g;
@@ -1660,6 +1678,8 @@ sub ar_transactions {
$column_data{employee} = "$ar->{employee} | ";
$column_data{globalprojectnumber} =
"" . H($ar->{globalprojectnumber}) . " | ";
+ $column_data{transaction_description} =
+ "" . H($ar->{transaction_description}) . " | ";
$i++;
$i %= 2;
@@ -1720,7 +1740,6 @@ sub ar_transactions {
-{path}>
{login}>
{password}>