protected function generateFileHeader()
    {
        $shipping_file = $this->shipping_file;
        $assignment = $shipping_file->assignment;
        $assignor_person = $assignment->assignor->person;
        $bank = $assignment->bank;

        $format = '%03.3s%04.4s%01.1s%-9.9s%01.1s%014.14s%020.20s%05.5s%-1.1s'
            . '%012.12s%-1.1s%-1.1s%-30.30s%-30.30s%-10.10s%01.1s%08.8s%06.6s'
            . '%06.6s%03.3s%05.5s%-20.20s%-20.20s%-29.29s';

        $data = [
            $bank->code,
            '0',
            '0',
            '',
            $assignor_person->getDocumentType(),
            $assignor_person->document,
            $assignment->covenant,
            '0', // $assignment->agency,
            '',
            '0', // $assignment->account,
            '',
            '',
            Utils::cleanSpaces($assignor_person->name),
            $bank->name,
            '',
            '1',
            static::date('dmY', $shipping_file->stamp),
            static::date('His', $shipping_file->stamp),
            $shipping_file->counter,
            static::VERSION_FILE_LAYOUT,
            '0',
            '',
            $shipping_file->notes,
            '',
        ];

        return vsprintf($format, static::normalize($data));
    }