feat(Payment): add CREDIT payment method
This commit is contained in:
@@ -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),
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -10,6 +10,7 @@ class PaymentMethods(models.TextChoices):
|
|||||||
CASH = 'CASH', _('Efectivo')
|
CASH = 'CASH', _('Efectivo')
|
||||||
CONFIAR = 'CONFIAR', _('Confiar')
|
CONFIAR = 'CONFIAR', _('Confiar')
|
||||||
BANCOLOMBIA = 'BANCOLOMBIA', _('Bancolombia')
|
BANCOLOMBIA = 'BANCOLOMBIA', _('Bancolombia')
|
||||||
|
CREDIT = 'CREDIT', _('Crédito')
|
||||||
|
|
||||||
|
|
||||||
class Customer(models.Model):
|
class Customer(models.Model):
|
||||||
|
|||||||
@@ -21,3 +21,4 @@ class TestPaymentMethods(TestCase, LoginMixin):
|
|||||||
self.assertIn('CASH', [method.get('value') for method in methods])
|
self.assertIn('CASH', [method.get('value') for method in methods])
|
||||||
self.assertIn('CONFIAR', [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('BANCOLOMBIA', [method.get('value') for method in methods])
|
||||||
|
self.assertIn('CREDIT', [method.get('value') for method in methods])
|
||||||
|
|||||||
Reference in New Issue
Block a user