| Conditions | 10 |
| Total Lines | 501 |
| Code Lines | 390 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.
For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.
Commonly applied refactorings include:
If many parameters/temporary variables are present:
Complex classes like satdigitalinvoice.layout.make_layout() often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes.
Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.
| 1 | from datetime import date, datetime, timedelta |
||
| 165 | def make_layout(): |
||
| 166 | # ----- Full layout ----- |
||
| 167 | return [ |
||
| 168 | [ |
||
| 169 | sg.TabGroup( |
||
| 170 | [[ |
||
| 171 | sg.Tab( |
||
| 172 | 'Emitidas '.center(13), |
||
| 173 | [ |
||
| 174 | [ |
||
| 175 | sg.Column([[ |
||
| 176 | sg.Button(image_data=FOLDER_ICON, key="ver_emitidas", border_width=0, button_color=BUTTON_COLOR), |
||
| 177 | sg.ButtonMenu( |
||
| 178 | image_data=SEARCH_ICON, button_text="", key="buscar_facturas", border_width=0, button_color=BUTTON_COLOR, |
||
| 179 | menu_def=[ |
||
| 180 | [], |
||
| 181 | [str(o) for o in SearchOptions], |
||
| 182 | ], |
||
| 183 | ), |
||
| 184 | sg.Input(datetime.now().strftime(PERIODO_FMT), size=(40, 1), key="emitidas_search"), |
||
| 185 | sg.Push(), |
||
| 186 | sg.Button(image_data=IMPORT_CSV, key="importar_emitidas", border_width=0, button_color=BUTTON_COLOR), |
||
| 187 | ]], |
||
| 188 | expand_x=True |
||
| 189 | ) |
||
| 190 | ], |
||
| 191 | [ |
||
| 192 | sg.HorizontalSeparator(color="black"), |
||
| 193 | ], |
||
| 194 | [ |
||
| 195 | sg.Column([[ |
||
| 196 | sg.Button("".ljust(10), key="status_sat", border_width=0, button_color=sg.theme_background_color()), |
||
| 197 | sg.Button("".ljust(10), key="email_notificada", border_width=0, button_color=sg.theme_background_color()), |
||
| 198 | sg.Button("".ljust(10), key="pendiente_pago", border_width=0, button_color=sg.theme_background_color()), |
||
| 199 | ]]), |
||
| 200 | sg.VSeparator(color="black"), |
||
| 201 | sg.Column([[ |
||
| 202 | sg.CalendarButton("FechaPago:", format=CALENDAR_FECHA_FMT, title="FechaPago", no_titlebar=False, target="fecha_pago", pad=TEXT_PADDING, |
||
| 203 | border_width=0), |
||
| 204 | sg.Input(datetime.now().strftime(CALENDAR_FECHA_FMT), size=(12, 1), key="fecha_pago"), |
||
| 205 | sg.Text("FormaPago:", pad=TEXT_PADDING, border_width=0), |
||
| 206 | sg.Combo([Code(k, v) for k, v in FORMA_PAGO.items()], |
||
| 207 | default_value=Code("03", FORMA_PAGO["03"]), key="forma_pago", size=(35, 1)), |
||
| 208 | sg.Text("ImpPagado:", pad=TEXT_PADDING, border_width=0), |
||
| 209 | sg.Input("", size=(12, 1), key="importe_pago"), |
||
| 210 | ]], visible=False, key="ppd_action_items"), |
||
| 211 | ], |
||
| 212 | [ |
||
| 213 | MyTable( |
||
| 214 | key="emitidas_table", |
||
| 215 | headings=[ |
||
| 216 | '#', |
||
| 217 | 'Receptor Razon Social', |
||
| 218 | 'Recep. Rfc', |
||
| 219 | 'Factura', |
||
| 220 | "Fecha", |
||
| 221 | "Total", |
||
| 222 | "Pendiente", |
||
| 223 | "Status", |
||
| 224 | "Tipo", |
||
| 225 | "Folio" |
||
| 226 | ], |
||
| 227 | row_fn=lambda i, r: [ |
||
| 228 | i, |
||
| 229 | r['Receptor'].get('Nombre', ''), |
||
| 230 | r['Receptor']['Rfc'], |
||
| 231 | r.name, |
||
| 232 | r["Fecha"].strftime(CALENDAR_FECHA_FMT), |
||
| 233 | r["Total"], |
||
| 234 | r.saldo_pendiente() or "", |
||
| 235 | r.liquidated_notified_icons, |
||
| 236 | mf_pago_fmt(r), |
||
| 237 | r.uuid |
||
| 238 | ] |
||
| 239 | ) |
||
| 240 | ]], |
||
| 241 | key='emitidas_tab', |
||
| 242 | ), |
||
| 243 | sg.Tab( |
||
| 244 | 'Recibidas '.center(13), |
||
| 245 | [ |
||
| 246 | [ |
||
| 247 | sg.Column([[ |
||
| 248 | sg.Button(image_data=FOLDER_ICON, key="ver_recibidas", border_width=0, button_color=BUTTON_COLOR), |
||
| 249 | sg.ButtonMenu( |
||
| 250 | image_data=SEARCH_ICON, button_text="", key="buscar_facturas_recibidas", border_width=0, button_color=BUTTON_COLOR, |
||
| 251 | menu_def=[ |
||
| 252 | [], |
||
| 253 | [str(o) for o in SearchOptions], |
||
| 254 | ], |
||
| 255 | ), |
||
| 256 | sg.Input(datetime.now().strftime(PERIODO_FMT), size=(40, 1), key="recibidas_search"), |
||
| 257 | ]], |
||
| 258 | expand_x=True |
||
| 259 | ) |
||
| 260 | ], |
||
| 261 | [ |
||
| 262 | sg.HorizontalSeparator(color="black"), |
||
| 263 | ], |
||
| 264 | [ |
||
| 265 | sg.Column([[ |
||
| 266 | sg.Button("".ljust(10), key="status_sat_recibidas", border_width=0, button_color=sg.theme_background_color()), |
||
| 267 | ]]), |
||
| 268 | ], |
||
| 269 | [ |
||
| 270 | MyTable( |
||
| 271 | key="recibidas_table", |
||
| 272 | headings=[ |
||
| 273 | '#', |
||
| 274 | 'Emisor Razon Social', |
||
| 275 | 'Emisor Rfc', |
||
| 276 | 'Factura', |
||
| 277 | "Fecha", |
||
| 278 | "Total", |
||
| 279 | "Pendiente", |
||
| 280 | "Status", |
||
| 281 | "Tipo", |
||
| 282 | "Folio" |
||
| 283 | ], |
||
| 284 | row_fn=lambda i, r: [ |
||
| 285 | i, |
||
| 286 | r['Emisor'].get('Nombre', ''), |
||
| 287 | r['Emisor']['Rfc'], |
||
| 288 | r.name, |
||
| 289 | r["Fecha"].strftime(CALENDAR_FECHA_FMT), |
||
| 290 | r["Total"], |
||
| 291 | r.saldo_pendiente() or "", |
||
| 292 | r.liquidated_notified_icons, |
||
| 293 | mf_pago_fmt(r), |
||
| 294 | r.uuid |
||
| 295 | ] |
||
| 296 | ) |
||
| 297 | ]], |
||
| 298 | key='recibidas_tab', |
||
| 299 | ), |
||
| 300 | sg.Tab( |
||
| 301 | 'Facturas '.center(13), |
||
| 302 | [ |
||
| 303 | [ |
||
| 304 | sg.Button(image_data=EDIT_ICON, key="editar_facturas", border_width=0, button_color=BUTTON_COLOR), |
||
| 305 | sg.Text("Periodo:", pad=TEXT_PADDING), |
||
| 306 | sg.Input(date.today().strftime(PERIODO_FMT), size=(11, 1), key="facturas_periodo"), |
||
| 307 | sg.Text("", pad=TEXT_PADDING, key="preparar_facturas_text", font=LARGE_FONT), |
||
| 308 | ], |
||
| 309 | [ |
||
| 310 | MyTable( |
||
| 311 | key="facturas_table", |
||
| 312 | headings=[ |
||
| 313 | '#', |
||
| 314 | 'EReg', |
||
| 315 | 'Receptor Razon Social', |
||
| 316 | 'Recep. Rfc', |
||
| 317 | "Tipo", |
||
| 318 | "Subtotal", |
||
| 319 | "Total" |
||
| 320 | ], |
||
| 321 | row_fn=lambda i, r: [ |
||
| 322 | i, |
||
| 323 | r['Emisor']['RegimenFiscal'].code, |
||
| 324 | r['Receptor']['Nombre'], |
||
| 325 | r['Receptor']['Rfc'], |
||
| 326 | mf_pago_fmt(r), |
||
| 327 | r['SubTotal'], |
||
| 328 | r['Total'] |
||
| 329 | ] |
||
| 330 | ) |
||
| 331 | ]], |
||
| 332 | key='facturas_tab', |
||
| 333 | ), |
||
| 334 | sg.Tab( |
||
| 335 | 'Productos '.center(13), |
||
| 336 | [ |
||
| 337 | [ |
||
| 338 | sg.Button(image_data=EDIT_ICON, key="editar_productos", border_width=0, button_color=BUTTON_COLOR), |
||
| 339 | ], |
||
| 340 | [ |
||
| 341 | MyTable( |
||
| 342 | key="productos_table", |
||
| 343 | headings=[ |
||
| 344 | '#', |
||
| 345 | 'Producto', |
||
| 346 | 'Descripcion', |
||
| 347 | 'CuentaPredial', |
||
| 348 | 'ClaveProdServ' |
||
| 349 | ], |
||
| 350 | row_fn=lambda i, r: [ |
||
| 351 | i, |
||
| 352 | r['Producto'], |
||
| 353 | r['Concepto']['Descripcion'], |
||
| 354 | r['Concepto'].get('CuentaPredial'), |
||
| 355 | r['Concepto']['ClaveProdServ'] |
||
| 356 | ] |
||
| 357 | ) |
||
| 358 | ]], |
||
| 359 | key='productos_tab', |
||
| 360 | ), |
||
| 361 | sg.Tab( |
||
| 362 | 'Correos'.center(13), |
||
| 363 | [ |
||
| 364 | [ |
||
| 365 | sg.Text("", pad=TEXT_PADDING), |
||
| 366 | ], |
||
| 367 | [ |
||
| 368 | MyTable( |
||
| 369 | key="correos_table", |
||
| 370 | headings=[ |
||
| 371 | '#', |
||
| 372 | 'Receptor Razon Social', |
||
| 373 | 'Recep. Rfc', |
||
| 374 | 'Facturas', |
||
| 375 | 'Pendientes Emitidas Meses Anteriores' |
||
| 376 | ], |
||
| 377 | row_fn=lambda i, r: [ |
||
| 378 | i, |
||
| 379 | r[0]["RazonSocial"], |
||
| 380 | r[0]["Rfc"], |
||
| 381 | ",".join(n.name for n in r[1]), |
||
| 382 | ",".join(n.name for n in r[2]) |
||
| 383 | ] |
||
| 384 | ) |
||
| 385 | ]], |
||
| 386 | key='correos_tab', |
||
| 387 | ), |
||
| 388 | sg.Tab( |
||
| 389 | 'Ajustes'.center(13), |
||
| 390 | [ |
||
| 391 | [ |
||
| 392 | sg.Button(image_data=EDIT_ICON, key="editar_ajustes", border_width=0, button_color=BUTTON_COLOR), |
||
| 393 | sg.Text("Periodo:", pad=TEXT_PADDING), |
||
| 394 | sg.Input((date.today() + relativedelta(months=1)).strftime(PERIODO_FMT), size=(11, 1), key="ajustes_periodo"), |
||
| 395 | sg.Text("", pad=TEXT_PADDING, key="preparar_ajustes_text", font=LARGE_FONT), |
||
| 396 | ], |
||
| 397 | [ |
||
| 398 | MyTable( |
||
| 399 | key="ajustes_table", |
||
| 400 | headings=[ |
||
| 401 | "#", |
||
| 402 | "Receptor Razon Social", |
||
| 403 | "Recep. Rfc", |
||
| 404 | "Producto", |
||
| 405 | "Actual", |
||
| 406 | "Nuevo", |
||
| 407 | "Ajuste %", |
||
| 408 | "Periodo", |
||
| 409 | "Meses" |
||
| 410 | ], |
||
| 411 | row_fn=lambda i, r: [ |
||
| 412 | i, |
||
| 413 | r["receptor"]["RazonSocial"], |
||
| 414 | r["receptor"]["Rfc"], |
||
| 415 | r["concepto"].get("_producto"), |
||
| 416 | r["valor_unitario"], |
||
| 417 | r["valor_unitario_nuevo"], |
||
| 418 | r["ajuste_porcentaje"], |
||
| 419 | r["periodo"], |
||
| 420 | r["meses"] |
||
| 421 | ] |
||
| 422 | ) |
||
| 423 | ]], |
||
| 424 | key='ajustes_tab' |
||
| 425 | ), |
||
| 426 | sg.Tab( |
||
| 427 | 'Depositos'.center(13), |
||
| 428 | [ |
||
| 429 | [ |
||
| 430 | sg.Button(image_data=EDIT_ICON, key="editar_depositos", border_width=0, button_color=BUTTON_COLOR), |
||
| 431 | ], |
||
| 432 | [ |
||
| 433 | MyTable( |
||
| 434 | key="depositos_table", |
||
| 435 | headings=[ |
||
| 436 | "#", |
||
| 437 | "Receptor Razon Social", |
||
| 438 | "Recep. Rfc", |
||
| 439 | "Producto", |
||
| 440 | "Actual", |
||
| 441 | ], |
||
| 442 | row_fn=lambda i, r: [ |
||
| 443 | i, |
||
| 444 | r["receptor"]["RazonSocial"], |
||
| 445 | r["receptor"]["Rfc"], |
||
| 446 | r["concepto"].get("_producto"), |
||
| 447 | r["deposito"], |
||
| 448 | ] |
||
| 449 | ) |
||
| 450 | ]], |
||
| 451 | key='depositos_tab' |
||
| 452 | ), |
||
| 453 | sg.Tab( |
||
| 454 | 'Clientes '.center(13), |
||
| 455 | [ |
||
| 456 | [ |
||
| 457 | sg.Button(image_data=EDIT_ICON, key="editar_clientes", border_width=0, button_color=BUTTON_COLOR), |
||
| 458 | sg.Push(), |
||
| 459 | sg.Button("Exportar", key="exportar_clientes", border_width=0), |
||
| 460 | ], |
||
| 461 | [ |
||
| 462 | MyTable( |
||
| 463 | key="clientes_table", |
||
| 464 | headings=[ |
||
| 465 | "#", |
||
| 466 | "Razon Social", |
||
| 467 | "Rfc", |
||
| 468 | "Reg", |
||
| 469 | "CP", |
||
| 470 | "IdCIF" |
||
| 471 | ], |
||
| 472 | row_fn=lambda i, r: [ |
||
| 473 | i, |
||
| 474 | r["RazonSocial"], |
||
| 475 | r["Rfc"], |
||
| 476 | r["RegimenFiscal"], |
||
| 477 | r["CodigoPostal"], |
||
| 478 | r["IdCIF"] |
||
| 479 | ] |
||
| 480 | ) |
||
| 481 | ]], |
||
| 482 | key='clientes_tab', |
||
| 483 | ), |
||
| 484 | sg.Tab( |
||
| 485 | 'Solicitudes'.center(13), |
||
| 486 | [ |
||
| 487 | [ |
||
| 488 | sg.Column([[ |
||
| 489 | sg.Button(image_data=ZIP_ICON, key="cargar_zip", border_width=0, button_color=BUTTON_COLOR), |
||
| 490 | sg.Text("Rfc:", pad=TEXT_PADDING), |
||
| 491 | sg.Combo([], default_value="", key="solicitudes_rfc", size=(15, 1)), |
||
| 492 | |||
| 493 | sg.Text("Recuperar:", pad=TEXT_PADDING), |
||
| 494 | sg.Combo([TipoRecuperar.Recibidas, TipoRecuperar.Emitidas], default_value=TipoRecuperar.Recibidas, key="tipo_recuperar", size=(10, 1)), |
||
| 495 | |||
| 496 | sg.CalendarButton("Inicio:", format=CALENDAR_FECHA_FMT, title="Inicio", no_titlebar=False, target="fecha_inicial", pad=TEXT_PADDING, |
||
| 497 | border_width=0), |
||
| 498 | sg.Input((datetime.now() - timedelta(days=40)).strftime(CALENDAR_FECHA_FMT), size=(12, 1), key="fecha_inicial"), |
||
| 499 | |||
| 500 | sg.CalendarButton("Final:", format=CALENDAR_FECHA_FMT, title="Final", no_titlebar=False, target="fecha_final", pad=TEXT_PADDING, |
||
| 501 | border_width=0), |
||
| 502 | sg.Input(datetime.now().strftime(CALENDAR_FECHA_FMT), size=(12, 1), key="fecha_final"), |
||
| 503 | |||
| 504 | sg.Text("Tipo:", pad=TEXT_PADDING), |
||
| 505 | sg.Combo([TipoDescargaMasivaTerceros.CFDI, TipoDescargaMasivaTerceros.METADATA], default_value=TipoDescargaMasivaTerceros.CFDI, |
||
| 506 | key="tipo_solicitud", size=(10, 1)), |
||
| 507 | |||
| 508 | sg.Button("Nueva Solicitud", key="nueva_solicitud", border_width=0), |
||
| 509 | ]], |
||
| 510 | expand_x=True |
||
| 511 | ) |
||
| 512 | ], |
||
| 513 | [ |
||
| 514 | MyTable( |
||
| 515 | key="solicitudes_table", |
||
| 516 | headings=[ |
||
| 517 | "#", |
||
| 518 | "IdSolicitud", |
||
| 519 | "Mensaje", |
||
| 520 | "EstadoSolicitud", |
||
| 521 | "FechaInicial", |
||
| 522 | "FechaFinal", |
||
| 523 | "TipoSolicitud", |
||
| 524 | "RfcReceptor", |
||
| 525 | "RfcEmisor", |
||
| 526 | ], |
||
| 527 | row_fn=lambda i, r: [ |
||
| 528 | i, |
||
| 529 | r["response"]["IdSolicitud"], |
||
| 530 | r["response"]["Mensaje"], |
||
| 531 | r["response"].get("EstadoSolicitud", ""), |
||
| 532 | r["request"]["fecha_inicial"].strftime(CALENDAR_FECHA_FMT), |
||
| 533 | r["request"]["fecha_final"].strftime(CALENDAR_FECHA_FMT), |
||
| 534 | r["request"]["tipo_solicitud"], |
||
| 535 | r["request"]["rfc_receptor"] or "", |
||
| 536 | r["request"]["rfc_emisor"] or "", |
||
| 537 | ] |
||
| 538 | ) |
||
| 539 | ] |
||
| 540 | ], |
||
| 541 | key='solicitudes_tab', |
||
| 542 | # visible=has_fiel |
||
| 543 | ), |
||
| 544 | sg.Tab( |
||
| 545 | 'Contabilidad '.center(13), |
||
| 546 | [ |
||
| 547 | [ |
||
| 548 | sg.Column([[ |
||
| 549 | sg.Text("Rfc:", pad=TEXT_PADDING), |
||
| 550 | sg.Combo([], default_value="", key="contabilidad_rfc", size=(15, 1)), |
||
| 551 | sg.Text("Periodo:", pad=TEXT_PADDING), |
||
| 552 | sg.Input((date.today() - relativedelta(months=1)).strftime(PERIODO_FMT), size=(11, 1), key="periodo"), |
||
| 553 | sg.Button(image_data=EXCEL_ICON, key="ver_excel", border_width=0, button_color=BUTTON_COLOR), |
||
| 554 | sg.Button(image_data=DIOT_ICON, key="ver_diot", border_width=0, button_color=BUTTON_COLOR), |
||
| 555 | sg.Button(image_data=FOLDER_ICON, key="ver_carpeta", border_width=0, button_color=BUTTON_COLOR), |
||
| 556 | ]]) |
||
| 557 | ], |
||
| 558 | [ |
||
| 559 | sg.Multiline( |
||
| 560 | expand_x=True, |
||
| 561 | expand_y=True, |
||
| 562 | key="declaracion", |
||
| 563 | write_only=True, |
||
| 564 | autoscroll=True, |
||
| 565 | reroute_stdout=True |
||
| 566 | ) |
||
| 567 | ] |
||
| 568 | ], |
||
| 569 | key='contabilidad_tab', |
||
| 570 | ), |
||
| 571 | sg.Tab( |
||
| 572 | 'Configuracion'.center(13), |
||
| 573 | [ |
||
| 574 | [ |
||
| 575 | sg.Column([ |
||
| 576 | [ |
||
| 577 | sg.Button(image_data=FOLDER_ICON, key="projecto_ver", border_width=0, button_color=BUTTON_COLOR), |
||
| 578 | sg.Button( |
||
| 579 | border_width=0, |
||
| 580 | button_text='Seleccionar Projecto', target='projecto_dir_selected', |
||
| 581 | button_type=BUTTON_TYPE_BROWSE_FOLDER, key='projecto_dir_browse', |
||
| 582 | ), |
||
| 583 | sg.Text("", pad=TEXT_PADDING, key="projecto_dir"), |
||
| 584 | sg.Button("Projecto:", pad=TEXT_PADDING, key='projecto_dir_selected', visible=False, enable_events=True, change_submits=True), |
||
| 585 | ], |
||
| 586 | [ |
||
| 587 | sg.Button(image_data=EDIT_ICON, key="editar_configurar", border_width=0, button_color=BUTTON_COLOR), |
||
| 588 | ] |
||
| 589 | ]) |
||
| 590 | ], |
||
| 591 | [ |
||
| 592 | sg.Column([ |
||
| 593 | [ |
||
| 594 | sg.Text(" Proxima Factura:", pad=TEXT_PADDING), |
||
| 595 | sg.Text("Serie:", pad=TEXT_PADDING), |
||
| 596 | sg.Input("", key="serie", size=(8, 1)), |
||
| 597 | sg.Text("Folio:", pad=TEXT_PADDING), |
||
| 598 | sg.Input("", key="folio", size=(8, 1)), |
||
| 599 | ], |
||
| 600 | [ |
||
| 601 | sg.Text("Complemento Pago:", pad=TEXT_PADDING), |
||
| 602 | sg.Text("Serie:", pad=TEXT_PADDING), |
||
| 603 | sg.Input("", key="serie_pago", size=(8, 1)), |
||
| 604 | sg.Text("", key="folio_pago", pad=TEXT_PADDING), |
||
| 605 | ] |
||
| 606 | ], |
||
| 607 | expand_x=True |
||
| 608 | ) |
||
| 609 | ], |
||
| 610 | [ |
||
| 611 | sg.Column([[]], size=(40, 40)) |
||
| 612 | ], |
||
| 613 | [ |
||
| 614 | sg.Column([[ |
||
| 615 | sg.Button("Organizar Facturas", key="organizar_facturas", border_width=0), |
||
| 616 | ]], |
||
| 617 | expand_x=True |
||
| 618 | ) |
||
| 619 | ], |
||
| 620 | [ |
||
| 621 | sg.Column([[ |
||
| 622 | sg.Button("Exportar Metadata ", key="exportar_metadata", border_width=0), |
||
| 623 | sg.Button("Importar Metadata ", key="importar_metadata", border_width=0), |
||
| 624 | ]], |
||
| 625 | expand_x=True |
||
| 626 | ) |
||
| 627 | ] |
||
| 628 | ], |
||
| 629 | key='configuracion_tab', |
||
| 630 | ), |
||
| 631 | sg.Tab( |
||
| 632 | 'Consola'.center(13), |
||
| 633 | [ |
||
| 634 | [ |
||
| 635 | sg.Push(), |
||
| 636 | sg.Button(image_data=ABOUT_ICON, key="about", border_width=0, button_color=BUTTON_COLOR), |
||
| 637 | ], |
||
| 638 | [sg.Multiline( |
||
| 639 | expand_x=True, |
||
| 640 | expand_y=True, |
||
| 641 | key="console", |
||
| 642 | write_only=True, |
||
| 643 | autoscroll=True, |
||
| 644 | reroute_stdout=True |
||
| 645 | )] |
||
| 646 | ], |
||
| 647 | key='errores_tab', |
||
| 648 | ), |
||
| 649 | ]], |
||
| 650 | expand_x=True, |
||
| 651 | expand_y=True, |
||
| 652 | enable_events=True, |
||
| 653 | key="main_tab_group", |
||
| 654 | ) |
||
| 655 | ], |
||
| 656 | [ |
||
| 657 | sg.Column([[ |
||
| 658 | sg.Push(), |
||
| 659 | sg.Text("Factura:", pad=TEXT_PADDING), |
||
| 660 | sg.Text("", key="serie_folio", pad=TEXT_PADDING), |
||
| 661 | sg.Button(image_data=PREVIEW_ICON, key="ver_preview", border_width=0, button_color=BUTTON_COLOR, disabled=True), |
||
| 662 | sg.Button("".center(22), disabled=True, key="crear_facturas", border_width=0, button_color=sg.theme_background_color()), |
||
| 663 | sg.Sizegrip(), |
||
| 664 | ]], |
||
| 665 | expand_x=True, |
||
| 666 | ), |
||
| 713 |