# BillInfo

```csharp
public class BillInfoDto
{
    public Guid UUID { get; set; }
    public Guid TemplateUUID { get; set; }
    public string TemplateBase64String { get; set; }
    public string BillSerieOrNumber { get; set; }
    public DateTime IssueDate { get; set; } 
    public string CurrencyCode { get; set; }
    public decimal? ExchangeRate { get; set; }
    public RelatedDocument RelatedDocument { get; set; }
    public ValidityPeriod ValidityPeriod { get; set; }
}
```

### UUID

<mark style="color:blue;">`Guid`</mark>  <mark style="color:orange;">`Seçimli`</mark>

> GUID is a unique number used to track receipts.

```javascript
Bill.BillInfo.UUID = 'b8787efb-639d-4efc-85b5-953bf1dbaac0';
```

{% hint style="info" %}
If the field is left empty, a new UUID will be added to the receipt by the system.
{% endhint %}

### TemplateUUID

<mark style="color:blue;">`Guid`</mark>  <mark style="color:orange;">`Seçimli`</mark>

> This field is used for the UUID of the XSLT that will be added to the invoice. The XSLT corresponding to this UUID is added to the invoice.

```javascript
Bill.BillInfo.TemplateUUID = '94e8b735-1361-4d6f-a4a6-3745b62239c8';
```

{% hint style="info" %}

* If the TemplateUUID field is filled and the TemplateBase64String field is empty, the design corresponding to the entered TemplateUUID information will be added to the order.
* If the TemplateBase64String field is filled, the TemplateBase64String information will be added as the order design regardless of the TemplateUUID field.
* If the TemplateUUID and TemplateBase64String fields are left empty, the default design will be added to the order.
  {% endhint %}

### TemplateBase64String

<mark style="color:blue;">`string`</mark>  <mark style="color:orange;">`Seçimli`</mark>

> The Base64 version of the design to be added to the receipt is inserted here.

{% hint style="info" %}

* If the TemplateUUID field is filled and the TemplateBase64String field is empty, the design corresponding to the entered TemplateUUID information will be added to the receipt.
* If the TemplateBase64String field is filled, the TemplateBase64String information will be added as the receipt design regardless of the TemplateUUID field.
* If the TemplateUUID and TemplateBase64String fields are left empty, the default design will be added to the receipt.
  {% endhint %}

### BillSerieOrNumber

<mark style="color:blue;">`string`</mark>  <mark style="color:red;">`Zorunlu`</mark>

> You can enter the 16-digit e-receipt number and the 3-digit serial number in this field. If you enter the 16-digit receipt number, no action will be taken; the value you entered will be used as the receipt number. If you enter the 3-digit serial number, a number will be generated from that serial number defined on the portal.

```javascript
//Manuel Adisyon Numarası
Bill.BillInfo.BillSerieOrNumber = "EAD2023000000001";

//Seri Bilgisi
Bill.BillInfo.BillSerieOrNumber= "EAD";
```

{% hint style="info" %}
The EAD series registered in the portal is automatically assigned the next number.
{% endhint %}

### IssueDate

<mark style="color:blue;">`DateTime`</mark>  <mark style="color:red;">`Zorunlu`</mark>

> The date and time of the bill are entered in this field.

```javascript
Bill.BillInfo.IssueDate = "2023-03-22T10:20:39.846Z";
```

### CurrencyCode

<mark style="color:blue;">`string`</mark>  <mark style="color:red;">`Zorunlu`</mark>

> This field is where the currency of the receipt is entered. The available values ​​are listed under Currency Codes in the code lists section.

```javascript
Bill.BillInfo.CurrencyCode = "TRY";
```

### ExchangeRate

<mark style="color:blue;">`string`</mark>  <mark style="color:orange;">`Seçimli`</mark>

> This field is where the exchange rate is entered if the receipt is issued in a currency other than Turkish Lira. The exchange rate information will be displayed on the receipt.

### RelatedDocument

<mark style="color:blue;">`string`</mark>  <mark style="color:red;">`Zorunlu`</mark>

Upon completion of the service, the universal unique identification number (ETTN) of the e-Invoice or e-Archive Invoice to be issued, or the device registration number of the POS device used to issue the retail sales receipt, will be entered into the Code field.

```csharp
public class RelatedDocument
    {
        public RelatedDocumentType Type { get; set; }
        public string Code { get; set; }
    }
```

> The `RelatedDocumentType` object is of type `Enum`. If the device registration number of the POS terminal is entered in the `Code` field, `SALES_RECEIPT` will be entered. If `ETTN` is entered in the `Code` field, this field specifies the type of invoice issued. It can take the values ​​`eInvoice` or `ear Archive_Invoice`.

```csharp
public enum RelatedDocumentType
{ 
     EFATURA = 1,
     EARSIV_FATURA = 2,
     SATIS_FISI = 3
}
```

```javascript
Bill.BillInfo.RelatedDocument.Code= "b8787efb-639d-4efc-85b5-953bf1dbaac0";
```

```javascript
Bill.BillInfo.RelatedDocument.Type = "EFATURA";
```

### ValidityPeriod

<mark style="color:blue;">`string`</mark>  <mark style="color:red;">`Zorunlu`</mark>

> The e-receipt document contains the service duration. It includes the date and time the table was first used and the date and time it was closed.

```csharp
public class ValidityPeriod
    {
        public DateTime StartDate { get; set; }
        public DateTime EndDate { get; set; }
    }
```

```javascript
Bill.BillInfo.ValidityPeriod.StartDate = "2023-03-22T10:20:39.846Z";
```

```javascript
Bill.BillInfo.ValidityPeriod.EndDate = "2023-03-22T12:00:00.200Z";
```
