davidbonachera/EdiParser

View on GitHub
Model/Infolog/M31.php

Summary

Maintainability
C
1 day
Test Coverage
<?php
/**
 * This file is part of the EdiParser package.
 *
 * @package     EdiParserBundle
 * @since       0.0.1
 * @author      davidbonachera
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace Boda\EdiParserBundle\Model\Infolog;

use Boda\EdiParserBundle\Model\ModelAbstract;

class M31 extends ModelAbstract
{
    /**
     * Template Data
     * @var array $templateData
     */
    public static $templateData = array(
        // Part 1
        "31.00" => array(
            "CODEXC" => "31",
            "SEPEXC" => ".",
            "SCOEXC" => "00",
            "TRTEXC" => null,
            "CODACT" => null,
            "CODPRO" => null,
            "VALPRO" => null,
            "DS1PRO" => null,
            "DS2PRO" => null,
            "FOUPRO" => null,
            "VAPPRO" => null,
            "FAMPRO" => null,
            "ANAPRO" => null,
            "EDIPRO" => null,
            "SPCPRO" => null,
            "PCBPRO" => null,
            "UNIPRO" => null,
            "MESPRO" => null,
            "PDBUVC" => null,
            "PDNUVC" => null,
            "HAUUVC" => null,
            "LNGUVC" => null,
            "LRGUVC" => null,
            "PDBCOL" => null,
            "HAUCOL" => null,
            "LNGCOL" => null,
            "LRGCOL" => null,
            "COLCOU" => null,
            "COUPAL" => null,
            "GERPAL" => null,
            "GERHAUHS" => null,
            "HAUCOU" => null,
            "CODEMB" => null,
            "ABCPRO" => null,
            "CODMDR" => null,
            "MODREC" => null,
            "NBJDLV" => null,
            "MOTIMM" => null,
            "CODMDS" => null,
            "ZONPRF" => null,
            "ALLPRF" => null,
            "ABCSTS" => null,
            "CODADM" => null,
            "HOMGRB" => null,
            "PERGRB" => null,
            "CODMDP" => null,
            "TOPPRN" => null,
            "GERHAU" => null,
        ),
        // Part 2
        "31.01" => array(
            "CODEXC" => "31",
            "SEPEXC" => ".",
            "SCOEXC" => "01",
            "TRTEXC" => null,
            "CODACT" => null,
            "CODPRO" => null,
            "VALPRO" => null,
            "INDPRO" => null,
            "CODMRQ" => null,
            "DESFOU" => null,
            "CIRDET" => null,
            "CIRPAL" => null,
            "METRPL" => null,
            "CODRPL" => null,
            "VALRPL" => null,
            "CODALC" => null,
            "DEGALC" => null,
            "VOLALC" => null,
            "CODMDG" => null,
            "TAUPST" => null,
            "COELOG" => null,
            "PRXPRO" => null,
            "CODMDI" => null,
            "NXTIVT" => null,
            "SECSTK" => null,
            "CODMDF" => null,
            "FMTFAB" => null,
            "ACTFAB" => null,
            "CODFAB" => null,
            "VRAFAB" => null,
            "VALFAB" => null,
            "CODZVI" => null,
            "CODEAP" => null,
            "TOPCNA" => null,
        ),
        // Part 3
        "31.02" => array(
            "CODEXC" => "31",
            "SEPEXC" => ".",
            "SCOEXC" => "02",
            "TRTEXC" => null,
            "CODACT" => null,
            "CODPRO" => null,
            "VALPRO" => null,
            "CODTMD" => null,
            "CODSEC" => null,
            "CODSPE" => null,
            "UNIFAC" => null,
            "COEFAC" => null,
            "SECDLV" => null,
            "CODRGP" => null,
            "CODRSC" => null,
            "UNICAL" => null,
            "TEMPRE" => null,
            "TEMMIN" => null,
            "TEMMAX" => null,
            "TOLPOI" => null,
            "COECOL" => null,
            "COESPC" => null,
            "COEUVC" => null,
            "INDTOL" => null,
            "CODMTR" => null,
            "CODMDT" => null,
            "NBJFVI" => null,
            "CODGAM" => null,
            "DISEXC" => null,
        ),
    );

    public static $validationTemplateData = array(
        "31.00" => array(
            "CODEXC" => [ "length" => 2, "required" => TRUE ],
            "SEPEXC" => [ "length" => 1, "required" => TRUE ],
            "SCOEXC" => [ "length" => 2, "required" => TRUE ],
            "TRTEXC" => [ "length" => 1, "required" => TRUE ],
            "CODACT" => [ "length" => 3, "required" => TRUE ],
            "CODPRO" => [ "length" => 17, "required" => TRUE ],
            "VALPRO" => [ "length" => 2, "required" => TRUE ],
            "DS1PRO" => [ "length" => 30, "required" => TRUE ],
            "DS2PRO" => [ "length" => 30, "required" => TRUE ],
            "FOUPRO" => [ "length" => 14, "required" => TRUE ],
            "VAPPRO" => [ "length" => 2, "required" => TRUE ],
            "FAMPRO" => [ "length" => 10, "required" => TRUE ],
            "ANAPRO" => [ "length" => 15, "required" => TRUE ],
            "EDIPRO" => [ "length" => 17, "required" => TRUE ],
            "SPCPRO" => [ "length" => 4, "required" => TRUE ],
            "PCBPRO" => [ "length" => 5, "required" => TRUE ],
            "UNIPRO" => [ "length" => 3, "required" => TRUE ],
            "MESPRO" => [ "length" => 1, "required" => TRUE ],
            "PDBUVC" => [ "length" => 7, "required" => TRUE ],
            "PDNUVC" => [ "length" => 7, "required" => TRUE ],
            "HAUUVC" => [ "length" => 3, "required" => TRUE ],
            "LNGUVC" => [ "length" => 3, "required" => TRUE ],
            "LRGUVC" => [ "length" => 3, "required" => TRUE ],
            "PDBCOL" => [ "length" => 7, "required" => TRUE ],
            "HAUCOL" => [ "length" => 3, "required" => TRUE ],
            "LNGCOL" => [ "length" => 3, "required" => TRUE ],
            "LRGCOL" => [ "length" => 3, "required" => TRUE ],
            "COLCOU" => [ "length" => 8, "required" => TRUE ],
            "COUPAL" => [ "length" => 8, "required" => TRUE ],
            "GERPAL" => [ "length" => 2, "required" => TRUE ],
            "GERHAUHS" => [ "length" => 2, "required" => TRUE ],
            "HAUCOU" => [ "length" => 3, "required" => TRUE ],
            "CODEMB" => [ "length" => 3, "required" => TRUE ],
            "ABCPRO" => [ "length" => 1, "required" => TRUE ],
            "CODMDR" => [ "length" => 3, "required" => TRUE ],
            "MODREC" => [ "length" => 1, "required" => TRUE ],
            "NBJDLV" => [ "length" => 3, "required" => TRUE ],
            "MOTIMM" => [ "length" => 3, "required" => TRUE ],
            "CODMDS" => [ "length" => 3, "required" => TRUE ],
            "ZONPRF" => [ "length" => 1, "required" => TRUE ],
            "ALLPRF" => [ "length" => 3, "required" => TRUE ],
            "ABCSTS" => [ "length" => 1, "required" => TRUE ],
            "CODADM" => [ "length" => 3, "required" => TRUE ],
            "HOMGRB" => [ "length" => 1, "required" => TRUE ],
            "PERGRB" => [ "length" => 3, "required" => TRUE ],
            "CODMDP" => [ "length" => 3, "required" => TRUE ],
            "TOPPRN" => [ "length" => 1, "required" => TRUE ],
            "GERHAU" => [ "length" => 2, "required" => TRUE ],
        ),
        "31.01" => array(
            "CODEXC" => [ "length" => 2, "required" => TRUE ],
            "SEPEXC" => [ "length" => 1, "required" => TRUE ],
            "SCOEXC" => [ "length" => 2, "required" => TRUE ],
            "TRTEXC" => [ "length" => 1, "required" => TRUE ],
            "CODACT" => [ "length" => 3, "required" => TRUE ],
            "CODPRO" => [ "length" => 17, "required" => TRUE ],
            "VALPRO" => [ "length" => 2, "required" => TRUE ],
            "INDPRO" => [ "length" => 10, "required" => TRUE ],
            "CODMRQ" => [ "length" => 8, "required" => TRUE ],
            "DESFOU" => [ "length" => 30, "required" => TRUE ],
            "CIRDET" => [ "length" => 3, "required" => TRUE ],
            "CIRPAL" => [ "length" => 3, "required" => TRUE ],
            "METRPL" => [ "length" => 1, "required" => TRUE ],
            "CODRPL" => [ "length" => 17, "required" => TRUE ],
            "VALRPL" => [ "length" => 2, "required" => TRUE ],
            "CODALC" => [ "length" => 4, "required" => TRUE ],
            "DEGALC" => [ "length" => 5, "required" => TRUE ],
            "VOLALC" => [ "length" => 6, "required" => TRUE ],
            "CODMDG" => [ "length" => 3, "required" => TRUE ],
            "TAUPST" => [ "length" => 20, "required" => TRUE ],
            "COELOG" => [ "length" => 5, "required" => TRUE ],
            "PRXPRO" => [ "length" => 36, "required" => TRUE ],
            "CODMDI" => [ "length" => 3, "required" => TRUE ],
            "NXTIVT" => [ "length" => 8, "required" => TRUE ],
            "SECSTK" => [ "length" => 9, "required" => TRUE ],
            "CODMDF" => [ "length" => 3, "required" => TRUE ],
            "FMTFAB" => [ "length" => 5, "required" => TRUE ],
            "ACTFAB" => [ "length" => 3, "required" => TRUE ],
            "CODFAB" => [ "length" => 17, "required" => TRUE ],
            "VRAFAB" => [ "length" => 17, "required" => TRUE ],
            "VALFAB" => [ "length" => 2, "required" => TRUE ],
            "CODZVI" => [ "length" => 4, "required" => TRUE ],
            "CODEAP" => [ "length" => 3, "required" => TRUE ],
            "TOPCNA" => [ "length" => 1, "required" => TRUE ],
        ),
        "31.02" => array(
            "CODEXC" => [ "length" => 2, "required" => TRUE ],
            "SEPEXC" => [ "length" => 1, "required" => TRUE ],
            "SCOEXC" => [ "length" => 2, "required" => TRUE ],
            "TRTEXC" => [ "length" => 1, "required" => TRUE ],
            "CODACT" => [ "length" => 3, "required" => TRUE ],
            "CODPRO" => [ "length" => 17, "required" => TRUE ],
            "VALPRO" => [ "length" => 2, "required" => TRUE ],
            "CODTMD" => [ "length" => 4, "required" => TRUE ],
            "CODSEC" => [ "length" => 4, "required" => TRUE ],
            "CODSPE" => [ "length" => 1, "required" => TRUE ],
            "UNIFAC" => [ "length" => 3, "required" => TRUE ],
            "COEFAC" => [ "length" => 10, "required" => TRUE ],
            "SECDLV" => [ "length" => 3, "required" => TRUE ],
            "CODRGP" => [ "length" => 17, "required" => TRUE ],
            "CODRSC" => [ "length" => 3, "required" => TRUE ],
            "UNICAL" => [ "length" => 1, "required" => TRUE ],
            "TEMPRE" => [ "length" => 3, "required" => TRUE ],
            "TEMMIN" => [ "length" => 3, "required" => TRUE ],
            "TEMMAX" => [ "length" => 3, "required" => TRUE ],
            "TOLPOI" => [ "length" => 3, "required" => TRUE ],
            "COECOL" => [ "length" => 4, "required" => TRUE ],
            "COESPC" => [ "length" => 4, "required" => TRUE ],
            "COEUVC" => [ "length" => 4, "required" => TRUE ],
            "INDTOL" => [ "length" => 1, "required" => TRUE ],
            "CODMTR" => [ "length" => 5, "required" => TRUE ],
            "CODMDT" => [ "length" => 3, "required" => TRUE ],
            "NBJFVI" => [ "length" => 4, "required" => TRUE ],
            "CODGAM" => [ "length" => 10, "required" => TRUE ],
            "DISEXC" => [ "length" => 135, "required" => TRUE ],
        ),
    );

    public function getTemplateData()
    {
        return static::$templateData;
    }

    public function getValidationTemplateData()
    {
        return static::$validationTemplateData;
    }

    public function __toString()
    {
        return "M31";
    }
}