IR->get_vendor(\%myconfig, \%$form);
IR->retrieve_invoice(\%myconfig, \%$form);
$form->{cp_id} = $cp_id;
IR->get_vendor(\%myconfig, \%$form);
IR->retrieve_invoice(\%myconfig, \%$form);
$form->{cp_id} = $cp_id;
}
my $globalprojectnumber = NTI($cgi->popup_menu('-name' => 'globalproject_id', '-values' => \@values, '-labels' => \%labels,
'-default' => $form->{"globalproject_id"}));
}
my $globalprojectnumber = NTI($cgi->popup_menu('-name' => 'globalproject_id', '-values' => \@values, '-labels' => \%labels,
'-default' => $form->{"globalproject_id"}));
: (NTI($cgi->popup_menu('-name' => 'vendor', '-default' => $form->{oldvendor},
'-onChange' => 'document.getElementById(\'update_button\').click();',
'-values' => \@values, '-labels' => \%labels, '-style' => 'width: 250px')))) . qq|
: (NTI($cgi->popup_menu('-name' => 'vendor', '-default' => $form->{oldvendor},
'-onChange' => 'document.getElementById(\'update_button\').click();',
'-values' => \@values, '-labels' => \%labels, '-style' => 'width: 250px')))) . qq|
"invdate", "BL", "trigger1",
"duedate", "BL", "trigger2");
"invdate", "BL", "trigger1",
"duedate", "BL", "trigger2");
<th align=right nowrap>| . $locale->text('Invoice Number') . qq|</th>
<td><input name=invnumber size=11 value="$form->{invnumber}"></td>
</tr>
<th align=right nowrap>| . $locale->text('Invoice Number') . qq|</th>
<td><input name=invnumber size=11 value="$form->{invnumber}"></td>
</tr>
qq|<td align=center><input name="datepaid_$i" id="datepaid_$i" size=11 title="$myconfig{dateformat}" value="$form->{"datepaid_$i"}" onBlur=\"check_right_date_format(this)\">
<input type="button" name="datepaid_$i" id="trigger_datepaid_$i" value="?"></td>|;
$column_data{"source_$i"} =
qq|<td align=center><input name="datepaid_$i" id="datepaid_$i" size=11 title="$myconfig{dateformat}" value="$form->{"datepaid_$i"}" onBlur=\"check_right_date_format(this)\">
<input type="button" name="datepaid_$i" id="trigger_datepaid_$i" value="?"></td>|;
$column_data{"source_$i"} =
# 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 };
# 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 };
($form->{AP}) = split /--/, $form->{AP};
($form->{AP_paid}) = split /--/, $form->{AP_paid};
($form->{AP}) = split /--/, $form->{AP};
($form->{AP_paid}) = split /--/, $form->{AP_paid};
if (IR->post_invoice(\%myconfig, \%$form)){
# saving the history
if(!exists $form->{addition} && $form->{id} ne "") {
if (IR->post_invoice(\%myconfig, \%$form)){
# saving the history
if(!exists $form->{addition} && $form->{id} ne "") {
$form->{addition} = "POSTED";
#$form->{what_done} = $locale->text("Rechnungsnummer") . qq| | . $form->{invnumber};
$form->save_history($form->dbconnect(\%myconfig));
$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}) {
if (IR->delete_invoice(\%myconfig, \%$form)) {
# saving the history
if(!exists $form->{addition}) {
$form->redirect($locale->text('Invoice deleted!'));
}
$form->error($locale->text('Cannot delete invoice!'));
$form->redirect($locale->text('Invoice deleted!'));
}
$form->error($locale->text('Cannot delete invoice!'));