Lector de precio desarrollado en Qt
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

146 lines
3.9 KiB

2 weeks ago
  1. #ifndef PRINCIPAL_H
  2. #define PRINCIPAL_H
  3. #include <QMainWindow>
  4. #include <QPropertyAnimation>
  5. #include <QTimer>
  6. #include <QLabel>
  7. #include <QSql>
  8. #include <QSqlQuery>
  9. #include <QSettings>
  10. struct g_datos
  11. {
  12. long g_cod ;
  13. QString g_codb ;
  14. QString g_des ;
  15. QString g_desr ;
  16. QString g_pre ;
  17. QString g_iva ;
  18. QString g_dep ;
  19. QString g_uxb ;
  20. long g_env ;
  21. QString g_medi ;
  22. QString g_peso ;
  23. QString g_tpre ;
  24. QString g_iint ;
  25. QString g_datfar;
  26. QString g_tprect;
  27. QString g_cpie ;
  28. double g_tas ;
  29. QString g_coda ;
  30. QString g_tip_pre;
  31. };
  32. namespace Ui {
  33. class Principal;
  34. }
  35. class Principal : public QMainWindow
  36. {
  37. Q_OBJECT
  38. public:
  39. explicit Principal(QWidget *parent = 0);
  40. ~Principal();
  41. QSqlDatabase db;
  42. QString Leo_fecha();
  43. QString Leo_hora();
  44. int busiva(QString);
  45. void Leo_situa();
  46. int Busca_Articulo(QString, struct g_datos *);
  47. void caliva (double);
  48. int caltas (int);
  49. void Leo_config();
  50. void Leo_Settings();
  51. void Imprime_pantalla();
  52. void Ingresa_articulo();
  53. void Busca_promo(QString, struct g_datos *);
  54. QTimer *timer = new QTimer();
  55. QString g_fecha_sql;
  56. QString g_hora_sql;
  57. QString tiptas;/* tipo de tasa (se obtine en esta funcion ) */
  58. QString forexp;/* forma de expresion (se obtiene en esta funcion)*/
  59. double porsus;/* porcentaje de suspencion(" " " " " ) */
  60. double iva1, /* importe del iva para tasa 1 */
  61. iva2, /* " " " " " 2 */
  62. iva3, /* " " " " " 3 */
  63. iva4, /* " " " " " 3 */
  64. iva, /* importe iva total */
  65. liber, /* importe de la liberacion */
  66. susp, /* " " " suspension */
  67. neto; /* " neto */
  68. int tasa1,tasa2,tasa3,tasa4; /* (vienen de BUSIVA) */
  69. double tas1, /* tasa 1 si la lleva (lo obtiene esta rutina) */
  70. tas2, /* tasa 2 si la " (" " " " ) */
  71. tas3, /* tasa 3 " " " ( " " " " ) */
  72. tas4, /* tasa 4 " " " ( " " " " ) */
  73. tasa; /* auxiliar para calculo */
  74. int errnum; /* indica posibles errores en la numeracion */
  75. int forma; /* indica forma de numeracion */
  76. long g_nro;
  77. QString g_codnum_periren, g_codnum_nroinic, g_codnum_nrotope;
  78. QString g_automat_emp, g_automat_suc, g_automat_drel, g_automat_anio, g_automat_mes, g_automat_dia, g_automat_nro, g_automat_fecha;
  79. QString g_manual_nro, g_manual_fecha, g_manual_uso;
  80. QString g_secup[10];//tipo de precio //SACAR, MANDAR A OTRA GLOBAL GENERAL
  81. int g_tli ;
  82. QString g_prueba_2;
  83. QString fec_now;
  84. QString fec_now2;
  85. QString gn_nro;
  86. QString g_suc;
  87. QString g_tcom;
  88. QString g_ope;
  89. QString g_mos_vta;
  90. QString g_opr_secup;
  91. QString g_gps_tlisuc;
  92. QString g_gps_suc;
  93. QString g_codsit;
  94. QString g_desr;
  95. QString g_cliente;
  96. int v_i;
  97. QString g_prueba;
  98. QString g_sql;
  99. int num_items_art;
  100. int num_items;
  101. QSqlQuery query;
  102. QSqlQuery query_art;
  103. QString v_datos_pre;
  104. double tasa_iva;
  105. float g_prec_iva;
  106. int g_pre_ofe;
  107. int nameCol1;
  108. int nameCol2;
  109. int nameCol3;
  110. int nameCol3b;
  111. int nameCol4;
  112. int nameCol4b;
  113. int nameCol5;
  114. int nameCol6;
  115. int nameCol7;
  116. int g_flag1;
  117. int g_flag2;
  118. int g_startcodbar;
  119. QString g_codigo;
  120. protected:
  121. bool eventFilter(QObject *obj, QEvent *ev);
  122. private slots:
  123. void Muestra_principal();
  124. private:
  125. Ui::Principal *ui;
  126. };
  127. #endif // PRINCIPAL_H