# saving the history
$form->{id} = $form->{"id_$i"};
if(!exists $form->{addition}) {
- $form->{snumbers} = qq|invnumber_| . $form->{"invnumber_$i"};
- $form->{addition} = "POSTED";
+ $form->{snumbers} = qq|invnumber_| . $form->{"invnumber_$i"};
+ $form->{what_done} = "invoice";
+ $form->{addition} = "PAYMENT POSTED";
$form->save_history;
}
# /saving the history
($form->{AP}) = split /--/, $form->{AP};
($form->{AP_paid}) = split /--/, $form->{AP_paid};
- $form->redirect($locale->text('Payment posted!'))
- if (AP->post_payment(\%myconfig, \%$form));
+ if (AP->post_payment(\%myconfig, \%$form)) {
+ $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
+ $form->{what_done} = 'invoice';
+ $form->{addition} = "PAYMENT POSTED";
+ $form->save_history;
+ $form->redirect($locale->text('Payment posted!'))
+ } else {
$form->error($locale->text('Cannot post payment!'));
+ };
$main::lxdebug->leave_sub();
($form->{AR}) = split /--/, $form->{AR};
($form->{AR_paid}) = split /--/, $form->{AR_paid};
- $form->redirect($locale->text('Payment posted!')) if (AR->post_payment(\%myconfig, \%$form));
- $form->error($locale->text('Cannot post payment!'));
+ if (AR->post_payment(\%myconfig, \%$form)) {
+ $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
+ $form->{what_done} = 'invoice';
+ $form->{addition} = "PAYMENT POSTED";
+ $form->save_history;
+ $form->redirect($locale->text('Payment posted!'))
+ } else {
+ $form->error($locale->text('Cannot post payment!'));
+ };
$main::lxdebug->leave_sub();
}
if (IR->post_payment(\%myconfig, \%$form)){
if (!exists $form->{addition} && $form->{id} ne "") {
# saving the history
- $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
- $form->{addition} = "PAYMENT POSTED";
- $form->{what_done} = $form->{currency} . qq| | . $form->{paid} . qq| | . $locale->text("POSTED");
+ $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
+ $form->{addition} = "PAYMENT POSTED";
+ $form->{what_done} = "invoice";
$form->save_history;
# /saving the history
}
($form->{AR}) = split /--/, $form->{AR};
($form->{AR_paid}) = split /--/, $form->{AR_paid};
relink_accounts();
- $form->redirect($locale->text('Payment posted!'))
- if (IS->post_payment(\%myconfig, \%$form));
- $form->error($locale->text('Cannot post payment!'));
-
+ if ( IS->post_payment(\%myconfig, \%$form) ) {
+ $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
+ $form->{what_done} = $form->{type};
+ $form->{addition} = "PAYMENT POSTED";
+ $form->save_history;
+ $form->redirect($locale->text('Payment posted!'))
+ } else {
+ $form->error($locale->text('Cannot post payment!'));
+ };
$main::lxdebug->leave_sub();
}
'Own bank account number or IBAN' => 'Eigene Kontonummer oder IBAN',
'Own bank code' => 'Eigene Bankleitzahl',
'Owner of account' => 'Kontoinhaber',
- 'PAYMENT POSTED' => 'Rechung gebucht',
+ 'PAYMENT POSTED' => 'Zahlung gebucht',
'PDF' => 'PDF',
'PDF (OpenDocument/OASIS)' => 'PDF (OpenDocument/OASIS)',
'PDF export -- options' => 'PDF-Export -- Optionen',