/**
  * 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('update_customerchargecard');
     if (!$this->getRecordNo()) {
         throw new InvalidArgumentException('Record No is required for update');
     }
     $xml->writeAttribute('recordno', $this->getRecordNo(), true);
     $xml->writeElement('exp_month', $this->getExpirationMonth());
     $xml->writeElement('exp_year', $this->getExpirationYear());
     $xml->writeElement('description', $this->getDescription());
     if ($this->isActive() === true) {
         $xml->writeElement('status', 'active');
     } elseif ($this->isActive() === false) {
         $xml->writeElement('status', 'inactive');
     }
     if ($this->getAddressLine1() || $this->getAddressLine2() || $this->getCity() || $this->getStateProvince() || $this->getZipPostalCode() || $this->getCountry()) {
         $xml->startElement('mailaddress');
         $xml->writeElement('address1', $this->getAddressLine1());
         $xml->writeElement('address2', $this->getAddressLine2());
         $xml->writeElement('city', $this->getCity());
         $xml->writeElement('state', $this->getStateProvince());
         $xml->writeElement('zip', $this->getZipPostalCode());
         $xml->writeElement('country', $this->getCountry());
         $xml->endElement();
         //mailaddress
     }
     $xml->writeElement('defaultcard', $this->isDefaultCard());
     $xml->writeElement('usebilltoaddr', $this->isBillToContactAddressUsedForVerification());
     $xml->endElement();
     //update_customerchargecard
     $xml->endElement();
     //function
 }
 /**
  * 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('create');
     $xml->startElement('APACCOUNTLABEL');
     if (!$this->getAccountLabel()) {
         throw new InvalidArgumentException('Account Label is required for create');
     }
     $xml->writeElement('ACCOUNTLABEL', $this->getAccountLabel(), true);
     if (!$this->getDescription()) {
         throw new InvalidArgumentException('Description is required for create');
     }
     $xml->writeElement('DESCRIPTION', $this->getDescription(), true);
     if (!$this->getGlAccountNo()) {
         throw new InvalidArgumentException('GL Account is required for create');
     }
     $xml->writeElement('GLACCOUNTNO', $this->getGlAccountNo(), true);
     $xml->writeElement('OFFSETGLACCOUNTNO', $this->getOffsetGlAccountNo());
     if ($this->isActive() === true) {
         $xml->writeElement('STATUS', 'active');
     } elseif ($this->isActive() === false) {
         $xml->writeElement('STATUS', 'inactive');
     }
     $xml->endElement();
     //APACCOUNTLABEL
     $xml->endElement();
     //create
     $xml->endElement();
     //function
 }
 /**
  * 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('create_arpaymentbatch');
     if (!$this->getTitle()) {
         throw new InvalidArgumentException('Title is required for create');
     }
     $xml->writeElement('batchtitle', $this->getTitle(), true);
     if ($this->getUndepositedFundsGlAccountNo()) {
         $xml->writeElement('undepfundsacct', $this->getUndepositedFundsGlAccountNo());
     } elseif ($this->getBankAccountId()) {
         $xml->writeElement('bankaccountid', $this->getBankAccountId());
     }
     if (!$this->getGlPostingDate()) {
         throw new InvalidArgumentException('GL Posting Date is required for create');
     }
     $xml->startElement('datecreated');
     $xml->writeDateSplitElements($this->getGlPostingDate(), true);
     $xml->endElement();
     //datecreated
     $xml->endElement();
     //create_arpaymentbatch
     $xml->endElement();
     //function
 }
 /**
  * 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('create_aradjustmentbatch');
     if (!$this->getTitle()) {
         throw new InvalidArgumentException('Title is required for create');
     }
     $xml->writeElement('batchtitle', $this->getTitle(), true);
     if (!$this->getGlPostingDate()) {
         throw new InvalidArgumentException('GL Posting Date is required for create');
     }
     $xml->startElement('datecreated');
     $xml->writeDateSplitElements($this->getGlPostingDate(), true);
     $xml->endElement();
     //datecreated
     /*if (count($this->getApAdjustments()) > 0) {
           foreach ($this->getApAdjustments() as $apAdjustment) {
               $bill->writeXml($xml);
           }
       }*/
     $xml->endElement();
     //create_aradjustmentbatch
     $xml->endElement();
     //function
 }
 /**
  *
  * @param XMLWriter $xml
  */
 public function writeXml(XMLWriter &$xml)
 {
     $xml->startElement('function');
     $xml->writeAttribute('controlid', $this->getControlId());
     $xml->startElement('create_arpayment');
     if (!$this->getCustomerId()) {
         throw new InvalidArgumentException('Customer ID is required for create');
     }
     $xml->writeElement('customerid', $this->getCustomerId(), true);
     $xml->writeElement('paymentamount', $this->getTransactionPaymentAmount(), true);
     $xml->writeElement('translatedamount', $this->getBasePaymentAmount());
     if ($this->getUndepositedFundsGlAccountNo()) {
         $xml->writeElement('undepfundsacct', $this->getUndepositedFundsGlAccountNo());
     } elseif ($this->getBankAccountId()) {
         $xml->writeElement('bankaccountid', $this->getBankAccountId());
     }
     $xml->writeElement('refid', $this->getReferenceNumber());
     $xml->writeElement('overpaylocid', $this->getOverpaymentLocationId());
     $xml->writeElement('overpaydeptid', $this->getOverpaymentDepartmentId());
     if (!$this->getReceivedDate()) {
         throw new InvalidArgumentException('Received Date is required for create');
     }
     $xml->startElement('datereceived');
     $xml->writeDateSplitElements($this->getReceivedDate(), true);
     $xml->endElement();
     //datereceived
     if (!$this->getPaymentMethod()) {
         throw new InvalidArgumentException('Payment Method is required for create');
     }
     $xml->writeElement('paymentmethod', $this->getPaymentMethod(), true);
     $xml->writeElement('basecurr', $this->getBaseCurrency());
     $xml->writeElement('currency', $this->getTransactionCurrency());
     if ($this->getExchangeRateDate()) {
         $xml->startElement('exchratedate');
         $xml->writeDateSplitElements($this->getExchangeRateDate(), true);
         $xml->endElement();
     }
     if ($this->getExchangeRateType()) {
         $xml->writeElement('exchratetype', $this->getExchangeRateType());
     } elseif ($this->getExchangeRateValue()) {
         $xml->writeElement('exchrate', $this->getExchangeRateValue());
     } elseif ($this->getBaseCurrency() || $this->getTransactionCurrency()) {
         $xml->writeElement('exchratetype', $this->getExchangeRateType(), true);
     }
     $xml->writeElement('cctype', $this->getCreditCardType());
     $xml->writeElement('authcode', $this->getAuthorizationCode());
     if (count($this->getApplyToTransactions()) > 0) {
         foreach ($this->getApplyToTransactions() as $applyToTransaction) {
             $applyToTransaction->writeXml($xml);
         }
     }
     //TODO online payment methods
     $xml->endElement();
     //create_arpayment
     $xml->endElement();
     //function
 }
 /**
  * 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('record_otherreceipt');
     $xml->startElement('paymentdate');
     $xml->writeDateSplitElements($this->getTransactionDate());
     $xml->endElement();
     //paymentdate
     $xml->writeElement('payee', $this->getPayer(), true);
     $xml->startElement('receiveddate');
     $xml->writeDateSplitElements($this->getReceiptDate());
     $xml->endElement();
     //receiveddate
     $xml->writeElement('paymentmethod', $this->getPaymentMethod(), true);
     if ($this->getBankAccountId() || $this->getDepositDate()) {
         $xml->writeElement('bankaccountid', $this->getBankAccountId(), true);
         if ($this->getDepositDate()) {
             $xml->startElement('depositdate');
             $xml->writeDateSplitElements($this->getDepositDate(), true);
             $xml->endElement();
             //depositdate
         }
     } else {
         $xml->writeElement('undepglaccountno', $this->getUndepositedFundsGlAccountNo(), true);
     }
     $xml->writeElement('refid', $this->getTransactionNo());
     $xml->writeElement('description', $this->getDescription());
     $xml->writeElement('supdocid', $this->getAttachmentsId());
     $xml->writeElement('currency', $this->getTransactionCurrency());
     if ($this->getExchangeRateValue()) {
         $xml->writeElement('exchrate', $this->getExchangeRateValue());
     } elseif ($this->getExchangeRateDate() || $this->getExchangeRateType()) {
         if ($this->getExchangeRateDate()) {
             $xml->startElement('exchratedate');
             $xml->writeDateSplitElements($this->getExchangeRateDate(), true);
             $xml->endElement();
         }
         $xml->writeElement('exchratetype', $this->getExchangeRateType(), true);
     }
     $this->writeXmlExplicitCustomFields($xml);
     $xml->startElement('receiptitems');
     if (count($this->getLines()) > 0) {
         foreach ($this->getLines() as $line) {
             $line->writeXml($xml);
         }
     } else {
         throw new InvalidArgumentException('CM Other Receipt must have at least 1 line');
     }
     $xml->endElement();
     //receiptitems
     $xml->endElement();
     //record_otherreceipt
     $xml->endElement();
     //function
 }
Esempio n. 7
0
 /**
  * Write the function block XML
  *
  * @param XMLWriter $xml
  */
 public function writeXml(XMLWriter &$xml)
 {
     $xml->startElement('function');
     $xml->writeAttribute('controlid', $this->getControlId());
     $xml->startElement('getDdsObjects');
     $xml->endElement();
     //getDdsObjects
     $xml->endElement();
     //function
 }
 /**
  * Write the getUserPermissions block XML
  *
  * @param XMLWriter $xml
  */
 public function writeXml(XMLWriter &$xml)
 {
     $xml->startElement('function');
     $xml->writeAttribute('controlid', $this->getControlId());
     $xml->startElement('getUserPermissions');
     $xml->writeElement('userId', $this->getUserId(), true);
     $xml->endElement();
     //getUserPermissions
     $xml->endElement();
     //function
 }
 /**
  * Write the function block XML
  *
  * @param XMLWriter $xml
  */
 public function writeXml(XMLWriter &$xml)
 {
     $xml->startElement('function');
     $xml->writeAttribute('controlid', $this->getControlId());
     $xml->startElement('getDdsDdl');
     $xml->writeElement('object', $this->getObjectName(), true);
     $xml->endElement();
     //getDdsDdl
     $xml->endElement();
     //function
 }
 /**
  * Write the operation block XML
  *
  * @param XMLWriter $xml
  */
 public function writeXml(&$xml)
 {
     $xml->startElement('authentication');
     $xml->startElement('login');
     $xml->writeElement('userid', $this->userId, true);
     $xml->writeElement('companyid', $this->companyId, true);
     $xml->writeElement('password', $this->password, true);
     $xml->endElement();
     //login
     $xml->endElement();
     //authentication
 }
Esempio n. 11
0
 /**
  * Write the inspect block XML
  *
  * @param XMLWriter $xml
  */
 public function writeXml(XMLWriter &$xml)
 {
     $xml->startElement('function');
     $xml->writeAttribute('controlid', $this->getControlId());
     $xml->startElement('inspect');
     $xml->writeAttribute('detail', $this->writeXmlShowDetail());
     $xml->writeElement('object', $this->getObjectName(), true);
     $xml->endElement();
     //inspect
     $xml->endElement();
     //function
 }
 /**
  * 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('delete_supdocfolder');
     if (!$this->getFolderName()) {
         throw new InvalidArgumentException('Attachments Folder Name is required for delete');
     }
     $xml->writeAttribute('key', $this->getFolderName());
     $xml->endElement();
     //delete_supdocfolder
     $xml->endElement();
     //function
 }
 /**
  * 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('delete_customerchargecard');
     if (!$this->getRecordNo()) {
         throw new InvalidArgumentException('Record No is required for delete');
     }
     $xml->writeAttribute('recordno', $this->getRecordNo());
     $xml->endElement();
     //delete_customerchargecard
     $xml->endElement();
     //function
 }
Esempio n. 14
0
 /**
  * Write the readMore block XML
  *
  * @param XMLWriter $xml
  */
 public function writeXml(XMLWriter &$xml)
 {
     $xml->startElement('function');
     $xml->writeAttribute('controlid', $this->getControlId());
     $xml->startElement('readMore');
     if (!$this->getResultId()) {
         throw new InvalidArgumentException('Result ID is required for read more');
     }
     $xml->writeElement('resultId', $this->getResultId(), true);
     $xml->endElement();
     //readMore
     $xml->endElement();
     //function
 }
Esempio n. 15
0
 /**
  * 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('delete_contact');
     if (!$this->getContactName()) {
         throw new InvalidArgumentException('Contact Name is required for delete');
     }
     $xml->writeAttribute('contactname', $this->getContactName());
     $xml->endElement();
     //delete_contact
     $xml->endElement();
     //function
 }
Esempio n. 16
0
 /**
  * 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('delete_task');
     if (!$this->getRecordNo()) {
         throw new InvalidArgumentException('Task Record No is required for delete');
     }
     $xml->writeAttribute('key', $this->getRecordNo());
     $xml->endElement();
     //delete_task
     $xml->endElement();
     //function
 }
 /**
  * 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('delete_statglaccount');
     if (!$this->getAccountNo()) {
         throw new InvalidArgumentException('Account No is required for delete');
     }
     $xml->writeAttribute('glaccountno', $this->getAccountNo());
     $xml->endElement();
     //delete_statglaccount
     $xml->endElement();
     //function
 }
Esempio n. 18
0
 /**
  * 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('delete_item');
     if (!$this->getItemId()) {
         throw new InvalidArgumentException('Item ID is required for delete');
     }
     $xml->writeAttribute('itemid', $this->getItemId());
     $xml->endElement();
     //delete_item
     $xml->endElement();
     //function
 }
 /**
  * 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('delete_expensetype');
     if (!$this->getExpenseType()) {
         throw new InvalidArgumentException('Expense Type is required for delete');
     }
     $xml->writeAttribute('expensetype', $this->getExpenseType());
     $xml->endElement();
     //delete_expensetype
     $xml->endElement();
     //function
 }
 /**
  * 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('delete_potransaction');
     if (!$this->getDocumentId()) {
         throw new InvalidArgumentException('Document ID is required for delete');
     }
     $xml->writeAttribute('key', $this->getDocumentId());
     $xml->endElement();
     //delete_potransaction
     $xml->endElement();
     //function
 }
 /**
  * Write the expense block XML
  *
  * @param XMLWriter $xml
  */
 public function writeXml(XMLWriter &$xml)
 {
     $xml->startElement('expense');
     if (!empty($this->getExpenseType())) {
         $xml->writeElement('expensetype', $this->getExpenseType(), true);
     } else {
         $xml->writeElement('glaccountno', $this->getGlAccountNumber(), true);
     }
     $xml->writeElement('amount', $this->getReimbursementAmount());
     $xml->writeElement('currency', $this->getTransactionCurrency());
     $xml->writeElement('trx_amount', $this->getTransactionAmount());
     if ($this->getExchangeRateDate()) {
         $xml->startElement('exchratedate');
         $xml->writeDateSplitElements($this->getExchangeRateDate(), true);
         $xml->endElement();
     }
     if ($this->getExchangeRateType()) {
         $xml->writeElement('exchratetype', $this->getExchangeRateType());
     } elseif ($this->getExchangeRateValue()) {
         $xml->writeElement('exchrate', $this->getExchangeRateValue());
     } elseif ($this->getTransactionCurrency() || $this->getTransactionAmount()) {
         $xml->writeElement('exchratetype', $this->getExchangeRateType(), true);
     }
     if ($this->getExpenseDate()) {
         $xml->startElement('expensedate');
         $xml->writeDateSplitElements($this->getExpenseDate(), true);
         $xml->endElement();
     }
     $xml->writeElement('memo', $this->getPaidTo());
     $xml->writeElement('form1099', $this->isForm1099());
     $xml->writeElement('paidfor', $this->getPaidFor());
     $xml->writeElement('locationid', $this->getLocationId());
     $xml->writeElement('departmentid', $this->getDepartmentId());
     $this->writeXmlExplicitCustomFields($xml);
     $xml->writeElement('projectid', $this->getProjectId());
     $xml->writeElement('customerid', $this->getCustomerId());
     $xml->writeElement('vendorid', $this->getVendorId());
     $xml->writeElement('employeeid', $this->getEmployeeId());
     $xml->writeElement('itemid', $this->getItemId());
     $xml->writeElement('classid', $this->getClassId());
     $xml->writeElement('contractid', $this->getContractId());
     $xml->writeElement('warehouseid', $this->getWarehouseId());
     $xml->writeElement('billable', $this->isBillable());
     $xml->writeElement('exppmttype', $this->getPaymentTypeName());
     $xml->writeElement('quantity', $this->getQuantity());
     $xml->writeElement('rate', $this->getUnitRate());
     $xml->endElement();
     //expense
 }
 /**
  * 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('delete');
     $xml->writeElement('object', 'GLBATCH');
     if (!$this->getRecordNo()) {
         throw new InvalidArgumentException('Record No is required for delete');
     }
     $xml->writeElement('keys', $this->getRecordNo(), true);
     $xml->endElement();
     //delete
     $xml->endElement();
     //function
 }
 /**
  * @param XMLWriter $xml
  */
 protected function writeXmlExplicitCustomFields(XMLWriter &$xml)
 {
     if (count($this->customFields) > 0) {
         $xml->startElement('customfields');
         foreach ($this->customFields as $customFieldName => $customFieldValue) {
             $xml->startElement('customfield');
             $xml->writeElement('customfieldname', $customFieldName, true);
             $xml->writeElement('customfieldvalue', $customFieldValue, true);
             $xml->endElement();
             //customfield
         }
         $xml->endElement();
         //customfields
     }
 }
Esempio n. 24
0
 /**
  *
  * @param XMLWriter $xml
  */
 public function writeXml(XMLWriter &$xml)
 {
     $xml->startElement('function');
     $xml->writeAttribute('controlid', $this->getControlId());
     $xml->startElement('apply_arpayment');
     if (!$this->getRecordNo()) {
         throw new InvalidArgumentException('Record No is required for apply');
     }
     $xml->writeElement('arpaymentkey', $this->getRecordNo(), true);
     if (!$this->getReceivedDate()) {
         throw new InvalidArgumentException('Received Date is required for apply');
     }
     $xml->startElement('paymentdate');
     $xml->writeDateSplitElements($this->getReceivedDate(), true);
     $xml->endElement();
     //paymentdate
     $xml->writeElement('batchkey', $this->getSummaryRecordNo());
     $xml->writeElement('overpaylocid', $this->getOverpaymentLocationId());
     $xml->writeElement('overpaydeptid', $this->getOverpaymentDepartmentId());
     if (count($this->getApplyToTransactions()) > 0) {
         $xml->startElement('arpaymentitems');
         foreach ($this->getApplyToTransactions() as $applyToTransaction) {
             $applyToTransaction->writeXml($xml);
         }
         $xml->endElement();
         //arpaymentitems
     }
     $xml->endElement();
     //apply_arpayment
     $xml->endElement();
     //function
 }
 /**
  * Write the authentication block XML
  *
  * @param XMLWriter $xml
  */
 public function writeXml(&$xml)
 {
     $xml->startElement('authentication');
     $xml->writeElement('sessionid', $this->sessionId, true);
     $xml->endElement();
     //authentication
 }
 /**
  * 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('update_supdocfolder');
     if (!$this->getFolderName()) {
         throw new InvalidArgumentException('Attachments Folder Name is required for update');
     }
     $xml->writeElement('supdocfoldername', $this->getFolderName(), true);
     $xml->writeElement('supdocfolderdescription', $this->getDescription());
     $xml->writeElement('supdocparentfoldername', $this->getParentFolderName());
     $xml->endElement();
     //update_supdocfolder
     $xml->endElement();
     //function
 }
Esempio n. 27
0
 /**
  * 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('create');
     $xml->startElement('WAREHOUSE');
     if (!$this->getWarehouseId()) {
         throw new InvalidArgumentException('Warehouse ID is required for create');
     }
     $xml->writeElement('WAREHOUSEID', $this->getWarehouseId(), true);
     if (!$this->getWarehouseName()) {
         throw new InvalidArgumentException('Warehouse Name is required for create');
     }
     $xml->writeElement('NAME', $this->getWarehouseName(), true);
     if (!$this->getLocationId()) {
         throw new InvalidArgumentException('Location ID is required for create');
     }
     $xml->startElement('LOC');
     $xml->writeElement('LOCATIONID', $this->getLocationId(), true);
     $xml->endElement();
     //LOC
     $xml->writeElement('MANAGERID', $this->getManagerEmployeeId());
     $xml->writeElement('PARENTID', $this->getParentWarehouseId());
     if ($this->getWarehouseContactName()) {
         $xml->startElement('CONTACTINFO');
         $xml->writeElement('CONTACTNAME', $this->getWarehouseContactName());
         $xml->endElement();
     }
     if ($this->getShipToContactName()) {
         $xml->startElement('SHIPTO');
         $xml->writeElement('CONTACTNAME', $this->getShipToContactName());
         $xml->endElement();
     }
     $xml->writeElement('USEDINGL', $this->isUsedInGeneralLedger());
     if ($this->isActive() === true) {
         $xml->writeElement('STATUS', 'active');
     } elseif ($this->isActive() === false) {
         $xml->writeElement('STATUS', 'inactive');
     }
     $this->writeXmlImplicitCustomFields($xml);
     $xml->endElement();
     //WAREHOUSE
     $xml->endElement();
     //create
     $xml->endElement();
     //function
 }
Esempio n. 28
0
 /**
  * Write the sortfield block XML
  *
  * @param XMLWriter $xml
  */
 public function writeXml(XMLWriter &$xml)
 {
     $xml->startElement('sortfield');
     $xml->writeAttribute('order', $this->getOrderBy());
     $xml->text($this->getFieldName());
     $xml->endElement();
     //sortfield
 }
Esempio n. 29
0
 /**
  * Write the arpaymentitem block XML
  *
  * @param XMLWriter $xml
  */
 public function writeXml(XMLWriter &$xml)
 {
     $xml->startElement('arpaymentitem');
     $xml->writeElement('invoicekey', $this->getApplyToRecordId(), true);
     $xml->writeElement('amount', $this->getAmountToApply(), true);
     $xml->endElement();
     //arpaymentitem
 }
 /**
  * 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('approve_appaymentrequest');
     if (!$this->getRecordNo()) {
         throw new InvalidArgumentException('Record No is required for approve');
     }
     $xml->startElement('appaymentkeys');
     $xml->writeElement('appaymentkey', $this->getRecordNo(), true);
     $xml->endElement();
     //appaymentkeys
     $xml->endElement();
     //approve_appaymentrequest
     $xml->endElement();
     //function
 }