add 37 to UUID for cancelaciones to EDICOM add 'C' last char to know it's cancel

This commit is contained in:
fjrodriguez
2023-03-09 11:37:18 -06:00
parent d6e76930ed
commit e8817cb3b8
4 changed files with 21 additions and 3 deletions

View File

@@ -15,7 +15,7 @@ BASE_DIR = Path(__file__).resolve().parent.parent
SECRET_KEY = os.getenv("adminAS_KEY")
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False
DEBUG = True
ALLOWED_HOSTS = ['*']
# Application definition

View File

@@ -0,0 +1,18 @@
# Generated by Django 4.1.3 on 2023-03-09 17:35
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('Clientes', '0015_alter_timbres_rfcc'),
]
operations = [
migrations.AlterField(
model_name='timbres',
name='uuid',
field=models.CharField(max_length=37, unique=True),
),
]

View File

@@ -9,7 +9,7 @@ class saldoModel(models.Model):
class Timbres(models.Model):
uuid = models.CharField(max_length=36, unique=True)
uuid = models.CharField(max_length=37, unique=True)
rfcc = models.CharField(max_length=13,db_index=True)
rfcp = models.CharField(max_length=13)
fecha = models.CharField(max_length=55)

View File

@@ -415,7 +415,7 @@ class add_timbre2(APIView):
serie=request.GET.get('serie', None)
tipo=request.GET.get('tipo', None)
rfcp=request.GET.get('rfcp', None)
modo=request.GET.get('modo', None)
modo=request.GET.get('modo', None)
obj={'uuid':uuid,'rfcc':rfcc,'fecha':fecha,'folio':folio,
'serie':serie,'tipo':tipo,'rfcp':rfcp,'modo':modo
}