Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * QuickBooks InventoryItem object container
- *
- * @todo Verify the get/set methods on this one... it was copied from NonInventoryItem
- * @todo Add isActive(), getIsActive(), etc. methods
- *
- * @author Keith Palmer <keith@consolibyte.com>
- * @license LICENSE.txt
- *
- * @package QuickBooks
- * @subpackage Object
- */
- /**
- *
- */
- QuickBooks_Loader::load('/QuickBooks/QBXML/Object.php');
- /**
- *
- */
- class QuickBooks_QBXML_Object_PurchaseOrder extends QuickBooks_QBXML_Object
- {
- public function __construct($arr = array())
- {
- parent::__construct($arr);
- }
- /**
- * Set the transaction date of the purchase order
- *
- * @param string $date
- * @return boolean
- */
- public function setTxnDate($date)
- {
- return $this->set('TxnDate', $date);
- }
- public function getTxnNumber() {
- return $this->get('TxnDate');
- }
- /**
- * Set RefNumber of the purchase order
- * @param $refnumber
- * @return bool
- */
- public function setRefNumber($refnumber) {
- return $this->set('RefNumber', $refnumber);
- }
- public function getRefNumber() {
- return $this->get('RefNumber');
- }
- /**
- * Get the name for this item
- *
- * @return string
- */
- public function getName()
- {
- return $this->get('Name');
- }
- public function setFullName($fullname)
- {
- return $this->setFullNameType('FullName', 'Name', 'ParentRef FullName', $fullname);
- }
- public function getFullName()
- {
- return $this->getFullNameType('FullName', 'Name', 'ParentRef FullName');
- }
- /**
- * Set the account ListID for this item
- *
- * @param string $ListID
- * @return string
- */
- public function setItemDescription($desc)
- {
- return $this->set('PurchaseOrderLineAdd Desc', $desc);
- }
- public function setItemQuantity($qty) {
- return $this->set('PurchaseOrderLineAdd Quantity', $qty);
- }
- public function setItemRate($rate) {
- return $this->set('PurchaseOrderLineAdd Rate', $rate);
- }
- public function setVendorRefFullName($FullName)
- {
- return $this->setFullNameType('VendorRef FullName', null, null, $FullName);
- }
- /**
- * Get Vendor Full Name
- */
- public function getVendorRefFullName()
- {
- return $this->get('VendorRef FullName');
- }
- /**
- * Set Item Full Name
- */
- public function setItemFullName($itemFullName) {
- return $this->setFullNameType('PurchaseOrderLineAdd ItemRef FullName', null, null, $itemFullName);
- }
- /**
- *
- *
- * @return boolean
- */
- protected function _cleanup()
- {
- return true;
- }
- /**
- *
- */
- public function asArray($request, $nest = true)
- {
- $this->_cleanup();
- return parent::asArray($request, $nest);
- }
- /**
- * Convert this object to a valid qbXML request
- *
- * @param string $request The type of request to convert this to (examples: CustomerAddRq, CustomerModRq, CustomerQueryRq)
- * @param boolean $todo_for_empty_elements A constant, one of: QUICKBOOKS_XML_XML_COMPRESS, QUICKBOOKS_XML_XML_DROP, QUICKBOOKS_XML_XML_PRESERVE
- * @param string $indent
- * @param string $root
- * @return string
- */
- public function asQBXML($request, $version = null, $locale = null, $root = null)
- {
- $this->_cleanup();
- return parent::asQBXML($request, $version, $locale, $root);
- }
- /**
- * Tell what type of object this is
- *
- * @return string
- */
- public function object()
- {
- return QUICKBOOKS_OBJECT_PURCHASEORDER;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement