require "bin/mozilla/arap.pl";
require "bin/mozilla/common.pl";
-require "bin/mozilla/drafts.pl";
require "bin/mozilla/reportgenerator.pl";
use strict;
$main::auth->assert('general_ledger');
- return $main::lxdebug->leave_sub() if (load_draft_maybe());
-
$form->{title} = "Add";
- $form->{callback} = "ap.pl?action=add&DONT_LOAD_DRAFT=1" unless $form->{callback};
+ $form->{callback} = "ap.pl?action=add" unless $form->{callback};
AP->get_transdate(\%myconfig, $form);
$form->{initial_transdate} = $form->{transdate};
$form->{javascript} .= qq|<script type="text/javascript" src="js/common.js"></script>|;
$form->{javascript} .= qq|<script type="text/javascript" src="js/show_vc_details.js"></script>|;
$form->{javascript} .= qq|<script type="text/javascript" src="js/follow_up.js"></script>|;
+ $form->{javascript} .= qq|<script type="text/javascript" src="js/kivi.Draft.js"></script>|;
$form->header();
my ($vendor) = split /--/, $form->{vendor};
if ($form->{oldvendor} ne "$vendor--$form->{vendor_id}") {
&update;
- ::end_of_request();
+ $::dispatcher->end_request;
}
my ($debitaccno, $debittaxkey) = split /--/, $form->{AP_amountselected};
my ($taxkey, $NULL) = split /--/, $form->{taxchartselected};
$form->save_history;
}
# /saving the history
- remove_draft() if $form->{remove_draft};
# Dieser Text wird niemals ausgegeben: Probleme beim redirect?
$form->redirect($locale->text('Transaction posted!')) unless $inline;
} else {
vendornumber country ustid taxzone payment_terms charts direct_debit);
my @hidden_variables = map { "l_${_}" } @columns;
- push @hidden_variables, "l_subtotal", qw(open closed vendor invnumber ordnumber transaction_description notes project_id transdatefrom transdateto department);
+ push @hidden_variables, "l_subtotal", qw(open closed vendor invnumber ordnumber transaction_description notes project_id transdatefrom transdateto department
+ parts_partnumber parts_description);
my $href = build_std_url('action=ap_transactions', grep { $form->{$_} } @hidden_variables);
'vendornumber' => { 'text' => $locale->text('Vendor Number'), },
'country' => { 'text' => $locale->text('Country'), },
'ustid' => { 'text' => $locale->text('USt-IdNr.'), },
- 'taxzone' => { 'text' => $locale->text('Steuersatz'), },
+ 'taxzone' => { 'text' => $locale->text('Tax rate'), },
'payment_terms' => { 'text' => $locale->text('Payment Terms'), },
'charts' => { 'text' => $locale->text('Buchungskonto'), },
'direct_debit' => { 'text' => $locale->text('direct debit'), },
push @options, $locale->text('Order Number') . " : $form->{ordnumber}" if ($form->{ordnumber});
push @options, $locale->text('Notes') . " : $form->{notes}" if ($form->{notes});
push @options, $locale->text('Transaction description') . " : $form->{transaction_description}" if ($form->{transaction_description});
+ push @options, $locale->text('Part Description') . " : $form->{parts_description}" if $form->{parts_description};
+ push @options, $locale->text('Part Number') . " : $form->{parts_partnumber}" if $form->{parts_partnumber};
push @options, $locale->text('From') . " " . $locale->date(\%myconfig, $form->{transdatefrom}, 1) if ($form->{transdatefrom});
push @options, $locale->text('Bis') . " " . $locale->date(\%myconfig, $form->{transdateto}, 1) if ($form->{transdateto});
push @options, $locale->text('Open') if ($form->{open});