├── .gitignore ├── .travis.yml ├── Gemfile ├── Gemfile.lock ├── LICENSE.txt ├── Rakefile ├── cfdi.gemspec ├── doc ├── CFDI.html ├── CFDI │ ├── Certificado.html │ ├── Complemento.html │ ├── Comprobante.html │ ├── Concepto.html │ ├── Domicilio.html │ ├── ElementoComprobante.html │ ├── Entidad.html │ └── Key.html ├── Float.html ├── _index.html ├── class_list.html ├── css │ ├── common.css │ ├── full_list.css │ └── style.css ├── file_list.html ├── frames.html ├── index.html ├── js │ ├── app.js │ ├── full_list.js │ └── jquery.js ├── method_list.html └── top-level-namespace.html ├── examples ├── crear_factura.rb ├── data │ ├── _empty │ ├── certPAC.cer │ ├── cfdi_32.xml │ ├── cfdi_impuestos.xml │ └── timbrado.xml └── desde_xml.rb ├── lib ├── addenda.rb ├── certificado.rb ├── cfdi.rb ├── complemento.rb ├── comprobante.rb ├── comun.rb ├── concepto.rb ├── entidad.rb ├── impuestos.rb ├── impuestos │ ├── generico.rb │ ├── retencion.rb │ └── traslado.rb ├── key.rb ├── version.rb └── xml.rb ├── readme.md └── test ├── comprobante_spec.rb ├── entidad_spec.rb └── fixtures ├── cfdi_32.rb ├── cfdi_33.rb └── cfdi_impuestos.rb /.gitignore: -------------------------------------------------------------------------------- 1 | previous.rb 2 | key.pem 3 | cert.cer 4 | pkg/ 5 | *.gem 6 | .yardoc 7 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: ruby 2 | bundler_args: '' 3 | sudo: false 4 | rvm: 5 | - "2.1.0" 6 | before_install: 7 | - 'echo "gem: --no-ri --no-rdoc" > ~/.gemrc' -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gemspec 4 | 5 | # para tener compatibilidad con Savon 2 6 | gem 'nokogiri', '~>1.5.11' 7 | group :test do 8 | gem 'rake' 9 | end 10 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | PATH 2 | remote: . 3 | specs: 4 | cfdi (0.2.2) 5 | nokogiri (~> 1.5.11) 6 | 7 | GEM 8 | remote: https://rubygems.org/ 9 | specs: 10 | coderay (1.1.0) 11 | diff-lcs (1.2.5) 12 | method_source (0.8.2) 13 | nokogiri (1.5.11) 14 | pry (0.10.1) 15 | coderay (~> 1.1.0) 16 | method_source (~> 0.8.1) 17 | slop (~> 3.4) 18 | rake (10.1.1) 19 | rspec (2.14.1) 20 | rspec-core (~> 2.14.0) 21 | rspec-expectations (~> 2.14.0) 22 | rspec-mocks (~> 2.14.0) 23 | rspec-core (2.14.7) 24 | rspec-expectations (2.14.5) 25 | diff-lcs (>= 1.1.3, < 2.0) 26 | rspec-mocks (2.14.5) 27 | slop (3.6.0) 28 | 29 | PLATFORMS 30 | ruby 31 | 32 | DEPENDENCIES 33 | cfdi! 34 | nokogiri (~> 1.5.11) 35 | pry 36 | rake 37 | rspec 38 | 39 | BUNDLED WITH 40 | 1.10.6 41 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 2 | Version 2, December 2004 3 | 4 | (C) 2013 Roberto Hidalgo , Aquellos listados en CONTRIBUTORS 5 | 6 | Everyone is permitted to copy and distribute verbatim or modified 7 | copies of this license document, and changing it is allowed as long 8 | as the name is changed. 9 | 10 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 11 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 12 | 13 | 0. You just DO WHAT THE FUCK YOU WANT TO. 14 | 15 | 16 | ---- 17 | Traducción: 18 | 19 | LICENCIA PÚBLICA HAZ LO QUE TE DE TU CHINGADA GANA 20 | Version 2, Diciembre 2004 21 | 22 | (C) 2013 Roberto Hidalgo , Aquellos listados en CONTRIBUTORS 23 | 24 | Se permite la copia y distribución textual o con modificaciones de 25 | este documento de licencia, y los cambios son permitidos siempre y 26 | cuando el nombre sea cambiado. 27 | 28 | LICENCIA PÚBLICA HAZ LO QUE TE DE TU CHINGADA GANA 29 | TÉRMINOS Y CONDICIONES PARA COPIAR, DISTRIBUIR Y MODIFICAR ESTE SOFTWARE 30 | 31 | 0. Solamente HAZ LO QUE TE DE TU CHINGADA GANA. -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | require "bundler/gem_tasks" 2 | require 'rspec/core/rake_task' 3 | 4 | task :release do 5 | system "gem build cfdi.gemspec" 6 | end 7 | 8 | RSpec::Core::RakeTask.new(:spec) do |t| 9 | t.pattern = 'test/*_spec.rb' 10 | end 11 | 12 | task :test => :spec 13 | 14 | task :default => :spec -------------------------------------------------------------------------------- /cfdi.gemspec: -------------------------------------------------------------------------------- 1 | # -*- encoding: utf-8 -*- 2 | lib = File.expand_path('../lib', __FILE__) 3 | $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) 4 | 5 | require 'version' 6 | 7 | Gem::Specification.new do |gem| 8 | gem.name = "cfdi" 9 | gem.version = CFDI::VERSION 10 | gem.authors = ["Roberto Hidalgo"] 11 | gem.email = ["un@rob.mx"] 12 | gem.description = "Comprobantes fiscales digitales por internet" 13 | gem.summary = "Digitales!! por Internet!!" 14 | gem.homepage = "https://github.com/unRob/cfdi" 15 | gem.licenses = ['WTFPL', 'GPLv2'] 16 | gem.has_rdoc = true 17 | 18 | gem.files = `git ls-files`.split($/) 19 | gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) } 20 | gem.test_files = gem.files.grep(%r{^(test|spec|features)/}) 21 | gem.require_paths = ["lib"] 22 | gem.rdoc_options = '--no-private' 23 | 24 | gem.add_runtime_dependency 'nokogiri', '~>1.5.11' 25 | gem.add_development_dependency 'rspec' 26 | gem.add_development_dependency 'pry' 27 | 28 | end 29 | -------------------------------------------------------------------------------- /doc/CFDI/Certificado.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | Class: CFDI::Certificado 8 | 9 | — Documentation by YARD 0.8.7.2 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 63 | 64 | 65 | 66 |

Class: CFDI::Certificado 67 | 68 | 69 | 70 |

71 | 72 |
73 | 74 |
Inherits:
75 |
76 | OpenSSL::X509::Certificate 77 | 78 |
    79 |
  • Object
  • 80 | 81 | 82 | 83 | 84 | 85 |
86 | show all 87 | 88 |
89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 |
Defined in:
99 |
lib/certificado.rb
100 | 101 |
102 |
103 | 104 |

Overview

105 |
106 | 107 |

Certificados en formato X590

108 | 109 |

En español, el archivo `.cer`

110 | 111 | 112 |
113 |
114 |
115 | 116 | 117 |
118 | 119 | 120 | 121 |

Instance Attribute Summary (collapse)

122 |
    123 | 124 |
  • 125 | 126 | 127 | - (Object) data 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | readonly 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 |
    147 |

    el certificado en Base64.

    148 |
    149 | 150 |
  • 151 | 152 | 153 |
  • 154 | 155 | 156 | - (Object) noCertificado 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | readonly 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 |
    176 |

    el número de certificado.

    177 |
    178 | 179 |
  • 180 | 181 | 182 |
183 | 184 | 185 | 186 | 187 | 188 |

189 | Instance Method Summary 190 | (collapse) 191 |

192 | 193 |
    194 | 195 |
  • 196 | 197 | 198 | - (CFDI::Comprobante) certifica(factura) 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 |
    213 |

    Certifica una factura.

    214 |
    215 | 216 |
  • 217 | 218 | 219 |
  • 220 | 221 | 222 | - (CFDI::Certificado) initialize(file) 223 | 224 | 225 | 226 | 227 | 228 | 229 | constructor 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 |
    239 |

    Importar un certificado de sellado.

    240 |
    241 | 242 |
  • 243 | 244 | 245 |
246 | 247 | 248 | 249 |
250 |

Constructor Details

251 | 252 |
253 |

254 | 255 | - (CFDI::Certificado) initialize(file) 256 | 257 | 258 | 259 | 260 | 261 |

262 |
263 | 264 |

Importar un certificado de sellado

265 | 266 | 267 |
268 |
269 |
270 |

Parameters:

271 |
    272 | 273 |
  • 274 | 275 | file 276 | 277 | 278 | (IO, String) 279 | 280 | 281 | 282 | — 283 |
    284 |

    El `path` del certificado o un objeto #IO

    285 |
    286 | 287 |
  • 288 | 289 |
290 | 291 | 292 |
293 | 294 | 315 | 335 | 336 |
295 |
296 | 
297 | 
298 | 19
299 | 20
300 | 21
301 | 22
302 | 23
303 | 24
304 | 25
305 | 26
306 | 27
307 | 28
308 | 29
309 | 30
310 | 31
311 | 32
312 | 33
313 | 34
314 |
316 |
# File 'lib/certificado.rb', line 19
317 | 
318 | def initialize (file)
319 |   
320 |   if file.is_a? String
321 |     file = File.read(file)
322 |   end
323 |         
324 |   super file
325 |   
326 |   @noCertificado = '';
327 |   # Normalmente son strings de tipo:
328 |   # 3230303031303030303030323030303030323933
329 |   # por eso sólo tomamos cada segundo dígito
330 |   self.serial.to_s(16).scan(/.{2}/).each {|v| @noCertificado += v[1]; }
331 |   @data = self.to_s.gsub(/^-.+/, '').gsub(/\n/, '')
332 |   
333 | end
334 |
337 |
338 | 339 |
340 | 341 |
342 |

Instance Attribute Details

343 | 344 | 345 | 346 |
347 |

348 | 349 | - (Object) data (readonly) 350 | 351 | 352 | 353 | 354 | 355 |

356 |
357 | 358 |

el certificado en Base64

359 | 360 | 361 |
362 |
363 |
364 | 365 | 366 |
367 | 368 | 376 | 383 | 384 |
369 |
370 | 
371 | 
372 | 13
373 | 14
374 | 15
375 |
377 |
# File 'lib/certificado.rb', line 13
378 | 
379 | def data
380 |   @data
381 | end
382 |
385 |
386 | 387 | 388 | 389 |
390 |

391 | 392 | - (Object) noCertificado (readonly) 393 | 394 | 395 | 396 | 397 | 398 |

399 |
400 | 401 |

el número de certificado

402 | 403 | 404 |
405 |
406 |
407 | 408 | 409 |
410 | 411 | 419 | 426 | 427 |
412 |
413 | 
414 | 
415 | 11
416 | 12
417 | 13
418 |
420 |
# File 'lib/certificado.rb', line 11
421 | 
422 | def noCertificado
423 |   @noCertificado
424 | end
425 |
428 |
429 | 430 |
431 | 432 | 433 |
434 |

Instance Method Details

435 | 436 | 437 |
438 |

439 | 440 | - (CFDI::Comprobante) certifica(factura) 441 | 442 | 443 | 444 | 445 | 446 |

447 |
448 | 449 |

Certifica una factura

450 | 451 | 452 |
453 |
454 |
455 |

Parameters:

456 |
    457 | 458 |
  • 459 | 460 | factura 461 | 462 | 463 | (CFDI::Comprobante) 464 | 465 | 466 | 467 | — 468 |
    469 |

    El comprobante a certificar

    470 |
    471 | 472 |
  • 473 | 474 |
475 | 476 |

Returns:

477 |
    478 | 479 |
  • 480 | 481 | 482 | (CFDI::Comprobante) 483 | 484 | 485 | 486 | — 487 |
    488 |

    El comprobante certificado (con `#noCertificado` y `#certificado`)

    489 |
    490 | 491 |
  • 492 | 493 |
494 | 495 |
496 | 497 | 508 | 518 | 519 |
498 |
499 | 
500 | 
501 | 41
502 | 42
503 | 43
504 | 44
505 | 45
506 | 46
507 |
509 |
# File 'lib/certificado.rb', line 41
510 | 
511 | def certifica factura
512 |   
513 |   factura.noCertificado = @noCertificado
514 |   factura.certificado = @data
515 |   
516 | end
517 |
520 |
521 | 522 |
523 | 524 |
525 | 526 | 531 | 532 | 533 | -------------------------------------------------------------------------------- /doc/CFDI/Complemento.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | Class: CFDI::Complemento 8 | 9 | — Documentation by YARD 0.8.7.2 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 63 | 64 | 65 | 66 |

Class: CFDI::Complemento 67 | 68 | 69 | 70 |

71 | 72 |
73 | 74 |
Inherits:
75 |
76 | ElementoComprobante 77 | 78 | 86 | show all 87 | 88 |
89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 |
Defined in:
99 |
lib/complemento.rb
100 | 101 |
102 |
103 | 104 |

Overview

105 |
106 | 107 |

Un complemento fiscal, o Timbre

108 | 109 | 110 |
111 |
112 |
113 | 114 | 115 |
116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 |

Method Summary

130 | 131 |

Methods inherited from ElementoComprobante

132 |

#cadena_original, data, #initialize, #to_h

133 |
134 |

Constructor Details

135 | 136 |

This class inherits a constructor from CFDI::ElementoComprobante

137 | 138 |
139 | 140 | 141 |
142 | 143 | 148 | 149 | 150 | -------------------------------------------------------------------------------- /doc/CFDI/Concepto.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | Class: CFDI::Concepto 8 | 9 | — Documentation by YARD 0.8.7.2 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 63 | 64 | 65 | 66 |

Class: CFDI::Concepto 67 | 68 | 69 | 70 |

71 | 72 |
73 | 74 |
Inherits:
75 |
76 | ElementoComprobante 77 | 78 | 86 | show all 87 | 88 |
89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 |
Defined in:
99 |
lib/concepto.rb
100 | 101 |
102 |
103 | 104 |

Overview

105 |
106 | 107 |

Un concepto del comprobante

108 | 109 | 110 |
111 |
112 |
113 | 114 | 115 |
116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 |

124 | Instance Method Summary 125 | (collapse) 126 |

127 | 128 |
    129 | 130 |
  • 131 | 132 | 133 | - (Integer) cantidad=(qty) 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 |
    148 |

    Asigna la cantidad de (tipo) de este concepto.

    149 |
    150 | 151 |
  • 152 | 153 | 154 |
  • 155 | 156 | 157 | - (Float) importe 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 |
    172 |

    El importe de este concepto.

    173 |
    174 | 175 |
  • 176 | 177 | 178 |
  • 179 | 180 | 181 | - (Float) valorUnitario=(dineros) 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 |
    196 |

    Aigna el valor unitario de este concepto.

    197 |
    198 | 199 |
  • 200 | 201 | 202 |
203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 |

Methods inherited from ElementoComprobante

215 |

data, #initialize, #to_h

216 |
217 |

Constructor Details

218 | 219 |

This class inherits a constructor from CFDI::ElementoComprobante

220 | 221 |
222 | 223 | 224 |
225 |

Instance Method Details

226 | 227 | 228 |
229 |

230 | 231 | - (Integer) cantidad=(qty) 232 | 233 | 234 | 235 | 236 | 237 |

238 |
239 | 240 |

Asigna la cantidad de (tipo) de este concepto

241 | 242 | 243 |
244 |
245 |
246 |

Parameters:

247 |
    248 | 249 |
  • 250 | 251 | qty 252 | 253 | 254 | (Integer, String, #to_i) 255 | 256 | 257 | 258 | — 259 |
    260 |

    La cantidad, que ahuevo queremos en int, porque no, no podemos vender 1.5 261 | Kilos de verga…

    262 |
    263 | 264 |
  • 265 | 266 |
267 | 268 |

Returns:

269 |
    270 | 271 |
  • 272 | 273 | 274 | (Integer) 275 | 276 | 277 | 278 | — 279 |
    280 |

    La cantidad

    281 |
    282 | 283 |
  • 284 | 285 |
286 | 287 |
288 | 289 | 298 | 306 | 307 |
290 |
291 | 
292 | 
293 | 46
294 | 47
295 | 48
296 | 49
297 |
299 |
# File 'lib/concepto.rb', line 46
300 | 
301 | def cantidad= qty
302 |   @cantidad = qty.to_i
303 |   @cantidad
304 | end
305 |
308 |
309 | 310 |
311 |

312 | 313 | - (Float) importe 314 | 315 | 316 | 317 | 318 | 319 |

320 |
321 | 322 |

El importe de este concepto

323 | 324 | 325 |
326 |
327 |
328 | 329 |

Returns:

330 |
    331 | 332 |
  • 333 | 334 | 335 | (Float) 336 | 337 | 338 | 339 | — 340 |
    341 |

    El valor unitario multiplicado por la cantidad

    342 |
    343 | 344 |
  • 345 | 346 |
347 | 348 |
349 | 350 | 358 | 365 | 366 |
351 |
352 | 
353 | 
354 | 37
355 | 38
356 | 39
357 |
359 |
# File 'lib/concepto.rb', line 37
360 | 
361 | def importe
362 |   return @valorUnitario*@cantidad
363 | end
364 |
367 |
368 | 369 |
370 |

371 | 372 | - (Float) valorUnitario=(dineros) 373 | 374 | 375 | 376 | 377 | 378 |

379 |
380 | 381 |

Aigna el valor unitario de este concepto

382 | 383 | 384 |
385 |
386 |
387 |

Parameters:

388 |
    389 | 390 |
  • 391 | 392 | dineros 393 | 394 | 395 | (String, Float, #to_f) 396 | 397 | 398 | 399 | — 400 |
    401 |

    Cualquier cosa que responda a #to_f

    402 |
    403 | 404 |
  • 405 | 406 |
407 | 408 |

Returns:

409 |
    410 | 411 |
  • 412 | 413 | 414 | (Float) 415 | 416 | 417 | 418 | — 419 |
    420 |

    El valor unitario como Float

    421 |
    422 | 423 |
  • 424 | 425 |
426 | 427 |
428 | 429 | 438 | 446 | 447 |
430 |
431 | 
432 | 
433 | 28
434 | 29
435 | 30
436 | 31
437 |
439 |
# File 'lib/concepto.rb', line 28
440 | 
441 | def valorUnitario= dineros
442 |   @valorUnitario = dineros.to_f
443 |   @valorUnitario
444 | end
445 |
448 |
449 | 450 |
451 | 452 |
453 | 454 | 459 | 460 | 461 | -------------------------------------------------------------------------------- /doc/CFDI/ElementoComprobante.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | Class: CFDI::ElementoComprobante 8 | 9 | — Documentation by YARD 0.8.7.2 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 63 | 64 | 65 | 66 |

Class: CFDI::ElementoComprobante 67 | 68 | 69 | 70 |

71 | 72 |
73 | 74 |
Inherits:
75 |
76 | Object 77 | 78 |
    79 |
  • Object
  • 80 | 81 | 82 | 83 |
84 | show all 85 | 86 |
87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 |
Defined in:
97 |
lib/comun.rb
98 | 99 |
100 |
101 | 102 |

Overview

103 |
104 | 105 |

Un elemento del comprobante con métodos mágicos y especiales

106 | 107 | 108 |
109 |
110 |
111 | 112 | 113 |
114 |

Direct Known Subclasses

115 |

Complemento, Concepto, Domicilio, Entidad

116 |
117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 |

126 | Class Method Summary 127 | (collapse) 128 |

129 | 130 |
    131 | 132 |
  • 133 | 134 | 135 | + (Array) data 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 |
    150 |

    Los elementos para generar la cadena original de este comprobante.

    151 |
    152 | 153 |
  • 154 | 155 | 156 |
157 | 158 |

159 | Instance Method Summary 160 | (collapse) 161 |

162 | 163 |
    164 | 165 |
  • 166 | 167 | 168 | - (Array) cadena_original 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 |
    183 |

    Un array con los datos de la cadena original para este elemento.

    184 |
    185 | 186 |
  • 187 | 188 | 189 |
  • 190 | 191 | 192 | - (CFDI::ElementoComprobante) initialize(data = {}) 193 | 194 | 195 | 196 | 197 | 198 | 199 | constructor 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 |
    209 |

    Crear este elemento y settear lo que le pasemos como hash en un tipo de 210 | dato adecuado.

    211 |
    212 | 213 |
  • 214 | 215 | 216 |
  • 217 | 218 | 219 | - (Hash) to_h 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 |
    234 |

    Los datos xmleables de este elemento.

    235 |
    236 | 237 |
  • 238 | 239 | 240 |
241 | 242 | 243 |
244 |

Constructor Details

245 | 246 |
247 |

248 | 249 | - (CFDI::ElementoComprobante) initialize(data = {}) 250 | 251 | 252 | 253 | 254 | 255 |

256 |
257 | 258 |

Crear este elemento y settear lo que le pasemos como hash en un tipo de 259 | dato adecuado

260 | 261 | 262 |
263 |
264 |
265 |

Parameters:

266 |
    267 | 268 |
  • 269 | 270 | data 271 | 272 | 273 | (Hash) 274 | 275 | 276 | (defaults to: {}) 277 | 278 | 279 | — 280 |
    281 |

    Los datos para este elemento

    282 |
    283 | 284 |
  • 285 | 286 |
287 | 288 | 289 |
290 | 291 | 304 | 316 | 317 |
292 |
293 | 
294 | 
295 | 24
296 | 25
297 | 26
298 | 27
299 | 28
300 | 29
301 | 30
302 | 31
303 |
305 |
# File 'lib/comun.rb', line 24
306 | 
307 | def initialize data={}
308 |   #puts self.class
309 |   data.each do |k,v|
310 |     method = "#{k}=".to_sym
311 |     next if !self.respond_to? method
312 |     self.send method, v
313 |   end
314 | end
315 |
318 |
319 | 320 |
321 | 322 | 323 |
324 |

Class Method Details

325 | 326 | 327 |
328 |

329 | 330 | + (Array) data 331 | 332 | 333 | 334 | 335 | 336 |

337 |
338 | 339 |

Los elementos para generar la cadena original de este comprobante

340 | 341 | 342 |
343 |
344 |
345 | 346 |

Returns:

347 |
    348 | 349 |
  • 350 | 351 | 352 | (Array) 353 | 354 | 355 | 356 | — 357 |
    358 |

    idem

    359 |
    360 | 361 |
  • 362 | 363 |
364 | 365 |
366 | 367 | 375 | 382 | 383 |
368 |
369 | 
370 | 
371 | 37
372 | 38
373 | 39
374 |
376 |
# File 'lib/comun.rb', line 37
377 | 
378 | def self.data
379 |   @cadenaOriginal
380 | end
381 |
384 |
385 | 386 |
387 | 388 |
389 |

Instance Method Details

390 | 391 | 392 |
393 |

394 | 395 | - (Array) cadena_original 396 | 397 | 398 | 399 | 400 | 401 |

402 |
403 | 404 |

Un array con los datos de la cadena original para este elemento

405 | 406 | 407 |
408 |
409 |
410 | 411 |

Returns:

412 |
    413 | 414 |
  • 415 | 416 | 417 | (Array) 418 | 419 | 420 | 421 | — 422 |
    423 |

    idem

    424 |
    425 | 426 |
  • 427 | 428 |
429 | 430 |
431 | 432 | 446 | 459 | 460 |
433 |
434 | 
435 | 
436 | 45
437 | 46
438 | 47
439 | 48
440 | 49
441 | 50
442 | 51
443 | 52
444 | 53
445 |
447 |
# File 'lib/comun.rb', line 45
448 | 
449 | def cadena_original
450 |   params = []
451 |   data = {}
452 |   data = self.class.data
453 |  # puts self.class.cadenaOriginal
454 |   
455 |   data.each {|key| params.push instance_variable_get('@'+key.to_s) }
456 |   return params
457 | end
458 |
461 |
462 | 463 |
464 |

465 | 466 | - (Hash) to_h 467 | 468 | 469 | 470 | 471 | 472 |

473 |
474 | 475 |

Los datos xmleables de este elemento

476 | 477 | 478 |
479 |
480 |
481 | 482 |

Returns:

483 |
    484 | 485 |
  • 486 | 487 | 488 | (Hash) 489 | 490 | 491 | 492 | — 493 |
    494 |

    idem

    495 |
    496 | 497 |
  • 498 | 499 |
500 | 501 |
502 | 503 | 518 | 532 | 533 |
504 |
505 | 
506 | 
507 | 59
508 | 60
509 | 61
510 | 62
511 | 63
512 | 64
513 | 65
514 | 66
515 | 67
516 | 68
517 |
519 |
# File 'lib/comun.rb', line 59
520 | 
521 | def to_h
522 |   h = {}
523 |   self.class.data.each do |v|
524 |     value = self.send(v)
525 |     value = value.to_h if value.is_a? ElementoComprobante
526 |     h[v] = value
527 |   end
528 |   
529 |   h
530 | end
531 |
534 |
535 | 536 |
537 | 538 |
539 | 540 | 545 | 546 | 547 | -------------------------------------------------------------------------------- /doc/CFDI/Entidad.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | Class: CFDI::Entidad 8 | 9 | — Documentation by YARD 0.8.7.2 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 63 | 64 | 65 | 66 |

Class: CFDI::Entidad 67 | 68 | 69 | 70 |

71 | 72 |
73 | 74 |
Inherits:
75 |
76 | ElementoComprobante 77 | 78 | 86 | show all 87 | 88 |
89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 |
Defined in:
99 |
lib/entidad.rb
100 | 101 |
102 |
103 | 104 |

Overview

105 |
106 | 107 |

Una persona fiscal

108 | 109 | 110 |
111 |
112 |
113 | 114 | 115 |
116 | 117 | 118 | 119 |

Instance Attribute Summary (collapse)

120 |
    121 | 122 |
  • 123 | 124 | 125 | - (CFDI::Domicilio, Hash) domicilioFiscal 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 |
    143 |

    El domicilio de esta entidad.

    144 |
    145 | 146 |
  • 147 | 148 | 149 |
  • 150 | 151 | 152 | - (CFDI::Domicilio, Hash) expedidoEn 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 |
    170 |

    El domicilio de la sucursal de emisión.

    171 |
    172 | 173 |
  • 174 | 175 | 176 |
  • 177 | 178 | 179 | - (String) nombre 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 |
    197 |

    El nombre o razón social de la entidad.

    198 |
    199 | 200 |
  • 201 | 202 | 203 |
  • 204 | 205 | 206 | - (String) regimenFiscal 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 |
    224 |

    El régimen fiscal, sólo de un emisor.

    225 |
    226 | 227 |
  • 228 | 229 | 230 |
  • 231 | 232 | 233 | - (String) rfc 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 |
    251 |

    El RFC.

    252 |
    253 | 254 |
  • 255 | 256 | 257 |
258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 |

Method Summary

270 | 271 |

Methods inherited from ElementoComprobante

272 |

data, #initialize, #to_h

273 |
274 |

Constructor Details

275 | 276 |

This class inherits a constructor from CFDI::ElementoComprobante

277 | 278 |
279 | 280 |
281 |

Instance Attribute Details

282 | 283 | 284 | 285 |
286 |

287 | 288 | - (CFDI::Domicilio, Hash) domicilioFiscal 289 | 290 | 291 | 292 | 293 | 294 |

295 |
296 | 297 |

El domicilio de esta entidad

298 | 299 | 300 |
301 |
302 |
303 | 304 |

Returns:

305 |
    306 | 307 |
  • 308 | 309 | 310 | (CFDI::Domicilio, Hash) 311 | 312 | 313 | 314 | — 315 |
    316 |

    the current value of domicilioFiscal

    317 |
    318 | 319 |
  • 320 | 321 |
322 | 323 |
324 | 325 | 333 | 340 | 341 |
326 |
327 | 
328 | 
329 | 10
330 | 11
331 | 12
332 |
334 |
# File 'lib/entidad.rb', line 10
335 | 
336 | def domicilioFiscal
337 |   @domicilioFiscal
338 | end
339 |
342 |
343 | 344 | 345 | 346 |
347 |

348 | 349 | - (CFDI::Domicilio, Hash) expedidoEn 350 | 351 | 352 | 353 | 354 | 355 |

356 |
357 | 358 |

El domicilio de la sucursal de emisión

359 | 360 | 361 |
362 |
363 |
364 | 365 |

Returns:

366 |
    367 | 368 |
  • 369 | 370 | 371 | (CFDI::Domicilio, Hash) 372 | 373 | 374 | 375 | — 376 |
    377 |

    the current value of expedidoEn

    378 |
    379 | 380 |
  • 381 | 382 |
383 | 384 |
385 | 386 | 394 | 401 | 402 |
387 |
388 | 
389 | 
390 | 10
391 | 11
392 | 12
393 |
395 |
# File 'lib/entidad.rb', line 10
396 | 
397 | def expedidoEn
398 |   @expedidoEn
399 | end
400 |
403 |
404 | 405 | 406 | 407 |
408 |

409 | 410 | - (String) nombre 411 | 412 | 413 | 414 | 415 | 416 |

417 |
418 | 419 |

El nombre o razón social de la entidad

420 | 421 | 422 |
423 |
424 |
425 | 426 |

Returns:

427 |
    428 | 429 |
  • 430 | 431 | 432 | (String) 433 | 434 | 435 | 436 | — 437 |
    438 |

    the current value of nombre

    439 |
    440 | 441 |
  • 442 | 443 |
444 | 445 |
446 | 447 | 455 | 462 | 463 |
448 |
449 | 
450 | 
451 | 10
452 | 11
453 | 12
454 |
456 |
# File 'lib/entidad.rb', line 10
457 | 
458 | def nombre
459 |   @nombre
460 | end
461 |
464 |
465 | 466 | 467 | 468 |
469 |

470 | 471 | - (String) regimenFiscal 472 | 473 | 474 | 475 | 476 | 477 |

478 |
479 | 480 |

El régimen fiscal, sólo de un emisor

481 | 482 | 483 |
484 |
485 |
486 | 487 |

Returns:

488 |
    489 | 490 |
  • 491 | 492 | 493 | (String) 494 | 495 | 496 | 497 | — 498 |
    499 |

    the current value of regimenFiscal

    500 |
    501 | 502 |
  • 503 | 504 |
505 | 506 |
507 | 508 | 516 | 523 | 524 |
509 |
510 | 
511 | 
512 | 10
513 | 11
514 | 12
515 |
517 |
# File 'lib/entidad.rb', line 10
518 | 
519 | def regimenFiscal
520 |   @regimenFiscal
521 | end
522 |
525 |
526 | 527 | 528 | 529 |
530 |

531 | 532 | - (String) rfc 533 | 534 | 535 | 536 | 537 | 538 |

539 |
540 | 541 |

El RFC

542 | 543 | 544 |
545 |
546 |
547 | 548 |

Returns:

549 |
    550 | 551 |
  • 552 | 553 | 554 | (String) 555 | 556 | 557 | 558 | — 559 |
    560 |

    the current value of rfc

    561 |
    562 | 563 |
  • 564 | 565 |
566 | 567 |
568 | 569 | 577 | 584 | 585 |
570 |
571 | 
572 | 
573 | 10
574 | 11
575 | 12
576 |
578 |
# File 'lib/entidad.rb', line 10
579 | 
580 | def rfc
581 |   @rfc
582 | end
583 |
586 |
587 | 588 |
589 | 590 | 591 |
592 | 593 | 598 | 599 | 600 | -------------------------------------------------------------------------------- /doc/CFDI/Key.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | Class: CFDI::Key 8 | 9 | — Documentation by YARD 0.8.7.2 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 63 | 64 | 65 | 66 |

Class: CFDI::Key 67 | 68 | 69 | 70 |

71 | 72 |
73 | 74 |
Inherits:
75 |
76 | OpenSSL::PKey::RSA 77 | 78 |
    79 |
  • Object
  • 80 | 81 | 82 | 83 | 84 | 85 |
86 | show all 87 | 88 |
89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 |
Defined in:
99 |
lib/key.rb
100 | 101 |
102 |
103 | 104 |

Overview

105 |
106 | 107 |

Una llave privada, en formato X509 no PKCS7

108 | 109 |

Para convertirlos, nomás hacemos

110 | 111 |
openssl pkcs8 -inform DER -in nombreGiganteDelSAT.key -passin pass:miFIELCreo >> certX509.pem
112 | 113 | 114 |
115 |
116 |
117 | 118 | 119 |
120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 |

128 | Instance Method Summary 129 | (collapse) 130 |

131 | 132 |
    133 | 134 |
  • 135 | 136 | 137 | - (CFDI::Key) initialize(file, password = nil) 138 | 139 | 140 | 141 | 142 | 143 | 144 | constructor 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 |
    154 |

    Crea una llave privada.

    155 |
    156 | 157 |
  • 158 | 159 | 160 |
  • 161 | 162 | 163 | - (CFDI::comprobante) sella(factura) 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 |
    178 |

    sella una factura.

    179 |
    180 | 181 |
  • 182 | 183 | 184 |
185 | 186 | 187 | 188 |
189 |

Constructor Details

190 | 191 |
192 |

193 | 194 | - (CFDI::Key) initialize(file, password = nil) 195 | 196 | 197 | 198 | 199 | 200 |

201 |
202 | 203 |

Crea una llave privada

204 | 205 | 206 |
207 |
208 |
209 |

Parameters:

210 |
    211 | 212 |
  • 213 | 214 | file 215 | 216 | 217 | (IO, String) 218 | 219 | 220 | 221 | — 222 |
    223 |

    El `path` de esta llave o los bytes de la misma

    224 |
    225 | 226 |
  • 227 | 228 |
  • 229 | 230 | password=nil 231 | 232 | 233 | (String, nil) 234 | 235 | 236 | 237 | — 238 |
    239 |

    El password de esta llave

    240 |
    241 | 242 |
  • 243 | 244 |
245 | 246 | 247 |
248 | 249 | 260 | 270 | 271 |
250 |
251 | 
252 | 
253 | 17
254 | 18
255 | 19
256 | 20
257 | 21
258 | 22
259 |
261 |
# File 'lib/key.rb', line 17
262 | 
263 | def initialize file, password=nil
264 |   if file.is_a? String
265 |     file = File.read(file)
266 |   end
267 |   super file, password
268 | end
269 |
272 |
273 | 274 |
275 | 276 | 277 |
278 |

Instance Method Details

279 | 280 | 281 |
282 |

283 | 284 | - (CFDI::comprobante) sella(factura) 285 | 286 | 287 | 288 | 289 | 290 |

291 |
292 | 293 |

sella una factura

294 | 295 | 296 |
297 |
298 |
299 |

Parameters:

300 |
    301 | 302 |
  • 303 | 304 | factura 305 | 306 | 307 | (CFDI::Comprobante) 308 | 309 | 310 | 311 | — 312 |
    313 |

    El comprobante a sellar

    314 |
    315 | 316 |
  • 317 | 318 |
319 | 320 |

Returns:

321 |
    322 | 323 |
  • 324 | 325 | 326 | (CFDI::comprobante) 327 | 328 | 329 | 330 | — 331 |
    332 |

    El comprobante con el `sello`

    333 |
    334 | 335 |
  • 336 | 337 |
338 | 339 |
340 | 341 | 350 | 358 | 359 |
342 |
343 | 
344 | 
345 | 29
346 | 30
347 | 31
348 | 32
349 |
351 |
# File 'lib/key.rb', line 29
352 | 
353 | def sella factura
354 |   cadena_original = factura.cadena_original
355 |   factura.sello = Base64::encode64(self.sign(OpenSSL::Digest::SHA1.new, cadena_original)).gsub(/\n/, '')
356 | end
357 |
360 |
361 | 362 |
363 | 364 |
365 | 366 | 371 | 372 | 373 | -------------------------------------------------------------------------------- /doc/Float.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | Class: Float 8 | 9 | — Documentation by YARD 0.8.7.2 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 63 | 64 | 65 | 66 |

Class: Float 67 | 68 | 69 | 70 |

71 | 72 |
73 | 74 |
Inherits:
75 |
76 | Object 77 | 78 |
    79 |
  • Object
  • 80 | 81 | 82 | 83 |
84 | show all 85 | 86 |
87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 |
Defined in:
97 |
lib/comun.rb
98 | 99 |
100 |
101 | 102 |

Overview

103 |
104 | 105 |

Mkay, quiero que mis floats tengan dos decimales a huevo

106 | 107 | 108 |
109 |
110 |
111 | 112 | 113 |
114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 |

122 | Instance Method Summary 123 | (collapse) 124 |

125 | 126 |
    127 | 128 |
  • 129 | 130 | 131 | - (String) to_s 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 |
    146 |

    Lo que dice la clase.

    147 |
    148 | 149 |
  • 150 | 151 | 152 |
153 | 154 | 155 | 156 | 157 |
158 |

Instance Method Details

159 | 160 | 161 |
162 |

163 | 164 | - (String) to_s 165 | 166 | 167 | 168 | 169 | 170 |

171 |
172 | 173 |

Lo que dice la clase

174 | 175 | 176 |
177 |
178 |
179 | 180 |

Returns:

181 |
    182 | 183 |
  • 184 | 185 | 186 | (String) 187 | 188 | 189 | 190 | — 191 |
    192 |

    El string de este float con dos decimales

    193 |
    194 | 195 |
  • 196 | 197 |
198 | 199 |
200 | 201 | 209 | 216 | 217 |
202 |
203 | 
204 | 
205 | 7
206 | 8
207 | 9
208 |
210 |
# File 'lib/comun.rb', line 7
211 | 
212 | def to_s
213 |   sprintf('%.2f', self)
214 | end
215 |
218 |
219 | 220 |
221 | 222 |
223 | 224 | 229 | 230 | 231 | -------------------------------------------------------------------------------- /doc/_index.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | Documentation by YARD 0.8.7.2 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 56 | 57 | 58 | 59 |

Documentation by YARD 0.8.7.2

60 |
61 |

Alphabetic Index

62 | 63 |
64 |

Namespace Listing A-Z

65 | 66 | 67 | 68 | 69 | 70 | 71 | 180 | 181 |
72 | 73 | 74 |
    75 |
  • C
  • 76 |
      77 | 78 |
    • 79 | CFDI 80 | 81 |
    • 82 | 83 |
    • 84 | Certificado 85 | 86 | (CFDI) 87 | 88 |
    • 89 | 90 |
    • 91 | Complemento 92 | 93 | (CFDI) 94 | 95 |
    • 96 | 97 |
    • 98 | Comprobante 99 | 100 | (CFDI) 101 | 102 |
    • 103 | 104 |
    • 105 | Concepto 106 | 107 | (CFDI) 108 | 109 |
    • 110 | 111 |
    112 |
113 | 114 | 115 |
    116 |
  • D
  • 117 |
      118 | 119 |
    • 120 | Domicilio 121 | 122 | (CFDI) 123 | 124 |
    • 125 | 126 |
    127 |
128 | 129 | 130 |
    131 |
  • E
  • 132 |
      133 | 134 |
    • 135 | ElementoComprobante 136 | 137 | (CFDI) 138 | 139 |
    • 140 | 141 |
    • 142 | Entidad 143 | 144 | (CFDI) 145 | 146 |
    • 147 | 148 |
    149 |
150 | 151 | 152 |
    153 |
  • F
  • 154 |
      155 | 156 |
    • 157 | Float 158 | 159 |
    • 160 | 161 |
    162 |
163 | 164 | 165 |
    166 |
  • K
  • 167 |
      168 | 169 |
    • 170 | Key 171 | 172 | (CFDI) 173 | 174 |
    • 175 | 176 |
    177 |
178 | 179 |
182 | 183 |
184 | 185 |
186 | 187 | 192 | 193 | 194 | -------------------------------------------------------------------------------- /doc/class_list.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | Class List 19 | 20 | 21 | 22 | 28 |
29 |

Class List

30 | 45 | 46 | 47 | 52 |
53 | 54 | 55 | -------------------------------------------------------------------------------- /doc/css/common.css: -------------------------------------------------------------------------------- 1 | /* Override this file with custom rules */ -------------------------------------------------------------------------------- /doc/css/full_list.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif; 4 | font-size: 13px; 5 | height: 101%; 6 | overflow-x: hidden; 7 | } 8 | 9 | h1 { padding: 12px 10px; padding-bottom: 0; margin: 0; font-size: 1.4em; } 10 | .clear { clear: both; } 11 | #search { position: absolute; right: 5px; top: 9px; padding-left: 24px; } 12 | #content.insearch #search, #content.insearch #noresults { background: url(data:image/gif;base64,R0lGODlhEAAQAPYAAP///wAAAPr6+pKSkoiIiO7u7sjIyNjY2J6engAAAI6OjsbGxjIyMlJSUuzs7KamppSUlPLy8oKCghwcHLKysqSkpJqamvT09Pj4+KioqM7OzkRERAwMDGBgYN7e3ujo6Ly8vCoqKjY2NkZGRtTU1MTExDw8PE5OTj4+PkhISNDQ0MrKylpaWrS0tOrq6nBwcKysrLi4uLq6ul5eXlxcXGJiYoaGhuDg4H5+fvz8/KKiohgYGCwsLFZWVgQEBFBQUMzMzDg4OFhYWBoaGvDw8NbW1pycnOLi4ubm5kBAQKqqqiQkJCAgIK6urnJyckpKSjQ0NGpqatLS0sDAwCYmJnx8fEJCQlRUVAoKCggICLCwsOTk5ExMTPb29ra2tmZmZmhoaNzc3KCgoBISEiIiIgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCAAAACwAAAAAEAAQAAAHaIAAgoMgIiYlg4kACxIaACEJCSiKggYMCRselwkpghGJBJEcFgsjJyoAGBmfggcNEx0flBiKDhQFlIoCCA+5lAORFb4AJIihCRbDxQAFChAXw9HSqb60iREZ1omqrIPdJCTe0SWI09GBACH5BAkIAAAALAAAAAAQABAAAAdrgACCgwc0NTeDiYozCQkvOTo9GTmDKy8aFy+NOBA7CTswgywJDTIuEjYFIY0JNYMtKTEFiRU8Pjwygy4ws4owPyCKwsMAJSTEgiQlgsbIAMrO0dKDGMTViREZ14kYGRGK38nHguHEJcvTyIEAIfkECQgAAAAsAAAAABAAEAAAB2iAAIKDAggPg4iJAAMJCRUAJRIqiRGCBI0WQEEJJkWDERkYAAUKEBc4Po1GiKKJHkJDNEeKig4URLS0ICImJZAkuQAhjSi/wQyNKcGDCyMnk8u5rYrTgqDVghgZlYjcACTA1sslvtHRgQAh+QQJCAAAACwAAAAAEAAQAAAHZ4AAgoOEhYaCJSWHgxGDJCQARAtOUoQRGRiFD0kJUYWZhUhKT1OLhR8wBaaFBzQ1NwAlkIszCQkvsbOHL7Y4q4IuEjaqq0ZQD5+GEEsJTDCMmIUhtgk1lo6QFUwJVDKLiYJNUd6/hoEAIfkECQgAAAAsAAAAABAAEAAAB2iAAIKDhIWGgiUlh4MRgyQkjIURGRiGGBmNhJWHm4uen4ICCA+IkIsDCQkVACWmhwSpFqAABQoQF6ALTkWFnYMrVlhWvIKTlSAiJiVVPqlGhJkhqShHV1lCW4cMqSkAR1ofiwsjJyqGgQAh+QQJCAAAACwAAAAAEAAQAAAHZ4AAgoOEhYaCJSWHgxGDJCSMhREZGIYYGY2ElYebi56fhyWQniSKAKKfpaCLFlAPhl0gXYNGEwkhGYREUywag1wJwSkHNDU3D0kJYIMZQwk8MjPBLx9eXwuETVEyAC/BOKsuEjYFhoEAIfkECQgAAAAsAAAAABAAEAAAB2eAAIKDhIWGgiUlh4MRgyQkjIURGRiGGBmNhJWHm4ueICImip6CIQkJKJ4kigynKaqKCyMnKqSEK05StgAGQRxPYZaENqccFgIID4KXmQBhXFkzDgOnFYLNgltaSAAEpxa7BQoQF4aBACH5BAkIAAAALAAAAAAQABAAAAdogACCg4SFggJiPUqCJSWGgkZjCUwZACQkgxGEXAmdT4UYGZqCGWQ+IjKGGIUwPzGPhAc0NTewhDOdL7Ykji+dOLuOLhI2BbaFETICx4MlQitdqoUsCQ2vhKGjglNfU0SWmILaj43M5oEAOwAAAAAAAAAAAA==) no-repeat center left; } 13 | #full_list { padding: 0; list-style: none; margin-left: 0; } 14 | #full_list ul { padding: 0; } 15 | #full_list li { padding: 5px; padding-left: 12px; margin: 0; font-size: 1.1em; list-style: none; } 16 | #noresults { padding: 7px 12px; } 17 | #content.insearch #noresults { margin-left: 7px; } 18 | ul.collapsed ul, ul.collapsed li { display: none; } 19 | ul.collapsed.search_uncollapsed { display: block; } 20 | ul.collapsed.search_uncollapsed li { display: list-item; } 21 | li a.toggle { cursor: default; position: relative; left: -5px; top: 4px; text-indent: -999px; width: 10px; height: 9px; margin-left: -10px; display: block; float: left; background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAYAAABb0P4QAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAK8AAACvABQqw0mAAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAAVdEVYdENyZWF0aW9uIFRpbWUAMy8xNC8wOeNZPpQAAAE2SURBVDiNrZTBccIwEEXfelIAHUA6CZ24BGaWO+FuzZAK4k6gg5QAdGAq+Bxs2Yqx7BzyL7Llp/VfzZeQhCTc/ezuGzKKnKSzpCxXJM8fwNXda3df5RZETlIt6YUzSQDs93sl8w3wBZxCCE10GM1OcWbWjB2mWgEH4Mfdyxm3PSepBHibgQE2wLe7r4HjEidpnXMYdQPKEMJcsZ4zs2POYQOcaPfwMVOo58zsAdMt18BuoVDPxUJRacELbXv3hUIX2vYmOUvi8C8ydz/ThjXrqKqqLbDIAdsCKBd+Wo7GWa7o9qzOQHVVVXeAbs+yHHCH4aTsaCOQqunmUy1yBUAXkdMIfMlgF5EXLo2OpV/c/Up7jG4hhHcYLgWzAZXUc2b2ixsfvc/RmNNfOXD3Q/oeL9axJE1yT9IOoUu6MGUkAAAAAElFTkSuQmCC) no-repeat bottom left; } 22 | li.collapsed a.toggle { opacity: 0.5; cursor: default; background-position: top left; } 23 | li { color: #888; cursor: pointer; } 24 | li.deprecated { text-decoration: line-through; font-style: italic; } 25 | li.r1 { background: #f0f0f0; } 26 | li.r2 { background: #fafafa; } 27 | li:hover { background: #ddd; } 28 | li small:before { content: "("; } 29 | li small:after { content: ")"; } 30 | li small.search_info { display: none; } 31 | a:link, a:visited { text-decoration: none; color: #05a; } 32 | li.clicked { background: #05a; color: #ccc; } 33 | li.clicked a:link, li.clicked a:visited { color: #eee; } 34 | li.clicked a.toggle { opacity: 0.5; background-position: bottom right; } 35 | li.collapsed.clicked a.toggle { background-position: top right; } 36 | #search input { border: 1px solid #bbb; -moz-border-radius: 3px; -webkit-border-radius: 3px; } 37 | #nav { margin-left: 10px; font-size: 0.9em; display: none; color: #aaa; } 38 | #nav a:link, #nav a:visited { color: #358; } 39 | #nav a:hover { background: transparent; color: #5af; } 40 | .frames #nav span:after { content: ' | '; } 41 | .frames #nav span:last-child:after { content: ''; } 42 | 43 | .frames #content h1 { margin-top: 0; } 44 | .frames li { white-space: nowrap; cursor: normal; } 45 | .frames li small { display: block; font-size: 0.8em; } 46 | .frames li small:before { content: ""; } 47 | .frames li small:after { content: ""; } 48 | .frames li small.search_info { display: none; } 49 | .frames #search { width: 170px; position: static; margin: 3px; margin-left: 10px; font-size: 0.9em; color: #888; padding-left: 0; padding-right: 24px; } 50 | .frames #content.insearch #search { background-position: center right; } 51 | .frames #search input { width: 110px; } 52 | .frames #nav { display: block; } 53 | 54 | #full_list.insearch li { display: none; } 55 | #full_list.insearch li.found { display: list-item; padding-left: 10px; } 56 | #full_list.insearch li a.toggle { display: none; } 57 | #full_list.insearch li small.search_info { display: block; } 58 | -------------------------------------------------------------------------------- /doc/css/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 0 20px; 3 | font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif; 4 | font-size: 13px; 5 | } 6 | body.frames { padding: 0 5px; } 7 | h1 { font-size: 25px; margin: 1em 0 0.5em; padding-top: 4px; border-top: 1px dotted #d5d5d5; } 8 | h1.noborder { border-top: 0px; margin-top: 0; padding-top: 4px; } 9 | h1.title { margin-bottom: 10px; } 10 | h1.alphaindex { margin-top: 0; font-size: 22px; } 11 | h2 { 12 | padding: 0; 13 | padding-bottom: 3px; 14 | border-bottom: 1px #aaa solid; 15 | font-size: 1.4em; 16 | margin: 1.8em 0 0.5em; 17 | } 18 | h2 small { font-weight: normal; font-size: 0.7em; display: block; float: right; } 19 | .clear { clear: both; } 20 | .inline { display: inline; } 21 | .inline p:first-child { display: inline; } 22 | .docstring h1, .docstring h2, .docstring h3, .docstring h4 { padding: 0; border: 0; border-bottom: 1px dotted #bbb; } 23 | .docstring h1 { font-size: 1.2em; } 24 | .docstring h2 { font-size: 1.1em; } 25 | .docstring h3, .docstring h4 { font-size: 1em; border-bottom: 0; padding-top: 10px; } 26 | .summary_desc .object_link, .docstring .object_link { font-family: monospace; } 27 | .rdoc-term { padding-right: 25px; font-weight: bold; } 28 | .rdoc-list p { margin: 0; padding: 0; margin-bottom: 4px; } 29 | 30 | /* style for */ 31 | #filecontents table, .docstring table { border-collapse: collapse; } 32 | #filecontents table th, #filecontents table td, 33 | .docstring table th, .docstring table td { border: 1px solid #ccc; padding: 8px; padding-right: 17px; } 34 | #filecontents table tr:nth-child(odd), 35 | .docstring table tr:nth-child(odd) { background: #eee; } 36 | #filecontents table tr:nth-child(even), 37 | .docstring table tr:nth-child(even) { background: #fff; } 38 | #filecontents table th, .docstring table th { background: #fff; } 39 | 40 | /* style for
70 | 71 | 180 | 181 |
72 | 73 | 74 |
    75 |
  • C
  • 76 |
      77 | 78 |
    • 79 | CFDI 80 | 81 |
    • 82 | 83 |
    • 84 | Certificado 85 | 86 | (CFDI) 87 | 88 |
    • 89 | 90 |
    • 91 | Complemento 92 | 93 | (CFDI) 94 | 95 |
    • 96 | 97 |
    • 98 | Comprobante 99 | 100 | (CFDI) 101 | 102 |
    • 103 | 104 |
    • 105 | Concepto 106 | 107 | (CFDI) 108 | 109 |
    • 110 | 111 |
    112 |
113 | 114 | 115 |
    116 |
  • D
  • 117 |
      118 | 119 |
    • 120 | Domicilio 121 | 122 | (CFDI) 123 | 124 |
    • 125 | 126 |
    127 |
128 | 129 | 130 |
    131 |
  • E
  • 132 |
      133 | 134 |
    • 135 | ElementoComprobante 136 | 137 | (CFDI) 138 | 139 |
    • 140 | 141 |
    • 142 | Entidad 143 | 144 | (CFDI) 145 | 146 |
    • 147 | 148 |
    149 |
150 | 151 | 152 |
    153 |
  • F
  • 154 |
      155 | 156 |
    • 157 | Float 158 | 159 |
    • 160 | 161 |
    162 |
163 | 164 | 165 |
    166 |
  • K
  • 167 |
      168 | 169 |
    • 170 | Key 171 | 172 | (CFDI) 173 | 174 |
    • 175 | 176 |
    177 |
178 | 179 |
182 | 183 | 184 | 185 | 186 | 187 | 192 | 193 | 194 | -------------------------------------------------------------------------------- /doc/js/app.js: -------------------------------------------------------------------------------- 1 | function createSourceLinks() { 2 | $('.method_details_list .source_code'). 3 | before("[View source]"); 4 | $('.toggleSource').toggle(function() { 5 | $(this).parent().nextAll('.source_code').slideDown(100); 6 | $(this).text("Hide source"); 7 | }, 8 | function() { 9 | $(this).parent().nextAll('.source_code').slideUp(100); 10 | $(this).text("View source"); 11 | }); 12 | } 13 | 14 | function createDefineLinks() { 15 | var tHeight = 0; 16 | $('.defines').after(" more..."); 17 | $('.toggleDefines').toggle(function() { 18 | tHeight = $(this).parent().prev().height(); 19 | $(this).prev().show(); 20 | $(this).parent().prev().height($(this).parent().height()); 21 | $(this).text("(less)"); 22 | }, 23 | function() { 24 | $(this).prev().hide(); 25 | $(this).parent().prev().height(tHeight); 26 | $(this).text("more..."); 27 | }); 28 | } 29 | 30 | function createFullTreeLinks() { 31 | var tHeight = 0; 32 | $('.inheritanceTree').toggle(function() { 33 | tHeight = $(this).parent().prev().height(); 34 | $(this).parent().toggleClass('showAll'); 35 | $(this).text("(hide)"); 36 | $(this).parent().prev().height($(this).parent().height()); 37 | }, 38 | function() { 39 | $(this).parent().toggleClass('showAll'); 40 | $(this).parent().prev().height(tHeight); 41 | $(this).text("show all"); 42 | }); 43 | } 44 | 45 | function fixBoxInfoHeights() { 46 | $('dl.box dd.r1, dl.box dd.r2').each(function() { 47 | $(this).prev().height($(this).height()); 48 | }); 49 | } 50 | 51 | function searchFrameLinks() { 52 | $('.full_list_link').click(function() { 53 | toggleSearchFrame(this, $(this).attr('href')); 54 | return false; 55 | }); 56 | } 57 | 58 | function toggleSearchFrame(id, link) { 59 | var frame = $('#search_frame'); 60 | $('#search a').removeClass('active').addClass('inactive'); 61 | if (frame.attr('src') == link && frame.css('display') != "none") { 62 | frame.slideUp(100); 63 | $('#search a').removeClass('active inactive'); 64 | } 65 | else { 66 | $(id).addClass('active').removeClass('inactive'); 67 | frame.attr('src', link).slideDown(100); 68 | } 69 | } 70 | 71 | function linkSummaries() { 72 | $('.summary_signature').click(function() { 73 | document.location = $(this).find('a').attr('href'); 74 | }); 75 | } 76 | 77 | function framesInit() { 78 | if (hasFrames) { 79 | document.body.className = 'frames'; 80 | $('#menu .noframes a').attr('href', document.location); 81 | window.top.document.title = $('html head title').text(); 82 | } 83 | else { 84 | $('#menu .noframes a').text('frames').attr('href', framesUrl); 85 | } 86 | } 87 | 88 | function keyboardShortcuts() { 89 | if (window.top.frames.main) return; 90 | $(document).keypress(function(evt) { 91 | if (evt.altKey || evt.ctrlKey || evt.metaKey || evt.shiftKey) return; 92 | if (typeof evt.target !== "undefined" && 93 | (evt.target.nodeName == "INPUT" || 94 | evt.target.nodeName == "TEXTAREA")) return; 95 | switch (evt.charCode) { 96 | case 67: case 99: $('#class_list_link').click(); break; // 'c' 97 | case 77: case 109: $('#method_list_link').click(); break; // 'm' 98 | case 70: case 102: $('#file_list_link').click(); break; // 'f' 99 | default: break; 100 | } 101 | }); 102 | } 103 | 104 | function summaryToggle() { 105 | $('.summary_toggle').click(function() { 106 | if (localStorage) { 107 | localStorage.summaryCollapsed = $(this).text(); 108 | } 109 | $('.summary_toggle').each(function() { 110 | $(this).text($(this).text() == "collapse" ? "expand" : "collapse"); 111 | var next = $(this).parent().parent().nextAll('ul.summary').first(); 112 | if (next.hasClass('compact')) { 113 | next.toggle(); 114 | next.nextAll('ul.summary').first().toggle(); 115 | } 116 | else if (next.hasClass('summary')) { 117 | var list = $('