X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=inline;f=bin%2Fmozilla%2Far.pl;h=a740728ac406b2560aca95d1ea3c87c1b83286fd;hb=19db5b9099df8a70daac82388e45c0aee17c9266;hp=2094ead3ac34c7bce7ca99ec54a91d92392667e0;hpb=09fe7f33a735ecc3f4a3112ad716f674983b00cc;p=kivitendo-erp.git
diff --git a/bin/mozilla/ar.pl b/bin/mozilla/ar.pl
index 2094ead3a..a740728ac 100644
--- a/bin/mozilla/ar.pl
+++ b/bin/mozilla/ar.pl
@@ -91,8 +91,8 @@ sub add {
# saving the history
if(!exists $form->{addition} && ($form->{id} ne "")) {
$form->{snumbers} = qq|invnumber_| . $form->{invnumber};
- $form->{addition} = "ADDED";
- $form->save_history($form->dbconnect(\%myconfig));
+ $form->{addition} = "ADDED";
+ $form->save_history($form->dbconnect(\%myconfig));
}
# /saving the history
@@ -293,8 +293,8 @@ sub form_header {
if ($form->{currency} ne $form->{defaultcurrency}) {
if ($form->{forex}) {
$exchangerate .= qq|
-
| . $locale->text('Exchangerate') . qq| |
- {exchangerate}>$form->{exchangerate} |
+ | . $locale->text('Exchangerate') . qq| |
+ {exchangerate}>$form->{exchangerate} |
|;
} else {
$exchangerate .= qq|
@@ -305,10 +305,10 @@ sub form_header {
}
$taxincluded = qq|
-
- {taxincluded}> |
- | . $locale->text('Tax Included') . qq| |
-
+
+ {taxincluded}> |
+ | . $locale->text('Tax Included') . qq| |
+
|;
if (($rows = $form->numtextrows($form->{notes}, 50)) < 2) {
@@ -318,12 +318,12 @@ sub form_header {
qq||;
$department = qq|
-
- | . $locale->text('Department') . qq| |
-
-
- |
-
+
+ | . $locale->text('Department') . qq| |
+
+
+ |
+
| if $form->{selectdepartment};
my $n = ($form->{creditremaining} =~ /-/) ? "0" : "1";
@@ -338,11 +338,11 @@ sub form_header {
if ($form->{selectemployee}) {
$employee = qq|
-
- | . $locale->text('Salesperson') . qq| |
- |
-
-
+
+ | . $locale->text('Salesperson') . qq| |
+ |
+
+
|;
}
@@ -478,66 +478,66 @@ sub form_header {
-
-
- |
-
-
|
@@ -547,10 +547,10 @@ $jsscript
-
- |
+ |
+ |
. $locale->text('Account') . qq| |
- |
+ | |
. $locale->text('Amount') . qq| |
|
. $locale->text('Tax') . qq| |
@@ -558,7 +558,7 @@ $jsscript
. $locale->text('Taxkey') . qq|
|
. $locale->text('Project') . qq| |
-
+
|;
$amount = $locale->text('Amount');
@@ -622,13 +622,13 @@ $jsscript
'-default' => $form->{"project_id_$i"} ));
print qq|
-
+
$selectAR_amount |
{"amount_$i"}> |
$form->{"tax_$i"} |
$tax
$projectnumber |
-
+
|;
$amount = "";
$project = "";
@@ -650,15 +650,15 @@ $jsscript
- ${ARselected} |
- $form->{invtotal} |
+ ${ARselected} |
+ $form->{invtotal} |
- {oldinvtotal}>
- {oldtotalpaid}>
+ {oldinvtotal}>
+ {oldtotalpaid}>
-
+
- |
+ |
@@ -669,19 +669,19 @@ $jsscript
- | . $locale->text('Notes') . qq| |
- $notes |
-
+ | . $locale->text('Notes') . qq| |
+ $notes |
+
|
-
- |
+ |
+ |
. $locale->text('Incoming Payments') . qq| |
-
+
|;
if ($form->{currency} eq $form->{defaultcurrency}) {
@@ -1159,8 +1159,8 @@ sub post_as_new {
# 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));
+ $form->{addition} = "POSTED AS NEW";
+ $form->save_history($form->dbconnect(\%myconfig));
}
# /saving the history
&post;
@@ -1242,8 +1242,8 @@ sub yes {
# saving the history
if(!exists $form->{addition}) {
$form->{snumbers} = qq|invnumber_| . $form->{invnumber};
- $form->{addition} = "DELETED";
- $form->save_history($form->dbconnect(\%myconfig));
+ $form->{addition} = "DELETED";
+ $form->save_history($form->dbconnect(\%myconfig));
}
# /saving the history
$form->redirect($locale->text('Transaction deleted!'));
@@ -1269,243 +1269,20 @@ sub search {
# setup customer selection
$form->all_vc(\%myconfig, "customer", "AR");
- if (@{ $form->{all_customer} || [] }) {
- map { $customer .= "\n";
-
- map {
- $form->{selectdepartment} .=
- "$_->{description}--$_->{id}\n"
- } (@{ $form->{all_departments} || [] });
- }
-
- $department = qq|
-
- | . $locale->text('Department') . qq| |
- |
-
-| if $form->{selectdepartment};
-
- $form->{title} = $locale->text('AR Transactions');
-
- $form->{javascript} .= qq||;
-
- # use JavaScript Calendar or not
+ $form->{title} = $locale->text('AR Transactions');
+ $form->{fokus} = "search.customer";
$form->{jsscript} = 1;
- $jsscript = "";
- if ($form->{jsscript}) {
-
- # with JavaScript Calendar
- $button1 = qq|
-
- text('button') . qq|> |
- |;
- $button2 = qq|
-
- text('button') . qq|> |
- |;
-
- #write Trigger
- $jsscript =
- Form->write_trigger(\%myconfig, "2", "transdatefrom", "BR", "trigger1",
- "transdateto", "BL", "trigger2");
- } else {
-
- # without JavaScript Calendar
- $button1 = qq|
- | |;
- $button2 = qq|
- | |;
- }
- $form->get_lists("projects" => { "key" => "ALL_PROJECTS",
- "all" => 1 });
+ $form->get_lists("projects" => { "key" => "ALL_PROJECTS", "all" => 1 },
+ "departments" => "ALL_DEPARTMENTS",
+ "customers" => "ALL_VC");
- my %labels = ();
- my @values = ("");
- foreach my $item (@{ $form->{"ALL_PROJECTS"} }) {
- push(@values, $item->{"id"});
- $labels{$item->{"id"}} = $item->{"projectnumber"};
- }
- my $projectnumber =
- NTI($cgi->popup_menu('-name' => 'project_id', '-values' => \@values,
- '-labels' => \%labels));
+ # constants and subs for template
+ $form->{jsscript} = 1;
+ $form->{vc_keys} = sub { "$_[0]->{name}--$_[0]->{id}" };
- $form->{fokus} = "search.customer";
$form->header;
- $onload = qq|focus()|;
- $onload .= qq|;setupDateFormat('|. $myconfig{dateformat} .qq|', '|. $locale->text("Falsches Datumsformat!") .qq|')|;
- $onload .= qq|;setupPoints('|. $myconfig{numberformat} .qq|', '|. $locale->text("wrongformat") .qq|')|;
- print qq|
-
-
-
-
-
-
-$jsscript
-
- | | |