Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision dfb4f85b

Von admin vor etwa 14 Jahren hinzugefügt

  • ID dfb4f85b514e25ecaaca5beeec8ce5fb397c6d92
  • Vorgänger dd1de766
  • Nachfolger 5e38423b

Fixed a bug in account matcher code.

Unterschiede anzeigen:

src/fox/lib/ff_app.cpp
const char *s1;
const char *s2;
bool mightMatch=true;
if (AE_BankAccount_GetOwnerType(ba)!=0 ||
AE_BankAccount_GetOwnerId(ba)!=0)
mightMatch=false;
/* compare bank code */
s1=AB_ImExporterAccountInfo_GetBankCode(iea);
s2=AE_BankAccount_GetBankCode(ba);
if (s1 && *s1 && s2 && *s2)
mightMatch=(strcasecmp(s1, s2)!=0)?false:true;
if (mightMatch) {
s1=AB_ImExporterAccountInfo_GetBankCode(iea);
s2=AE_BankAccount_GetBankCode(ba);
if (s1 && *s1 && s2 && *s2)
mightMatch=(strcasecmp(s1, s2)!=0)?false:true;
}
/* compare account number */
if (mightMatch) {
s1=AB_ImExporterAccountInfo_GetAccountNumber(iea);
......
ba=NULL;
}
/* search for booked balance in database*/
/* search for booked balance in database */
if (bookedList) {
GWEN_Gui_ProgressLog(pid, GWEN_LoggerLevel_Info, I18N("Looking for booked balance"));
bb=AE_BankBalance_List_First(bookedList);
src/fox/lib/modules/bankaccounts/fm_bankaccaccpage.cpp
AE_BANKACCOUNT *ba;
/* look for bank account in list */
DBG_INFO(AE_LOGDOMAIN, "Checking AqBanking account %d", (int) AB_Account_GetUniqueId(a));
ba=AE_BankAccount_List_First(baList);
while(ba) {
if (AE_BankAccount_GetBankingId(ba)==AB_Account_GetUniqueId(a))
break;
ba=AE_BankAccount_List_Next(ba);
}
if (AE_BankAccount_GetOwnerType(ba)==0 &&
AE_BankAccount_GetOwnerId(ba)==0 &&
AE_BankAccount_GetBankingId(ba)==AB_Account_GetUniqueId(a))
break;
ba=AE_BankAccount_List_Next(ba);
}
if (ba==NULL) {
/* then match by bank code and account number */
DBG_INFO(AE_LOGDOMAIN, "AqBanking account %d not assigned, looking further", (int) AB_Account_GetUniqueId(a));
/* then match by bank code and account number */
ba=AE_BankAccount_List_First(baList);
while(ba) {
const char *s1;
const char *s2;
bool mightMatch=true;
if (AE_BankAccount_GetOwnerType(ba)!=0 ||
AE_BankAccount_GetOwnerId(ba)!=0)
mightMatch=false;
/* compare bank code */
s1=AB_Account_GetBankCode(a);
s2=AE_BankAccount_GetBankCode(ba);
if (s1 && s2)
mightMatch=(strcasecmp(s1, s2)!=0)?false:true;
if (mightMatch) {
s1=AB_Account_GetBankCode(a);
s2=AE_BankAccount_GetBankCode(ba);
if (s1 && s2)
mightMatch=(strcasecmp(s1, s2)!=0)?false:true;
}
/* compare account number */
if (mightMatch) {
......
mightMatch=(strcasecmp(s1, s2)!=0)?false:true;
}
if (mightMatch)
break;
if (mightMatch) {
DBG_INFO(AE_LOGDOMAIN, "Account %d matches AqBanking account %d",
(int)AE_BankAccount_GetId(ba), (int)AB_Account_GetUniqueId(a));
break;
}
ba=AE_BankAccount_List_Next(ba);
}
......
/* new account, add it */
const char *s;
DBG_INFO(AE_LOGDOMAIN, "No match for AqBanking account %d found, creating new account", (int) AB_Account_GetUniqueId(a));
ba=AE_BankAccount_new();
if (gr)
AE_BankAccount_SetGroupId(ba, AE_Group_GetId(gr));

Auch abrufbar als: Unified diff