diff --git a/LICENSE b/LICENSE old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/composer.json b/composer.json old mode 100644 new mode 100755 diff --git a/src/Catalogos.php b/src/Catalogos.php old mode 100644 new mode 100755 diff --git a/src/Facturacom.php b/src/Facturacom.php old mode 100644 new mode 100755 diff --git a/src/Facturacom33.php b/src/Facturacom33.php old mode 100644 new mode 100755 index b2b103e..ba4d29e --- a/src/Facturacom33.php +++ b/src/Facturacom33.php @@ -11,10 +11,11 @@ use inquid\facturacom\models\Cliente; use inquid\facturacom\models\EmpresaFacturadora; +use inquid\facturacom\models\Error; use inquid\facturacom\models\Factura; use inquid\facturacom\models\Factura33; -use inquid\facturacom\models\Error; use inquid\facturacom\models\Serie; +use inquid\facturacom\models\ResponseFactura; use yii\base\Model; use yii\db\ActiveRecord; @@ -158,7 +159,7 @@ public function createFactura33($factura) $this->API_VERSION = 'api/v3'; if ($factura->validate()) { try { - return $this->booleanResponse($this->sendRequest('post', 'cfdi33/create', $factura->getAttributes())); + return $this->sendRequest('post', 'cfdi33/create', $factura); } catch (\Exception $exception) { return new Error(500, $exception->getMessage()); } diff --git a/src/HttpClient.php b/src/HttpClient.php old mode 100644 new mode 100755 diff --git a/src/HttpClientV3.php b/src/HttpClientV3.php old mode 100644 new mode 100755 diff --git a/src/models/Cliente.php b/src/models/Cliente.php old mode 100644 new mode 100755 diff --git a/src/models/Conceptos.php b/src/models/Conceptos.php old mode 100644 new mode 100755 diff --git a/src/models/CuentasBanco.php b/src/models/CuentasBanco.php old mode 100644 new mode 100755 diff --git a/src/models/DataCatalogos.php b/src/models/DataCatalogos.php old mode 100644 new mode 100755 diff --git a/src/models/DocumentoAbonado.php b/src/models/DocumentoAbonado.php old mode 100644 new mode 100755 diff --git a/src/models/EmpresaFacturadora.php b/src/models/EmpresaFacturadora.php old mode 100644 new mode 100755 diff --git a/src/models/Error.php b/src/models/Error.php old mode 100644 new mode 100755 diff --git a/src/models/Factura.php b/src/models/Factura.php old mode 100644 new mode 100755 diff --git a/src/models/Factura33.php b/src/models/Factura33.php old mode 100644 new mode 100755 index 6b8f6fb..7a7a8a5 --- a/src/models/Factura33.php +++ b/src/models/Factura33.php @@ -167,7 +167,7 @@ class Factura33 extends ActiveRecord /** * @inheritdoc */ - public function rules() + /*public function rules() { return [ [['rfc', 'forma_pago', 'metodo_pago', 'num_orden', 'serie_factura', 'send_email', 'exchange_rate', 'currencie'], 'required'], @@ -179,7 +179,7 @@ public function rules() [['forma_pago'], 'string', 'max' => 100], [['num_orden'], 'string', 'max' => 25] ]; - } + }*/ /** * @inheritdoc diff --git a/src/models/Impuestos.php b/src/models/Impuestos.php old mode 100644 new mode 100755 diff --git a/src/models/Producto.php b/src/models/Producto.php old mode 100644 new mode 100755 diff --git a/src/models/ResponseFactura.php b/src/models/ResponseFactura.php new file mode 100755 index 0000000..59e0d3c --- /dev/null +++ b/src/models/ResponseFactura.php @@ -0,0 +1,31 @@ + macbook + * Date=> 12/4/17 + * Time=> 4=>05 PM + */ + +namespace inquid\facturacom\models; + + +use yii\base\Model; + +class ResponseFactura extends Model +{ + public $status = ''; + public $SAT = [ + 'UUID' => '', + 'FechaTimbrado' => '', + 'noCertificadoSAT' => '', + 'version' => '', + 'selloSAT' => '', + 'selloCFD' => '' + ]; + public $INV = [ + 'Serie' => '', + 'Folio' => '', + 'UID' => '', + ]; + public $message = ''; +} \ No newline at end of file diff --git a/src/models/Serie.php b/src/models/Serie.php old mode 100644 new mode 100755