-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add Batch Key support to ArPaymentCreate and testing against 7.4 to Travis * Add TaskId to GLENTRY, Fix GlobalConsolidation processOffline * Rollback adding 7.4 support. * Add Decline AP Payements Request * Add showprivate to Query * Fix IsNegate for InArrayInteger and InArrayString #150 * Add approve and decline for PurchasingTransactions #144 * Incorporate code review comments * Bump version number 2.3.0
- Loading branch information
1 parent
9d6a9cb
commit b8188d3
Showing
23 changed files
with
459 additions
and
36 deletions.
There are no files selected for viewing
50 changes: 50 additions & 0 deletions
50
src/Intacct/Functions/AccountsPayable/ApPaymentRequestDecline.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?php | ||
|
||
/** | ||
* Copyright 2020 Sage Intacct, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"). You may not | ||
* use this file except in compliance with the License. You may obtain a copy | ||
* of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* or in the "LICENSE" file accompanying this file. This file is distributed on | ||
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | ||
* express or implied. See the License for the specific language governing | ||
* permissions and limitations under the License. | ||
*/ | ||
|
||
namespace Intacct\Functions\AccountsPayable; | ||
|
||
use Intacct\Xml\XMLWriter; | ||
use InvalidArgumentException; | ||
|
||
/* | ||
* Decline an existing AP payment request record | ||
*/ | ||
class ApPaymentRequestDecline extends AbstractApPaymentRequest | ||
{ | ||
/** | ||
* Write the function block XML | ||
* | ||
* @param XMLWriter $xml | ||
* @throw InvalidArgumentException | ||
*/ | ||
public function writeXml(XMLWriter &$xml) | ||
{ | ||
$xml->startElement('function'); | ||
$xml->writeAttribute('controlid', $this->getControlId()); | ||
|
||
$xml->startElement('decline_appaymentrequest'); | ||
|
||
if (!$this->getRecordNo()) { | ||
throw new InvalidArgumentException('Record No is required for decline'); | ||
} | ||
$xml->writeAttribute('key', $this->getRecordNo()); | ||
|
||
$xml->endElement(); //decline_appaymentrequest | ||
|
||
$xml->endElement(); //function | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
src/Intacct/Functions/Purchasing/PurchasingTransactionApprove.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?php | ||
|
||
/** | ||
* Copyright 2020 Sage Intacct, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"). You may not | ||
* use this file except in compliance with the License. You may obtain a copy | ||
* of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* or in the "LICENSE" file accompanying this file. This file is distributed on | ||
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | ||
* express or implied. See the License for the specific language governing | ||
* permissions and limitations under the License. | ||
*/ | ||
|
||
namespace Intacct\Functions\Purchasing; | ||
|
||
use Intacct\Xml\XMLWriter; | ||
|
||
class PurchasingTransactionApprove extends AbstractPurchasingTransaction | ||
{ | ||
/** | ||
* Write the function block XML | ||
* | ||
* @param XMLWriter $xml | ||
*/ | ||
public function writeXml(XMLWriter &$xml) | ||
{ | ||
$xml->startElement('function'); | ||
$xml->writeAttribute('controlid', $this->getControlId()); | ||
|
||
$xml->startElement('approve'); | ||
|
||
$xml->startElement('PODOCUMENT'); | ||
|
||
$xml->writeElement('DOCID', $this->getExternalId(), false); | ||
|
||
$xml->writeElement('COMMENT', $this->getComment()); | ||
|
||
$xml->endElement(); //PODOCUMENT | ||
|
||
$xml->endElement(); //approve | ||
|
||
$xml->endElement(); //function | ||
} | ||
} |
Oops, something went wrong.