コード例 #1
0
        public override void WriteXml(ref IaXmlWriter xml)
        {
            xml.WriteStartElement("updatesotransitem");
            xml.WriteAttribute("line_num", LineNo);

            xml.WriteElement("bundlenumber", BundleNumber);
            xml.WriteElement("itemid", ItemId, true);
            xml.WriteElement("itemdesc", ItemDescription);
            xml.WriteElement("taxable", Taxable);
            xml.WriteElement("warehouseid", WarehouseId);
            xml.WriteElement("quantity", Quantity, true);
            xml.WriteElement("unit", Unit);
            xml.WriteElement("discountpercent", DiscountPercent);
            xml.WriteElement("price", Price);
            xml.WriteElement("discsurchargememo", DiscountSurchargeMemo);
            xml.WriteElement("locationid", LocationId);
            xml.WriteElement("departmentid", DepartmentId);
            xml.WriteElement("memo", Memo);

            if (ItemDetails.Count > 0)
            {
                xml.WriteStartElement("itemdetails");
                foreach (AbstractTransactionItemDetail ItemDetail in ItemDetails)
                {
                    ItemDetail.WriteXml(ref xml);
                }
                xml.WriteEndElement(); //itemdetails
            }

            xml.WriteCustomFieldsExplicit(CustomFields);

            xml.WriteElement("revrectemplate", RevRecTemplate);

            if (RevRecStartDate.HasValue)
            {
                xml.WriteStartElement("revrecstartdate");
                xml.WriteDateSplitElements(RevRecStartDate.Value);
                xml.WriteEndElement(); //revrecstartdate
            }

            if (RevRecEndDate.HasValue)
            {
                xml.WriteStartElement("revrecenddate");
                xml.WriteDateSplitElements(RevRecEndDate.Value);
                xml.WriteEndElement(); //revrecenddate
            }

            xml.WriteElement("renewalmacro", RenewalMacro);
            xml.WriteElement("projectid", ProjectId);
            xml.WriteElement("customerid", CustomerId);
            xml.WriteElement("vendorid", VendorId);
            xml.WriteElement("employeeid", EmployeeId);
            xml.WriteElement("classid", ClassId);
            xml.WriteElement("contractid", ContractId);
            xml.WriteElement("fulfillmentstatus", FulfillmentStatus);
            xml.WriteElement("taskno", TaskNumber);
            xml.WriteElement("billingtemplate", BillingTemplate);

            xml.WriteEndElement(); //updatesotransitem
        }
コード例 #2
0
        public override void WriteXml(ref IaXmlWriter xml)
        {
            xml.WriteStartElement("function");
            xml.WriteAttribute("controlid", ControlId, true);

            xml.WriteStartElement("create_aradjustment");

            xml.WriteElement("customerid", CustomerId, true);

            xml.WriteStartElement("datecreated");
            xml.WriteDateSplitElements(TransactionDate);
            xml.WriteEndElement(); //datecreated

            if (GlPostingDate.HasValue)
            {
                xml.WriteStartElement("dateposted");
                xml.WriteDateSplitElements(GlPostingDate.Value);
                xml.WriteEndElement(); //dateposted
            }

            xml.WriteElement("batchkey", SummaryRecordNo);

            xml.WriteElement("adjustmentno", AdjustmentNumber);

            xml.WriteElement("action", Action);

            xml.WriteElement("invoiceno", InvoiceNumber);

            xml.WriteElement("description", Description);

            xml.WriteElement("externalid", ExternalId);

            WriteXmlMultiCurrencySection(ref xml);

            xml.WriteElement("nogl", DoNotPostToGL);

            xml.WriteCustomFieldsExplicit(CustomFields);

            xml.WriteStartElement("aradjustmentitems");

            if (Lines.Count > 0)
            {
                foreach (ArAdjustmentLineCreate Line in Lines)
                {
                    Line.WriteXml(ref xml);
                }
            }
            xml.WriteEndElement(); //aradjustmentitems

            xml.WriteEndElement(); //create_aradjustment

            xml.WriteEndElement(); //function
        }
コード例 #3
0
        public override void WriteXml(ref IaXmlWriter xml)
        {
            xml.WriteStartElement("function");
            xml.WriteAttribute("controlid", ControlId, true);

            xml.WriteStartElement("record_cctransaction");

            xml.WriteElement("chargecardid", ChargeCardId, true);

            if (TransactionDate.HasValue)
            {
                xml.WriteStartElement("paymentdate");
                xml.WriteDateSplitElements(TransactionDate.Value);
                xml.WriteEndElement(); //paymentdate
            }

            xml.WriteElement("referenceno", ReferenceNumber);
            xml.WriteElement("payee", Payee);
            xml.WriteElement("description", Description);
            xml.WriteElement("supdocid", AttachmentsId);
            xml.WriteElement("currency", TransactionCurrency);

            if (ExchangeRateValue.HasValue)
            {
                xml.WriteElement("exchrate", ExchangeRateValue);
            }
            else if (ExchangeRateDate.HasValue || !string.IsNullOrWhiteSpace(ExchangeRateType))
            {
                if (ExchangeRateDate.HasValue)
                {
                    xml.WriteStartElement("exchratedate");
                    xml.WriteDateSplitElements(ExchangeRateDate.Value);
                    xml.WriteEndElement();
                }
                xml.WriteElement("exchratetype", ExchangeRateType, true);
            }

            xml.WriteCustomFieldsExplicit(CustomFields);

            xml.WriteStartElement("ccpayitems");
            if (Lines.Count > 0)
            {
                foreach (ChargeCardTransactionLineCreate line in Lines)
                {
                    line.WriteXml(ref xml);
                }
            }
            xml.WriteEndElement(); //ccpayitems

            xml.WriteEndElement(); //record_cctransaction

            xml.WriteEndElement(); //function
        }
コード例 #4
0
        public override void WriteXml(ref IaXmlWriter xml)
        {
            xml.WriteStartElement("lineitem");

            if (!string.IsNullOrWhiteSpace(AccountLabel))
            {
                xml.WriteElement("accountlabel", AccountLabel, true);
            }
            else
            {
                xml.WriteElement("glaccountno", GlAccountNumber, true);
            }

            xml.WriteElement("offsetglaccountno", OffsetGlAccountNumber);
            xml.WriteElement("amount", TransactionAmount);
            xml.WriteElement("allocationid", AllocationId);
            xml.WriteElement("memo", Memo);
            xml.WriteElement("locationid", LocationId);
            xml.WriteElement("departmentid", DepartmentId);
            xml.WriteElement("key", Key);
            xml.WriteElement("totalpaid", TotalPaid);
            xml.WriteElement("totaldue", TotalDue);

            xml.WriteCustomFieldsExplicit(CustomFields);

            xml.WriteElement("revrectemplate", RevRecTemplateId);
            xml.WriteElement("defrevaccount", DeferredRevGlAccountNo);
            if (RevRecStartDate.HasValue)
            {
                xml.WriteStartElement("revrecstartdate");
                xml.WriteDateSplitElements(RevRecStartDate.Value);
                xml.WriteEndElement(); //revrecstartdate
            }
            if (RevRecEndDate.HasValue)
            {
                xml.WriteStartElement("revrecenddate");
                xml.WriteDateSplitElements(RevRecEndDate.Value);
                xml.WriteEndElement(); //revrecenddate
            }
            xml.WriteElement("projectid", ProjectId);
            xml.WriteElement("customerid", CustomerId);
            xml.WriteElement("vendorid", VendorId);
            xml.WriteElement("employeeid", EmployeeId);
            xml.WriteElement("itemid", ItemId);
            xml.WriteElement("classid", ClassId);
            xml.WriteElement("contractid", ContractId);
            xml.WriteElement("warehouseid", WarehouseId);

            xml.WriteEndElement(); //lineitem
        }
コード例 #5
0
        public override void WriteXml(ref IaXmlWriter xml)
        {
            xml.WriteStartElement("itemdetail");

            xml.WriteElement("quantity", Quantity);
            if (!string.IsNullOrWhiteSpace(SerialNumber))
            {
                xml.WriteElement("serialno", SerialNumber);
            }
            else if (!string.IsNullOrWhiteSpace(LotNumber))
            {
                xml.WriteElement("lotno", LotNumber);
            }

            xml.WriteElement("aisle", Aisle);
            xml.WriteElement("row", Row);
            xml.WriteElement("bin", Bin);

            if (ItemExpiration.HasValue)
            {
                xml.WriteStartElement("itemexpiration");
                xml.WriteDateSplitElements(ItemExpiration.Value);
                xml.WriteEndElement(); // itemexpiration
            }

            xml.WriteEndElement(); //itemdetail
        }
コード例 #6
0
        public override void WriteXml(ref IaXmlWriter xml)
        {
            xml.WriteStartElement("function");
            xml.WriteAttribute("controlid", ControlId, true);

            xml.WriteStartElement("create_reimbursementrequest");

            xml.WriteElement("bankaccountid", BankAccountId, true);
            xml.WriteElement("employeeid", EmployeeId, true);

            xml.WriteElement("memo", Memo);

            xml.WriteElement("paymentmethod", PaymentMethod, true);

            xml.WriteStartElement("paymentdate");
            xml.WriteDateSplitElements(PaymentDate, true);
            xml.WriteEndElement(); //paymentdate

            xml.WriteElement("paymentoption", MergeOption);

            xml.WriteStartElement("eppaymentrequestitems");
            foreach (ReimbursementRequestItem applyToTransaction in ApplyToTransactions)
            {
                applyToTransaction.WriteXml(ref xml);
            }
            xml.WriteEndElement(); //eppaymentrequestitems

            xml.WriteElement("documentnumber", DocumentNo);
            xml.WriteElement("paymentdescription", Memo);
            xml.WriteElement("paymentcontact", NotificationContactName);

            xml.WriteEndElement(); //create_reimbursementrequest

            xml.WriteEndElement(); //function
        }
コード例 #7
0
        public override void WriteXml(ref IaXmlWriter xml)
        {
            xml.WriteStartElement("function");
            xml.WriteAttribute("controlid", ControlId, true);

            xml.WriteStartElement("record_deposit");

            xml.WriteElement("bankaccountid", BankAccountId, true);

            xml.WriteStartElement("depositdate");
            xml.WriteDateSplitElements(DepositDate);
            xml.WriteEndElement(); //depositdate

            xml.WriteElement("depositid", DepositSlipId, true);

            xml.WriteStartElement("receiptkeys");
            if (TransactionsKeysToDeposit.Count > 0)
            {
                foreach (int key in TransactionsKeysToDeposit)
                {
                    xml.WriteElement("receiptkey", key, true);
                }
            }
            xml.WriteEndElement(); //receiptkeys

            xml.WriteElement("description", Description);

            xml.WriteElement("supdocid", AttachmentsId);

            xml.WriteCustomFieldsExplicit(CustomFields);

            xml.WriteEndElement(); //record_deposit

            xml.WriteEndElement(); //function
        }
コード例 #8
0
        public override void WriteXml(ref IaXmlWriter xml)
        {
            xml.WriteStartElement("function");
            xml.WriteAttribute("controlid", ControlId, true);

            xml.WriteStartElement("apply_arpayment");

            xml.WriteElement("arpaymentkey", RecordNo, true);

            xml.WriteStartElement("paymentdate");
            xml.WriteDateSplitElements(ReceivedDate.Value, true);
            xml.WriteEndElement(); //paymentdate

            xml.WriteElement("batchkey", SummaryRecordNo);
            xml.WriteElement("memo", Memo);
            xml.WriteElement("overpaylocid", OverpaymentLocationId);
            xml.WriteElement("overpaydeptid", OverpaymentDepartmentId);

            if (ApplyToTransactions.Count > 0)
            {
                xml.WriteStartElement("arpaymentitems");
                foreach (ArPaymentItem applyToTransaction in ApplyToTransactions)
                {
                    applyToTransaction.WriteXml(ref xml);
                }

                xml.WriteEndElement(); //arpaymentitems
            }

            xml.WriteEndElement(); //apply_arpayment

            xml.WriteEndElement(); //function
        }
コード例 #9
0
        public override void WriteXml(ref IaXmlWriter xml)
        {
            xml.WriteStartElement("function");
            xml.WriteAttribute("controlid", ControlId, true);

            xml.WriteStartElement("create_expensereportbatch");

            xml.WriteElement("batchtitle", Title, true);

            if (GlPostingDate.HasValue)
            {
                xml.WriteStartElement("datecreated");
                xml.WriteDateSplitElements(GlPostingDate.Value);
                xml.WriteEndElement(); //datecreated
            }

            /*if (ExpenseReports.Count > 0) {
             *  foreach (ExpenseReportCreate expenseReport in ExpenseReports) {
             *      Bill.writeXml($xml);
             *  }
             * }*/

            xml.WriteEndElement(); //create_expensereportbatch

            xml.WriteEndElement(); //function
        }
コード例 #10
0
        public override void WriteXml(ref IaXmlWriter xml)
        {
            xml.WriteStartElement("function");
            xml.WriteAttribute("controlid", ControlId, true);

            xml.WriteStartElement("create_arpaymentbatch");

            xml.WriteElement("batchtitle", Title, true);

            if (!string.IsNullOrWhiteSpace(UndepositedFundsGlAccountNo))
            {
                xml.WriteElement("undepfundsacct", UndepositedFundsGlAccountNo);
            }
            else
            {
                xml.WriteElement("bankaccountid", BankAccountId);
            }

            if (GlPostingDate.HasValue)
            {
                xml.WriteStartElement("datecreated");
                xml.WriteDateSplitElements(GlPostingDate.Value, true);
                xml.WriteEndElement(); //datecreated
            }

            xml.WriteEndElement(); //create_arpaymentbatch

            xml.WriteEndElement(); //function
        }
コード例 #11
0
        public override void WriteXml(ref IaXmlWriter xml)
        {
            xml.WriteStartElement("function");
            xml.WriteAttribute("controlid", ControlId, true);

            xml.WriteStartElement("create_expensereport");

            xml.WriteElement("employeeid", EmployeeId, true);

            xml.WriteStartElement("datecreated");
            xml.WriteDateSplitElements(TransactionDate.Value);
            xml.WriteEndElement(); //datecreated

            if (GlPostingDate.HasValue)
            {
                xml.WriteStartElement("dateposted");
                xml.WriteDateSplitElements(GlPostingDate.Value);
                xml.WriteEndElement(); //dateposted
            }

            xml.WriteElement("batchkey", SummaryRecordNo);
            xml.WriteElement("expensereportno", ExpenseReportNumber);
            xml.WriteElement("state", Action);
            xml.WriteElement("description", ReasonForExpense);
            xml.WriteElement("memo", Memo);
            xml.WriteElement("externalid", ExternalId);
            xml.WriteElement("basecurr", BaseCurrency);
            xml.WriteElement("currency", ReimbursementCurrency);

            xml.WriteCustomFieldsExplicit(CustomFields);

            xml.WriteElement("supdocid", AttachmentsId);

            xml.WriteStartElement("expenses");
            if (Lines.Count > 0)
            {
                foreach (ExpenseReportLineCreate line in Lines)
                {
                    line.WriteXml(ref xml);
                }
            }
            xml.WriteEndElement(); //expenses

            xml.WriteEndElement(); //create_expensereport

            xml.WriteEndElement(); //function
        }
コード例 #12
0
        public override void WriteXml(ref IaXmlWriter xml)
        {
            xml.WriteStartElement("function");
            xml.WriteAttribute("controlid", ControlId, true);

            xml.WriteStartElement("create_expenseadjustmentreport");

            xml.WriteElement("employeeid", EmployeeId, true);

            xml.WriteStartElement("datecreated");
            xml.WriteDateSplitElements(TransactionDate);
            xml.WriteEndElement(); //datecreated

            if (GlPostingDate.HasValue)
            {
                xml.WriteStartElement("dateposted");
                xml.WriteDateSplitElements(GlPostingDate.Value);
                xml.WriteEndElement(); //dateposted
            }

            xml.WriteElement("batchkey", SummaryRecordNo);
            xml.WriteElement("adjustmentno", ExpenseAdjustmentNumber);
            xml.WriteElement("docnumber", ExpenseReportNumber);
            xml.WriteElement("description", Description);
            xml.WriteElement("basecurr", BaseCurrency);
            xml.WriteElement("currency", ReimbursementCurrency);

            // Current schema does not allow custom fields
            //xml.WriteCustomFieldsExplicit(CustomFields);

            xml.WriteStartElement("expenseadjustments");
            if (Lines.Count > 0)
            {
                foreach (ExpenseAdjustmentLineCreate Line in Lines)
                {
                    Line.WriteXml(ref xml);
                }
            }
            xml.WriteEndElement(); //expenseadjustments

            xml.WriteElement("supdocid", AttachmentsId);

            xml.WriteEndElement(); //create_expenseadjustmentreport

            xml.WriteEndElement(); //function
        }
コード例 #13
0
        public override void WriteXml(ref IaXmlWriter xml)
        {
            xml.WriteStartElement("function");
            xml.WriteAttribute("controlid", ControlId, true);

            xml.WriteStartElement("create_paymentrequest");

            if (!String.IsNullOrWhiteSpace(ChargeCardId))
            {
                xml.WriteElement("chargecardid", ChargeCardId);
            }
            else
            {
                xml.WriteElement("bankaccountid", BankAccountId);
            }

            xml.WriteElement("vendorid", VendorId, true);

            xml.WriteElement("memo", Memo);

            xml.WriteElement("paymentmethod", PaymentMethod, true);

            xml.WriteElement("grouppayments", GroupPayments);

            xml.WriteStartElement("paymentdate");
            xml.WriteDateSplitElements(PaymentDate, true);
            xml.WriteEndElement(); //paymentdate

            xml.WriteElement("paymentoption", MergeOption);

            if (ApplyToTransactions.Count > 0)
            {
                xml.WriteStartElement("paymentrequestitems");
                foreach (ApPaymentRequestItem ApplyToTransaction in ApplyToTransactions)
                {
                    ApplyToTransaction.WriteXml(ref xml);
                }
                xml.WriteEndElement(); //paymentrequestitems
            }

            // TODO: what about paymentamount element? only in v3.0 schema - was removed from v2.1 schema

            xml.WriteElement("documentnumber", DocumentNo);

            // TODO: review paymentdescription vs memo
            xml.WriteElement("paymentdescription", Memo);

            xml.WriteElement("paymentcontact", NotificationContactName);

            xml.WriteEndElement(); //create_paymentrequest

            xml.WriteEndElement(); //function
        }
コード例 #14
0
        public override void WriteXml(ref IaXmlWriter xml)
        {
            xml.WriteStartElement("function");
            xml.WriteAttribute("controlid", ControlId, true);

            xml.WriteStartElement("create_ictransaction");

            xml.WriteElement("transactiontype", TransactionDefinition, true);

            xml.WriteStartElement("datecreated");
            xml.WriteDateSplitElements(TransactionDate.Value, true);
            xml.WriteEndElement(); //datecreated

            xml.WriteElement("createdfrom", CreatedFrom);
            xml.WriteElement("documentno", DocumentNumber);
            xml.WriteElement("referenceno", ReferenceNumber);
            xml.WriteElement("message", Message);
            xml.WriteElement("externalid", ExternalId);
            xml.WriteElement("basecurr", BaseCurrency);

            xml.WriteCustomFieldsExplicit(CustomFields);

            xml.WriteElement("state", State);

            xml.WriteStartElement("ictransitems");
            if (Lines.Count > 0)
            {
                foreach (InventoryTransactionLineCreate line in Lines)
                {
                    line.WriteXml(ref xml);
                }
            }
            xml.WriteEndElement(); //ictransitems

            if (Subtotals.Count > 0)
            {
                xml.WriteStartElement("subtotals");
                foreach (TransactionSubtotalCreate subtotal in Subtotals)
                {
                    subtotal.WriteXml(ref xml);
                }
                xml.WriteEndElement(); //subtotals
            }

            xml.WriteEndElement(); //create_ictransaction

            xml.WriteEndElement(); //function
        }
コード例 #15
0
        public override void WriteXml(ref IaXmlWriter xml)
        {
            xml.WriteStartElement("function");
            xml.WriteAttribute("controlid", ControlId, true);

            xml.WriteStartElement("create_apadjustmentbatch");

            xml.WriteElement("batchtitle", Title, true);

            xml.WriteStartElement("datecreated");
            xml.WriteDateSplitElements(GlPostingDate);
            xml.WriteEndElement(); //datecreated

            xml.WriteEndElement(); //create_apadjustmentbatch

            xml.WriteEndElement(); //function
        }
コード例 #16
0
        public override void WriteXml(ref IaXmlWriter xml)
        {
            xml.WriteStartElement("function");
            xml.WriteAttribute("controlid", ControlId, true);

            xml.WriteStartElement("reverse_expensereport");

            xml.WriteAttribute("key", RecordNo);

            xml.WriteStartElement("datereversed");
            xml.WriteDateSplitElements(ReverseDate);
            xml.WriteEndElement(); //datereversed

            xml.WriteElement("description", Memo);

            xml.WriteEndElement(); //reverse_expensereport

            xml.WriteEndElement(); //function
        }
コード例 #17
0
        public override void WriteXml(ref IaXmlWriter xml)
        {
            xml.WriteStartElement("function");
            xml.WriteAttribute("controlid", ControlId, true);

            xml.WriteStartElement("reverse_cctransaction");

            xml.WriteAttribute("key", RecordNo, true);

            xml.WriteStartElement("datereversed");
            xml.WriteDateSplitElements(ReverseDate);
            xml.WriteEndElement(); //datereversed

            xml.WriteElement("memo", Memo);

            xml.WriteEndElement(); //reverse_cctransaction

            xml.WriteEndElement(); //function
        }
コード例 #18
0
        public override void WriteXml(ref IaXmlWriter xml)
        {
            xml.WriteStartElement("function");
            xml.WriteAttribute("controlid", ControlId, true);

            xml.WriteStartElement("create_expensereportbatch");

            xml.WriteElement("batchtitle", Title, true);

            if (GlPostingDate.HasValue)
            {
                xml.WriteStartElement("datecreated");
                xml.WriteDateSplitElements(GlPostingDate.Value);
                xml.WriteEndElement(); //datecreated
            }

            xml.WriteEndElement(); //create_expensereportbatch

            xml.WriteEndElement(); //function
        }
コード例 #19
0
        public override void WriteXml(ref IaXmlWriter xml)
        {
            xml.WriteStartElement("function");
            xml.WriteAttribute("controlid", ControlId, true);

            xml.WriteStartElement("create_billbatch");

            xml.WriteElement("batchtitle", Title, true);

            xml.WriteStartElement("datecreated");
            xml.WriteDateSplitElements(GlPostingDate);
            xml.WriteEndElement(); //datecreated

            /*if (count($this->getBills()) > 0) {
             *  foreach ($this->getBills() as $bill) {
             *      $bill->writeXml($xml);
             *  }
             * }*/

            xml.WriteEndElement(); //create_billbatch

            xml.WriteEndElement(); //function
        }
コード例 #20
0
        private new void WriteXmlMultiCurrencySection(ref IaXmlWriter xml)
        {
            xml.WriteElement("currency", TransactionCurrency);

            if (ExchangeRateDate.HasValue)
            {
                xml.WriteStartElement("exchratedate");
                xml.WriteDateSplitElements(ExchangeRateDate.Value);
                xml.WriteEndElement(); //exchratedate
            }
            if (!string.IsNullOrWhiteSpace(ExchangeRateType))
            {
                xml.WriteElement("exchratetype", ExchangeRateType);
            }
            else if (ExchangeRateValue.HasValue)
            {
                xml.WriteElement("exchrate", ExchangeRateValue);
            }
            else if (!string.IsNullOrWhiteSpace(BaseCurrency) || !string.IsNullOrWhiteSpace(TransactionCurrency))
            {
                xml.WriteElement("exchratetype", ExchangeRateType, true);
            }
        }
コード例 #21
0
        public override void WriteXml(ref IaXmlWriter xml)
        {
            xml.WriteStartElement("function");
            xml.WriteAttribute("controlid", ControlId, true);

            xml.WriteStartElement("update_sotransaction");
            if (!string.IsNullOrWhiteSpace(ExternalId))
            {
                xml.WriteAttribute("key", ExternalId);
                xml.WriteAttribute("externalkey", true);
            }
            else
            {
                xml.WriteAttribute("key", TransactionId);
            }

            if (DisableValidation == true)
            {
                xml.WriteAttribute("disablevalidation", true);
            }

            if (TransactionDate.HasValue)
            {
                xml.WriteStartElement("datecreated");
                xml.WriteDateSplitElements(TransactionDate.Value, true);
                xml.WriteEndElement(); //datecreated
            }

            if (GlPostingDate.HasValue)
            {
                xml.WriteStartElement("dateposted");
                xml.WriteDateSplitElements(GlPostingDate.Value);
                xml.WriteEndElement(); //dateposted
            }

            xml.WriteElement("referenceno", ReferenceNumber);
            xml.WriteElement("termname", PaymentTerm);

            if (DueDate.HasValue)
            {
                xml.WriteStartElement("datedue");
                xml.WriteDateSplitElements(DueDate.Value, true);
                xml.WriteEndElement(); //datedue
            }

            if (OriginalDocumentDate.HasValue)
            {
                xml.WriteStartElement("origdocdate");
                xml.WriteDateSplitElements(OriginalDocumentDate.Value, true);
                xml.WriteEndElement(); //origdocdate
            }

            xml.WriteElement("message", Message);
            xml.WriteElement("shippingmethod", ShippingMethod);

            if (!string.IsNullOrWhiteSpace(ShipToContactName))
            {
                xml.WriteStartElement("shipto");
                xml.WriteElement("contactname", ShipToContactName, true);
                xml.WriteEndElement(); //shipto
            }

            if (!string.IsNullOrWhiteSpace(BillToContactName))
            {
                xml.WriteStartElement("billto");
                xml.WriteElement("contactname", BillToContactName, true);
                xml.WriteEndElement(); //billto
            }

            xml.WriteElement("supdocid", AttachmentsId);

            xml.WriteElement("basecurr", BaseCurrency);
            xml.WriteElement("currency", TransactionCurrency);

            if (ExchangeRateDate.HasValue)
            {
                xml.WriteStartElement("exchratedate");
                xml.WriteDateSplitElements(ExchangeRateDate.Value);
                xml.WriteEndElement(); //exchratedate
            }
            if (!string.IsNullOrWhiteSpace(ExchangeRateType))
            {
                xml.WriteElement("exchratetype", ExchangeRateType);
            }
            else if (ExchangeRateValue.HasValue)
            {
                xml.WriteElement("exchrate", ExchangeRateValue);
            }
            else if (!string.IsNullOrWhiteSpace(BaseCurrency) || !string.IsNullOrWhiteSpace(TransactionCurrency))
            {
                xml.WriteElement("exchratetype", ExchangeRateType, true);
            }

            xml.WriteElement("vsoepricelist", VsoePriceList);

            xml.WriteCustomFieldsExplicit(CustomFields);

            xml.WriteElement("state", State);
            xml.WriteElement("projectid", ProjectId);

            if (Lines.Count > 0)
            {
                xml.WriteStartElement("updatesotransitems");
                foreach (AbstractOrderEntryTransactionLine line in Lines)
                {
                    line.WriteXml(ref xml);
                }
                xml.WriteEndElement(); //updatesotransitems
            }

            if (Subtotals.Count > 0)
            {
                xml.WriteStartElement("updatesubtotals");
                foreach (AbstractTransactionSubtotal subtotal in Subtotals)
                {
                    subtotal.WriteXml(ref xml);
                }
                xml.WriteEndElement(); //updatesubtotals
            }

            xml.WriteEndElement(); //update_sotransaction

            xml.WriteEndElement(); //function
        }
コード例 #22
0
        public override void WriteXml(ref IaXmlWriter xml)
        {
            xml.WriteStartElement("expenseadjustment");

            if (!string.IsNullOrWhiteSpace(ExpenseType))
            {
                xml.WriteElement("expensetype", ExpenseType, true);
            }
            else
            {
                xml.WriteElement("glaccountno", GlAccountNumber, true);
            }

            xml.WriteElement("amount", ReimbursementAmount, true);
            xml.WriteElement("currency", TransactionCurrency);
            xml.WriteElement("trx_amount", TransactionAmount);

            if (ExchangeRateDate.HasValue)
            {
                xml.WriteStartElement("exchratedate");
                xml.WriteDateSplitElements(ExchangeRateDate.Value, true);
                xml.WriteEndElement(); //exchratedate
            }

            if (!string.IsNullOrWhiteSpace(ExchangeRateType))
            {
                xml.WriteElement("exchratetype", ExchangeRateType);
            }
            else if (ExchangeRateValue.HasValue)
            {
                xml.WriteElement("exchrate", ExchangeRateValue.Value);
            }
            else if (!string.IsNullOrWhiteSpace(TransactionCurrency) || TransactionAmount.HasValue)
            {
                xml.WriteElement("exchratetype", ExchangeRateType, true);
            }

            if (ExpenseDate.HasValue)
            {
                xml.WriteStartElement("expensedate");
                xml.WriteDateSplitElements(ExpenseDate.Value, true);
                xml.WriteEndElement();  //expensedate
            }

            xml.WriteElement("memo", Memo);
            xml.WriteElement("locationid", LocationId);
            xml.WriteElement("departmentid", DepartmentId);
            xml.WriteElement("projectid", ProjectId);
            xml.WriteElement("customerid", CustomerId);
            xml.WriteElement("vendorid", VendorId);
            xml.WriteElement("employeeid", EmployeeId);
            xml.WriteElement("itemid", ItemId);
            xml.WriteElement("classid", ClassId);
            xml.WriteElement("contractid", ContractId);
            xml.WriteElement("warehouseid", WarehouseId);
            xml.WriteElement("billable", Billable);
            xml.WriteElement("exppmttype", PaymentTypeName);
            xml.WriteElement("quantity", Quantity);
            xml.WriteElement("rate", UnitRate);

            xml.WriteCustomFieldsExplicit(CustomFields);

            xml.WriteEndElement(); //expenseadjustment
        }
コード例 #23
0
        public override void WriteXml(ref IaXmlWriter xml)
        {
            xml.WriteStartElement("function");
            xml.WriteAttribute("controlid", ControlId, true);

            xml.WriteStartElement("update_potransaction");
            if (!string.IsNullOrWhiteSpace(ExternalId))
            {
                xml.WriteAttribute("key", ExternalId);
                xml.WriteAttribute("externalkey", true);
            }
            else
            {
                xml.WriteAttribute("key", DocumentId);
            }

            if (TransactionDate.HasValue)
            {
                xml.WriteStartElement("datecreated");
                xml.WriteDateSplitElements(TransactionDate.Value);
                xml.WriteEndElement(); //datecreated
            }

            if (GlPostingDate.HasValue)
            {
                xml.WriteStartElement("dateposted");
                xml.WriteDateSplitElements(GlPostingDate.Value);
                xml.WriteEndElement(); //dateposted
            }

            xml.WriteElement("referenceno", ReferenceNumber);
            xml.WriteElement("vendordocno", VendorDocNumber);
            xml.WriteElement("termname", PaymentTerm);

            if (DueDate.HasValue)
            {
                xml.WriteStartElement("datedue");
                xml.WriteDateSplitElements(DueDate.Value);
                xml.WriteEndElement(); //datedue
            }

            xml.WriteElement("message", Message);
            xml.WriteElement("shippingmethod", ShippingMethod);

            if (!string.IsNullOrWhiteSpace(ReturnToContactName))
            {
                xml.WriteStartElement("returnto");
                xml.WriteElement("contactname", ReturnToContactName);
                xml.WriteEndElement(); //returnto
            }

            if (!string.IsNullOrWhiteSpace(PayToContactName))
            {
                xml.WriteStartElement("payto");
                xml.WriteElement("contactname", PayToContactName);
                xml.WriteEndElement(); //payto
            }

            if (!string.IsNullOrWhiteSpace(DeliverToContactName))
            {
                xml.WriteStartElement("deliverto");
                xml.WriteElement("contactname", DeliverToContactName, true);
                xml.WriteEndElement(); //deliverto
            }

            xml.WriteElement("supdocid", AttachmentsId);
            xml.WriteElement("externalid", ExternalId);

            xml.WriteElement("basecurr", BaseCurrency);
            xml.WriteElement("currency", TransactionCurrency);

            if (ExchangeRateDate.HasValue)
            {
                xml.WriteStartElement("exchratedate");
                xml.WriteDateSplitElements(ExchangeRateDate.Value);
                xml.WriteEndElement(); //exchratedate
            }
            if (!string.IsNullOrWhiteSpace(ExchangeRateType))
            {
                xml.WriteElement("exchratetype", ExchangeRateType);
            }
            else if (ExchangeRateValue.HasValue)
            {
                xml.WriteElement("exchrate", ExchangeRateValue);
            }
            else if (!string.IsNullOrWhiteSpace(BaseCurrency) || !string.IsNullOrWhiteSpace(TransactionCurrency))
            {
                xml.WriteElement("exchratetype", ExchangeRateType, true);
            }

            xml.WriteCustomFieldsExplicit(CustomFields);

            xml.WriteElement("state", State);

            if (Lines.Count > 0)
            {
                xml.WriteStartElement("updatepotransitems");
                foreach (AbstractPurchasingTransactionLine line in Lines)
                {
                    line.WriteXml(ref xml);
                }
                xml.WriteEndElement(); //updatepotransitems
            }

            if (Subtotals.Count > 0)
            {
                xml.WriteStartElement("updatesubtotals");
                foreach (TransactionSubtotalUpdate subtotal in Subtotals)
                {
                    subtotal.WriteXml(ref xml);
                }
                xml.WriteEndElement(); //updatesubtotals
            }

            xml.WriteEndElement(); //update_potransaction

            xml.WriteEndElement(); //function
        }
コード例 #24
0
        public override void WriteXml(ref IaXmlWriter xml)
        {
            xml.WriteStartElement("sotransitem");

            xml.WriteElement("bundlenumber", BundleNumber);
            xml.WriteElement("itemid", ItemId, true);
            xml.WriteElement("itemdesc", ItemDescription);
            xml.WriteElement("taxable", Taxable);
            xml.WriteElement("warehouseid", WarehouseId);
            xml.WriteElement("quantity", Quantity, true);
            xml.WriteElement("unit", Unit);
            xml.WriteElement("linelevelsimpletaxtype", LineLevelSimpleTaxType);
            xml.WriteElement("discountpercent", DiscountPercent);
            xml.WriteElement("price", Price);
            xml.WriteElement("sourcelinekey", SourceLineRecordNo);
            xml.WriteElement("discsurchargememo", DiscountSurchargeMemo);
            xml.WriteElement("locationid", LocationId);
            xml.WriteElement("departmentid", DepartmentId);
            xml.WriteElement("memo", Memo);

            if (ItemDetails.Count > 0)
            {
                xml.WriteStartElement("itemdetails");
                foreach (AbstractTransactionItemDetail itemDetail in ItemDetails)
                {
                    itemDetail.WriteXml(ref xml);
                }
                xml.WriteEndElement(); //itemdetails
            }

            xml.WriteCustomFieldsExplicit(CustomFields);

            xml.WriteElement("revrectemplate", RevRecTemplate);

            if (RevRecStartDate.HasValue)
            {
                xml.WriteStartElement("revrecstartdate");
                xml.WriteDateSplitElements(RevRecStartDate.Value);
                xml.WriteEndElement(); //revrecstartdate
            }

            if (RevRecEndDate.HasValue)
            {
                xml.WriteStartElement("revrecenddate");
                xml.WriteDateSplitElements(RevRecEndDate.Value);
                xml.WriteEndElement(); //revrecenddate
            }

            xml.WriteElement("renewalmacro", RenewalMacro);
            xml.WriteElement("projectid", ProjectId);
            xml.WriteElement("customerid", CustomerId);
            xml.WriteElement("vendorid", VendorId);
            xml.WriteElement("employeeid", EmployeeId);
            xml.WriteElement("classid", ClassId);
            xml.WriteElement("contractid", ContractId);
            xml.WriteElement("fulfillmentstatus", FulfillmentStatus);
            xml.WriteElement("taskno", TaskNumber);
            xml.WriteElement("billingtemplate", BillingTemplate);

            xml.WriteElement("dropship", DropShip);

            if (!string.IsNullOrWhiteSpace(LineShipToContactName))
            {
                xml.WriteStartElement("shipto");
                xml.WriteElement("contactname", LineShipToContactName, true);
                xml.WriteEndElement(); //shipto
            }

            xml.WriteEndElement(); //sotransitem
        }
コード例 #25
0
        public override void WriteXml(ref IaXmlWriter xml)
        {
            xml.WriteStartElement("function");
            xml.WriteAttribute("controlid", ControlId, true);

            xml.WriteStartElement("update_invoice");
            if (!string.IsNullOrWhiteSpace(ExternalId))
            {
                xml.WriteAttribute("key", ExternalId);
                xml.WriteAttribute("externalkey", true);
            }
            else
            {
                xml.WriteAttribute("key", RecordNo);
            }

            xml.WriteElement("customerid", CustomerId);

            if (TransactionDate.HasValue)
            {
                xml.WriteStartElement("datecreated");
                xml.WriteDateSplitElements(TransactionDate.Value);
                xml.WriteEndElement(); //datecreated
            }

            if (GlPostingDate.HasValue)
            {
                xml.WriteStartElement("dateposted");
                xml.WriteDateSplitElements(GlPostingDate.Value);
                xml.WriteEndElement(); //dateposted
            }

            if (DueDate.HasValue)
            {
                xml.WriteStartElement("datedue");
                xml.WriteDateSplitElements(DueDate.Value);
                xml.WriteEndElement(); //datedue

                xml.WriteElement("termname", PaymentTerm);
            }
            else if (!string.IsNullOrWhiteSpace(PaymentTerm))
            {
                xml.WriteElement("termname", PaymentTerm, true);
            }

            xml.WriteElement("action", Action);
            xml.WriteElement("invoiceno", InvoiceNumber);
            xml.WriteElement("ponumber", ReferenceNumber);
            xml.WriteElement("description", Description);

            if (!string.IsNullOrWhiteSpace(BillToContactName))
            {
                xml.WriteStartElement("payto");
                xml.WriteElement("contactname", BillToContactName);
                xml.WriteEndElement(); //payto
            }
            if (!string.IsNullOrWhiteSpace(ShipToContactName))
            {
                xml.WriteStartElement("returnto");
                xml.WriteElement("contactname", ShipToContactName);
                xml.WriteEndElement(); //returnto
            }

            WriteXmlMultiCurrencySection(ref xml);

            xml.WriteElement("supdocid", AttachmentsId);

            xml.WriteCustomFieldsExplicit(CustomFields);

            if (Lines.Count > 0)
            {
                xml.WriteStartElement("updateinvoiceitems");
                foreach (AbstractInvoiceLine line in Lines)
                {
                    line.WriteXml(ref xml);
                }
                xml.WriteEndElement(); //updateinvoiceitems
            }

            xml.WriteEndElement(); //update_invoice

            xml.WriteEndElement(); //function
        }
コード例 #26
0
        public override void WriteXml(ref IaXmlWriter xml)
        {
            xml.WriteStartElement("function");
            xml.WriteAttribute("controlid", ControlId, true);

            xml.WriteStartElement("create_arpayment");

            xml.WriteElement("customerid", CustomerId, true);
            xml.WriteElement("paymentamount", TransactionPaymentAmount, true);
            xml.WriteElement("batchkey", SummaryRecordNo);
            xml.WriteElement("translatedamount", BasePaymentAmount);

            if (!string.IsNullOrWhiteSpace(UndepositedFundsGlAccountNo))
            {
                xml.WriteElement("undepfundsacct", UndepositedFundsGlAccountNo);
            }
            else
            {
                xml.WriteElement("bankaccountid", BankAccountId);
            }

            xml.WriteElement("refid", ReferenceNumber);

            xml.WriteElement("overpaylocid", OverpaymentLocationId);
            xml.WriteElement("overpaydeptid", OverpaymentDepartmentId);

            xml.WriteStartElement("datereceived");
            xml.WriteDateSplitElements(ReceivedDate.Value, true);
            xml.WriteEndElement(); //datereceived

            xml.WriteElement("paymentmethod", PaymentMethod, true);

            xml.WriteElement("basecurr", BaseCurrency);
            xml.WriteElement("currency", TransactionCurrency);

            if (ExchangeRateDate.HasValue)
            {
                xml.WriteStartElement("exchratedate");
                xml.WriteDateSplitElements(ExchangeRateDate.Value);
                xml.WriteEndElement(); //exchratedate
            }

            if (!string.IsNullOrWhiteSpace(ExchangeRateType))
            {
                xml.WriteElement("exchratetype", ExchangeRateType);
            }
            else if (ExchangeRateValue.HasValue)
            {
                xml.WriteElement("exchrate", ExchangeRateValue);
            }
            else if (!string.IsNullOrWhiteSpace(BaseCurrency) || !string.IsNullOrWhiteSpace(TransactionCurrency))
            {
                xml.WriteElement("exchratetype", ExchangeRateType, true);
            }

            xml.WriteElement("cctype", CreditCardType);
            xml.WriteElement("authcode", AuthorizationCode);

            if (ApplyToTransactions.Count > 0)
            {
                foreach (ArPaymentItem applyToTransaction in ApplyToTransactions)
                {
                    applyToTransaction.WriteXml(ref xml);
                }
            }

            // TODO online payment methods

            xml.WriteEndElement(); //create_arpayment

            xml.WriteEndElement(); //function
        }
コード例 #27
0
        public override void WriteXml(ref IaXmlWriter xml)
        {
            xml.WriteStartElement("function");
            xml.WriteAttribute("controlid", ControlId, true);

            xml.WriteStartElement("create_bill");

            xml.WriteElement("vendorid", VendorId, true);

            xml.WriteStartElement("datecreated");
            xml.WriteDateSplitElements(TransactionDate.Value);
            xml.WriteEndElement(); //datecreated

            if (GlPostingDate.HasValue)
            {
                xml.WriteStartElement("dateposted");
                xml.WriteDateSplitElements(GlPostingDate.Value);
                xml.WriteEndElement(); //dateposted
            }

            if (DueDate.HasValue)
            {
                xml.WriteStartElement("datedue");
                xml.WriteDateSplitElements(DueDate.Value);
                xml.WriteEndElement(); //datedue

                xml.WriteElement("termname", PaymentTerm);
            }
            else
            {
                xml.WriteElement("termname", PaymentTerm, true);
            }

            xml.WriteElement("action", Action);
            xml.WriteElement("batchkey", SummaryRecordNo);
            xml.WriteElement("billno", BillNumber);
            xml.WriteElement("ponumber", ReferenceNumber);
            xml.WriteElement("onhold", OnHold);
            xml.WriteElement("description", Description);
            xml.WriteElement("externalid", ExternalId);

            if (!String.IsNullOrWhiteSpace(PayToContactName))
            {
                xml.WriteStartElement("payto");
                xml.WriteElement("contactname", PayToContactName);
                xml.WriteEndElement(); //payto
            }
            if (!String.IsNullOrWhiteSpace(ReturnToContactName))
            {
                xml.WriteStartElement("returnto");
                xml.WriteElement("contactname", ReturnToContactName);
                xml.WriteEndElement(); //returnto
            }

            WriteXmlMultiCurrencySection(ref xml);

            xml.WriteElement("nogl", DoNotPostToGL);
            xml.WriteElement("supdocid", AttachmentsId);

            xml.WriteCustomFieldsExplicit(CustomFields);

            xml.WriteStartElement("billitems");
            if (Lines.Count > 0)
            {
                foreach (BillLineCreate Line in Lines)
                {
                    Line.WriteXml(ref xml);
                }
            }
            xml.WriteEndElement(); //billitems

            xml.WriteEndElement(); //create_bill

            xml.WriteEndElement(); //function
        }
コード例 #28
0
        public override void WriteXml(ref IaXmlWriter xml)
        {
            xml.WriteStartElement("function");
            xml.WriteAttribute("controlid", ControlId, true);

            xml.WriteStartElement("record_otherreceipt");

            xml.WriteStartElement("paymentdate");
            xml.WriteDateSplitElements(TransactionDate);
            xml.WriteEndElement(); //paymentdate

            xml.WriteElement("payee", Payer, true);

            xml.WriteStartElement("receiveddate");
            xml.WriteDateSplitElements(ReceiptDate);
            xml.WriteEndElement(); //receiveddate

            xml.WriteElement("paymentmethod", PaymentMethod, true);

            if (!string.IsNullOrWhiteSpace(BankAccountId) || DepositDate.HasValue)
            {
                xml.WriteElement("bankaccountid", BankAccountId, true);
                if (DepositDate.HasValue)
                {
                    xml.WriteStartElement("depositdate");
                    xml.WriteDateSplitElements(DepositDate.Value);
                    xml.WriteEndElement(); //depositdate
                }
            }
            else
            {
                xml.WriteElement("undepglaccountno", UndepositedFundsGlAccountNo, true);
            }

            xml.WriteElement("refid", TransactionNo);
            xml.WriteElement("description", Description);
            xml.WriteElement("supdocid", AttachmentsId);
            xml.WriteElement("currency", TransactionCurrency);

            if (ExchangeRateValue.HasValue)
            {
                xml.WriteElement("exchrate", ExchangeRateValue);
            }
            else if (ExchangeRateDate.HasValue || !string.IsNullOrWhiteSpace(ExchangeRateType))
            {
                if (ExchangeRateDate.HasValue)
                {
                    xml.WriteStartElement("exchratedate");
                    xml.WriteDateSplitElements(ExchangeRateDate.Value);
                    xml.WriteEndElement(); //exchratedate
                }
                xml.WriteElement("exchratetype", ExchangeRateType, true);
            }

            xml.WriteCustomFieldsExplicit(CustomFields);

            xml.WriteStartElement("receiptitems");
            if (Lines.Count > 0)
            {
                foreach (OtherReceiptLineCreate line in Lines)
                {
                    line.WriteXml(ref xml);
                }
            }

            xml.WriteEndElement(); //receiptitems
            xml.WriteEndElement(); //record_otherreceipt

            xml.WriteEndElement(); //function
        }