<?php

namespace Modules\Stock\Service\Export;

class MouvementExportService extends AbstractExportService
{
    /**
     * @return array<string,array<string,string>>
     */
    public function getArchitecture(): array
    {
        $fields = [
            'SM.NO_MVT' => ['nomChamp' => $this->trad->t('N° Mouvement'), 'type' => 'TEXT'],
            'SM.DTE_MVT' => ['nomChamp' => $this->trad->t('Date du mouvement'), 'type' => 'DATE'],
            'SM.TYPE_MVT' => ['nomChamp' => $this->trad->t('Type de mouvement'), 'type' => 'TEXT'],
            'SM.SITE' => ['nomChamp' => $this->trad->t('SiteStock'), 'type' => 'TEXT'],
            'SM.TYPE_ENT' => ['nomChamp' => $this->trad->t('Type d\'entête'), 'type' => 'TEXT'],
            'SM.NO_ENT' => ['nomChamp' => $this->trad->t('N° d\'entête'), 'type' => 'TEXT'],
            'SM.NO_LIG' => ['nomChamp' => $this->trad->t('N° de ligne'), 'type' => 'TEXT'],
            'SM.TIERS' => ['nomChamp' => $this->trad->t('Tiers'), 'type' => 'TEXT'],
            'SM.CODE_ART' => ['nomChamp' => $this->trad->t('Code article'), 'type' => 'TEXT'],
            'SM.NO_LOT' => ['nomChamp' => $this->trad->t('N° de lot'), 'type' => 'TEXT'],
            'SM.QTE_MVT' => ['nomChamp' => $this->trad->t('Quantité mouvementée'), 'type' => 'TEXT'],
            'SM.QTEMVTCOR' => ['nomChamp' => $this->trad->t('Quantité corrigée'), 'type' => 'TEXT'],
            'SM.SECTIMP' => ['nomChamp' => $this->trad->t('Section d\'imputation'), 'type' => 'TEXT'],
            'SM.CODE_COMP' => ['nomChamp' => $this->trad->t('Code complémentaire'), 'type' => 'TEXT'],
            'SM.SSCPTEANA' => ['nomChamp' => $this->trad->t('Sous compte d\'analyse'), 'type' => 'TEXT'],
            'SM.CODE_STE' => ['nomChamp' => $this->trad->t('Code société'), 'type' => 'TEXT'],
            'SM.DATEMODI' => ['nomChamp' => $this->trad->t('Date de modification'), 'type' => 'DATE'],
            'SM.DEVISE' => ['nomChamp' => $this->trad->t('Devise'), 'type' => 'TEXT'],
            'SM.VAL_DEVIS' => ['nomChamp' => $this->trad->t('Valeur de devise'), 'type' => 'TEXT'],
            'SM.CODGES' => ['nomChamp' => $this->trad->t('Code gestion'), 'type' => 'TEXT'],
            'SM.LIBGES' => ['nomChamp' => $this->trad->t('Libellé du code gestion'), 'type' => 'TEXT'],
            'SM.ID_CG' => ['nomChamp' => $this->trad->t('Id du code gestion'), 'type' => 'TEXT'],
        ];

        if ($this->isPrixVisible()) {
            $fields['SM.PU'] = ['nomChamp' => $this->trad->t('Prix unitaire'), 'type' => 'TEXT'];
            $fields['SM.PUNMVTCOR'] = ['nomChamp' => $this->trad->t('Prix corrigé'), 'type' => 'TEXT'];
        }

        return $fields;
    }
}
