protected function trailer() { $this->iniciaTrailer(); $this->add(1, 1, '9'); $this->add(2, 394, ''); $this->add(395, 400, Util::formatCnab('9', $this->getCount(), 6)); return $this; }
private function arrumaCodCedente() { $_4first = substr($this->getCedenteCodigo(), 0, 4); $agencia = Util::formatCnab('9', $this->getAgencia(), 4); if ($_4first != $agencia) { if (strlen($this->getCedenteCodigo()) == 12) { $this->cedenteCodigo = $agencia . $this->getCedenteCodigo(); } else { if (strlen($this->getCedenteCodigo()) == 11) { $this->cedenteCodigo = $agencia . $this->getCedenteCodigo(); $this->cedenteCodigo .= Util::modulo11($this->getCedenteCodigo()); } else { throw new \Exception('Codigo de cedente inválido, formato: PPPXXXXXXXXD'); } } } }
protected function trailer() { $this->iniciaTrailer(); $this->add(1, 3, Util::onlyNumbers($this->getCodigoBanco())); //Codigo do banco $this->add(4, 7, '9999'); // Numero do lote remessa $this->add(8, 8, Util::formatCnab(9, 9, 1)); //Tipo de registro $this->add(9, 17, ''); // Reservado (Uso Banco) $this->add(18, 23, Util::formatCnab(9, 1, 6)); // Qtd de lotes do arquivo $this->add(24, 29, Util::formatCnab(9, $this->qtyRegistrosLote + 4, 6)); // Qtd de lotes do arquivo $this->add(30, 240, ''); // Reservado (Uso Banco) return $this; }
protected function trailer() { $this->iniciaTrailer(); $this->add(1, 1, '9'); $this->add(2, 7, Util::formatCnab('9', $this->getCount(), 6)); $this->add(8, 20, Util::formatCnab('9', $this->total, 13, 2)); $this->add(21, 394, Util::formatCnab('9', 0, 374)); $this->add(395, 400, Util::formatCnab('9', $this->getCount(), 6)); return $this; }
protected function trailer() { $this->iniciaTrailer(); $this->add(1, 1, '9'); $this->add(2, 2, '1'); $this->add(3, 5, $this->getCodigoBanco()); $this->add(6, 10, $this->getConta()); $this->add(11, 394, ''); $this->add(395, 400, Util::formatCnab('9', $this->getCount(), 6)); return $this; }