Exemplo n.º 1
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('update');
     $xml->startElement('DEPARTMENT');
     if (!$this->getDepartmentId()) {
         throw new InvalidArgumentException('Department ID is required for update');
     }
     $xml->writeElement('DEPARTMENTID', $this->getDepartmentId(), true);
     $xml->writeElement('TITLE', $this->getDepartmentName());
     $xml->writeElement('PARENTID', $this->getParentDepartmentId());
     $xml->writeElement('SUPERVISORID', $this->getManagerEmployeeId());
     $xml->writeElement('CUSTTITLE', $this->getDepartmentTitle());
     if ($this->isActive() === true) {
         $xml->writeElement('STATUS', 'active');
     } elseif ($this->isActive() === false) {
         $xml->writeElement('STATUS', 'inactive');
     }
     $this->writeXmlImplicitCustomFields($xml);
     $xml->endElement();
     //DEPARTMENT
     $xml->endElement();
     //update
     $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
 }
Exemplo n.º 3
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('TIMESHEET');
     if (!$this->getEmployeeId()) {
         throw new InvalidArgumentException('Employee ID is required for create');
     }
     $xml->writeElement('EMPLOYEEID', $this->getEmployeeId(), true);
     if (!$this->getBeginDate()) {
         throw new InvalidArgumentException('Begin Date is required for create');
     }
     $xml->writeElement('BEGINDATE', $this->getBeginDate(), true);
     $xml->writeElement('DESCRIPTION', $this->getDescription());
     $xml->writeElement('SUPDOCID', $this->getAttachmentsId());
     $xml->writeElement('STATE', $this->getAction());
     $xml->startElement('TIMESHEETENTRIES');
     if (count($this->getEntries()) > 0) {
         foreach ($this->getEntries() as $entry) {
             $entry->writeXml($xml);
         }
     } else {
         throw new InvalidArgumentException('Timesheet must have at least 1 entry');
     }
     $xml->endElement();
     //TIMESHEETENTRIES
     $this->writeXmlImplicitCustomFields($xml);
     $xml->endElement();
     //TIMESHEET
     $xml->endElement();
     //create
     $xml->endElement();
     //function
 }
Exemplo n.º 4
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('update_supdoc');
     if (!$this->getAttachmentsId()) {
         throw new InvalidArgumentException('Attachments ID is required for update');
     }
     $xml->writeElement('supdocid', $this->getAttachmentsId(), true);
     $xml->writeElement('supdocname', $this->getAttachmentsName());
     $xml->writeElement('supdocfoldername', $this->getAttachmentFolderName());
     $xml->writeElement('supdocdescription', $this->getDescription());
     if (count($this->getFiles()) > 0) {
         $xml->startElement('attachments');
         foreach ($this->getFiles() as $file) {
             if ($file instanceof AttachmentInterface) {
                 $file->writeXml($xml);
             }
         }
         $xml->endElement();
         //attachments
     }
     $xml->endElement();
     //update_supdoc
     $xml->endElement();
     //function
 }
Exemplo n.º 5
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_supdoc');
     // Attachments ID is not required if auto-numbering is configured in module
     $xml->writeElement('supdocid', $this->getAttachmentsId(), true);
     // System sets value to 'Unnamed' if left null
     $xml->writeElement('supdocname', $this->getAttachmentsName(), true);
     if (!$this->getAttachmentFolderName()) {
         // System does not pick up user preferences for default folder
         // Nor does it pick up user's related employee default folder
         throw new InvalidArgumentException('Attachment Folder Name is required for create');
     }
     $xml->writeElement('supdocfoldername', $this->getAttachmentFolderName(), true);
     $xml->writeElement('supdocdescription', $this->getDescription());
     if (count($this->getFiles()) > 0) {
         $xml->startElement('attachments');
         foreach ($this->getFiles() as $file) {
             if ($file instanceof AttachmentInterface) {
                 $file->writeXml($xml);
             }
         }
         $xml->endElement();
         //attachments
     }
     $xml->endElement();
     //create_supdoc
     $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('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
 }
 /**
  * @param XMLWriter $xml
  */
 public function writeXml(XMLWriter &$xml)
 {
     $xml->startElement('potransitem');
     $xml->writeElement('itemid', $this->getItemId(), true);
     $xml->writeElement('itemdesc', $this->getItemDescription());
     $xml->writeElement('taxable', $this->isTaxable());
     $xml->writeElement('warehouseid', $this->getWarehouseId());
     $xml->writeElement('quantity', $this->getQuantity(), true);
     $xml->writeElement('unit', $this->getUnit());
     $xml->writeElement('price', $this->getPrice());
     $xml->writeElement('overridetaxamount', $this->getOverrideTaxAmount());
     $xml->writeElement('tax', $this->getTax());
     $xml->writeElement('locationid', $this->getLocationId());
     $xml->writeElement('departmentid', $this->getDepartmentId());
     $xml->writeElement('memo', $this->getMemo());
     if (count($this->getItemDetails()) > 0) {
         $xml->startElement('itemdetails');
         foreach ($this->getItemDetails() as $itemDetail) {
             $itemDetail->writeXml($xml);
         }
         $xml->endElement();
         //itemdetails
     }
     $xml->writeElement('form1099', $this->isForm1099());
     $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('classid', $this->getClassId());
     $xml->writeElement('contractid', $this->getContractId());
     $xml->writeElement('billable', $this->isBillable());
     $xml->endElement();
     //potransitem
 }
 /**
  * @param XMLWriter $xml
  */
 public function writeXml(XMLWriter &$xml)
 {
     $xml->startElement('ictransitem');
     $xml->writeElement('itemid', $this->getItemId(), true);
     $xml->writeElement('itemdesc', $this->getItemDescription());
     $xml->writeElement('warehouseid', $this->getWarehouseId());
     $xml->writeElement('quantity', $this->getQuantity(), true);
     $xml->writeElement('unit', $this->getUnit());
     $xml->writeElement('cost', $this->getCost());
     $xml->writeElement('locationid', $this->getLocationId());
     $xml->writeElement('departmentid', $this->getDepartmentId());
     if (count($this->getItemDetails()) > 0) {
         $xml->startElement('itemdetails');
         foreach ($this->getItemDetails() as $itemDetail) {
             $itemDetail->writeXml($xml);
         }
         $xml->endElement();
         //itemdetails
     }
     $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('classid', $this->getClassId());
     $xml->writeElement('contractid', $this->getContractId());
     $xml->endElement();
     //ictransitem
 }
Exemplo n.º 9
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('update');
     $xml->startElement('CLASS');
     if (!$this->getClassId()) {
         throw new InvalidArgumentException('Class ID is required for update');
     }
     $xml->writeElement('CLASSID', $this->getClassId(), true);
     $xml->writeElement('NAME', $this->getClassName());
     $xml->writeElement('DESCRIPTION', $this->getDescription());
     $xml->writeElement('PARENTID', $this->getParentClassId());
     if ($this->isActive() === true) {
         $xml->writeElement('STATUS', 'active');
     } elseif ($this->isActive() === false) {
         $xml->writeElement('STATUS', 'inactive');
     }
     $this->writeXmlImplicitCustomFields($xml);
     $xml->endElement();
     //CLASS
     $xml->endElement();
     //update
     $xml->endElement();
     //function
 }
Exemplo n.º 10
0
 /**
  * Write the function block XML
  *
  * @param XMLWriter $xml
  */
 public function writeXml(XMLWriter &$xml)
 {
     $xml->startElement('function');
     $xml->writeAttribute('controlid', $this->getControlId());
     $xml->startElement('consolidate');
     if (!$this->getReportingBookId()) {
         throw new InvalidArgumentException('Reporting Book ID is required to create consolidation');
     }
     $xml->writeElement('bookid', $this->getReportingBookId(), true);
     if (!$this->getReportingPeriodName()) {
         throw new InvalidArgumentException('Reporting Period Name is required to create consolidation');
     }
     $xml->writeElement('reportingperiodname', $this->getReportingPeriodName(), true);
     $xml->writeElement('offline', $this->isProcessOffline());
     $xml->writeElement('updatesucceedingperiods', $this->isUpdateSucceedingPeriods());
     $xml->writeElement('changesonly', $this->isChangesOnly());
     $xml->writeElement('email', $this->getNotificationEmail());
     if (count($this->getEntities()) > 0) {
         $xml->startElement('entities');
         foreach ($this->getEntities() as $entity) {
             $entity->writeXml($xml);
         }
         $xml->endElement();
         //entities
     }
     $xml->endElement();
     //consolidate
     $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
 }
Exemplo n.º 12
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
 }
Exemplo n.º 13
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('EEACCOUNTLABEL');
     if (!$this->getExpenseType()) {
         throw new InvalidArgumentException('Expense Type is required for create');
     }
     $xml->writeElement('ACCOUNTLABEL', $this->getExpenseType(), 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());
     $xml->writeElement('ITEMID', $this->getItemId());
     if ($this->isActive() === true) {
         $xml->writeElement('STATUS', 'active');
     } elseif ($this->isActive() === false) {
         $xml->writeElement('STATUS', 'inactive');
     }
     $this->writeXmlImplicitCustomFields($xml);
     $xml->endElement();
     //EEACCOUNTLABEL
     $xml->endElement();
     //create
     $xml->endElement();
     //function
 }
Exemplo n.º 14
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('update');
     $xml->startElement('ALLOCATION');
     if (!$this->getAllocationId()) {
         throw new InvalidArgumentException('Allocation ID is required for update');
     }
     $xml->writeElement('ALLOCATIONID', $this->getAllocationId(), true);
     $xml->writeElement('TYPE', $this->getAllocateBy());
     $xml->writeElement('DESCRIPTION', $this->getDescription());
     $xml->writeElement('DOCNUMBER', $this->getDocumentNo());
     $xml->writeElement('SUPDOCID', $this->getAttachmentsId());
     if ($this->isActive() === true) {
         $xml->writeElement('STATUS', 'active');
     } elseif ($this->isActive() === false) {
         $xml->writeElement('STATUS', 'inactive');
     }
     if (count($this->getLines()) > 0) {
         // Completely replaces any existing lines
         $xml->startElement('ALLOCATIONENTRIES');
         foreach ($this->getLines() as $allocationLine) {
             $allocationLine->writeXml($xml);
         }
         $xml->endElement();
         //ALLOCATIONENTRIES
     }
     $xml->endElement();
     //ALLOCATION
     $xml->endElement();
     //update
     $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('update');
     $xml->startElement('APACCOUNTLABEL');
     if (!$this->getAccountLabel()) {
         throw new InvalidArgumentException('Account Label is required for update');
     }
     $xml->writeElement('ACCOUNTLABEL', $this->getAccountLabel(), true);
     $xml->writeElement('DESCRIPTION', $this->getDescription());
     $xml->writeElement('GLACCOUNTNO', $this->getGlAccountNo());
     $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();
     //update
     $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('GLBATCH');
     $xml->writeElement('JOURNAL', $this->getJournalSymbol(), true);
     $xml->writeElement('BATCH_DATE', $this->getPostingDate(), true);
     $xml->writeElement('REVERSEDATE', $this->getReverseDate());
     $xml->writeElement('BATCH_TITLE', $this->getDescription(), true);
     $xml->writeElement('HISTORY_COMMENT', $this->getHistoryComment());
     $xml->writeElement('REFERENCENO', $this->getReferenceNumber());
     $xml->writeElement('SUPDOCID', $this->getAttachmentsId());
     $xml->writeElement('STATE', $this->getAction());
     $this->writeXmlImplicitCustomFields($xml);
     $xml->startElement('ENTRIES');
     if (count($this->getLines()) >= 1) {
         foreach ($this->getLines() as $entry) {
             $entry->writeXml($xml);
         }
     } else {
         throw new InvalidArgumentException('Statistical Journal Entry must have at least 1 line');
     }
     $xml->endElement();
     //ENTRIES
     $xml->endElement();
     //GLBATCH
     $xml->endElement();
     //create
     $xml->endElement();
     //function
 }
Exemplo n.º 17
0
 /**
  *
  * @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
 }
Exemplo n.º 18
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
 }
Exemplo n.º 19
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('update');
     $xml->startElement('EMPLOYEE');
     if (!$this->getEmployeeId()) {
         throw new InvalidArgumentException('Employee ID is required for update');
     }
     $xml->writeElement('EMPLOYEEID', $this->getEmployeeId(), true);
     if ($this->getContactName()) {
         $xml->startElement('PERSONALINFO');
         $xml->writeElement('CONTACTNAME', $this->getContactName(), true);
         $xml->endElement();
         //PERSONALINFO
     }
     $xml->writeElement('STARTDATE', $this->getStartDate());
     $xml->writeElement('TITLE', $this->getTitle());
     $xml->writeElement('SSN', $this->getSsn());
     $xml->writeElement('EMPLOYEETYPE', $this->getEmployeeType());
     if ($this->isActive() === true) {
         $xml->writeElement('STATUS', 'active');
     } elseif ($this->isActive() === false) {
         $xml->writeElement('STATUS', 'inactive');
     }
     $xml->writeElement('BIRTHDATE', $this->getBirthDate());
     $xml->writeElement('ENDDATE', $this->getEndDate());
     $xml->writeElement('TERMINATIONTYPE', $this->getTerminationType());
     $xml->writeElement('SUPERVISORID', $this->getManagerEmployeeId());
     $xml->writeElement('GENDER', $this->getGender());
     $xml->writeElement('DEPARTMENTID', $this->getDepartmentId());
     $xml->writeElement('LOCATIONID', $this->getLocationId());
     $xml->writeElement('CLASSID', $this->getClassId());
     $xml->writeElement('CURRENCY', $this->getDefaultCurrency());
     $xml->writeElement('EARNINGTYPENAME', $this->getEarningTypeName());
     $xml->writeElement('POSTACTUALCOST', $this->isPostActualCost());
     $xml->writeElement('NAME1099', $this->getForm1099Name());
     $xml->writeElement('FORM1099TYPE', $this->getForm1099Type());
     $xml->writeElement('FORM1099BOX', $this->getForm1099Box());
     $xml->writeElement('SUPDOCFOLDERNAME', $this->getAttachmentFolderName());
     $xml->writeElement('PAYMETHODKEY', $this->getPreferredPaymentMethod());
     $xml->writeElement('PAYMENTNOTIFY', $this->isSendAutomaticPaymentNotification());
     $xml->writeElement('ACHENABLED', $this->isAchEnabled());
     $xml->writeElement('ACHBANKROUTINGNUMBER', $this->getAchBankRoutingNo());
     $xml->writeElement('ACHACCOUNTNUMBER', $this->getAchBankAccountNo());
     $xml->writeElement('ACHACCOUNTTYPE', $this->getAchBankAccountType());
     $xml->writeElement('ACHREMITTANCETYPE', $this->getAchBankAccountClass());
     $this->writeXmlImplicitCustomFields($xml);
     $xml->endElement();
     //EMPLOYEE
     $xml->endElement();
     //update
     $xml->endElement();
     //function
 }
Exemplo n.º 20
0
 /**
  * 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
 }
Exemplo n.º 21
0
 /**
  * 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
 }
Exemplo n.º 22
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
 }
Exemplo n.º 23
0
 /**
  * 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
 }
 /**
  * @param XMLWriter $xml
  */
 public function writeXml(XMLWriter &$xml)
 {
     $xml->startElement('updatesotransitem');
     $xml->writeAttribute('line_num', $this->getLineNo());
     $xml->writeElement('bundlenumber', $this->getBundleNumber());
     $xml->writeElement('itemid', $this->getItemId(), true);
     $xml->writeElement('itemdesc', $this->getItemDescription());
     $xml->writeElement('taxable', $this->isTaxable());
     $xml->writeElement('warehouseid', $this->getWarehouseId());
     $xml->writeElement('quantity', $this->getQuantity(), true);
     $xml->writeElement('unit', $this->getUnit());
     $xml->writeElement('discountpercent', $this->getDiscountPercent());
     $xml->writeElement('price', $this->getPrice());
     $xml->writeElement('discsurchargememo', $this->getDiscountSurchargeMemo());
     $xml->writeElement('locationid', $this->getLocationId());
     $xml->writeElement('departmentid', $this->getDepartmentId());
     $xml->writeElement('memo', $this->getMemo());
     if (count($this->getItemDetails()) > 0) {
         $xml->startElement('itemdetails');
         foreach ($this->getItemDetails() as $itemDetail) {
             $itemDetail->writeXml($xml);
         }
         $xml->endElement();
         //itemdetails
     }
     $this->writeXmlExplicitCustomFields($xml);
     $xml->writeElement('revrectemplate', $this->getRevRecTemplate());
     if ($this->getRevRecStartDate()) {
         $xml->startElement('revrecstartdate');
         $xml->writeDateSplitElements($this->getRevRecStartDate(), true);
         $xml->endElement();
         //revrecstartdate
     }
     if ($this->getRevRecEndDate()) {
         $xml->startElement('revrecenddate');
         $xml->writeDateSplitElements($this->getRevRecEndDate(), true);
         $xml->endElement();
         //revrecenddate
     }
     $xml->writeElement('renewalmacro', $this->getRenewalMacro());
     $xml->writeElement('projectid', $this->getProjectId());
     $xml->writeElement('customerid', $this->getCustomerId());
     $xml->writeElement('vendorid', $this->getVendorId());
     $xml->writeElement('employeeid', $this->getEmployeeId());
     $xml->writeElement('classid', $this->getClassId());
     $xml->writeElement('contractid', $this->getContractId());
     $xml->writeElement('fulfillmentstatus', $this->getFulfillmentStatus());
     $xml->writeElement('taskno', $this->getTaskNumber());
     $xml->writeElement('billingtemplate', $this->getBillingTemplate());
     $xml->endElement();
     //updatesotransitem
 }
Exemplo n.º 25
0
 /**
  * Write the update block XML
  *
  * @param XMLWriter $xml
  * @throw InvalidArgumentException
  */
 public function writeXml(XMLWriter &$xml)
 {
     $xml->startElement('function');
     $xml->writeAttribute('controlid', $this->getControlId());
     $xml->startElement('update');
     foreach ($this->getRecords() as $record) {
         $record->writeXml($xml);
     }
     $xml->endElement();
     //update
     $xml->endElement();
     //function
 }
Exemplo n.º 26
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
 }
Exemplo 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('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_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
 }
Exemplo n.º 29
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_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
 }