コード例 #1
0
ファイル: CfdiFactura.php プロジェクト: raalveco/ciberfactura
 public function complemento()
 {
     return CfdiComplemento::whereRaw("cfdi_id = {$this->id}")->first();
 }
コード例 #2
0
ファイル: CfdiBase.php プロジェクト: raalveco/ciberfactura
 public function xml()
 {
     $cfdi_id = $this->cfdi->id;
     if (CfdiComplemento::whereRaw("cfdi_id = {$cfdi_id}")->count() == 0) {
         return $this->xml->getXML();
     } else {
         return file_get_contents($this->path . "/" . strtoupper($this->cfdi->uuid()) . ".xml");
     }
 }