PHP Classes

File: src/Enums/OperationType.php

Recommend this page to a friend!
  Packages of Jacobo Cantorna Cigarrán   Laravel Verifactu   src/Enums/OperationType.php   Download  
File: src/Enums/OperationType.php
Role: Auxiliary script
Content type: text/plain
Description: Configuration script
Class: Laravel Verifactu
Manage fiscal documents using Verifactu API
Author: By
Last change:
Date: 5 months ago
Size: 730 bytes
 

Contents

Class file image Download
<?php

declare(strict_types=1);

namespace
Squareetlabs\VeriFactu\Enums;

enum OperationType: string
{
    case
SUBJECT_NO_EXEMPT_NO_REVERSE = 'S1';
    case
SUBJECT_NO_EXEMPT_REVERSE = 'S2';
    case
NOT_SUBJECT_ARTICLES = 'N1';
    case
NOT_SUBJECT_LOCALIZATION = 'N2';

    public function
description(): string
   
{
        return
match($this) {
           
self::SUBJECT_NO_EXEMPT_NO_REVERSE => 'Subject and not exempt - No reverse charge',
           
self::SUBJECT_NO_EXEMPT_REVERSE => 'Subject and not exempt - With reverse charge',
           
self::NOT_SUBJECT_ARTICLES => 'Not subject - Articles 7, 14, others',
           
self::NOT_SUBJECT_LOCALIZATION => 'Not subject due to localization rules',
        };
    }
}