Es wird nun immer "invoice" dort gespeichert.
if (AP->post_transaction(\%myconfig, \%$form)) {
# saving the history
if(!exists $form->{addition} && $form->{id} ne "") {
- $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
- $form->{addition} = "POSTED";
+ $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
+ $form->{addition} = "POSTED";
+ $form->{what_done} = "invoice";
$form->save_history;
}
# /saving the history
$form->{postasnew} = 1;
# saving the history
if(!exists $form->{addition} && $form->{id} ne "") {
- $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
- $form->{addition} = "POSTED AS NEW";
+ # does this work? post_as_new for ap doesn't immediately save the
+ # invoice, because the invnumber has to be entered by hand.
+ # And the value of $form->{postasnew} isn't checked when calling post
+ $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
+ $form->{addition} = "POSTED AS NEW";
+ $form->{what_done} = "invoice";
$form->save_history;
}
# /saving the history
if (AP->delete_transaction(\%myconfig, \%$form)) {
# saving the history
if(!exists $form->{addition}) {
- $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
- $form->{addition} = "DELETED";
+ $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
+ $form->{addition} = "DELETED";
+ $form->{what_done} = "invoice";
$form->save_history;
}
# /saving the history
# saving the history
if(!exists $form->{addition} && $form->{id} ne "") {
- $form->{snumbers} = "invnumber_$form->{invnumber}";
- $form->{addition} = "STORNO";
+ $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
+ $form->{addition} = "STORNO";
+ $form->{what_done} = "invoice";
$form->save_history;
}
# /saving the history
# saving the history
if(!exists $form->{addition} && $form->{id} ne "") {
- $form->{snumbers} = "invnumber_$form->{invnumber}";
- $form->{addition} = "POSTED";
+ $form->{snumbers} = "invnumber_$form->{invnumber}";
+ $form->{what_done} = "invoice";
+ $form->{addition} = "POSTED";
$form->save_history;
}
# /saving the history
$form->{postasnew} = 1;
# saving the history
if(!exists $form->{addition} && $form->{id} ne "") {
- $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
- $form->{addition} = "POSTED AS NEW";
+ $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
+ $form->{what_done} = "invoice";
+ $form->{addition} = "POSTED AS NEW";
$form->save_history;
}
# /saving the history
if (AR->delete_transaction(\%myconfig, \%$form)) {
# saving the history
if(!exists $form->{addition}) {
- $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
- $form->{addition} = "DELETED";
+ $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
+ $form->{what_done} = "invoice";
+ $form->{addition} = "DELETED";
$form->save_history;
}
# /saving the history
# saving the history
if(!exists $form->{addition} && $form->{id} ne "") {
- $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
- $form->{addition} = "STORNO";
+ $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
+ $form->{addition} = "STORNO";
+ $form->{what_done} = "invoice";
$form->save_history;
}
# /saving the history
# saving the history
if(!exists $form->{addition} && $form->{id} ne "") {
- $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
- $form->{addition} = "CANCELED";
+ $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
+ $form->{what_done} = "invoice";
+ $form->{addition} = "CANCELED";
$form->save_history;
}
# /saving the history
if (IR->post_invoice(\%myconfig, \%$form)){
# saving the history
if(!exists $form->{addition} && $form->{id} ne "") {
- $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
- $form->{addition} = "POSTED";
- #$form->{what_done} = $locale->text("Rechnungsnummer") . qq| | . $form->{invnumber};
+ $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
+ $form->{addition} = "POSTED";
+ $form->{what_done} = 'invoice';
$form->save_history;
}
# /saving the history
relink_accounts();
if ( IS->post_payment(\%myconfig, \%$form) ) {
$form->{snumbers} = qq|invnumber_| . $form->{invnumber};
- $form->{what_done} = $form->{type};
+ $form->{what_done} = 'invoice';
$form->{addition} = "PAYMENT POSTED";
$form->save_history;
$form->redirect($locale->text('Payment posted!'))
remove_draft() if $form->{remove_draft};
if(!exists $form->{addition}) {
- $form->{snumbers} = 'invnumber' .'_'. $form->{invnumber}; # ($form->{type} eq 'credit_note' ? 'cnnumber' : 'invnumber') .'_'. $form->{invnumber};
- $form->{addition} = $form->{print_and_post} ? "PRINTED AND POSTED" :
- $form->{storno} ? "STORNO" :
- "POSTED";
+ $form->{snumbers} = 'invnumber' .'_'. $form->{invnumber}; # ($form->{type} eq 'credit_note' ? 'cnnumber' : 'invnumber') .'_'. $form->{invnumber};
+ $form->{what_done} = 'invoice';
+ $form->{addition} = $form->{print_and_post} ? "PRINTED AND POSTED" :
+ $form->{storno} ? "STORNO" :
+ "POSTED";
$form->save_history;
}
}
# save the history of invoice being stornoed
- $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
- $form->{addition} = "STORNO";
+ $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
+ $form->{what_done} = 'invoice';
+ $form->{addition} = "STORNO";
$form->save_history;
map({ my $key = $_; delete($form->{$key}) unless (grep({ $key eq $_ } qw(id login password type))); } keys(%{ $form }));
if (IS->delete_invoice(\%myconfig, \%$form)) {
# saving the history
if(!exists $form->{addition}) {
- $form->{snumbers} = 'invnumber' .'_'. $form->{invnumber}; # ($form->{type} eq 'credit_note' ? 'cnnumber' : 'invnumber') .'_'. $form->{invnumber};
- $form->{addition} = "DELETED";
+ $form->{snumbers} = 'invnumber' .'_'. $form->{invnumber}; # ($form->{type} eq 'credit_note' ? 'cnnumber' : 'invnumber') .'_'. $form->{invnumber};
+ $form->{what_done} = 'invoice';
+ $form->{addition} = "DELETED";
$form->save_history;
}
# /saving the history