Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

¿Como se podria Usar el tema de complementos de pagos? #1

Closed
arcanoix opened this issue Apr 20, 2021 · 2 comments
Closed

¿Como se podria Usar el tema de complementos de pagos? #1

arcanoix opened this issue Apr 20, 2021 · 2 comments

Comments

@arcanoix
Copy link

Tengo una duda, en este libreria veo que tienen en el codigo uso de complementos de pago, pero en la documentacion no aparece como usarlo, algun ejemplo para el uso? Gracias.

@orlandocharles
Copy link
Contributor

Hola @thavoo puedes generarlo de esta forma

<?php

use Kinedu\CfdiXML\CFDI;
use Kinedu\CfdiXML\Common\Complemento\Pago;
use Kinedu\CfdiXML\Node\Complemento\Pagos\DoctoRelacionado;

$cfdi = new CFDI([...]);

$pago = new Pago([
    'FechaPago' => '2021-01-01T12:00:00',
    'FormaDePagoP' => '03',
    'MonedaP' => 'MXN',
    'Monto' => '300.00',
], [
    'Version' => '1.0',
]);

$pago->add(new DoctoRelacionado([
    'IdDocumento' => 'uuid',
    'Serie' => 'KIN',
    'Folio' => '1',
    'MonedaDR' => 'MXN',
    'MetodoDePagoDR' => 'PPD',
    'NumParcialidad' => 1,
    'ImpSaldoAnt' => 300,
    'ImpPagado' => 100,
    'ImpSaldoInsoluto' => 200,
]));

$cfdi->add($pago);

@arcanoix
Copy link
Author

Muchas gracias @orlandocharles aplicaré esa forma. Un saludo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants