Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload #19

Merged
merged 1 commit into from
Jul 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/Activity.php
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@
$activityProjects->setValidTill($validTill); // DateTimeInterface|null An activity can be set to only be valid for certain dates. Users will then only be able to book hours to the activity during these dates.
$activityProjects->setValidTill(Util::parseDate('20191231')); // string|null

// The minimum amount of ActivityQuantities linked to a ActivityProjects object is 0, the maximum amount is 4
// The minimum amount of ActivityQuantities linked to an ActivityProjects object is 0, the maximum amount is 4
$activityQuantity = new \PhpTwinfield\ActivityQuantity;
$activityQuantity->setBillable(false); // bool|null Is the quantity line billable or not.
$activityQuantity->setBillableLocked(false); // bool|null
Expand Down
4 changes: 2 additions & 2 deletions examples/BankTransaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
*/

/* Read a BankTransaction based off the passed in bank day book code, transaction number and optionally the office.
* The used transaction type, in the example below BNK depends on the administration. It is possible that there are multiple bank day book codes in an administration.
* The used transaction type, in the example below BNK, depends on the administration. It is possible that there are multiple bank day book codes in an administration.
* See https://accounting.twinfield.com/UI/#/Settings/Company/TransactionTypes for available codes for (bank) day books in your office
*/

Expand Down Expand Up @@ -267,7 +267,7 @@
$bankTransactionLine2->setDim1($dim1); // object|null If line type = total the bank balance account. If line type = detail the customer or supplier balance account or profit and loss account.
$bankTransactionLine2->setDim1(\PhpTwinfield\GeneralLedger::fromCode('2500')); // string|null If line type = vat the VAT balance account. When an empty dim1 is entered, by default the general ledger account will be taken as entered at the VAT code in Twinfield.
$bankTransactionLine2->setID(2); // int|null Line ID.
$bankTransactionLine2->setValue(\Money\Money::EUR(-10000)); // Money|null If line type = total amount including VAT. If line type = detail amount without VAT. If line type = vat VAT amount.
$bankTransactionLine2->setValue(\Money\Money::EUR(-10000)); // Money|null If line type = total amount including VAT. If line type = detail amount without VAT. If line type = vat VAT amount.

//$bankTransactionLine2->setComment('Example Comments'); // string|null Comment set on the transaction line.
$currencyDate = \DateTime::createFromFormat('d-m-Y', '01-09-2019');
Expand Down
2 changes: 1 addition & 1 deletion examples/CashTransaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
*/

/* Read a CashTransaction based off the passed in cash day book code, transaction number and optionally the office.
* The used transaction type, in the example below KAS depends on the administration. It is possible that there are multiple cash day book codes in an administration.
* The used transaction type, in the example below KAS, depends on the administration. It is possible that there are multiple cash day book codes in an administration.
* See https://accounting.twinfield.com/UI/#/Settings/Company/TransactionTypes for available codes for (cash) day books in your office
*/

Expand Down
336 changes: 336 additions & 0 deletions examples/JournalTransaction.php

Large diffs are not rendered by default.

347 changes: 347 additions & 0 deletions examples/PurchaseTransaction.php

Large diffs are not rendered by default.

352 changes: 352 additions & 0 deletions examples/SalesTransaction.php

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/ApiConnectors/ActivityApiConnector.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function get(string $code, Office $office): Activity
}

/**
* Sends a Activity instance to Twinfield to update or add.
* Sends an Activity instance to Twinfield to update or add.
*
* @param Activity $activity
* @return Activity
Expand Down
2 changes: 1 addition & 1 deletion src/Mappers/TransactionMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public static function map(string $transactionClassName, Response $response, Aut
}

if (Util::objectUses(RegimeField::class, $transaction)) {
$transaction->setRegime(self::getField($transactionElement, 'regime', $transaction));
$transaction->setRegime(self::parseEnumAttribute(\PhpTwinfield\Enums\Regime::class, self::getField($transactionElement, 'regime', $transaction)));
}

if (Util::objectUses(StatementNumberField::class, $transaction)) {
Expand Down