Exemplo n.º 1
0
def printed(page=1):
    session = db_worker.session_maker()
    db_printed = db_worker.all_facturas(session)
    invoice = cloud_accounting.get_invoice("1349400000001010023")
    print(invoice)
    print("dropit")
    print(db_printed)
    return render_template('printed.html', invoices_printed=db_printed)
Exemplo n.º 2
0
def post_credit_note():

    # Make sure we have the correct arguments
    if not 'invoice_id' in request.form or not 'fiscal_id' in request.form:
        abort(400)

    # get the arguments
    invoice_id = request.form['invoice_id']
    fiscal_id = request.form['fiscal_id']

    # Make sure parameters are usable
    if not len(invoice_id) > 0 and len(fiscal_id) > 0:
        abort(400)
    else:

        # Get the invoice from remote server
        invoice = cloud_accounting.get_invoice(invoice_id)
        nota_credito = NotaDeCredito(fiscal_id, invoice)
        nota_credito.print()

        # Return response
        return jsonify(data=str(nota_credito))
Exemplo n.º 3
0
def print_gatomalo(invoice_id):
    factura = cloud_accounting.get_invoice(invoice_id)
    factura.print()
    return jsonify(data=str(factura))