diff --git a/src/Pohoda/RaiffeisenBank/PohodaBankClient.php b/src/Pohoda/RaiffeisenBank/PohodaBankClient.php index d6469ce..fdefa13 100644 --- a/src/Pohoda/RaiffeisenBank/PohodaBankClient.php +++ b/src/Pohoda/RaiffeisenBank/PohodaBankClient.php @@ -210,17 +210,20 @@ public function getCurrencyCode() /** * Is Record with current remoteNumber already present in Pohoda ? * + * @todo Implement using Pohoda API UserList + * * @return bool */ public function checkForTransactionPresence() { + $this->addStatusMessage('Checking for transaction presence - Not yet implemented', 'debug'); return false; // !empty($this->getColumnsFromPohoda('id', ['cisDosle' => $this->getDataValue('cisDosle')])); TODO } /** * @param string $conSym */ - public function ensureKSExists($conSym): void + public function ensureKSExists(string $conSym): void { if (!\array_key_exists($conSym, $this->constSymbols)) { $this->constantor->insertToPohoda(['kod' => $conSym, 'poznam' => 'Created by Raiffeisen Bank importer', 'nazev' => '?!?!? '.$conSym]); @@ -229,6 +232,11 @@ public function ensureKSExists($conSym): void } } + /** + * Insert Transaction to Pohoda. + * + * @return array> Imported Transactions + */ public function insertTransactionToPohoda(): array { $producedId = ''; diff --git a/src/Pohoda/RaiffeisenBank/Statementor.php b/src/Pohoda/RaiffeisenBank/Statementor.php index 06963bb..007afea 100644 --- a/src/Pohoda/RaiffeisenBank/Statementor.php +++ b/src/Pohoda/RaiffeisenBank/Statementor.php @@ -30,14 +30,14 @@ class Statementor extends PohodaBankClient /** * Downloaded XML statements. * - * @var array + * @var array */ private array $statementsXML = []; /** * Downloaded PDF statements. * - * @var array + * @var array */ private array $statementsPDF = []; @@ -101,7 +101,7 @@ public function importOnline() /** * Import Raiffeisen bank XML statement into Pohoda. * - * @return array + * @return list> */ public function import(): array { @@ -144,8 +144,8 @@ public function import(): array public function entryToPohoda($entry): array { $data['symPar'] = current((array) $entry->NtryRef); - $data['intNote'] = 'Import Job '.\Ease\Shared::cfg('JOB_ID', 'n/a'); - $data['note'] = 'Imported by '.\Ease\Shared::AppName().' '.\Ease\Shared::AppVersion(); + $data['intNote'] = 'Imported by '.\Ease\Shared::AppName().' '.\Ease\Shared::AppVersion(). ' Import Job '.\Ease\Shared::cfg('MULTIFLEXI_JOB_ID', \Ease\Shared::cfg('JOB_ID', 'n/a')); + $data['note'] = ''; $data['datePayment'] = current((array) $entry->BookgDt->DtTm); // current((array) $entry->ValDt->DtTm); $data['dateStatement'] = current((array) $entry->BookgDt->DtTm); $moveTrans = ['DBIT' => 'expense', 'CRDT' => 'receipt']; diff --git a/src/pohodaSQL-raiffeisenbank-statements-sharepoint.php b/src/pohodaSQL-raiffeisenbank-statements-sharepoint.php index 5665668..5bb15c6 100644 --- a/src/pohodaSQL-raiffeisenbank-statements-sharepoint.php +++ b/src/pohodaSQL-raiffeisenbank-statements-sharepoint.php @@ -107,7 +107,7 @@ try { $result = $doc->urlAttachment((int) $id, $sharepointUri, basename($filename)); $doc->addStatusMessage($importInfo['number'].' '.$sharepointUri, $result ? 'success' : 'error'); - } catch (Exception $ex) { + } catch (\Exception $ex) { $engine->addStatusMessage(_('Cannot Update PohodaSQL to attach statements in sharepoint links to invoice'), 'error'); $exitcode = 4;