X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Far.pl;h=e0ed1e7935bd983f00a7905cd2292011e66a050c;hb=5b8e9fcb2f9c94d69519c927b8aa59184d93cea3;hp=038e59ea15c6cae6dc581073dba4ff41a80b5af8;hpb=0c404f20f1f066a1e6fc9c4bacf4bd70eec719e4;p=kivitendo-erp.git diff --git a/bin/mozilla/ar.pl b/bin/mozilla/ar.pl index 038e59ea1..e0ed1e793 100644 --- a/bin/mozilla/ar.pl +++ b/bin/mozilla/ar.pl @@ -409,12 +409,15 @@ sub form_header { gldate => $form->{"gldate_$i"}, }; + # default account for current assets (i.e. 1801 - SKR04) if no account is selected + $form->{accno_arap} = IS->get_standard_accno_current_assets(\%myconfig, \%$form); + $payment->{selectAR_paid} = NTI($cgi->popup_menu('-name' => "AR_paid_$i", '-id' => "AR_paid_$i", '-values' => \@AR_paid_values, '-labels' => \%chart_labels, - '-default' => $payment->{AR_paid})); + '-default' => $payment->{AR_paid} || $form->{accno_arap})); @@ -827,7 +830,7 @@ sub yes { sub search { $main::lxdebug->enter_sub(); - $main::auth->assert('general_ledger | invoice_edit'); + $main::auth->assert('invoice_edit'); my $form = $main::form; my %myconfig = %main::myconfig; @@ -844,7 +847,7 @@ sub search { "departments" => "ALL_DEPARTMENTS", "customers" => "ALL_VC", "business_types" => "ALL_BUSINESS_TYPES"); - $form->{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all(query => [ deleted => 0 ]); + $form->{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all_sorted(query => [ deleted => 0 ]); $form->{SHOW_BUSINESS_TYPES} = scalar @{ $form->{ALL_BUSINESS_TYPES} } > 0; # constants and subs for template @@ -880,7 +883,7 @@ sub create_subtotal_row { sub ar_transactions { $main::lxdebug->enter_sub(); - $main::auth->assert('general_ledger | invoice_edit'); + $main::auth->assert('invoice_edit'); my $form = $main::form; my %myconfig = %main::myconfig;