| @@ 46-59 (lines=14) @@ | ||
| 43 | * @param Invoice $invoice |
|
| 44 | * @return string |
|
| 45 | */ |
|
| 46 | public function buildInvoice(Invoice $invoice) |
|
| 47 | { |
|
| 48 | $errors = $this->validate($invoice); |
|
| 49 | ||
| 50 | if ($errors->count() > 0) { |
|
| 51 | return ''; |
|
| 52 | } |
|
| 53 | ||
| 54 | $twig = $this->getRender(); |
|
| 55 | return $twig->render('invoice.html.twig', [ |
|
| 56 | 'doc' => $invoice, |
|
| 57 | 'emp' => $this->company, |
|
| 58 | ]); |
|
| 59 | } |
|
| 60 | ||
| 61 | /** |
|
| 62 | * Genera una Nota Electrónica(Credito o Debito). |
|
| @@ 90-103 (lines=14) @@ | ||
| 87 | * @param Summary $summary |
|
| 88 | * @return string |
|
| 89 | */ |
|
| 90 | public function buildSummary(Summary $summary) |
|
| 91 | { |
|
| 92 | $errors = $this->validate($summary); |
|
| 93 | ||
| 94 | if ($errors->count() > 0) { |
|
| 95 | return ''; |
|
| 96 | } |
|
| 97 | ||
| 98 | $twig = $this->getRender(); |
|
| 99 | return $twig->render('summary.html.twig', [ |
|
| 100 | 'doc' => $summary, |
|
| 101 | 'emp' => $this->company, |
|
| 102 | ]); |
|
| 103 | } |
|
| 104 | ||
| 105 | /** |
|
| 106 | * Genera una comunicacion de Baja. |
|
| @@ 111-124 (lines=14) @@ | ||
| 108 | * @param Voided $voided |
|
| 109 | * @return string |
|
| 110 | */ |
|
| 111 | public function buildVoided(Voided $voided) |
|
| 112 | { |
|
| 113 | $errors = $this->validate($voided); |
|
| 114 | ||
| 115 | if ($errors->count() > 0) { |
|
| 116 | return ''; |
|
| 117 | } |
|
| 118 | ||
| 119 | $twig = $this->getRender(); |
|
| 120 | return $twig->render('voided.html.twig', [ |
|
| 121 | 'doc' => $voided, |
|
| 122 | 'emp' => $this->company, |
|
| 123 | ]); |
|
| 124 | } |
|
| 125 | ||
| 126 | /** |
|
| 127 | * @param string $dirCache |
|