PwsExpenseDocumentDetail

Overview


This structure contains the complete set of information about an expense document. The structure is used both to retrieve detailed expense document information and to pass information about an expense document back to the server to get updated.

Format


PwsExpenseDocumentDetail
  • PwsExpenseDocumentDetail
    • DocumentNumber: String (50)
    • ExpenseDocumentId: Int32
    • ExpenseDocumentUid: Int64
    • CashAdvanceReturnAmount: Double
    • CostCenterIdentity: PwsCostCenterRef
    • DocumentName: String (100)
    • DocumentType: String (1)
    • LocationIdentity: PwsLocationRef
    • ResourceIdentity: PwsResourceRef
    • VendorIdentity: PwsVendorRef
    • VendorInvoiceDate: DateTime
    • VendorInvoiceReferenceNumber: String (20)
    • Vendor: PwsVendorSummary
    • SubcontractorInvoiceDate: DateTime
    • SubcontractorInvoiceReferenceNumber: String (20)
    • NewDocumentNumber: String (50)
    • SubcontractorInvoiceReferenceNumberClearFlag: Boolean
    • Timestamp: String
    • VendorInvoiceReferenceNumberClearFlag: Boolean

Elements


Element

Data Type

Required?

Default

Description

Sample Data

DocumentNumber

String (50)

One of DocumentNumber or ExpenseDocumentUid is required


The expense document number is a unique identifier for an expense document.

ER00697

ExpenseDocumentId

Int32

No


The expense document Id is a unique identifier for an expense document. For internal use only. 


ExpenseDocumentUid

Int64

See Document Number


The expense document Uid is a unique and immutable identifier for an expense document.

1152921504607683544

CashAdvanceReturnAmount

Double

On Insert: No

On Update: No


The cash advance associated with the expense document. Applies for expense reports.

1

CostCenterIdentity

PwsCostCenterRef

On Insert: Yes

On Update: No


The cost center associated with the expense document. The cost center cannot be updated on an existing expense document. If specified on update, it must match the existing cost center.


DocumentName

String (100)

On Insert: Yes

On Update: No


The expense document name.

Expense Document A

DocumentType

String (1)

On Insert: Yes

On Update: No


The expense document type:

"E" for Expense Report

"C" for Subcontractor Invoice

"V" for Vendor Invoice

"S" for Soft Cost Batch

The type of an expense document cannot be changed once the document is completed. If specified on update, it must match the existing document type.

E

LocationIdentity

PwsLocationRef

On Insert: No

On Update: No


The unique keys identifying the location associated with the expense document's resource. Applies to expense reports. This is ignored when inserting or updating expense documents.


ResourceIdentity

PwsResourceRef

On Insert: Yes (if the expense document type is "E" for expense report or "C" for Subcontractor Invoice)

On Update: No


The unique keys identifying the resource associated with the expense document. Applies to expense reports.


VendorIdentity

PwsVendorRef

On Insert: Yes (if applicable to document type)

On Update: No


The unique keys identifying the vendor associated with the expense document. Applies to expense reports, vendor invoices and subcontractor invoices. The vendor associated with an expense document cannot be modified after the expense document is created. If specified on update, the specified vendor must match the existing vendor.


VendorInvoiceDate

DateTime

On Insert: No

On Update: No


The vendor invoice date associated with the expense document. Applies to vendor invoices.


VendorInvoiceReferenceNumber

String (20)

On Insert: No

On Update: No


The vendor invoice reference number is a unique identifier for a vendor. Applies to vendor invoices.


Vendor

PwsVendorSummary

On Insert: No

On Update: No


Additional information about the vendor associated with the expense document. This is ignored when inserting or updating expense documents.


SubcontractorInvoiceDate

DateTime

On Insert: No

On Update: No


The subcontractor invoice date associated with the expense document. Applies to subcontractor invoices.


SubcontractorInvoiceReferenceNumber

String (20)

On Insert: No

On Update: No


The subcontractor invoice reference number is a unique identifier for a subcontractor invoice. Applies to subcontractor invoices.


NewDocumentNumber

String (50)

On Insert: No

On Update: No


The new expense document number. This is used by PwsSaveExpenseDocument to support changing an existing expense document number. You can both identify an expense document by expense document number and modify the expense document by specifying the original number in DocumentNumber and the new value in NewDocumentNumber. NewDocumentNumber will always be null in responses from PwsGetExpenseDocument.

On Insert, if both a DocumentNumber and NewDocumentNumber are specified, the NewDocumentNumber will take precedence.

Note: that the expense document number may only be changed if numbering for expense documents is configured as Manual or Hybrid.


SubcontractorInvoiceReferenceNumberClearFlag

Boolean

On Insert: No

On Update: No

false

If set to 'true', the subcontractor invoice reference number will be set to null.

false

Timestamp

String

On Insert: No

On Update: No


Base64 encoded timestamp.

AAAAAA62H/Q=

VendorInvoiceReferenceNumberClearFlag

Boolean

On Insert: No

On Update: No

false

If set to 'true', the vendor invoice reference number will be set to null.

false

Usage Example(s)


Example 01
                <a:ExpenseDocumentDetail>
                  <DocumentNumber xmlns="http://projectorpsa.com/DataContracts/Shared/Common/">ER00697</DocumentNumber>
                  <ExpenseDocumentId i:nil="true" xmlns="http://projectorpsa.com/DataContracts/Shared/Common/"/>
                  <ExpenseDocumentUid xmlns="http://projectorpsa.com/DataContracts/Shared/Common/">1152921504607683544</ExpenseDocumentUid>
                  <a:CashAdvanceReturnAmount>1</a:CashAdvanceReturnAmount>
                  <a:CostCenterIdentity xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/">
                     <b:CostCenterId i:nil="true"/>
                     <b:CostCenterName>Section B</b:CostCenterName>
                     <b:CostCenterNumber>Section B</b:CostCenterNumber>
                     <b:CostCenterUid>1152921504606884477</b:CostCenterUid>
                  </a:CostCenterIdentity>
                  <a:DocumentName>Expense Document A</a:DocumentName>
                  <a:DocumentType>E</a:DocumentType>
                  <a:LocationIdentity xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/">
                     <b:LocationId i:nil="true"/>
                     <b:LocationName>USA</b:LocationName>
                     <b:LocationUid>1152921504606855985</b:LocationUid>
                  </a:LocationIdentity>
                  <a:ResourceIdentity xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/">
                     <b:ResourceDisplayName>Beth Brown</b:ResourceDisplayName>
                     <b:ResourceId i:nil="true"/>
                     <b:ResourceReferenceSystemId>E125</b:ResourceReferenceSystemId>
                     <b:ResourceUid>1152921504607111786</b:ResourceUid>
                  </a:ResourceIdentity>
                  <a:VendorIdentity xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/">
                     <b:VendorId i:nil="true"/>
                     <b:VendorName>Beth Brown</b:VendorName>
                     <b:VendorUid>1152921504607055834</b:VendorUid>
                     <b:VendorNumber>Beth Brown</b:VendorNumber>
                  </a:VendorIdentity>
                  <a:VendorInvoiceDate i:nil="true"/>
                  <a:VendorInvoiceReferenceNumber i:nil="true"/>
                  <a:Vendor xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/">
                     <b:VendorId i:nil="true"/>
                     <b:VendorName>Beth Brown</b:VendorName>
                     <b:VendorUid>1152921504607055834</b:VendorUid>
                     <b:VendorNumber>Beth Brown</b:VendorNumber>
                     <b:ExpenseReportPayeeFlag>true</b:ExpenseReportPayeeFlag>
                     <b:InactiveFlag>false</b:InactiveFlag>
                     <b:ResourceVendorFlag>true</b:ResourceVendorFlag>
                     <b:VendorInvoicePayeeFlag>false</b:VendorInvoicePayeeFlag>
                     <b:SubcontractorInvoicePayeeFlag>true</b:SubcontractorInvoicePayeeFlag>
                  </a:Vendor>
                  <a:SubcontractorInvoiceDate i:nil="true"/>
                  <a:SubcontractorInvoiceReferenceNumber i:nil="true"/>
                  <a:NewDocumentNumber i:nil="true"/>
                  <a:SubcontractorInvoiceReferenceNumberClearFlag>false</a:SubcontractorInvoiceReferenceNumberClearFlag>
                  <a:Timestamp>AAAAAA62H/Q=</a:Timestamp>
                  <a:VendorInvoiceReferenceNumberClearFlag>false</a:VendorInvoiceReferenceNumberClearFlag>
               </a:ExpenseDocumentDetail>