Esempio n. 1
0
def test_invalid_tipo_operacion_nota_debito():
    reference = form.InvoiceDocumentReference(ident='11111',
                                              uuid='21312312',
                                              date='2020-05-05')
    inv = form.DebitNote(reference)
    with pytest.raises(ValueError):
        inv.set_operation_type(22)
Esempio n. 2
0
def simple_debit_note_without_lines():
    inv = form.DebitNote(form.InvoiceDocumentReference('1234', 'xx', datetime.now()))
    inv.set_period(datetime.now(), datetime.now())
    inv.set_issue(datetime.now())
    inv.set_ident('ABC123')
    inv.set_operation_type('30')
    inv.set_payment_mean(form.PaymentMean(form.PaymentMean.DEBIT, '41', datetime.now(), '1234'))
    inv.set_supplier(form.Party(
        name = 'facho-supplier',
        ident = form.PartyIdentification('123','', '31'),
        responsability_code = form.Responsability(['O-07']),
        responsability_regime_code = '48',
        organization_code = '1',
        address = form.Address(
            '', '', form.City('05001', 'Medellín'),
            form.Country('CO', 'Colombia'),
            form.CountrySubentity('05', 'Antioquia'))
    ))
    inv.set_customer(form.Party(
        name = 'facho-customer',
        ident = form.PartyIdentification('321', '', '31'),
        responsability_code = form.Responsability(['O-07']),
        responsability_regime_code = '48',
        organization_code = '1',
        address = form.Address(
            '', '', form.City('05001', 'Medellín'),
            form.Country('CO', 'Colombia'),
            form.CountrySubentity('05', 'Antioquia'))
    ))
    return inv
Esempio n. 3
0
def test_valid_tipo_operacion_nota_debito():
    reference = form.InvoiceDocumentReference(ident='11111',
                                              uuid='21312312',
                                              date='2020-05-05')
    inv = form.DebitNote(reference)
    inv.set_operation_type('30')