当前位置: 首页>>代码示例>>PHP>>正文


PHP XMLWriter::writeDateSplitElements方法代码示例

本文整理汇总了PHP中Intacct\Xml\XMLWriter::writeDateSplitElements方法的典型用法代码示例。如果您正苦于以下问题:PHP XMLWriter::writeDateSplitElements方法的具体用法?PHP XMLWriter::writeDateSplitElements怎么用?PHP XMLWriter::writeDateSplitElements使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Intacct\Xml\XMLWriter的用法示例。


在下文中一共展示了XMLWriter::writeDateSplitElements方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: writeXml

 /**
  *
  * @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
 }
开发者ID:Intacct,项目名称:intacct-sdk-php,代码行数:61,代码来源:ArPaymentCreate.php

示例2: writeXml

 /**
  * 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
 }
开发者ID:Intacct,项目名称:intacct-sdk-php,代码行数:62,代码来源:OtherReceiptCreate.php

示例3: writeXml

 /**
  * 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
 }
开发者ID:Intacct,项目名称:intacct-sdk-php,代码行数:54,代码来源:ExpenseReportLineCreate.php

示例4: writeXml

 /**
  *
  * @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
 }
开发者ID:Intacct,项目名称:intacct-sdk-php,代码行数:36,代码来源:ArPaymentApply.php

示例5: writeXml

 /**
  * 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
 }
开发者ID:Intacct,项目名称:intacct-sdk-php,代码行数:32,代码来源:ArPaymentSummaryCreate.php

示例6: writeXml

 /**
  * 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
 }
开发者ID:Intacct,项目名称:intacct-sdk-php,代码行数:32,代码来源:ArAdjustmentSummaryCreate.php

示例7: writeXml

 /**
  * 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_cctransaction');
     if (!$this->getRecordNo()) {
         throw new InvalidArgumentException('Record No is required for update');
     }
     $xml->writeAttribute('key', $this->getRecordNo());
     if ($this->getTransactionDate()) {
         $xml->startElement('paymentdate');
         $xml->writeDateSplitElements($this->getTransactionDate());
         $xml->endElement();
         //paymentdate
     }
     $xml->writeElement('referenceno', $this->getReferenceNumber());
     $xml->writeElement('payee', $this->getPayee());
     $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);
     if (count($this->getLines()) > 0) {
         $xml->startElement('updateccpayitems');
         foreach ($this->getLines() as $line) {
             $line->writeXml($xml);
         }
         $xml->endElement();
         //updateccpayitems
     }
     $xml->endElement();
     //update_cctransaction
     $xml->endElement();
     //function
 }
开发者ID:Intacct,项目名称:intacct-sdk-php,代码行数:50,代码来源:ChargeCardTransactionUpdate.php

示例8: writeXml

 /**
  * 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_cctransaction');
     $xml->writeElement('chargecardid', $this->getChargeCardId(), true);
     $xml->startElement('paymentdate');
     $xml->writeDateSplitElements($this->getTransactionDate());
     $xml->endElement();
     //paymentdate
     $xml->writeElement('referenceno', $this->getReferenceNumber());
     $xml->writeElement('payee', $this->getPayee());
     $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('ccpayitems');
     if (count($this->getLines()) > 0) {
         foreach ($this->getLines() as $line) {
             $line->writeXml($xml);
         }
     } else {
         throw new InvalidArgumentException('CM Charge Card Transaction must have at least 1 line');
     }
     $xml->endElement();
     //ccpayitems
     $xml->endElement();
     //record_cctransaction
     $xml->endElement();
     //function
 }
开发者ID:Intacct,项目名称:intacct-sdk-php,代码行数:47,代码来源:ChargeCardTransactionCreate.php

示例9: writeXml

 /**
  * 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_expensereport');
     $xml->writeElement('employeeid', $this->getEmployeeId(), true);
     $xml->startElement('datecreated');
     $xml->writeDateSplitElements($this->getTransactionDate());
     $xml->endElement();
     //datecreated
     if ($this->getGlPostingDate()) {
         $xml->startElement('dateposted');
         $xml->writeDateSplitElements($this->getGlPostingDate(), true);
         $xml->endElement();
         //dateposted
     }
     $xml->writeElement('batchkey', $this->getSummaryRecordNo());
     $xml->writeElement('expensereportno', $this->getExpenseReportNumber());
     $xml->writeElement('state', $this->getAction());
     $xml->writeElement('description', $this->getReasonForExpense());
     $xml->writeElement('memo', $this->getMemo());
     $xml->writeElement('externalid', $this->getExternalId());
     $xml->writeElement('basecurr', $this->getBaseCurrency());
     $xml->writeElement('currency', $this->getReimbursementCurrency());
     $this->writeXmlExplicitCustomFields($xml);
     $xml->writeElement('supdocid', $this->getAttachmentsId());
     $xml->startElement('expenses');
     if (count($this->getLines()) > 0) {
         foreach ($this->getLines() as $line) {
             $line->writeXml($xml);
         }
     } else {
         throw new InvalidArgumentException('EE Report must have at least 1 line');
     }
     $xml->endElement();
     //expenses
     $xml->endElement();
     //create_expensereport
     $xml->endElement();
     //function
 }
开发者ID:Intacct,项目名称:intacct-sdk-php,代码行数:47,代码来源:ExpenseReportCreate.php

示例10: writeXml

 /**
  * 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_apadjustment');
     $xml->writeElement('vendorid', $this->getVendorId(), true);
     $xml->startElement('datecreated');
     $xml->writeDateSplitElements($this->getTransactionDate(), true);
     $xml->endElement();
     //datecreated
     if ($this->getGlPostingDate()) {
         $xml->startElement('dateposted');
         $xml->writeDateSplitElements($this->getGlPostingDate(), true);
         $xml->endElement();
         //dateposted
     }
     $xml->writeElement('batchkey', $this->getSummaryRecordNo());
     $xml->writeElement('adjustmentno', $this->getAdjustmentNumber());
     $xml->writeElement('action', $this->getAction());
     $xml->writeElement('billno', $this->getBillNumber());
     $xml->writeElement('description', $this->getDescription());
     $xml->writeElement('externalid', $this->getExternalId());
     $this->writeXmlMultiCurrencySection($xml);
     $xml->writeElement('nogl', $this->isDoNotPostToGL());
     $this->writeXmlExplicitCustomFields($xml);
     $xml->startElement('apadjustmentitems');
     if (count($this->getLines()) > 0) {
         foreach ($this->getLines() as $line) {
             $line->writeXml($xml);
         }
     } else {
         throw new InvalidArgumentException('AP Vendor Adjustment must have at least 1 line');
     }
     $xml->endElement();
     //apadjustmentitems
     $xml->endElement();
     //create_apadjustment
     $xml->endElement();
     //function
 }
开发者ID:Intacct,项目名称:intacct-sdk-php,代码行数:46,代码来源:ApAdjustmentCreate.php

示例11: writeXml

 /**
  * Write the function block XML
  *
  * @param XMLWriter $xml
  */
 public function writeXml(XMLWriter &$xml)
 {
     $xml->startElement('function');
     $xml->writeAttribute('controlid', $this->getControlId());
     $xml->startElement('create_paymentrequest');
     if ($this->getChargeCardId()) {
         $xml->writeElement('chargecardid', $this->getChargeCardId(), true);
     } else {
         $xml->writeElement('bankaccountid', $this->getBankAccountId(), true);
     }
     if (!$this->getVendorId()) {
         throw new InvalidArgumentException('Vendor ID is required for create payment request');
     }
     $xml->writeElement('vendorid', $this->getVendorId(), true);
     $xml->writeElement('memo', $this->getMemo());
     if (!$this->getPaymentMethod()) {
         throw new InvalidArgumentException('Payment Method is required for create payment request');
     }
     $xml->writeElement('paymentmethod', $this->getPaymentMethod(), true);
     $xml->writeElement('grouppayments', $this->isGroupPayments());
     if (!$this->getPaymentDate()) {
         throw new InvalidArgumentException('Payment Date is required for create payment request');
     }
     $xml->startElement('paymentdate');
     $xml->writeDateSplitElements($this->getPaymentDate(), true);
     $xml->endElement();
     //paymentdate
     $xml->writeElement('paymentoption', $this->getMergeOption());
     if (count($this->getApplyToTransactions()) > 0) {
         $xml->startElement('paymentrequestitems');
         foreach ($this->getApplyToTransactions() as $applyToTransaction) {
             $applyToTransaction->writeXml($xml);
         }
         $xml->endElement();
         //paymentrequestitems
     } else {
         throw new InvalidArgumentException('AP Payment Request must have at least 1 transaction to apply against');
     }
     // TODO: what about paymentamount element? only in v3.0 schema - was removed from v2.1 schema
     $xml->writeElement('documentnumber', $this->getDocumentNo());
     // TODO: review paymentdescription vs memo
     $xml->writeElement('paymentdescription', $this->getMemo());
     $xml->writeElement('paymentcontact', $this->getNotificationContactName());
     $xml->endElement();
     //create_paymentrequest
     $xml->endElement();
     //function
 }
开发者ID:Intacct,项目名称:intacct-sdk-php,代码行数:53,代码来源:ApPaymentRequestCreate.php

示例12: writeXml

 /**
  * Write the function block XML
  *
  * @param XMLWriter $xml
  */
 public function writeXml(XMLWriter &$xml)
 {
     $xml->startElement('function');
     $xml->writeAttribute('controlid', $this->getControlId());
     $xml->startElement('create_reimbursementrequest');
     if (!$this->getBankAccountId()) {
         throw new InvalidArgumentException('Bank Account ID is required for create reimbursement request');
     }
     $xml->writeElement('bankaccountid', $this->getBankAccountId(), true);
     if (!$this->getEmployeeId()) {
         throw new InvalidArgumentException('Employee ID is required for create reimbursement request');
     }
     $xml->writeElement('employeeid', $this->getEmployeeId(), true);
     $xml->writeElement('memo', $this->getMemo());
     if (!$this->getPaymentMethod()) {
         throw new InvalidArgumentException('Payment Method is required for create reimbursement request');
     }
     $xml->writeElement('paymentmethod', $this->getPaymentMethod(), true);
     if (!$this->getPaymentDate()) {
         throw new InvalidArgumentException('Payment Date is required for create reimbursement request');
     }
     $xml->startElement('paymentdate');
     $xml->writeDateSplitElements($this->getPaymentDate(), true);
     $xml->endElement();
     //paymentdate
     $xml->writeElement('paymentoption', $this->getMergeOption());
     if (count($this->getApplyToTransactions()) > 0) {
         $xml->startElement('eppaymentrequestitems');
         foreach ($this->getApplyToTransactions() as $applyToTransaction) {
             $applyToTransaction->writeXml($xml);
         }
         $xml->endElement();
         //eppaymentrequestitems
     } else {
         throw new InvalidArgumentException('EE Reimbursement Request must have at least 1 transaction to apply against');
     }
     $xml->writeElement('documentnumber', $this->getDocumentNo());
     $xml->writeElement('paymentdescription', $this->getMemo());
     $xml->writeElement('paymentcontact', $this->getNotificationContactName());
     $xml->endElement();
     //create_reimbursementrequest
     $xml->endElement();
     //function
 }
开发者ID:Intacct,项目名称:intacct-sdk-php,代码行数:49,代码来源:ReimbursementRequestCreate.php

示例13: writeXml

 /**
  * Write the function block XML
  *
  * @param XMLWriter $xml
  */
 public function writeXml(XMLWriter &$xml)
 {
     $xml->startElement('function');
     $xml->writeAttribute('controlid', $this->getControlId());
     $xml->startElement('create_ictransaction');
     $xml->writeElement('transactiontype', $this->getTransactionDefinition(), true);
     $xml->startElement('datecreated');
     $xml->writeDateSplitElements($this->getTransactionDate(), true);
     $xml->endElement();
     //datecreated
     $xml->writeElement('createdfrom', $this->getCreatedFrom());
     $xml->writeElement('documentno', $this->getDocumentNumber());
     $xml->writeElement('referenceno', $this->getReferenceNumber());
     $xml->writeElement('message', $this->getMessage());
     $xml->writeElement('externalid', $this->getExternalId());
     $xml->writeElement('basecurr', $this->getBaseCurrency());
     $this->writeXmlExplicitCustomFields($xml);
     $xml->writeElement('state', $this->getState());
     $xml->startElement('ictransitems');
     if (count($this->getLines()) > 0) {
         foreach ($this->getLines() as $line) {
             $line->writeXml($xml);
         }
     } else {
         throw new InvalidArgumentException('IC Transaction must have at least 1 line');
     }
     $xml->endElement();
     //ictransitems
     if (count($this->getSubtotals()) > 0) {
         $xml->startElement('subtotals');
         foreach ($this->getSubtotals() as $subtotal) {
             $subtotal->writeXml($xml);
         }
         $xml->endElement();
         //subtotals
     }
     $xml->endElement();
     //create_ictransaction
     $xml->endElement();
     //function
 }
开发者ID:Intacct,项目名称:intacct-sdk-php,代码行数:46,代码来源:InventoryTransactionCreate.php

示例14: writeXml

 /**
  * Write the itemdetail block XML
  *
  * @param XMLWriter $xml
  */
 public function writeXml(XMLWriter &$xml)
 {
     $xml->startElement('itemdetail');
     $xml->writeElement('quantity', $this->getQuantity());
     if ($this->getSerialNumber()) {
         $xml->writeElement('serialno', $this->getSerialNumber());
     } elseif ($this->getLotNumber()) {
         $xml->writeElement('lotno', $this->getLotNumber());
     }
     $xml->writeElement('aisle', $this->getAisle());
     $xml->writeElement('row', $this->getRow());
     $xml->writeElement('bin', $this->getBin());
     if ($this->getItemExpiration()) {
         $xml->startElement('itemexpiration');
         $xml->writeDateSplitElements($this->getItemExpiration());
         $xml->endElement();
         //itemexpiration
     }
     $xml->endElement();
     //itemdetail
 }
开发者ID:Intacct,项目名称:intacct-sdk-php,代码行数:26,代码来源:TransactionItemDetail.php

示例15: writeXml

 /**
  * 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('reverse_bill');
     if (!$this->getRecordNo()) {
         throw new InvalidArgumentException('Record No is required for reverse');
     }
     $xml->writeAttribute('key', $this->getRecordNo());
     if (!$this->getReverseDate()) {
         throw new InvalidArgumentException('Reverse Date is required for reverse');
     }
     $xml->startElement('datereversed');
     $xml->writeDateSplitElements($this->getReverseDate());
     $xml->endElement();
     //datereversed
     $xml->writeElement('description', $this->getMemo());
     $xml->endElement();
     //reverse_bill
     $xml->endElement();
     //function
 }
开发者ID:Intacct,项目名称:intacct-sdk-php,代码行数:28,代码来源:BillReverse.php


注:本文中的Intacct\Xml\XMLWriter::writeDateSplitElements方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。