# show history button
$form->{javascript} = qq|<script type=text/javascript src=js/show_history.js></script>|;
#/show hhistory button
-
+
$form->{title} = $locale->text('Edit Vendor Invoice');
&invoice_links;
IR->get_vendor(\%myconfig, \%$form);
IR->retrieve_invoice(\%myconfig, \%$form);
$form->{cp_id} = $cp_id;
-
+
if ($payment_id) {
$form->{payment_id} = $payment_id;
}
}
my $globalprojectnumber = NTI($cgi->popup_menu('-name' => 'globalproject_id', '-values' => \@values, '-labels' => \%labels,
'-default' => $form->{"globalproject_id"}));
-
+
%labels = ();
@values = ();
my $i = 0;
push(@values, $item);
$labels{$item} = $item;
}
-
+
$form->{currency} = $form->{defaultcurrency} unless $form->{currency};
my $currencies;
if (scalar @values) {
#write Trigger
$jsscript =
- Form->write_trigger(\%myconfig, "2",
+ Form->write_trigger(\%myconfig, "2",
"invdate", "BL", "trigger1",
"duedate", "BL", "trigger2");
<td align=right>
<table>
$employees
- <tr>
+ <tr>
<th align=right nowrap>| . $locale->text('Invoice Number') . qq|</th>
<td><input name=invnumber size=11 value="$form->{invnumber}"></td>
</tr>
. qq|">|;
}
# /button for saving history
- # mark_as_paid button
- if($form->{id} ne "") {
- print qq| <input type="submit" class="submit" name="action" value="|
+ # mark_as_paid button
+ if($form->{id} ne "") {
+ print qq| <input type="submit" class="submit" name="action" value="|
. $locale->text('mark as paid') . qq|">|;
}
# /mark_as_paid button
$auth->assert('vendor_invoice_edit');
- &mark_as_paid_common(\%myconfig,"ap");
+ &mark_as_paid_common(\%myconfig,"ap");
$lxdebug->leave_sub();
}
# Payments must not be recorded for the new storno invoice.
$form->{paidaccounts} = 0;
map { my $key = $_; delete $form->{$key} if grep { $key =~ /^$_/ } qw(datepaid_ source_ memo_ paid_ exchangerate_ AR_paid_) } keys %{ $form };
-
+
# saving the history
if(!exists $form->{addition} && $form->{id} ne "") {
- $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
+ $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
$form->{addition} = "CANCELED";
$form->save_history($form->dbconnect(\%myconfig));
}
# /saving the history
-
+
$form->{storno_id} = $form->{id};
$form->{storno} = 1;
$form->{id} = "";
if (IR->post_invoice(\%myconfig, \%$form)){
# saving the history
if(!exists $form->{addition} && $form->{id} ne "") {
- $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
+ $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
$form->{addition} = "POSTED";
#$form->{what_done} = $locale->text("Rechnungsnummer") . qq| | . $form->{invnumber};
$form->save_history($form->dbconnect(\%myconfig));
if (IR->delete_invoice(\%myconfig, \%$form)) {
# saving the history
if(!exists $form->{addition}) {
- $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
+ $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
$form->{addition} = "DELETED";
$form->save_history($form->dbconnect(\%myconfig));
}
- # /saving the history
+ # /saving the history
$form->redirect($locale->text('Invoice deleted!'));
}
$form->error($locale->text('Cannot delete invoice!'));