Create other costs for an agreement line item - Intergraph Smart Materials - Help - Hexagon

Intergraph Smart Materials Web API Help (10.6)

ft:locale
en-US
Product
Intergraph Smart Materials
Subproduct
Web API
Search by Category
Help
Smart Materials/Smart Reference Data Version
10.6

This API creates other costs details for an agreement line item present in a specified project of Smart Materials.

This API supports only the following agreement types:

  • Manual PO

  • Agreement by Requisition

  • Agreement by Inquiry

  • Sub Contracts

Required Privilege: API_AGREEMENT

Headers

Header Name

Description

Required

Values

Authorization

Access token

Required

Bearer <access_token>

Content-Type

Request type format

Required

application/JSON

Body

POST http://localhost:65116/smat/v1/Projects(‘:project')/Disciplines(‘:discipline')/Nls(':language’)/PurchaseOrders({key1})/LineItems({key2})/UsedOtherCosts

Specify values for the project, discipline, language, and key parameters in the URL. The project, discipline, and language together, define the project environment. The key1 parameter defines the purchase order ID (PohId) and key2 defines the line item ID (PoliId).

Element

Description

Type

Required

Notes

OtherCostCode

Name of the other cost.

String

Required

AccountCode

Name of the account code.

String

Optional

EvalCostInd

Indicates whether the other cost is an evaluation cost or not. Allowed values are Y and N, and the default value is N.

Evaluation costs are not considered while calculating the Total Costs of an agreement and cannot be modified.

String

Optional

ProgressPayCostInd

Indicates whether this other cost must be provided for Total Material Cost in Prog Pay Events or not. Allowed values are Y and N, and the default value is Y.

String

Optional

DiscountableInd

Indicates whether the other cost is discountable or not. Allowed values are Y and N.

You can use this element only, if the discount base is Discount% at agreement level and OcPercent, CostValueTotal have positive values.

String

Optional

OcPercent

Refers to other cost percentage.

If OcPercent is provided, CostValuePerUnit, CostValueTotal and UnitCode cannot be modified. Cost Value Total is calculated and UnitCode of the agreement is automatically added.

Depending on the setting of the project default ZP_OC_DP the percentage will be applied to the discounted price (ZP_OC_DP = 'Y', default) or to the extended price (ZP_OC_DP = 'N') of an agreement line item.

  • If project default ZP_CODELTA has been set to 'Y' the discounted price and the extended price for the changed quantity will be used for the calculation.

  • To apply a discount, you should give a negative value as percentage. However, discount can only be applied, if the project default ZP_OC_DISC is set to Y. If set to N, negative values are not allowed as percentage.

  • Discount can be either defined by Discount% or Discount Amount in Other Costs.

  • If discounts are entered on Other Costs level, Discount% and Discount Amount cannot be modified of the line item.

  • If discounts are entered using fields Discount% or Discount Amount for a line item, then discounts can not be defined on Other Costs.

Decimal

Optional

CostValuePerUnit

Cost value per unit.

Decimal

Optional

CostValueTotal

Total value of the other cost.

  • You cannot modify CostValueTotal, if the OcPercent or CostValuePerUnit is provided.

  • If the project default ZP_NEG_OC is set Y, then only negative values are allowed for the CostValueTotal.

  • You cannot provide negative values, if the Discount% or Discount Amount is defined on agreement level.

Decimal

Optional

UnitCode

Refers to the currency of the other cost.

  • Default value is given by the currency of the agreement line item which can be modified. However, you cannot modify it, if the OcPercent value is provided, and the currency of the agreement line item is also available.

String

Optional

TaxableInd

Indicates whether the assigned other cost is taxable or not. Allowed values are Y and N. The default value is defined by the value of the project default ZP_DEF_TAX.

String

Optional

ShortDesc

Short description of the other costs.

String

Optional

Description

Description of the other costs.

String

Optional

Sample Body

POST http://localhost:53609/smat/v1/Projects('AB')/Disciplines('PIPING')/Nls('English')/PurchaseOrders(10000140514)/LineItems(10000723089)/UsedOtherCosts

{

    "OtherCostCode": "LINE21",

    "AccountCode": null,

    "EvalCostInd": "N",

    "ProgressPayCostInd": "Y",

    "DiscountableInd": "N",

    "OcPercent": 10,

    "CostValuePerUnit": 0,

    "CostValueTotal": 0,

    "UnitCode": "USD",

    "TaxableInd": "Y",

    "ShortDesc": null,

    "Description": null

}

Success Response

Status Code: 201 Created

{

    "@odata.context": "http://localhost:57101/SMAT/V1/$metadata#Collection(Com.Ingr.Smat.V1.PoliOtherCosts)",

    "UocId": 10000716037,

    "OcId": 10000006970,

    "ProjId": "AB",

    "DpId": 5020,

    "PohId": 10000140514,

    "PoliId": 10000723089,

    "OtherCostCode": "LINE21",

    "PoSupp": 3,

    "AccountCode": null,

    "EvalCostInd": "N",

    "ProgressPayCostInd": "Y",

    "DiscountableInd": "N",

    "OcPercent": 10,

    "CostValuePerUnit": 0,

    "CostValueTotal": 10,

    "UnitCode": "USD",

    "TaxableInd": "Y",

    "ShortDesc": null,

    "Description": null,

    "ChangedCostValTot": 0,

    "CostValTotToSup": 10

}

Element

Description

Type

UocId

Unique ID of the used other costs which is a part of an agreement.

Integer

OcId

Unique ID of the other costs.

Integer

ProjId

Unique ID of the project where the other cost details got created.

String

DpId

Unique ID of the discipline where the other cost details got created.

Integer

PohId

Unique ID of the purchase order

Integer

PoliId

Unique ID of the purchase order line items

Integer

PoSupp

Supplement number of the purchase order.

Integer

ChangedCostValTot

Refers to the difference between the previous and the actual costs. Only in the case of a changed agreement line item, the value can differ from 0 (zero).

Decimal

CostValTotToSup

Refers to the total cost value up to this supplement i.e. it contains the total costs of this supplement along with all the previous supplements.

Decimal