X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Far.pl;h=834e1b18e405f0f2d7a46b4cc2cc712207f39ef9;hb=4ac2976f86e7747ecf69a4e7b64f155343e984ae;hp=be99f5477156eff304d26c772a597973f8b25f57;hpb=662ded382ad646d46d1e2613df42ed35ee2f6265;p=kivitendo-erp.git diff --git a/bin/mozilla/ar.pl b/bin/mozilla/ar.pl index be99f5477..834e1b18e 100644 --- a/bin/mozilla/ar.pl +++ b/bin/mozilla/ar.pl @@ -32,12 +32,13 @@ #====================================================================== use POSIX qw(strftime); -use List::Util qw(sum first); +use List::Util qw(sum first max); use SL::AR; use SL::FU; use SL::IS; use SL::PE; +use SL::DB::Default; use SL::ReportGenerator; require "bin/mozilla/arap.pl"; @@ -90,12 +91,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}; @@ -215,22 +216,18 @@ 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 ($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|