---
# System prepended metadata

title: Untitled

---

Scenario : Privalia users must timesheet only on Spain and common charging codes
 
 Given fnd_testing company is <Company.CompanyId>
 And I have <ChargingCodes_Company>
 And the actual period is open
 When this user timesheet
|<taskId>|<task_status>|<chargingCode_status>|<chargingCode_projectCode>|<employeeCompanyId>|<checkStatus>|
|308     |active       |active               |FR0007364                 |10                 |fail         |
|308     |active       |active               |FR0007364                 |3                  |Success      |

    

Company Table :

| CompanyId (PK)  | CompanyName |
| --------        | --------    |
| 10              | Privalia    |
| 20              | Privalia    |
| 26              | Privalia    |
| 12              | Vente Exclusive    |
| 3               | VENTE-PRIVEE.COM    |
| 4               | Vente-privee.com IT B.V    |
    
    

ChargingCodes_Company Table :

| CompanyId (FK) | ProjectCode | 
| --------       | -------- | 
| 10             | ES     | 
| 10             | AD     | 
| 20             | ES     | 
| 20             | AD     | 
| 26             | ES     | 
| 26             | AD     | 
| 12             | BE     | 
| 12             | AD     | 
| 3              | FR     | 
| 3              | AD     |  
| 4              | FR     | 
| 4              | AD     |   
    
Tasks_chargingCodes Table :
    
| TaskId (FK) | ChargingCodeId* (FK) | Percentage |   
| --------       | -------- | -------- |     
| 300             | 45     | 100 |
| 302             | 48     | 100 |
| 306             | 50     | 100 |
| 308             | 52     | 50 |
| 308             | 53     | 50 |


ChargingCode Table :
    
|ChargingCodeId* (PK) | CodeName | ProjectCode |
| -------- | -------- |-------- |  
| 45     |   Holiday | AD ADMINISTRATION |  
| 48     |   Development | ES0007364 | 
| 50     |   Development | BE0007364 |
| 52     |   Development | FR0007364 | 
| 53     |   Development | FR0007356 | 

    
* Not real, simplification made for the example.
    
Scenario Outline: ES user must not timesheet in charging codes from other countries
 Given fnd_testing country is <employeeCompanyCountry> user
 And the actual period is open
 When timesheet
|<task>|<task_status>|<chargingCode_status>|<chargingCode_country>|<employeeCompanyCountry>|<checkStatus>|

And I execute check “ES” employee must timesheet in “ES” active charging codes
 Then the check status must be successful

Examples:

 
|task|task_status|chargingCode_status|chargingCode_country|employeeCompanyCountry|checkStatus|
|Foundation - VPTRM - Steering projects|active|active|ES|ES|success|
|Foundation - VPTRM - Steering projects|active|active|ES|BE|fail|
|Foundation - VPTRM - Steering projects|active|active|BE|ES|fail|
|Foundation - VPTRM - Steering projects|active|active|BE|BE|success|
|Foundation - VPTRM - Steering projects|active|inactive|ES|ES|fail|
|Foundation - VPTRM - Steering projects|active|inactive|ES|BE|fail|
|Foundation - VPTRM - Steering projects|active|inactive|BE|ES|fail|
|Foundation - VPTRM - Steering projects|active|inactive|BE|BE|fail|
|Foundation - VPTRM - Steering projects|inactive|active|ES|ES|fail|
|Foundation - VPTRM - Steering projects|inactive|active|ES|BE|fail|
|Foundation - VPTRM - Steering projects|inactive|active|BE|ES|fail|
|Foundation - VPTRM - Steering projects|inactive|active|BE|BE|fail|
|Foundation - VPTRM - Steering projects|inactive|inactive|ES|ES|fail|
|Foundation - VPTRM - Steering projects|inactive|inactive|ES|BE|fail|
|Foundation - VPTRM - Steering projects|inactive|inactive|BE|ES|fail|
|Foundation - VPTRM - Steering projects|inactive|inactive|BE|BE|fail|