$sth->execute() || $form->dberror($query);
$form->{title} = $locale->text("History Search");
$form->header();
- my @daten;
+ my $daten = "";
while(my $hash_ref = $sth->fetchrow_hashref()){
- push(@daten, $form->get_history($dbh,$hash_ref->{id},$restriction));
+ $daten = $form->get_history($dbh,$hash_ref->{id},$restriction);
}
$dbh->disconnect();
print $form->parse_html_template("/common/show_history",
- {"DATEN" => @daten,
- "SUCCESS" => (length(@daten) > 0),
+ {"DATEN" => $daten,
+ "SUCCESS" => ($daten != 0 ? 1 : 0),
"NONEWWINDOW" => 1
});
$lxdebug->leave_sub();
if (AP->post_transaction(\%myconfig, \%$form)) {
# saving the history
if(!exists $form->{addition} && $form->{id} ne "") {
- $form->{snumber} = qq|invnumber_| . $form->{invnumber};
+ $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
$form->{addition} = "POSTED";
$form->save_history($form->dbconnect(\%myconfig));
}
$form->{postasnew} = 1;
# saving the history
if(!exists $form->{addition} && $form->{id} ne "") {
- $form->{snumber} = qq|invnumber_| . $form->{invnumber};
+ $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
$form->{addition} = "POSTED AS NEW";
$form->save_history($form->dbconnect(\%myconfig));
}
if (AP->delete_transaction(\%myconfig, \%$form, $spool)) {
# saving the history
if(!exists $form->{addition}) {
- $form->{snumber} = qq|invnumber_| . $form->{invnumber};
+ $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
$form->{addition} = "DELETED";
$form->save_history($form->dbconnect(\%myconfig));
}
# saving the history
if(!exists $form->{addition} && ($form->{id} ne "")) {
- $form->{snumber} = qq|invnumber_| . $form->{invnumber};
+ $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
$form->{addition} = "ADDED";
$form->save_history($form->dbconnect(\%myconfig));
}
if (AR->post_transaction(\%myconfig, \%$form)) {
# saving the history
if(!exists $form->{addition} && $form->{id} ne "") {
- $form->{snumber} = qq|invnumber_| . $form->{invnumber};
+ $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
$form->{addition} = "POSTED";
$form->save_history($form->dbconnect(\%myconfig));
}
$form->{postasnew} = 1;
# saving the history
if(!exists $form->{addition} && $form->{id} ne "") {
- $form->{snumber} = qq|invnumber_| . $form->{invnumber};
+ $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
$form->{addition} = "POSTED AS NEW";
$form->save_history($form->dbconnect(\%myconfig));
}
if (AR->delete_transaction(\%myconfig, \%$form, $spool)) {
# saving the history
if(!exists $form->{addition}) {
- $form->{snumber} = qq|invnumber_| . $form->{invnumber};
+ $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
$form->{addition} = "DELETED";
$form->save_history($form->dbconnect(\%myconfig));
}
$form->{script} = "ap.pl";
# saving the history
if(!exists $form->{addition}) {
- $form->{snumber} = qq|invnumber_| . $form->{invnumber};
+ $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
$form->{addition} = "SAVED";
$form->save_history($form->dbconnect(\%myconfig));
}
$form->{script} = "ar.pl";
# saving the history
if(!exists $form->{addition}) {
- $form->{snumber} = qq|invnumber_| . $form->{invnumber};
+ $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
$form->{addition} = "SAVED";
$form->save_history($form->dbconnect(\%myconfig));
}
$form->{type} = "invoice";
# saving the history
if(!exists $form->{addition}) {
- $form->{snumber} = qq|invnumber_| . $form->{invnumber};
+ $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
$form->{addition} = "SAVED";
$form->save_history($form->dbconnect(\%myconfig));
}
$form->{type} = "request_quotation";
# saving the history
if(!exists $form->{addition}) {
- $form->{snumber} = qq|ordnumber_| . $form->{ordnumber};
+ $form->{snumbers} = qq|ordnumber_| . $form->{ordnumber};
$form->{addition} = "SAVED";
$form->save_history($form->dbconnect(\%myconfig));
}
$form->{type} = "sales_quotation";
# saving the history
if(!exists $form->{addition}) {
- $form->{snumber} = qq|ordnumber_| . $form->{ordnumber};
+ $form->{snumbers} = qq|ordnumber_| . $form->{ordnumber};
$form->{addition} = "SAVED";
$form->save_history($form->dbconnect(\%myconfig));
}
($form->{db} eq 'customer') ? "sales_order" : "purchase_order";
# saving the history
if(!exists $form->{addition}) {
- $form->{snumber} = qq|ordnumber_| . $form->{ordnumber};
+ $form->{snumbers} = qq|ordnumber_| . $form->{ordnumber};
$form->{addition} = "SAVED";
$form->save_history($form->dbconnect(\%myconfig));
}
}
# saving the history
if(!exists $form->{addition}) {
- $form->{snumber} = ($form->{"db"} eq "customer" ? qq|customernumber_| . $form->{customernumber} : qq|vendornumber_| . $form->{vendornumber});
+ $form->{snumbers} = ($form->{"db"} eq "customer" ? qq|customernumber_| . $form->{customernumber} : qq|vendornumber_| . $form->{vendornumber});
$form->{addition} = "SAVED";
$form->save_history($form->dbconnect(\%myconfig));
}
}
# saving the history
if(!exists $form->{addition}) {
- $form->{snumber} = ($form->{"db"} eq "customer" ? qq|customernumber_| . $form->{customernumber} : qq|vendornumber_| . $form->{vendornumber});
+ $form->{snumbers} = ($form->{"db"} eq "customer" ? qq|customernumber_| . $form->{customernumber} : qq|vendornumber_| . $form->{vendornumber});
$form->{addition} = "SAVED";
$form->save_history($form->dbconnect(\%myconfig));
}
$msg .= " deleted!";
# saving the history
if(!exists $form->{addition}) {
- $form->{snumber} = ($form->{"db"} eq "customer" ? qq|customernumber_| . $form->{customernumber} : qq|vendornumber_| . $form->{vendornumber});
+ $form->{snumbers} = ($form->{"db"} eq "customer" ? qq|customernumber_| . $form->{customernumber} : qq|vendornumber_| . $form->{vendornumber});
$form->{addition} = "DELETED";
$form->save_history($form->dbconnect(\%myconfig));
}
DN->save_config(\%myconfig, \%$form);
# saving the history
if(!exists $form->{addition} && $form->{id} ne "") {
- $form->{addition} = "SAVED FOR DUNNING";
+ $form->{snumbers} = qq|dunning_id_| . $form->{"dunning_id"};
+ $form->{addition} = "SAVED FOR DUNNING";
$form->save_history($form->dbconnect(\%myconfig));
}
# /saving the history
}
# saving the history
if(!exists $form->{addition} && $form->{id} ne "") {
- $form->{addition} = "DUNNING STARTED";
+ $form->{snumbers} = qq|dunning_id_| . $form->{"dunning_id"};
+ $form->{addition} = "DUNNING STARTED";
$form->save_history($form->dbconnect(\%myconfig));
}
# /saving the history
if (GL->delete_transaction(\%myconfig, \%$form)){
# saving the history
if(!exists $form->{addition} && $form->{id} ne "") {
- $form->{snumber} = qq|ordnumber_| . $form->{ordnumber};
+ $form->{snumbers} = qq|ordnumber_| . $form->{ordnumber};
$form->{addition} = "DELETED";
$form->save_history($form->dbconnect(\%myconfig));
}
undef($form->{callback});
# saving the history
if(!exists $form->{addition} && $form->{id} ne "") {
- $form->{snumber} = qq|ordnumber_| . $form->{ordnumber};
+ $form->{snumbers} = qq|ordnumber_| . $form->{ordnumber};
$form->{addition} = "SAVED";
$form->{what_done} = $locale->text("Buchungsnummer") . " = " . $form->{id};
$form->save_history($form->dbconnect(\%myconfig));
$form->{storno} = 1;
# saving the history
if(!exists $form->{addition} && $form->{id} ne "") {
- $form->{snumber} = qq|ordnumber_| . $form->{ordnumber};
+ $form->{snumbers} = qq|ordnumber_| . $form->{ordnumber};
$form->{addition} = "STORNO";
$form->save_history($form->dbconnect(\%myconfig));
}
}
# saving the history
if(!exists $form->{addition}) {
- $form->{snumber} = qq|partnumber_| . $form->{partnumber};
+ $form->{snumbers} = qq|partnumber_| . $form->{partnumber};
$form->{addition} = "SAVED";
$form->save_history($form->dbconnect(\%myconfig));
}
# saving the history
if(!exists $form->{addition}) {
- $form->{snumber} = qq|partnumber_| . $form->{partnumber};
+ $form->{snumbers} = qq|partnumber_| . $form->{partnumber};
$form->{addition} = "SAVED AS NEW";
$form->save_history($form->dbconnect(\%myconfig));
}
$lxdebug->enter_sub();
# saving the history
if(!exists $form->{addition}) {
- $form->{snumber} = qq|partnumber_| . $form->{partnumber};
+ $form->{snumbers} = qq|partnumber_| . $form->{partnumber};
$form->{addition} = "DELETED";
$form->save_history($form->dbconnect(\%myconfig));
}
call_sub($display_form);
# saving the history
if(!exists $form->{addition}) {
- $form->{snumber} = qq|ordnumber_| . $form->{ordnumber};
+ $form->{snumbers} = qq|ordnumber_| . $form->{ordnumber};
$form->{addition} = "PRINTED";
$form->save_history($form->dbconnect(\%myconfig));
}
# saving the history
if(!exists $form->{addition}) {
- $form->{snumber} = qq|ordnumber_| . $form->{ordnumber};
+ $form->{snumbers} = qq|ordnumber_| . $form->{ordnumber};
if($form->{media} =~ /printer/) {
$form->{addition} = "PRINTED";
}
# saving the history
if(!exists $form->{addition}) {
- $form->{snumber} = qq|ordnumber_| . $form->{ordnumber};
+ $form->{snumbers} = qq|ordnumber_| . $form->{ordnumber};
$form->{addition} = "SAVED";
$form->save_history($form->dbconnect(\%myconfig));
}
# saving the history
if(!exists $form->{addition}) {
- $form->{snumber} = qq|ordnumber_| . $form->{ordnumber};
+ $form->{snumbers} = qq|ordnumber_| . $form->{ordnumber};
$form->{addition} = "SAVED";
$form->save_history($form->dbconnect(\%myconfig));
}
$form->redirect($msg);
# saving the history
if(!exists $form->{addition}) {
- $form->{snumber} = qq|ordnumber_| . $form->{ordnumber};
+ $form->{snumbers} = qq|ordnumber_| . $form->{ordnumber};
$form->{addition} = "DELETED";
$form->save_history($form->dbconnect(\%myconfig));
}
}
# saving the history
if(!exists $form->{addition} && $form->{id} ne "") {
- $form->{snumber} = qq|projectnumber_| . $form->{projectnumber};
+ $form->{snumbers} = qq|projectnumber_| . $form->{projectnumber};
$form->{addition} = "SAVED";
$form->save_history($form->dbconnect(\%myconfig));
}
}
# saving the history
if(!exists $form->{addition}) {
- $form->{snumber} = qq|projectnumber_| . $form->{projectnumber};
+ $form->{snumbers} = qq|projectnumber_| . $form->{projectnumber};
$form->{addition} = "DELETED";
$form->save_history($form->dbconnect(\%myconfig));
}
}
# saving the history
if(!exists $form->{addition} && $form->{id} ne "") {
- $form->{snumber} = qq|ordnumber_| . $form->{ordnumber};
+ $form->{snumbers} = qq|ordnumber_| . $form->{ordnumber};
$form->{addition} = "PRINTED";
$form->{what_done} = $form->{type};
$form->save_history($form->dbconnect(\%myconfig));