X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fap.pl;h=7b16657e578c9f11824bc7592df27be8345b46d3;hb=1f9b0c55e2288183a36b9026f1758a3921967811;hp=4531e99a917bb5102c679f746e529d10692ed618;hpb=891f62176912eb5c1e8864a1140635e4ad533d08;p=kivitendo-erp.git diff --git a/bin/mozilla/ap.pl b/bin/mozilla/ap.pl index 4531e99a9..7b16657e5 100644 --- a/bin/mozilla/ap.pl +++ b/bin/mozilla/ap.pl @@ -375,6 +375,10 @@ sub form_header { if ( $form->{'paid_'. $form->{paidaccounts}} ) { $form->{paidaccounts}++; } + + # default account for current assets (i.e. 1801 - SKR04) + $form->{accno_arap} = IS->get_standard_accno_current_assets(\%myconfig, \%$form); + for my $i (1 .. $form->{paidaccounts}) { $form->{totalpaid} += $form->{"paid_$i"}; @@ -606,10 +610,11 @@ sub post { my ($inline) = @_; - # check if there is a vendor, invoice and due date + # check if there is a vendor, invoice, due date and invnumber $form->isblank("transdate", $locale->text("Invoice Date missing!")); $form->isblank("duedate", $locale->text("Due Date missing!")); $form->isblank("vendor", $locale->text('Vendor missing!')); + $form->isblank("invnumber", $locale->text('Invoice Number missing!')); if ($myconfig{mandatory_departments} && !$form->{department}) { $form->{saved_message} = $::locale->text('You have to specify a department.'); @@ -795,7 +800,7 @@ sub yes { sub search { $main::lxdebug->enter_sub(); - $main::auth->assert('general_ledger | vendor_invoice_edit'); + $main::auth->assert('vendor_invoice_edit'); my $form = $main::form; my %myconfig = %main::myconfig; @@ -847,7 +852,7 @@ sub ap_transactions { my %myconfig = %main::myconfig; my $locale = $main::locale; - $main::auth->assert('general_ledger | vendor_invoice_edit'); + $main::auth->assert('vendor_invoice_edit'); ($form->{vendor}, $form->{vendor_id}) = split(/--/, $form->{vendor});