mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Fix handling of debit notes.
2005-05-23 Christian Stimming <stimming@tuhh.de> * src/import-export/hbci/dialog-hbcitrans.c: Fix handling of debit notes -- they were broken at all times since the aqbanking transition, oops. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@11053 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
a056e3e87b
commit
ed060f44a6
@ -1,5 +1,9 @@
|
||||
2005-05-23 Christian Stimming <stimming@tuhh.de>
|
||||
|
||||
* src/import-export/hbci/dialog-hbcitrans.c: Fix handling of debit
|
||||
notes -- they were broken at all times since the aqbanking
|
||||
transition, oops.
|
||||
|
||||
* src/import-export/hbci/dialog-hbcitrans.c: Add sanity checks and
|
||||
ask user when there are no purpose lines.
|
||||
|
||||
|
@ -506,7 +506,6 @@ int gnc_hbci_dialog_run_until_ok(HBCITransDialog *td,
|
||||
|
||||
{
|
||||
char *purpose = gnc_hbci_getpurpose (td->hbci_trans);
|
||||
printf ("%d: %s\n", strlen(purpose), purpose);
|
||||
if (strlen(purpose) == 0) {
|
||||
gtk_widget_show_all (td->dialog);
|
||||
values_ok = !gnc_verify_dialog
|
||||
@ -694,10 +693,15 @@ gnc_hbci_trans_dialog_enqueue(HBCITransDialog *td, AB_BANKING *api,
|
||||
printf("gnc_hbci_trans_dialog_enqueue: Oops, job not available. Aborting.\n");
|
||||
return NULL;
|
||||
}
|
||||
AB_JobSingleTransfer_SetTransaction(job, td->hbci_trans);
|
||||
|
||||
/* Make really sure there is no other job in the queue */
|
||||
/* HBCI_Outbox_removeByStatus (outbox, HBCI_JOB_STATUS_NONE); */
|
||||
switch (trans_type) {
|
||||
case SINGLE_DEBITNOTE:
|
||||
AB_JobSingleDebitNote_SetTransaction(job, td->hbci_trans);
|
||||
break;
|
||||
default:
|
||||
case SINGLE_TRANSFER:
|
||||
AB_JobSingleTransfer_SetTransaction(job, td->hbci_trans);
|
||||
};
|
||||
|
||||
/* Add job to queue */
|
||||
AB_Banking_EnqueueJob(api, job);
|
||||
|
@ -77,7 +77,7 @@ gnc_hbci_maketrans (GtkWidget *parent, Account *gnc_acc,
|
||||
( gnc_hbci_get_book_template_list
|
||||
( xaccAccountGetBook(gnc_acc)));
|
||||
int result;
|
||||
gboolean successful;
|
||||
gboolean successful = FALSE;
|
||||
HBCITransDialog *td;
|
||||
|
||||
/* Now open the HBCI_trans_dialog, which also calls
|
||||
@ -110,6 +110,28 @@ gnc_hbci_maketrans (GtkWidget *parent, Account *gnc_acc,
|
||||
AB_JOB *job =
|
||||
gnc_hbci_trans_dialog_enqueue(td, api,
|
||||
(AB_ACCOUNT *)h_acc, trans_type);
|
||||
|
||||
/* Check whether we really got a job */
|
||||
if (!job) {
|
||||
/* Oops, no job, probably not supported by bank. */
|
||||
if (gnc_verify_dialog
|
||||
(parent,
|
||||
FALSE,
|
||||
"%s",
|
||||
_("The backend found an error during the preparation \n"
|
||||
"of the job. It is not possible to execute this job. \n"
|
||||
"\n"
|
||||
"Most probable the bank does not support your chosen \n"
|
||||
"job or your HBCI account does not have the permission \n"
|
||||
"to execute this job. More error messages might be \n"
|
||||
"visible on your console log.\n"
|
||||
"\n"
|
||||
"Do you want to enter the job again?")))
|
||||
continue;
|
||||
else
|
||||
/* job is NULL anyway, so it doesn't have to be cleaned up */
|
||||
break;
|
||||
}
|
||||
|
||||
/* HBCI Transaction has been created and enqueued, so now open
|
||||
* the gnucash transaction dialog and fill in all values. */
|
||||
|
Loading…
Reference in New Issue
Block a user