Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview


This web service inserts or updates a single expense document based on a detailed expense document structure (PwsExpenseDocumentDetail). The service returns the identity (PwsClientRef) of the client that has been inserted or updated. The caller can optionally request that the full client detail (PwsClientElement) be included in the response.

...

Panel
titlePwsSaveExpenseDocument Request
  • PwsSaveExpenseDocument
    • serviceRequest: PwsSaveExpenseDocumentRq

Request Elements


Element

Data Type

Required?

Default

Description

Sample Data

RequestId

Int32

No


Click here for more information.


SessionTicket

String

Yes


Click here for more information.

AfzlAZe2idqL1YMlz4UgWg==

AdministratorComments

String (4000)

No


Administrator comments to be stored with the expense document upon save


ApproverIdentities

PwsUserRef

No


Projector users who have the ability to approve this expense document


DeleteCostCards

PwsCostCardRef

No


Key fields identifying the cost cards that should be deleted from the expense document


DeleteReceipts

PwsReceiptRef

No


Key fields identifying the receipts that should be deleted from the expense documents


ExcludeCreditCostCardsFlag

Boolean

No

true

If set to 'true', credit cost cards will be excluded from the expense document

true

ExpenseDocument

PwsExpenseDocumentDetail

On Insert: Yes

On Update: No


The detailed expense document information to be inserted or updated


ExpenseDocumentIdentity

PwsExpenseDocumentRef

On Insert: No

On Update: Yes


The unique keys used to identify the expense document


FullDetailFlag

Boolean

No

false

If set to 'true', include full detailed expense document element in response

true

InsertReceiptsIfNotFoundOnUpdateFlag

Boolean

No

false

If set to 'true' and an existing expense document is being updated, receipts identified in this web service will be inserted

false

ResourceIdentity

PwsResourceRef

On Insert: Yes (for expense documents only)

On Update: No


The resource associated with the expense document


RetrieveCostCardsFlag

Boolean

No

false

If set to 'true', the cost cards on the referenced expense document will be included in the response

true

RetrieveReceiptsFlag

Boolean

No

false

If set to 'true', the receipts on the referenced expense document will be included in the response

true

SaveCostCards

PwsCostCardDetail

No


The detailed cost card information for the cost card(s) to be inserted or updated


SaveReceipts

PwsReceiptDetail

No


The detailed receipt information for the reciept(s) to be inserted or updated


SendNotificationEmailFlag

Boolean

No

false

If set to 'true', a notification email will be sent to all the users who are able to approve the expense document

true

SubmissionComments

String (4000)

No


The comments that will be sent to the approvers upon submission

Submitted

SubmitFlag

Boolean

No

false

If set to 'true', all the cost cards on the expense document will be submitted

true

UpdateReceiptsIfFoundOnInsertFlag

Boolean

deprecated


** This field has been deprecated

true

ExpenseDocumentTimestamp

String

No


This is a Base64 encoded timestamp utilized for expense document locking. To protect against overwriting other changes, you may optionally echo back the timestamp returned by a call to PwsSaveExpenseDocument (or a prior call to PwsSaveExpenseDocument). This will cause the request to fail if any change has been made between invocations of PwsGetExpenseDocument and PwsSaveExpenseDocument.


PreserveCostCardStatusFlag

Boolean

deprecated


** This field has been deprecated


Request Usage Example(s)


Code Block
languagexml
titleExample 01
collapsetrue
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pws="http://projectorpsa.com/PwsProjectorServices/" xmlns:req="http://projectorpsa.com/DataContracts/Requests/" xmlns:tim="http://projectorpsa.com/DataContracts/Shared/TimeAndCost/" xmlns:com="http://projectorpsa.com/DataContracts/Shared/Common/">
   <soapenv:Header/>
   <soapenv:Body>
      <pws:PwsSaveExpenseDocument>
         <pws:serviceRequest>
            <req:SessionTicket>AcdrvYuS1YjvT27fonW7Cw==</req:SessionTicket>
            <tim:ExcludeCreditCostCardsFlag>true</tim:ExcludeCreditCostCardsFlag>
            <tim:ExpenseDocument>
               <tim:CashAdvanceReturnAmount>1.00</tim:CashAdvanceReturnAmount>
               <tim:DocumentName>Expense Document A</tim:DocumentName>
               <tim:DocumentType>E</tim:DocumentType>
               <tim:LocationIdentity>
                  <com:LocationName>USA</com:LocationName>
               </tim:LocationIdentity>
               <tim:ResourceIdentity>
                  <com:ResourceReferenceSystemId>E125</com:ResourceReferenceSystemId>
               </tim:ResourceIdentity>
               <tim:VendorIdentity>
                  <com:VendorNumber>Beth Brown</com:VendorNumber>
               </tim:VendorIdentity>
               <tim:Vendor>
                  <com:VendorNumber>Beth Brown</com:VendorNumber>
                  <com:ExpenseReportPayeeFlag>true</com:ExpenseReportPayeeFlag>
                  <com:InactiveFlag>false</com:InactiveFlag>
                  <com:ResourceVendorFlag>true</com:ResourceVendorFlag>
                  <com:VendorInvoicePayeeFlag>false</com:VendorInvoicePayeeFlag>
                  <com:SubcontractorInvoicePayeeFlag>false</com:SubcontractorInvoicePayeeFlag>
               </tim:Vendor>
               <tim:SubcontractorInvoiceReferenceNumberClearFlag>false</tim:SubcontractorInvoiceReferenceNumberClearFlag>
               <tim:VendorInvoiceReferenceNumberClearFlag>false</tim:VendorInvoiceReferenceNumberClearFlag>
            </tim:ExpenseDocument>
            <tim:FullDetailFlag>true</tim:FullDetailFlag>
            <tim:InsertReceiptsIfNotFoundOnUpdateFlag>false</tim:InsertReceiptsIfNotFoundOnUpdateFlag>
            <tim:ResourceIdentity>
               <com:ResourceReferenceSystemId>E125</com:ResourceReferenceSystemId>
            </tim:ResourceIdentity>
            <tim:RetrieveCostCardsFlag>false</tim:RetrieveCostCardsFlag>
            <tim:RetrieveReceiptsFlag>false</tim:RetrieveReceiptsFlag>
            <tim:SaveCostCards>
               <tim:PwsCostCardDetail>
                  <tim:Description>Breakfast</tim:Description>
                  <tim:DescriptionClearFlag>false</tim:DescriptionClearFlag>
                  <tim:ExpenseTypeIdentity>
                     <com:ExpenseTypeName>Meals</com:ExpenseTypeName>
                  </tim:ExpenseTypeIdentity>
                  <tim:IncurredAmount>7.99</tim:IncurredAmount>
                  <tim:IncurredDate>2018-02-06T00:00:00.000Z</tim:IncurredDate>
                  <tim:IncurredOpsCurrencyIdentity>
                     <com:OpsCurrencyCode>USD</com:OpsCurrencyCode>
                  </tim:IncurredOpsCurrencyIdentity>
                  <tim:IncurredVatAmount>0</tim:IncurredVatAmount>
                  <tim:LocationClearFlag>false</tim:LocationClearFlag>
                  <tim:LocationIdentity>
                     <com:LocationName>USA</com:LocationName>
                  </tim:LocationIdentity>
                  <tim:NonBillableFlag>false</tim:NonBillableFlag>
                  <tim:OverrideClientAmountClearFlag>false</tim:OverrideClientAmountClearFlag>
                  <tim:PayeeVendorClearFlag>false</tim:PayeeVendorClearFlag>
                  <tim:PayeeVendorIdentity>
                     <com:VendorNumber>Beth Brown</com:VendorNumber>
                  </tim:PayeeVendorIdentity>
                  <tim:ProjectIdentity>
                     <com:ProjectCode>P001407-001</com:ProjectCode>
                  </tim:ProjectIdentity>
                  <tim:ResourceClearFlag>false</tim:ResourceClearFlag>
                  <tim:ResourceIdentity>
                     <com:ResourceReferenceSystemId>E125</com:ResourceReferenceSystemId>
                  </tim:ResourceIdentity>
                  <tim:TotalAmountDisbursedCurrency>7.99</tim:TotalAmountDisbursedCurrency>
                  <tim:Udf1ClearFlag>false</tim:Udf1ClearFlag>
                  <tim:Udf2ClearFlag>false</tim:Udf2ClearFlag>
                  <tim:ExternalGroupingIdentifierClearFlag>false</tim:ExternalGroupingIdentifierClearFlag>
               </tim:PwsCostCardDetail>
            </tim:SaveCostCards>
            <tim:SendNotificationEmailFlag>true</tim:SendNotificationEmailFlag>
            <tim:SubmissionComments>Submitted</tim:SubmissionComments>
            <tim:SubmitFlag>true</tim:SubmitFlag>
         </pws:serviceRequest>
      </pws:PwsSaveExpenseDocument>
   </soapenv:Body>
</soapenv:Envelope>

...

ErrorNumber

ErrorCode

ErrorText

137

CostCardDescriptionTruncated

The specified cost card description exceeded the maximum length of 4000 characters and was truncated.

138

ExpenseDocumentNameTruncated

The specified expense document name exceeded the maximum length of 50 characters and was truncated.

19001CostCardErrorsOne or more cost cards could not be saved. The expense document was not created. Check CostCardResults for specific errors.
19004ExpenseDocumentNotSpecifiedForRetrieveNo expense document was specified for retrieval.
19015ExpenseDocumentNotSpecifiedForSaveNo expense document was specified for saving.
19021ExpenseDocumentOrDisbursingCostCenterRequiredMust specify either an expense document or a disbursing cost center for retrieving approvers.
19034InvalidValueForExpenseDocumentTypeThe value specified for expense document type is invalid. Value values are E for Expense Report, V for Vendor Invoice and S for Soft Card Batch.
19039ExpenseDocumentNotSpecifiedForSaveReceiptExpense document identity is required.
19073ExpenseDocumentIdentityRequiredAn expense document identity must be specified.
65195ReceiptsMayNotBeAssociatedWithEntireExpenseDocumentAccount is configured not to allow receipts to be attached to an entire expense document.
65196ReceiptsMayNotBeAssociatedWithIndividualCostCardsAccount is configured not to allow receipts to be attached to individual cost cards.
65197NoPermissionToSubmitOneOrMoreCostCardsYou do not have permission to submit one or more cost cards.
65468SpecifiedReceiptDoesNotBelogToSpecifiedExpenseDocumentReceipt/expense document mismatch
65470SpecifiedCostCardDoesNotBelongToSpecifiedExpenseDocumentCost card/expense document mismatch
65476FullyApprovedExpenseDocumentsMayNotBeUpdatedExpense document is fully approved and can no longer be modified
65481CannotRemoveLockedReceiptReceipt is locked and cannot be removed
65487LocationInactiveOrNotEnabledForCostCardsSpecified location is inactive or not enabled for cost cards.
65489CostCardRefInvalidCostCardRef is required
65491CostCardNotFoundCostCard not found
65492ExpenseDocumentRefInvalidExpenseDocumentRef is required
65494ExpenseDocumentNotFoundExpense document not found
65495ExpenseDocumentHasBeenUpdatedByAnotherUserExpense document has been changed.
65502ReceiptRefInvalidReceiptRef is required
65504ReceiptNotFoundReceipt not found
65506MemoryNotSupportForThisTypeOfExpenseDocumentMemory is supported only for expense report expense documents
65547DisbursingCostCenterMayNotBeChangedOnExistingExpenseDocumentsDisbursing cost center may not be changed on existing expense documents
65554DocumentNumberIsRequiredForNewExpenseDocumentsDocument number is required for new expense documents because account is configured to use manual expense document numbering (document type =%s)
65556SpecifiedExpenseDocumentNumberAlreadyInUseSpecified document number already in use
65562EntireExpenseReportFlagIsRequiredForNewReceiptsEntire expense report flag is required when attaching a new receipt
65563ReceiptMayNotBeTransferredBetweenExpenseDocumentsReceipt may not be transferred between expense documents
65564ReceiptMayNotBeAssociatedWithADifferentDocumentReceipt may not be associated with a different document
65565SpecifiedReceiptHasBeenDeletedSpecified receipt has been deleted
65567ReceiptsCannotBeAddedOrUpdatedForExpenseDocumentExpense document is locked for addition/update of receipts associated with entire document
65568DocumentNotFoundInUserReceiptPoolFolderDocument not found in user receipt pool folder
65570LockedReceiptCannotBeModifiedReceipt is locked and cannot be modified
65572ReceiptsAttachedToLockedCostCardCannotBeChangedOrRemovedCost card is locked, and receipts associated with it cannot be changed or removed
65610RemainingCashAdvanceExceedsTotalOfFreeResourcePaidCostCardsThe remaining cash advance amount (the portion of the cash advance amount not already allocated to payment vouchers) may not exceed the total disbursed amount among all cost cards on this expense document not already on payment vouchers.
65622CannotCreateSubcontractorInvoiceCardsChangedUnable to create subcontractor invoice because one or more included time cards has changed.
65630GivenCurrencyNotSameAsReportCurrencyThe specified currency does not match the expense document's disbursed currency.
65648SpecifiedDocumentNotOfSpecifiedTypeSpecified document type and expense document do not match.
65649DisbCostCenterDiffersFromEdCostCenterThe specified disbursing cost center and expense document do not match.
65650ExpDocOrCostCtrReqdForViScEither an expense document or cost center must be specified for vendor invoices and soft cost batches.
65651ExpDocOrRrscReqdForExpenseReportEither expense document or resource must be specified for expense reports.
65745SpecifiedSubcontractorInvoiceNumberAlreadyInUseSpecified expense document number is already in use.
65761DuplicateExpenseDocumentSpecifiedDuplicate expense document specified.
65764NoPermissionToSaveCostCardYou do not have permission to save this cost card.
65765InvalidValueForOverrideClientAmountOverride client amount cannot be set to a non-zero amount for expense report or subcontractor invoice cost cards.
65766CannotChangeResourceForSiCostCardsResource cannot be changed on subcontractor invoice cost cards.
65767VendorExpenseReportCompanyMismatchVendor cost center and expense report cost center must be in the same company.
65772SubcontractorInvoiceDateMustBeSpecifiedSubcontractor invoice date must be specified on subcontractor invoices.
65773SubcontractorInvoiceDateCannotBeSpecifiedSubcontractor invoice date may only be specified on subcontractor invoices.
65774SubcontractorInvoiceReferenceNumberCannotBeSpecifiedSubcontractor invoice reference number may only be specified on subcontractor invoices.
65775CanOnlyAssociatedExpenseReportsWithResourceOnly expense report expense documents can be associated with a resource.
65776ExpenseReportResourceCannotBeChangedAn expense report resource cannot be changed after expense document creation.
65777ExpenseReportVendorCannotBeChangedVendor cannot be changed on existing expense reports.
65778SubcontractorInvoiceVendorCannotBeChangedVendor cannot be changed on existing subcontractor invoices.
65779SubcontractorInvoiceVendorMustBeSpecifiedVendor must be specified for new subcontractor invoices.
65780SpecifiedSubcontractorInvoiceVendorInvalidVendor on subcontractor invoice must be enabled as a subcontractor invoice payee.
65781ExpenseReportResourceVendorMismatchVendor on expense report must match the resource expense report vendor.
65782SpecifiedExpenseReportVendorInvalidVendor on expense report must be enabled as an expense report payee.
65783SpecifiedExpenseDocumentVendorInvalidVendor is inactive.
65784ExpenseReportPayeeVendorCostCenterMismatchNon-resource payee expense report cost center, if specified, must match payee vendor cost center.
65785SubcontractorInvoiceVendorCostCenterMismatchSubcontractor invoice cost center, if specified, must match vendor cost center.
65786NoPermissionToMaintainReceiptsYou do not have permission to maintain receipts on this expense document.
65787NoPermissionToViewCostCardYou do not have permission to view this cost card.
65788CannotRetrieveReceiptsWithoutCostCardsCannot retrieve receipts without cost cards.
65796SiCostsCannotBeChangedToPassthroughCosts on subcontractor invoices cannot be changed to a passthrough expense type.
65797AtLeastOneCardNotFromSpecifiedExpenseDocumentAt least one cost card is not from specified expense document.
65798VatAmountMayNotExceedTotalAmountOnDacVAT amount may not exceed total amount.
65799DisbursedAndVatAmountsDifferingSignsBase amount and VAT amount must have the same sign.
65800DisbursedAndClientAmountsDifferingSignsBase amount and client amount must have the same sign.
65801VatAmountMayNotExceedTotalAmountOnSaveVAT amount may not exceed total amount.
65802CostCardMarkupPercentageOutOfRangeMarkup percentage may not be less than -100%.
65803DisbursedAndClientAmountsDifferingSignsOnWcAdjustment would create one or more cost cards with disbursed and client amounts with opposing signs.
65804SubcontractorInvoiceExpectedSpecified expense document is not a subcontractor invoice.
65805NoPermissionToMaintainSubcontractorInvoiceYou do not have permission to maintain this subcontractor invoice.
65819ResourceMayOnlyBeSpecifiedForExpenseReportsA resource identity may only be specified when retrieving approvers for an expense report.
65820ExpenseDocumentRefOrResourceRefRequiredForExpenseReportsPlease specify either an expense document identity or a resource identity, or both. When retrieving approvers for an expense report.
65821CannotSpecifyOverrideClientAmountOnSubcontractorInvoiceCostsOverride client amount cannot be specified for subcontractor invoice cost cards.
65822VendorsInvoiceNumberAlreadyInUseSpecified vendor's invoice number is already in use.
65824PassthroughExpensesNotAllowedOnSubcontractorInvoicesPass-through expense types cannot be used on subcontractor invoices.
65825VATAmountAndTotalAmountSignMismatchVAT and total amounts in incurred and disbursed currencies must all share a common sign.
65826OverrideClientAmountAndDisbursedAmountSignMismatchOverride client and base amounts must share a common sign.
65827CannotUnsubmitCostCardApClosedThis cost card cannot be unsubmitted because its accounting period is closed.