Skip to content

Commit 5a9e73c

Browse files
committed
Merge pull request #29 from rafaelsiqueira/master
Adicionado numeroPedido como propriedade da classe DestinoNacional
2 parents 4c853ef + 9f47790 commit 5a9e73c

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

src/PhpSigep/Model/DestinoNacional.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ class DestinoNacional extends AbstractModel implements Destino
4545
// * @var string
4646
// */
4747
// protected $centroCustoCliente;
48+
/**
49+
* Número do pedido
50+
* Opcional.
51+
* @var int
52+
*/
53+
protected $numeroPedido;
4854
/**
4955
* Número da nota fiscal
5056
* Opcional.
@@ -149,6 +155,22 @@ public function setDescricaoObjeto($descricaoObjeto)
149155
$this->descricaoObjeto = $descricaoObjeto;
150156
}
151157

158+
/**
159+
* @return int
160+
*/
161+
public function getNumeroPedido()
162+
{
163+
return $this->numeroPedido;
164+
}
165+
166+
/**
167+
* @param int $numeroPedido
168+
*/
169+
public function setNumeroPedido($numeroPedido)
170+
{
171+
$this->numeroPedido = $numeroPedido;
172+
}
173+
152174
/**
153175
* @return int
154176
*/

src/PhpSigep/Pdf/CartaoDePostagem.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,13 @@ private function _render()
254254
$nf = ' NF: '. $nf;
255255
}
256256

257+
$numeroPedido = trim($objetoPostal->getDestino()->getNumeroPedido());
258+
if(!empty($numeroPedido)) {
259+
$numeroPedido = ' Pedido: ' . $numeroPedido;
260+
}
261+
257262
$this->pdf->SetFontSize(7);
258-
$this->t($this->pdf->w, 'Volume: 1/1 '.'Peso(kg): ' . ((float)$objetoPostal->getPeso()) . $nf, 1, 'C', null);
263+
$this->t($this->pdf->w, 'Volume: 1/1 '.'Peso(kg): ' . ((float)$objetoPostal->getPeso()) . $nf . $numeroPedido, 1, 'C', null);
259264

260265
// Número da etiqueta
261266
$this->setFillColor(100, 100, 200);

0 commit comments

Comments
 (0)