# CreateProjectItem

#### Description

Create **billing request**. Billing request is used as a source for creating new invoice. That invoice can be created manually from Billing Invoices, using Draft Invoice generation or using one-off function CreateInvoicesFromItems.

#### Important Parameters

<table border="1" id="bkmrk-amount-unit-price-to" style="border-collapse: collapse; width: 100%; height: 103px;"><tbody><tr style="height: 29px;"><td style="width: 50%; height: 29px;">amount</td><td style="width: 50%; height: 29px;">Unit price to be charged</td></tr><tr style="height: 45px;"><td style="width: 50%; height: 45px;">billingDate</td><td style="width: 50%; height: 45px;">Date, in which the Billing Request will become valid for invoicing.</td></tr><tr style="height: 29px;"><td style="width: 50%; height: 29px;">billingStatus</td><td style="width: 50%; height: 29px;">0 .. Sales Items (representing Deal Value)

1 .. Pending

2 .. For Approval (Sales Order may be generated here)

3 .. Approved by manager (Invoice may be generated here, only users with Authorize rights to project may approve billing items)

4 .. Billed  
5 .. Approved by client

6 .. Postponed

7 .. Canceled

<span style="color: #ff0000;">999 .. Installed technology project items // will be canceled</span>

</td></tr><tr><td style="width: 50%;">type</td><td style="width: 50%;">1 .. sales items or billing items

2 .. auto-generated time sheet item

3 .. installed technology

</td></tr><tr><td style="width: 50%;">catalogPrice</td><td style="width: 50%;">Price before any discounts (also referred as Recommended Price, Price List Price, ...). The original price, from which discount is calculated.

</td></tr><tr><td style="width: 50%;">item</td><td style="width: 50%;">Product ID

</td></tr><tr><td style="width: 50%;">name</td><td style="width: 50%;">Main title of the Billing Request

</td></tr><tr><td style="width: 50%;">note</td><td style="width: 50%;">Description of Billing Request

</td></tr><tr><td style="width: 50%;">purchasePrice</td><td style="width: 50%;">Unit price for which the goods is purchased

</td></tr><tr><td style="width: 50%;">quantity</td><td style="width: 50%;">Pcs to be charged per Unit Price

</td></tr><tr><td style="width: 50%;">folder</td><td style="width: 50%;">Customer folder ID

</td></tr><tr><td style="width: 50%;">totalAmount</td><td style="width: 50%;">qty \* amount

</td></tr><tr><td style="width: 50%;">totalAmountWithVat</td><td style="width: 50%;">totalAmount + VAT

</td></tr><tr><td style="width: 50%;">vatValue</td><td style="width: 50%;">VAT rate in numbers

</td></tr><tr><td style="width: 50%;">ratio</td><td style="width: 50%;">fixed value (100) = 100% (used only in sales opportunity/deal to evaluate probability of the item in the sales basket)

</td></tr><tr><td style="width: 50%;">project</td><td style="width: 50%;">Project ID, where the Billing Request will be created.

</td></tr></tbody></table>

#### Request Example

#### CreateProjectItem (item.wsdl) Request

```XML
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsdl="http://atollon.com/enterprise/wsdl">
   <soapenv:Header/>
   <soapenv:Body>
      <wsdl:CreateProjectItem>
         <server>acme</server>
         <session>6A941A9BC9EBEFAF585A4B936AA958755B1C85E2BD04</session>     
         <ITEM>
           <amount>1234</amount>
           <billingDate>2020-05-14T00:00:00</billingDate>
           <billingStatus>3</billingStatus>
           <totalQuantity>5</totalQuantity>
           <catalogPrice>190</catalogPrice>
           <currency>CZK</currency>
           <item>133629101</item>
           <name>AAA Batteries</name>
           <project>139704101</project>
           <purchasePrice>130</purchasePrice>
           <quantity>5</quantity>
           <totalAmount>6170</totalAmount>
           <totalAmountWithVat>6787</totalAmountWithVat>
           <vatValue>10</vatValue>
           <ratio>100</ratio>
      </ITEM>
      </wsdl:CreateProjectItem>
   </soapenv:Body>
</soapenv:Envelope>
```

#### CreateProjectItem Response

```XML
<ns0:Envelope xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://atollon.com/enterprise/wsdl">
   <ns0:Body>
      <ns1:CreateProjectItemResponse>
         <result>OK</result>
         <time>0.01379299</time>
         <count>0</count>
         <itemId>139721101</itemId>
      </ns1:CreateProjectItemResponse>
   </ns0:Body>
</ns0:Envelope>
```