Skip to content

Commit f0d5337

Browse files
authored
Update LO.py
1 parent 3ce1a2f commit f0d5337

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

LO.py

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
#-------------------------------------------------------------------------------
2-
# Name: Licencias v3
2+
# Name: Licencias v4
33
# Purpose: Emisión de PDF con Licencias en funcion de un PDF mayor
44
# con ciertas caracteristicas, al cual, hay que borrarle y agregarle cosas en una
55
# pagina y agregarle paginas modelo.
66
#
77
# Author: Ing. Esp. Leonardo Barenghi
88
#
99
# Created: 14/09/2021
10-
# Copyright: (c) lbarenghi 2021 https://github.com/leogbar/Licencias
10+
# Modificated: 10/01/2023
11+
# Copyright: (c) lbarenghi 2021-2023 https://github.com/leogbar/Licencias
1112
# Licence: BSD 3
1213
#-------------------------------------------------------------------------------
1314

@@ -34,7 +35,7 @@
3435
pdfmetrics.registerFont(TTFont('Arial-Bold', 'Arial.ttf'))
3536

3637
def current_date_format(date):
37-
months = ("Enero", "Febrero", "Marzo", "Abri", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre")
38+
months = ("Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre")
3839
day = date.day
3940
month = months[date.month - 1]
4041
year = date.year
@@ -44,7 +45,7 @@ def current_date_format(date):
4445
now = datetime.datetime.now()
4546

4647

47-
event, values = sg.Window('Generacion de Licencias v1', [[sg.Text('(c) Ing. Esp. Leonardo Barenghi - 2021 - Licencia bajo BSD 3')],[sg.Text(' ')],[sg.Text('Ingrese cantidad de dias a partir de hoy para la emisión:')],[sg.InputText()],
48+
event, values = sg.Window('Generacion de Licencias v3', [[sg.Text('(c) Ing. Esp. Leonardo Barenghi - 2021 - Licencia bajo BSD 3')],[sg.Text(' ')],[sg.Text('Ingrese cantidad de dias a partir de hoy para la emisión:')],[sg.InputText()],
4849
[sg.Radio('Autorización de Operación Provisoria', "RADIO1", default=False, key="Licencia0")],
4950
[sg.Radio('Licencia de Operación', "RADIO1", default=False, key="Licencia1")],
5051
[sg.Radio('Registro', "RADIO1", default=False, key="Licencia2")],
@@ -193,16 +194,15 @@ def current_date_format(date):
193194
licencia1.mergePage(encabezadoPdf)
194195
licencia1.mergePage(lineaPdf)
195196
licencia1.mergePage(firmaPdf)
196-
licencia.addPage(licencia1)
197-
licencia.addPage(adjuntoPdf)
198197
x=x+1
199198
else:
200199
licencia1 = pypdf.PdfFileWriter()
201200
licencia1=original.getPage(i)
202201
licencia1.mergePage(anexoBorrarPdf)
203202
licencia1.mergePage(anexoPdf)
204-
licencia.addPage(licencia1)
205203
x=x+1
204+
licencia.addPage(licencia1)
205+
licencia.addPage(adjuntoPdf)
206206
salida=carpeta+separador+archivo+".pdf"
207207
print("Generando "+salida+ "..."+"\n")
208208

@@ -213,3 +213,4 @@ def current_date_format(date):
213213
else:
214214
print("No ingresó la cantidad de hojas...")
215215
#exit()
216+

0 commit comments

Comments
 (0)