[
  {
    "metadata": {},
    "data": [
      {
        "code": "IMCSN",
        "label": "Alimentation Droit Nuit",
        "concise": "Alim CSN",
        "type": "PREVISIONAL",
        "isActive": true,
        "saveResult": true,
        "period": {
          "calculationFrequency": "DAILY",
          "dailyEvaluation": false,
          "timeSlotCalculation": true,
          "firstStartTimeSlot": "18:00",
          "firstEndTimeSlot": "22:00",
          "secondStartTimeSlot": "26:00",
          "secondEndTimeSlot": "30:00"
        }
      },
      {
        "code": "IMDCE",
        "label": "Alimentation Droit CE",
        "concise": "Alim DCE",
        "type": "PREVISIONAL",
        "isActive": true,
        "saveResult": true,
        "calculationOrder": 0,
        "timeGroups": [
          "G0"
        ],
        "customFieldValues": [
          {
            "label": "CATÉGORIE",
            "value": "PNMNS,PNMS"
          },
          {
            "label": "ÉQUIPE-PN",
            "value": "PNSE,PNSS,PNSRP,PNSAS,PNNMT,PNNES,PNNAD"
          }
        ],
        "comment": "Cet onglet contient un champ initialement vide permettant d’indiquer l’objectif du compteur ainsi que les éventuelles modifications apportées.",
        "period": {
          "calculationFrequency": "COUNTER_CYCLE",
          "cycleCode": "PNMH1",
          "startDateCycle": "2024-03-05",
          "dailyEvaluation": false,
          "timeSlotCalculation": false
        },
        "schedule": {
          "maxTimeSlot": 1,
          "useDayFilter": false
        },
        "right": {
          "code": "DCPP",
          "operation": "ADD_RIGHT",
          "financialYear": 0,
          "createIfNotExist": true,
          "creationDateOption": "RIGHT_SETTINGS"
        }
      },
      {
        "code": "IMCPP",
        "label": "Alimentation Droit CPP",
        "concise": "Alim DCPP",
        "type": "PREVISIONAL",
        "isActive": true,
        "saveResult": true,
        "calculationOrder": 0,
        "timeGroups": [
          "G0"
        ],
        "customFieldValues": [
          {
            "label": "CATÉGORIE",
            "value": "PNMNS"
          },
          {
            "label": "ÉQUIPE-PN",
            "value": "PNSS,PNNAD,PNNMT,PNSE"
          }
        ],
        "comment": "Cet onglet contient un champ initialement vide permettant d’indiquer l’objectif du compteur ainsi que les éventuelles modifications apportées.",
        "schedule": {
          "maxTimeSlot": 2,
          "useDayFilter": true,
          "dayTypes": [
            "WORKED",
            "HOLIDAY",
            "EXCEPTIONAL_HOLIDAY"
          ],
          "days": [
            "MONDAY",
            "TUESDAY",
            "WEDNESDAY",
            "THURSDAY",
            "FRIDAY"
          ],
          "scheduleTypes": [
            "DAY",
            "NIGHT",
            "REST"
          ],
          "resourcePresence": "PRESENT"
        },
        "period": {
          "calculationFrequency": "DAILY",
          "calendarCode": "PNMCAL",
          "startPeriod": "-01,+02",
          "endPeriod": "+01,+05",
          "dailyEvaluation": false,
          "timeSlotCalculation": false
        },
        "right": {
          "code": "DCPP",
          "operation": "ADD_RIGHT",
          "financialYear": 0,
          "createIfNotExist": true,
          "creationDateOption": "RIGHT_SETTINGS"
        }
      },
      {
        "code": "IMCPE",
        "label": "Écrase Droit CPE",
        "concise": "Écrase DCPE",
        "type": "PREVISIONAL",
        "isActive": true,
        "saveResult": true,
        "calculationOrder": 0,
        "timeGroups": [
          "G0"
        ],
        "customFieldValues": [
          {
            "label": "CATÉGORIE",
            "value": "PNMS"
          },
          {
            "label": "ÉQUIPE-PN",
            "value": "PNNAD,PNNES,PNNMT,PNSAS,PNSE"
          }
        ],
        "comment": "Cet onglet contient un champ initialement vide permettant d’indiquer l’objectif du compteur ainsi que les éventuelles modifications apportées.",
        "schedule": {
          "maxTimeSlot": 3,
          "useDayFilter": true,
          "dayTypes": [
            "WORKED",
            "HOLIDAY"
          ],
          "days": [
            "MONDAY",
            "TUESDAY",
            "WEDNESDAY",
            "THURSDAY",
            "FRIDAY"
          ],
          "scheduleTypes": [
            "DAY",
            "NIGHT",
            "REST"
          ],
          "resourcePresence": "PRESENT"
        },
        "period": {
          "calculationFrequency": "WEEKLY",
          "calendarCode": "PNMCAL",
          "dailyEvaluation": true,
          "timeSlotCalculation": false
        },
        "right": {
          "code": "DCPE",
          "operation": "OVERWRITE_RIGHT",
          "financialYear": 1,
          "createIfNotExist": true,
          "creationDateOption": "COUNTER_DATE"
        }
      },
      {
        "code": "IMCSF",
        "label": "Raz Droit CSF",
        "concise": "Raz DCSF",
        "type": "PREVISIONAL",
        "isActive": true,
        "saveResult": true,
        "calculationOrder": 0,
        "timeGroups": [
          "G0"
        ],
        "comment": "comment",
        "schedule": {
          "maxTimeSlot": 4,
          "useDayFilter": false
        },
        "period": {
          "calculationFrequency": "PERIODIC",
          "calendarCode": "PNMCAL",
          "dailyEvaluation": false,
          "timeSlotCalculation": false
        },
        "right": {
          "code": "DCSF",
          "operation": "RESET",
          "financialYear": 1,
          "createIfNotExist": true,
          "creationDateOption": "CUSTOM_DATE",
          "customDate": "15/03"
        }
      },
      {
        "code": "MUL01",
        "label": "PNM FORMULE01",
        "concise": "PNM-FOR01",
        "type": "PREVISIONAL",
        "isActive": true,
        "saveResult": true,
        "period": {
          "calculationFrequency": "DAILY",
          "calendarCode": "PNMCAL",
          "startPeriod": "-01,+02",
          "endPeriod": "+01,+05",
          "dailyEvaluation": false,
          "timeSlotCalculation": false
        },
        "formulaLines": [
          {
            "instruction": {
              "type": "COMMENT",
              "comment": "Objectif du compteur MUL01"
            }
          },
          {
            "instruction": {
              "type": "IF",
              "enabled": true,
              "firstOperand": {
                "operandItem": "ABSENCE",
                "value": "ABS ABSENCE JOUR"
              },
              "operator": "EQUAL",
              "secondOperand": {
                "operandItem": "ABSENCE",
                "value": "AAP ABSENCE AUTORISEE PAYEE"
              }
            }
          },
          {
            "instruction": {
              "type": "THEN",
              "enabled": true,
              "firstOperand": {
                "operandItem": "CONSTANT",
                "value": "8"
              },
              "result": {
                "item": "VARIABLE",
                "value": "V-1 VARIABLE-1"
              }
            }
          },
          {
            "instruction": {
              "type": "CALCULATION",
              "enabled": true,
              "firstOperand": {
                "operandItem": "CONSTANT",
                "value": "6"
              },
              "result": {
                "item": "VARIABLE",
                "value": "V-2 VARIABLE-2"
              }
            }
          },
          {
            "instruction": {
              "type": "COMMENT",
              "comment": "Modifications apportées au compteur MUL01"
            }
          },
          {
            "instruction": {
              "type": "OTHERWISE",
              "enabled": true,
              "firstOperand": {
                "operandItem": "CONSTANT",
                "value": "4"
              },
              "result": {
                "item": "VARIABLE",
                "value": "V-1 VARIABLE-1"
              }
            }
          },
          {
            "instruction": {
              "type": "CALCULATION",
              "enabled": true,
              "firstOperand": {
                "operandItem": "VARIABLE",
                "value": "V-2 VARIABLE-2"
              },
              "operator": "PLUS",
              "secondOperand": {
                "operandItem": "CONSTANT",
                "value": 2
              }
            }
          },
          {
            "instruction": {
              "type": "ENDIF",
              "enabled": true
            }
          },
          {
            "instruction": {
              "type": "CALCULATION",
              "enabled": true,
              "firstOperand": {
                "operandItem": "VARIABLE",
                "value": "V-1 VARIABLE-1"
              },
              "operator": "PLUS",
              "secondOperand": {
                "operandItem": "VARIABLE",
                "value": "V-2 VARIABLE-2"
              },
              "result": {
                "item": "VARIABLE",
                "value": "V-5 RESULTAT"
              }
            }
          },
          {
            "instruction": {
              "type": "END",
              "enabled": true
            }
          }
        ]
      },
      {
        "code": "MUL02",
        "label": "PNM FORMULE02",
        "concise": "PNM-FOR02",
        "type": "PREVISIONAL",
        "isActive": true,
        "saveResult": true,
        "period": {
          "calculationFrequency": "DAILY",
          "calendarCode": "PNMCAL",
          "startPeriod": "-01,+02",
          "endPeriod": "+01,+05",
          "dailyEvaluation": false,
          "timeSlotCalculation": false
        },
        "formulaLines": [
          {
            "instruction": {
              "type": "COMMENT",
              "comment": "Objectif du compteur MUL02"
            }
          },
          {
            "instruction": {
              "type": "IF",
              "enabled": true,
              "firstOperand": {
                "operandItem": "FUNCTION",
                "value": "F11 Nb Fériés période"
              },
              "operator": "EQUAL",
              "secondOperand": {
                "operandItem": "CONSTANT",
                "value": 0
              }
            }
          },
          {
            "instruction": {
              "type": "AND",
              "enabled": true,
              "firstOperand": {
                "operandItem": "FUNCTION",
                "value": "F41 Jusqu'à date sortie"
              },
              "operator": "EQUAL",
              "secondOperand": {
                "operandItem": "CONSTANT",
                "value": "0"
              }
            }
          },
          {
            "instruction": {
              "type": "END",
              "enabled": true
            }
          },
          {
            "instruction": {
              "type": "ENDIF",
              "enabled": true
            }
          },
          {
            "instruction": {
              "type": "CALCULATION",
              "enabled": true,
              "firstOperand": {
                "operandItem": "CONSTANT",
                "value": 1
              },
              "result": {
                "item": "VARIABLE",
                "value": "V-5 RESULTAT"
              }
            }
          }
        ]
      },
      {
        "code": "MUL03",
        "label": "PNM FORMULE03",
        "concise": "PNM-FOR03",
        "type": "PREVISIONAL",
        "isActive": true,
        "saveResult": true,
        "period": {
          "calculationFrequency": "DAILY",
          "calendarCode": "PNMCAL",
          "startPeriod": "-01,+02",
          "endPeriod": "+01,+05",
          "dailyEvaluation": false,
          "timeSlotCalculation": false
        },
        "formulaLines": [
          {
            "instruction": {
              "type": "COMMENT",
              "comment": "Objectif du compteur MUL03"
            }
          },
          {
            "instruction": {
              "type": "CALCULATION",
              "enabled": true,
              "firstOperand": {
                "operandItem": "CONSTANT",
                "value": 1
              },
              "result": {
                "item": "VARIABLE",
                "value": "V-1 VARIABLE-1"
              }
            }
          },
          {
            "instruction": {
              "type": "CALCULATION",
              "enabled": true,
              "firstOperand": {
                "operandItem": "CONSTANT",
                "value": 1
              },
              "result": {
                "item": "VARIABLE",
                "value": "V-2 VARIABLE-2"
              }
            }
          },
          {
            "instruction": {
              "type": "LOOP",
              "enabled": true,
              "firstOperand": {
                "operandItem": "VARIABLE",
                "value": "V-1 VARIABLE-1"
              },
              "operator": "LOWER",
              "secondOperand": {
                "operandItem": "CONSTANT",
                "value": 5
              }
            }
          },
          {
            "instruction": {
              "type": "CALCULATION",
              "enabled": true,
              "firstOperand": {
                "operandItem": "VARIABLE",
                "value": "V-1 VARIABLE-1"
              },
              "operator": "PLUS",
              "secondOperand": {
                "operandItem": "CONSTANT",
                "value": 1
              },
              "result": {
                "item": "VARIABLE",
                "value": "V-1 VARIABLE-1"
              }
            }
          },
          {
            "instruction": {
              "type": "LOOP",
              "enabled": true,
              "firstOperand": {
                "operandItem": "VARIABLE",
                "value": "V-2 VARIABLE-2"
              },
              "operator": "LOWER",
              "secondOperand": {
                "operandItem": "CONSTANT",
                "value": 3
              }
            }
          },
          {
            "instruction": {
              "type": "CALCULATION",
              "enabled": true,
              "firstOperand": {
                "operandItem": "VARIABLE",
                "value": "V-2 VARIABLE-2"
              },
              "operator": "PLUS",
              "secondOperand": {
                "operandItem": "CONSTANT",
                "value": 1
              },
              "result": {
                "item": "VARIABLE",
                "value": "V-2 VARIABLE-2"
              }
            }
          },
          {
            "instruction": {
              "enabled": true,
              "type": "ENDLOOP"
            }
          },
          {
            "instruction": {
              "enabled": true,
              "type": "ENDLOOP"
            }
          },
          {
            "instruction": {
              "type": "CALCULATION",
              "enabled": true,
              "firstOperand": {
                "operandItem": "VARIABLE",
                "value": "V-1 VARIABLE-1"
              },
              "operator": "PLUS",
              "secondOperand": {
                "operandItem": "VARIABLE",
                "value": "V-2 VARIABLE-2"
              },
              "result": {
                "item": "VARIABLE",
                "value": "V-5 RESULTAT"
              }
            }
          }
        ]
      },
      {
        "code": "MUL04",
        "label": "PNM FORMULE04",
        "concise": "PNM-FOR04",
        "type": "PREVISIONAL",
        "isActive": true,
        "saveResult": true,
        "period": {
          "calculationFrequency": "DAILY",
          "calendarCode": "PNMCAL",
          "startPeriod": "-01,+02",
          "endPeriod": "+01,+05",
          "dailyEvaluation": false,
          "timeSlotCalculation": false
        },
        "formulaLines": [
          {
            "instruction": {
              "type": "COMMENT",
              "comment": "Objectif du compteur MUL04"
            }
          },
          {
            "instruction": {
              "type": "IF",
              "enabled": true,
              "firstOperand": {
                "operandItem": "FUNCTION",
                "value": "F42 Date cpt - aujourd'hui"
              },
              "operator": "GREATER",
              "secondOperand": {
                "operandItem": "CONSTANT",
                "value": "0"
              }
            }
          },
          {
            "instruction": {
              "type": "END",
              "enabled": true
            }
          },
          {
            "instruction": {
              "type": "ENDIF",
              "enabled": true
            }
          },
          {
            "instruction": {
              "type": "CALCULATION",
              "enabled": true,
              "firstOperand": {
                "operandItem": "SCHEDULE",
                "value": "410 ATTTIB-1"
              },
              "operator": "PLA",
              "secondOperand": {
                "operandItem": "CONSTANT",
                "value": 2
              },
              "result": {
                "item": "VARIABLE",
                "value": "V-1 VARIABLE-1"
              }
            }
          },
          {
            "instruction": {
              "type": "CALCULATION",
              "enabled": true,
              "firstOperand": {
                "operandItem": "SCHEDULE",
                "value": "420 ATTTIB-2"
              },
              "operator": "PLA",
              "secondOperand": {
                "operandItem": "CONSTANT",
                "value": 2
              },
              "result": {
                "item": "VARIABLE",
                "value": "V-2 VARIABLE-2"
              }
            }
          },
          {
            "instruction": {
              "type": "COMMENT",
              "comment": "HORAIRE DE TYPE ASTREINTE - SAUF FORFAIT SECURITE"
            }
          },
          {
            "instruction": {
              "type": "IF",
              "enabled": true,
              "firstOperand": {
                "operandItem": "VARIABLE",
                "value": "V-1 VARIABLE-1"
              },
              "operator": "DIFFERENT",
              "secondOperand": {
                "operandItem": "CONSTANT",
                "value": "4"
              }
            }
          },
          {
            "instruction": {
              "type": "OR",
              "enabled": true,
              "firstOperand": {
                "operandItem": "VARIABLE",
                "value": "V-2 VARIABLE-2"
              },
              "operator": "DIFFERENT",
              "secondOperand": {
                "operandItem": "CONSTANT",
                "value": "0"
              }
            }
          },
          {
            "instruction": {
              "type": "END",
              "enabled": true
            }
          },
          {
            "instruction": {
              "type": "ENDIF",
              "enabled": true
            }
          },
          {
            "instruction": {
              "type": "CALCULATION",
              "enabled": true,
              "firstOperand": {
                "operandItem": "CONSTANT",
                "value": 1
              },
              "result": {
                "item": "VARIABLE",
                "value": "V-5 RESULTAT"
              }
            }
          }
        ]
      },
      {
        "code": "MUL05",
        "label": "PNM FORMULE05",
        "concise": "PNM-FOR05",
        "type": "PREVISIONAL",
        "isActive": true,
        "saveResult": true,
        "period": {
          "calculationFrequency": "DAILY",
          "calendarCode": "PNMCAL",
          "startPeriod": "-01,+02",
          "endPeriod": "+01,+05",
          "dailyEvaluation": false,
          "timeSlotCalculation": false
        },
        "formulaLines": [
          {
            "instruction": {
              "type": "LOOP",
              "enabled": true,
              "firstOperand": {
                "operandItem": "POINTING",
                "value": "5"
              }
            }
          },
          {
            "instruction": {
              "type": "CALCULATION",
              "enabled": true,
              "firstOperand": {
                "operandItem": "VARIABLE",
                "value": "V-1 VARIABLE-1"
              },
              "operator": "PLUS",
              "secondOperand": {
                "operandItem": "CONSTANT",
                "value": 1
              },
              "result": {
                "item": "VARIABLE",
                "value": "V-1 VARIABLE-1"
              }
            }
          },
          {
            "instruction": {
              "type": "CALCULATION",
              "enabled": true,
              "firstOperand": {
                "operandItem": "POINTING"
              },
              "operator": "PTR",
              "secondOperand": {
                "operandItem": "VARIABLE",
                "value": "V-1 VARIABLE-1"
              },
              "result": {
                "item": "VARIABLE",
                "value": "V-2 VARIABLE-2"
              }
            }
          },
          {
            "instruction": {
              "type": "CALCULATION",
              "enabled": true,
              "firstOperand": {
                "operandItem": "VARIABLE",
                "value": "V-1 VARIABLE-1"
              },
              "operator": "MDL",
              "secondOperand": {
                "operandItem": "CONSTANT",
                "value": 2
              },
              "result": {
                "item": "VARIABLE",
                "value": "V-9 VARIABLE-9"
              }
            }
          },
          {
            "instruction": {
              "type": "COMMENT",
              "comment": "SI LE NB POINTAGE EST PAIR ON STOCKE LE TEMPS ENTRE LES DEUX POINTAGES EN V-8"
            }
          },
          {
            "instruction": {
              "type": "IF",
              "enabled": true,
              "firstOperand": {
                "operandItem": "VARIABLE",
                "value": "V-9 VARIABLE-9"
              },
              "operator": "EQUAL",
              "secondOperand": {
                "operandItem": "CONSTANT",
                "value": "0"
              }
            }
          },
          {
            "instruction": {
              "type": "CALCULATION",
              "enabled": true,
              "firstOperand": {
                "operandItem": "VARIABLE",
                "value": "V-2 VARIABLE-2"
              },
              "operator": "MINUS",
              "secondOperand": {
                "operandItem": "VARIABLE",
                "value": "V-3 VARIABLE-3"
              },
              "result": {
                "item": "VARIABLE",
                "value": "V-8 VARIABLE-8"
              }
            }
          },
          {
            "instruction": {
              "type": "CALCULATION",
              "enabled": true,
              "firstOperand": {
                "operandItem": "VARIABLE",
                "value": "V-5 RESULTAT"
              },
              "operator": "PLUS",
              "secondOperand": {
                "operandItem": "VARIABLE",
                "value": "V-8 VARIABLE-8"
              },
              "result": {
                "item": "VARIABLE",
                "value": "V-5 RESULTAT"
              }
            }
          },
          {
            "instruction": {
              "type": "COMMENT",
              "comment": "SI LE NB POINTAGE EST IMPAIR ON ENVOIE LE POINTAGE en V-3"
            }
          },
          {
            "instruction": {
              "type": "OTHERWISE",
              "enabled": true,
              "firstOperand": {
                "operandItem": "VARIABLE",
                "value": "V-2 VARIABLE-2"
              },
              "result": {
                "item": "VARIABLE",
                "value": "V-3 VARIABLE-3"
              }
            }
          },
          {
            "instruction": {
              "type": "ENDIF",
              "enabled": true
            }
          },
          {
            "instruction": {
              "type": "ENDLOOP",
              "enabled": true
            }
          }
        ]
      },
      {
        "code": "MUL06",
        "label": "PNM FORMULE06",
        "concise": "PNM-FOR06",
        "type": "PREVISIONAL",
        "isActive": true,
        "saveResult": true,
        "period": {
          "calculationFrequency": "DAILY",
          "calendarCode": "PNMCAL",
          "startPeriod": "-01,+02",
          "endPeriod": "+01,+05",
          "dailyEvaluation": false,
          "timeSlotCalculation": false
        },
        "formulaLines": [
          {
            "instruction": {
              "type": "LOOP",
              "enabled": true,
              "firstOperand": {
                "operandItem": "GROUP",
                "value": "ACT.EVT ACTIVITE EVENEMENTIELLE"
              }
            }
          },
          {
            "instruction": {
              "type": "IF",
              "enabled": true,
              "firstOperand": {
                "operandItem": "VARIABLE",
                "value": "V-2 VARIABLE-2"
              },
              "operator": "DIFFERENT",
              "secondOperand": {
                "operandItem": "CONSTANT",
                "value": "0"
              }
            }
          },
          {
            "instruction": {
              "type": "BREAK",
              "enabled": true
            }
          },
          {
            "instruction": {
              "type": "ENDIF",
              "enabled": true
            }
          },
          {
            "instruction": {
              "type": "ENDLOOP",
              "enabled": true
            }
          }
        ]
      }
    ]
  }
]