PwsExpenseType

Overview


This structure represents the fields associated with an expense type. This structure is intended to provide information about expense types in support of expense entry (creation and maintenance of cost cards).

Format


PwsExpenseType
  • PwsExpenseType
    • ExpenseTypeId: Int32
    • ExpenseTypeName: String (50)
    • ExpenseTypeUid: Int64
    • DefaultUnitCost: Double
    • DefaultUnitPrice: Double
    • ExpenseEntryInstructions: String (1000)
    • HardCostFlag: Boolean
    • MileageFlag: Boolean
    • ReceiptRequiredFlag: Boolean
    • SoftCostFlag: Boolean
    • TreatCostsAsPassthroughFlag: Boolean
    • Udf1Treatment: String
    • Udf2Treatment: String
    • UnitDrivenFlag: Boolean
    • UnitPluralName: String
    • UnitSingularName: String
    • VendorInvoiceCostFlag: Boolean
    • DescriptionRequiredFlag: Boolean
    • ExpenseTypeGroupIdentity: PwsExpenseTypeGroupRef
    • SubcontractorInvoiceFlag: Boolean
    • DefaultMarkupPercentage: Double
    • InactiveFlag: Boolean
    • UnitDrivenPricingFlag: Boolean
    • LockUnitCostFlag: Boolean

Elements


Element

Data Type

Description

Sample Data

ExpenseTypeId

Int32

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


ExpenseTypeName

String (50)

The expense type name is a unique identifier for an expense type.

Hotel

ExpenseTypeUid

Int64

A unique and immutable identifier for an expense type.

1152921504606878414

DefaultUnitCost

Double

The default cost per unit (for unit based expense types only).


DefaultUnitPrice

Double

The default price per unit (for unit based expense types only).


ExpenseEntryInstructions

String (1000)

The expense entry instructions for the expense type.


HardCostFlag

Boolean

If set to 'true', the expense type is enabled for expense reports.

true

MileageFlag

Boolean

If set to 'true', the expense type is mileage based.

false

ReceiptRequiredFlag

Boolean

If set to 'true', receipts are required for expenses logged against this expense type.

false

SoftCostFlag

Boolean

If set to 'true', the expense type is enabled for soft costs.

true

TreatCostsAsPassthroughFlag

Boolean

If set to 'true', expenses logged against this expense type are treated as passthrough expenses.

false

Udf1Treatment

String

User Defined Field Treatement for the first cost card UDF. See below for a discussion of UDF treatments.

N

Udf2Treatment

String

User Defined Field Treatement for the second cost card UDF. See below for a discussion of UDF treatments.

N

UnitDrivenFlag

Boolean

If set to 'true', the expense type is unit based.

false

UnitPluralName

String

The plural name for a unit based expense type (i.e. widgets).


UnitSingularName

String

The singular name for a unit based expense type (i.e. widget).


VendorInvoiceCostFlag

Boolean

If set to 'true', the expense type is enabled for vendor invoices.


DescriptionRequiredFlag

Boolean

If set to 'true', descriptions are required for expenses logged against this expense type.


ExpenseTypeGroupIdentity

PwsExpenseTypeGroupRef

The expense type group this expense type resides under.


SubcontractorInvoiceFlag

Boolean

If set to 'true', the expense type is enabled for subcontractor invoices.

false

DefaultMarkupPercentage

Double

The default mark up percentage that will be applied to expenses entered against this expense type.

0

InactiveFlag

Boolean

If set to 'true', this expense type is marked as inactive.

false

UnitDrivenPricingFlag

Boolean

If set to 'true', the expense type's pricing is unit based.

false

LockUnitCostFlag

Boolean

If set to 'true', the expense type's pricing is unit based and the unit cost is locked during expense entry.

false


UDF Treatment

The UDF treatment for a UDF determines whether the user defined field is required, optional or not available.

A value of 'R' indicates that the user defined field is required. It is possible that an existing cost card will have no value for a UDF even though the cost card's expense type indicates that the UDF value should be required. This can come about by modifying the UDF treatment setting for an expense type after a cost card has been created with the expense type. In this case, if you attempt to update the cost card via web services, the absence of the UDF value will not cause the update to fail. However, if you attempt to insert a new cost card with a missing value for the UDF, or clear the UDF value on an existing cost card that has a value for the UDF, it will result in failure. Yes/no UDFs never have a UDF treatment of 'R', as a missing value for a yes/no UDF is considered equivalent to a value of 'no'. Therefore, by their nature the value cannot be missing.

A value of 'A' indicates that the user defined field is available (but optional). This means that the UDF value is supported, but it is allowable for the value to missing. Therefore, web services that retrieve cost cards may return no value for the UDF, and web services that update cost cards will allow the caller to remove the value of the UDF.

A value of 'N' indicates that the user defined field is not available. In other words, the user defined field does not apply for the expense type. Again, it is possible that a cost card of this expense type will have a defined value for such a UDF. That value will continue to be returned by web services that retrieve cost cards, and web services that update cost cards will allow the caller to either leave the existing value unchanged or clear the existing value. However, attempts to change the value (to a different, non-null value) will fail.

Usage Example(s)


Example 01
               <a:PwsExpenseType>
                  <ExpenseTypeId i:nil="true" xmlns="http://projectorpsa.com/DataContracts/Shared/Common/"/>
                  <ExpenseTypeName xmlns="http://projectorpsa.com/DataContracts/Shared/Common/">Hotel</ExpenseTypeName>
                  <ExpenseTypeUid xmlns="http://projectorpsa.com/DataContracts/Shared/Common/">1152921504606878414</ExpenseTypeUid>
                  <a:DefaultUnitCost i:nil="true"/>
                  <a:DefaultUnitPrice i:nil="true"/>
                  <a:ExpenseEntryInstructions i:nil="true"/>
                  <a:HardCostFlag>true</a:HardCostFlag>
                  <a:MileageFlag>false</a:MileageFlag>
                  <a:ReceiptRequiredFlag>false</a:ReceiptRequiredFlag>
                  <a:SoftCostFlag>true</a:SoftCostFlag>
                  <a:TreatCostsAsPassthroughFlag>false</a:TreatCostsAsPassthroughFlag>
                  <a:Udf1Treatment>N</a:Udf1Treatment>
                  <a:Udf2Treatment>N</a:Udf2Treatment>
                  <a:UnitDrivenFlag>false</a:UnitDrivenFlag>
                  <a:UnitPluralName i:nil="true"/>
                  <a:UnitSingularName i:nil="true"/>
                  <a:VendorInvoiceCostFlag>true</a:VendorInvoiceCostFlag>
                  <a:DescriptionRequiredFlag>true</a:DescriptionRequiredFlag>
                  <a:ExpenseTypeGroupIdentity xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/">
                     <b:ExpenseTypeGroupId i:nil="true"/>
                     <b:ExpenseTypeGroupName>Travel</b:ExpenseTypeGroupName>
                     <b:ExpenseTypeGroupUid>1152921504606849219</b:ExpenseTypeGroupUid>
                  </a:ExpenseTypeGroupIdentity>
                  <a:SubcontractorInvoiceFlag>false</a:SubcontractorInvoiceFlag>
                  <a:DefaultMarkupPercentage>0</a:DefaultMarkupPercentage>
                  <a:InactiveFlag>false</a:InactiveFlag>
                  <a:UnitDrivenPricingFlag>false</a:UnitDrivenPricingFlag>
                  <a:LockUnitCostFlag>false</a:LockUnitCostFlag>
               </a:PwsExpenseType>