X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Far.pl;h=e69e13cbf32d3b69b93f3a94c101f148db9bb5c2;hb=eb8ba4764dff48ed8e67a00c48d02c9e7c6e5de5;hp=f170407d894382bf0fbca5ea3ae2d5f422f638a6;hpb=bea3f989a3bb5d1b734cf4e606a668213755e2e0;p=kivitendo-erp.git diff --git a/bin/mozilla/ar.pl b/bin/mozilla/ar.pl index f170407d8..e69e13cbf 100644 --- a/bin/mozilla/ar.pl +++ b/bin/mozilla/ar.pl @@ -32,7 +32,7 @@ #====================================================================== use POSIX qw(strftime); -use List::Util qw(sum first); +use List::Util qw(sum first max); use SL::AR; use SL::FU; @@ -76,8 +76,6 @@ use strict; # $locale->text('Nov') # $locale->text('Dec') -my $totalpaid; - sub add { $main::lxdebug->enter_sub(); @@ -92,12 +90,12 @@ sub add { if(!exists $form->{addition} && ($form->{id} ne "")) { $form->{snumbers} = qq|invnumber_| . $form->{invnumber}; $form->{addition} = "ADDED"; - $form->save_history($form->dbconnect(\%myconfig)); + $form->save_history; } # /saving the history $form->{title} = "Add"; - $form->{callback} = "ar.pl?action=add" unless $form->{callback}; + $form->{callback} = "ar.pl?action=add&DONT_LOAD_DRAFT=1" unless $form->{callback}; AR->get_transdate(\%myconfig, $form); $form->{initial_transdate} = $form->{transdate}; @@ -217,22 +215,19 @@ sub form_header { my $form = $main::form; my %myconfig = %main::myconfig; my $locale = $main::locale; - my $cgi = $main::cgi; + my $cgi = $::request->{cgi}; my ($title, $readonly, $exchangerate, $rows); - my ($taxincluded, $notes, $department, $customer, $employee, $amount, $project); - my ($jsscript, $button1, $button2, $onload); - my ($selectAR_amount, $selectAR_paid, $ARselected, $tax); - my (@column_index, %column_data); + my ($notes, $department, $customer, $employee, $amount, $project); + my ($onload); + my ($ARselected); $title = $form->{title}; - $form->{title} = $locale->text("$title Accounts Receivables Transaction"); - - $form->{taxincluded} = ($form->{taxincluded}) ? "checked" : ""; - # $locale->text('Add Accounts Receivables Transaction') # $locale->text('Edit Accounts Receivables Transaction') + $form->{title} = $locale->text("$title Accounts Receivables Transaction"); + $form->{javascript} = qq|