From 5442a52ff616e7efd71bdf969b829835836c6132 Mon Sep 17 00:00:00 2001 From: mono Date: Sat, 14 Mar 2026 23:45:52 -0500 Subject: [PATCH] feat(Payment): add CREDIT payment method --- ..._type_payment_alter_sale_payment_method.py | 23 +++++++++++++++++++ tienda_ilusion/don_confiao/models.py | 1 + .../don_confiao/tests/test_payment_methods.py | 1 + 3 files changed, 25 insertions(+) create mode 100644 tienda_ilusion/don_confiao/migrations/0044_alter_payment_type_payment_alter_sale_payment_method.py diff --git a/tienda_ilusion/don_confiao/migrations/0044_alter_payment_type_payment_alter_sale_payment_method.py b/tienda_ilusion/don_confiao/migrations/0044_alter_payment_type_payment_alter_sale_payment_method.py new file mode 100644 index 0000000..927774a --- /dev/null +++ b/tienda_ilusion/don_confiao/migrations/0044_alter_payment_type_payment_alter_sale_payment_method.py @@ -0,0 +1,23 @@ +# Generated by Django 5.0.6 on 2026-03-15 04:39 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('don_confiao', '0043_customer_address_external_id'), + ] + + operations = [ + migrations.AlterField( + model_name='payment', + name='type_payment', + field=models.CharField(choices=[('CASH', 'Efectivo'), ('CONFIAR', 'Confiar'), ('BANCOLOMBIA', 'Bancolombia'), ('CREDIT', 'Crédito')], default='CASH', max_length=30), + ), + migrations.AlterField( + model_name='sale', + name='payment_method', + field=models.CharField(choices=[('CASH', 'Efectivo'), ('CONFIAR', 'Confiar'), ('BANCOLOMBIA', 'Bancolombia'), ('CREDIT', 'Crédito')], default='CASH', max_length=30), + ), + ] diff --git a/tienda_ilusion/don_confiao/models.py b/tienda_ilusion/don_confiao/models.py index a815b1e..b41398f 100644 --- a/tienda_ilusion/don_confiao/models.py +++ b/tienda_ilusion/don_confiao/models.py @@ -10,6 +10,7 @@ class PaymentMethods(models.TextChoices): CASH = 'CASH', _('Efectivo') CONFIAR = 'CONFIAR', _('Confiar') BANCOLOMBIA = 'BANCOLOMBIA', _('Bancolombia') + CREDIT = 'CREDIT', _('Crédito') class Customer(models.Model): diff --git a/tienda_ilusion/don_confiao/tests/test_payment_methods.py b/tienda_ilusion/don_confiao/tests/test_payment_methods.py index 6d38a12..95cea03 100644 --- a/tienda_ilusion/don_confiao/tests/test_payment_methods.py +++ b/tienda_ilusion/don_confiao/tests/test_payment_methods.py @@ -21,3 +21,4 @@ class TestPaymentMethods(TestCase, LoginMixin): self.assertIn('CASH', [method.get('value') for method in methods]) self.assertIn('CONFIAR', [method.get('value') for method in methods]) self.assertIn('BANCOLOMBIA', [method.get('value') for method in methods]) + self.assertIn('CREDIT', [method.get('value') for method in methods]) -- 2.49.1