X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;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
- - - - - - - - {terms}> - - - - - - - - - - {defaultcurrency}> - {fxgain_accno}> - {fxloss_accno}> - $exchangerate - - $department - $taxincluded -
| . $locale->text('Customer') . qq|$customer
- - - - - - - {creditlimit}> - {creditremaining}> - -
| . $locale->text('Credit Limit') . qq|$form->{creditlimit}| . $locale->text('Remaining') . qq|$form->{creditremaining}
-
| . $locale->text('Currency') . qq|
-
- - $employee - - - - - - - - - - + + - + +
| . $locale->text('Invoice Number') . qq|
| . $locale->text('Order Number') . qq|
| . $locale->text('Invoice Date') . qq| + + + + + + + + {terms}> + + + + + + + + + + {defaultcurrency}> + {fxgain_accno}> + {fxloss_accno}> + $exchangerate + + $department + $taxincluded +
| . $locale->text('Customer') . qq|$customer
+ + + + + + + {creditlimit}> + {creditremaining}> + +
| . $locale->text('Credit Limit') . qq|$form->{creditlimit}| . $locale->text('Remaining') . qq|$form->{creditremaining}
+
| . $locale->text('Currency') . qq|
+
+ + $employee + + + + + + + + + + $button1 - - - + + + $button2 - +
| . $locale->text('Invoice Number') . qq|
| . $locale->text('Order Number') . qq|
| . $locale->text('Invoice Date') . qq|
| . $locale->text('Due Date') . qq|
| . $locale->text('Due Date') . qq|
-
- - + - @@ -558,7 +558,7 @@ $jsscript . $locale->text('Taxkey') . qq| - + |; $amount = $locale->text('Amount'); @@ -622,13 +622,13 @@ $jsscript '-default' => $form->{"project_id_$i"} )); print qq| - + $tax - + |; $amount = ""; $project = ""; @@ -650,15 +650,15 @@ $jsscript - - + + - {oldinvtotal}> - {oldtotalpaid}> + {oldinvtotal}> + {oldtotalpaid}> - + - + @@ -669,19 +669,19 @@ $jsscript
| +
| . $locale->text('Account') . qq|| + | . $locale->text('Amount') . qq| | . $locale->text('Tax') . qq| | . $locale->text('Project') . qq|
$selectAR_amount {"amount_$i"}> $form->{"tax_$i"}$projectnumber
${ARselected}$form->{invtotal}${ARselected}$form->{invtotal}
- - - + + +
| . $locale->text('Notes') . qq|$notes
| . $locale->text('Notes') . qq|$notes
- - + - + |; 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 .= " - - - -| 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| - - |; - $button2 = 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| - - -{script}> - -
| +
| . $locale->text('Incoming Payments') . qq|
| . $locale->text('Department') . qq|
- text('button') . qq|> - text('button') . qq|>
- - - - - - - - - - - -
$form->{title}
- - - - - - $department - - - - - - - - - - - - - - - - - - - - - - - $button1 - - $button2 - - -
| . $locale->text('Customer') . qq|$customer
| . $locale->text('Invoice Number') . qq|
| . $locale->text('Order Number') . qq|
| . $locale->text('Transaction description') . qq|
| . $locale->text('Notes') . qq|
| . $locale->text("Project Number") . qq|$projectnumber
| . $locale->text('From') . qq|| . $locale->text('Bis') . qq|
-
- - - - - -
| . $locale->text('Include in Report') . qq| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| . $locale->text('Open') . qq|| . $locale->text('Closed') . qq|
| . $locale->text('ID') . qq|| . $locale->text('Invoice Number') . qq|| . $locale->text('Order Number') . qq|| . $locale->text('Invoice Date') . qq|
| . $locale->text('Customer') . qq|| . $locale->text('Amount') . qq|| . $locale->text('Tax') . qq|| . $locale->text('Total') . qq|
| . $locale->text('Date Paid') . qq|| . $locale->text('Paid') . qq|| . $locale->text('Due Date') . qq|| . $locale->text('Amount Due') . qq|
| . $locale->text('Notes') . qq|| . $locale->text('Salesperson') . qq|| . $locale->text('Shipping Point') . qq|| . $locale->text('Ship via') . qq|
| . $locale->text('Ertrag') . qq| | . $locale->text('Ertrag prozentual') . qq|| . $locale->text('Employee') . qq|
| . $locale->text('Subtotal') . qq|| . $locale->text('Project Number') . qq|| . $locale->text('Transaction description') . qq|
| . $locale->text('Customer') . qq|
| . $locale->text('Customer Number') . qq|| . $locale->text('Country') . qq|| . $locale->text('USt-IdNr.') . qq|| . $locale->text('Steuersatz') . qq|
| . $locale->text('Payment Terms') . qq|| . $locale->text('Buchungskonto') . qq|
-
-

- -{nextsub}> - -
- - - - - - -$jsscript - - -|; + print $form->parse_html_template('ar/search', { %myconfig }); $main::lxdebug->leave_sub(); }