GithubHelp home page GithubHelp logo

begrandafe's Introduction

Begranda facturación electrónica

Habilita enviar facturas electrónicas a la DIAN por medio del API de Begranda

Acerca de

Packagist StyleCI License

Usando la libería en PHP de begranda, podrás enviar facturas electronicas a la DIAN de una forma sencilla y limpia

Requerimientos

Instalación con Composer

Ejecuta composer require fvalenciabg/begrandafe.

Enviar una factura

El proceso para enviar una factura electronica simple

$endpoint = getenv("BG_ENDPOINT");
$key = getenv("BG_KEY");

$invoice = new Invoice($endpoint,$key);
$datetime = date("Y-m-d h:i:s");
$invoice->
    setInvoice("990000072")->
    setSeller([
        "nit"=>"3534533",
        "name"=>"Vendedor",
        "location"=>[
            "address"=>"Cl 46 AA 43",
            "countryCode"=>"CO",
            "city"=>"Medellín",
            "subdivission"=>"Poblado",
            "department"=>"Antioquia"
        ]
    ])->
    setDate($datetime)->
    setBase(100000.00)->
    setTotal(119000.00)->
    setIva(19000.00)->
    setIca(0)->
    setIpo(0)->
    setPaymentMethod(10)->
    setPaymentChannel(9)->
    setAuthorizationNumber("9000000123303363")->
    setAuthorizationPeriod("2018-05-05","2028-05-05")->
    setAuthorizationInvoiceFrom(990000000)->
    setAuthorizationInvoiceTo(995000000)->
    setBuyer([
        "nit"=>"45747373",
        "name"=>"Comprador",
        "type"=>31,
        "location"=>[
            "address"=>"CR 33 56 34",
            "countryCode"=>"CO",
            "city"=>"Medellin",
            "subdivission"=>"Belen",
            "department"=>"Antioquia"
        ]
    ]);
$invoice->send();

Dudas

Si tienes dudas o inconveninentes no dudes en escribirnos a [email protected].

begrandafe's People

Contributors

fvalenciabg avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.