Skip to content

Commit

Permalink
Download PDF
Browse files Browse the repository at this point in the history
Push PDF to Sharepoint
Attach Sharepoint PDF link to document
  • Loading branch information
Vítězslav Dvořák committed Jun 13, 2024
1 parent 075f860 commit 04b6852
Show file tree
Hide file tree
Showing 6 changed files with 312 additions and 63 deletions.
50 changes: 24 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,28 @@ Raiffeisenbank for Stormware Pohoda
Configuration
-------------

````````````
`EASE_LOGGER`=syslog|console
`CERT_FILE`='RAIFF_CERT.p12'
`CERT_PASS`=CertPass
`XIBMCLIENTID`=PwX4bOQLWGiuoErv6I
`ACCOUNT_NUMBER`=666666666
`ACCOUNT_CURRENCY`=CZK
`STATEMENT_IMPORT_SCOPE`=last_two_months
`TRANSACTION_IMPORT_SCOPE`=yesterday
`API_DEBUG`=True
`APP_DEBUG`=True
`STATEMENT_LINE`=ADDITIONAL
`POHODA_ICO`=12345678
`POHODA_URL`=http://10.11.25.25:10010
`POHODA_USERNAME`=mServerXXX
`POHODA_PASSWORD`=mServerXXX
`POHODA_TIMEOUT`=60
`POHODA_COMPRESS`=false
`POHODA_DEBUG`=true
`POHODA_BANK_IDS`=RB
```env
EASE_LOGGER=syslog|console
CERT_FILE='RAIFF_CERT.p12'
CERT_PASS=CertPass
XIBMCLIENTID=PwX4bOQLWGiuoErv6I
ACCOUNT_NUMBER=666666666
ACCOUNT_CURRENCY=CZK
STATEMENT_IMPORT_SCOPE=last_two_months
TRANSACTION_IMPORT_SCOPE=yesterday
API_DEBUG=True
APP_DEBUG=True
STATEMENT_LINE=ADDITIONAL
POHODA_ICO=12345678
POHODA_URL=http://10.11.25.25:10010
POHODA_USERNAME=mServerXXX
POHODA_PASSWORD=mServerXXX
POHODA_TIMEOUT=60
POHODA_COMPRESS=false
POHODA_DEBUG=true
POHODA_BANK_IDS=RB
```

3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@
"minimum-stability": "dev",
"bin": ["src/pohoda-raiffeisenbank-transactions.php", "src/pohoda-raiffeisenbank-setup.php"],
"require": {
"vgrem/php-spo": "^3",
"vitexsoftware/pohoda-connector": "dev-main",
"vitexsoftware/rbczpremiumapi": "dev-main",
"spojenet/pohoda-sql": "dev-master"
"spojenet/pohoda-sql": "dev-main"
},
"autoload": {
"psr-4": {
Expand Down
179 changes: 159 additions & 20 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 20 additions & 1 deletion src/Pohoda/RaiffeisenBank/PohodaBankClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ abstract class PohodaBankClient extends \mServer\Bank
*/
public static $dateFormat = 'Y-m-d';

/**
*
* @var Response
*/
public $response;

/**
*
* @var
Expand Down Expand Up @@ -214,6 +220,9 @@ public function ensureKSExists($conSym)
*/
public function insertTransactionToPohoda($success)
{
$producedId = '';
$producedNumber = '';
$producedAction = '';
if ($this->checkForTransactionPresence() === false) {
try {
$cache = $this->getData();
Expand All @@ -223,9 +232,19 @@ public function insertTransactionToPohoda($success)
if ($this->commit()) {
$success++;
}
if (property_exists($this->response, 'producedDetails') && is_array($this->response->producedDetails)) {
$producedId = $this->response->producedDetails['id'];
$producedNumber = $this->response->producedDetails['number'];
$producedAction = $this->response->producedDetails['actionType'];
} else {
echo '';
}
} catch (\Pohoda\Exception $exc) {
$producedId = 'n/a';
$producedNumber = 'n/a';
$producedAction = 'n/a';
}
$this->addStatusMessage('New entry ', $result ? 'success' : 'error'); // TODO: Parse response for docID
$this->addStatusMessage('#' . $producedId . ' ' . $producedAction . ' ' . $producedNumber, $result ? 'success' : 'error'); // TODO: Parse response for docID
} else {
$this->addStatusMessage('Record with remoteNumber ' . 'TODO' . ' already present in Pohoda', 'warning');
}
Expand Down
Loading

0 comments on commit 04b6852

Please sign in to comment.