private function reimprimir_ticket()
 {
     $factura = new factura_cliente();
     $fac0 = FALSE;
     if ($_GET['reticket'] == '') {
         foreach ($factura->all() as $fac) {
             $fac0 = $fac;
             break;
         }
     } else {
         $fac0 = $factura->get_by_codigo($_GET['reticket']);
     }
     if ($fac0) {
         $this->imprimir_ticket($fac0, 1, FALSE);
     } else {
         $this->new_error_msg("Ticket no encontrado.");
     }
 }
Beispiel #2
0
 public function get_factura()
 {
     if ($this->tipodocumento == 'Factura de cliente') {
         $fac = new factura_cliente();
         return $fac->get_by_codigo($this->documento);
     } else {
         if ($this->tipodocumento == 'Factura de proveedor') {
             $fac = new factura_proveedor();
             return $fac->get_by_codigo($this->documento);
         } else {
             return FALSE;
         }
     }
 }