Question: My Client wants to generate a code for every ticket number that goes into database based on the financial year they are working (April current year to March next year) and number needs to reset to 0 where the financial year changes

Example:

```
ID
17/18/0000001
17/18/0000002
... 
18/19/0000001
18/19/0000002
...

```

[![enter image description here](https://i.stack.imgur.com/kmsqc.png)](https://i.stack.imgur.com/kmsqc.png)

If the financial year is stored in database like starting an ending month and year. How we can check that this is the next year broda! reset the numbers.

Answer: 
```
   var creds = {"name":model.email,"password" : model.password};

```

You need to pass the data like this.

```
   this.http.post('http://sample.sample.com/api/authenticate', JSON.stringify(creds), {headers: headers}).subscribe(data => {

```
you need to enable CORS on Server/in your API, this error occurs when CORS is not enabled.