SV/SV_GRAPH.CPP
2021-09-08 21:43:28 +02:00

1388 lines
49 KiB
C++
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#include<graphics.h>
#include<conio.h>
#include<stdio.h>
#include "..\libs\make_bot\make_bot.h"
#include "sv_graph.h"
void Fuente(int Fuente, int Size );
void textxy(int x, int y, char *text);
void Dibuja_Botones_Comunes(void);
extern struct Make_Boton Check[5];
extern struct Make_Boton PP_S[5];
extern struct Make_Boton Comunes[9];
void Dibuja_Pantalla_Altas_Todos_los_Datos(struct Make_Boton *PATLD, struct Make_Boton *PATLD_c){
int A_H = 5 /*22*/;
int A_V_P = 15 /*50*/;
int A_V_P_P = -35 /*0*/;
Fuente(SMALL_FONT, 6);
// char buffer[50];
////////////////////////////// Calcula los botones /////////////////////////
// Toda la pantalla
PATLD[0].Up = 0; PATLD[0].Down = 480;
PATLD[0].Left = 0; PATLD[0].Right = 640;
Imprime_Boton2 (1, GRIS_C, BLANCO, GRIS_O, PATLD[0]);
// Barra de ayuda
PATLD[0].Up = 450; PATLD[0].Down = 475;
PATLD[0].Left = 5; PATLD[0].Right = 549;
Imprime_Boton2 (1, GRIS_C, GRIS_O, BLANCO, PATLD[0]);
setcolor(NEGRO);
textxy(10+A_H,50+A_V_P_P, "Nombre");
PATLD[0].Up = 50+A_V_P_P; PATLD[0].Down = 70+A_V_P_P;
PATLD[0].Left = 82+A_H; PATLD[0].Right = 232+A_H;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PATLD[0]);
PATLD[1].Up = 50+A_V_P_P; PATLD[1].Down = 70+A_V_P_P;
PATLD[1].Left = 238+A_H; PATLD[1].Right = 388+A_H;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PATLD[1]);
PATLD[2].Up = 50+A_V_P_P; PATLD[2].Down = 70+A_V_P_P;
PATLD[2].Left = 394+A_H; PATLD[2].Right = 544+A_H;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PATLD[2]);
textxy(10+A_H,75+A_V_P_P, "D.N.I."); // 15 d
PATLD[3].Up = 75+A_V_P_P; PATLD[3].Down = 95+A_V_P_P;
PATLD[3].Left = 82+A_H; PATLD[3].Right = 232+A_H;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PATLD[3]);
textxy(242+A_H,75+A_V_P_P, "Telfono"); // 12 d
PATLD[4].Up = 75+A_V_P_P; PATLD[4].Down = 95+A_V_P_P;
PATLD[4].Left = 332+A_H; PATLD[4].Right = 544+A_H;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PATLD[4]);
textxy(10+A_H,100+A_V_P_P, "Calle"); // 30 d
PATLD[5].Up = 100+A_V_P_P; PATLD[5].Down = 120+A_V_P_P;
PATLD[5].Left = 82+A_H; PATLD[5].Right = 382+A_H;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PATLD[5]);
textxy(392+A_H,100+A_V_P_P, "");
PATLD[6].Up = 100+A_V_P_P; PATLD[6].Down = 120+A_V_P_P;
PATLD[6].Left = 422+A_H; PATLD[6].Right = 544+A_H;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PATLD[6]);
textxy(10+A_H,150+A_V_P_P, "Local"); // 30 digitos
PATLD[7].Up = 150+A_V_P_P; PATLD[7].Down = 170+A_V_P_P;
PATLD[7].Left = 82+A_H; PATLD[7].Right = 382+A_H;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PATLD[7]);
textxy(390+A_H,150+A_V_P_P, "Tlf."); // 12 digitos
PATLD[8].Up = 150+A_V_P_P; PATLD[8].Down = 170+A_V_P_P;
PATLD[8].Left = 422+A_H; PATLD[8].Right = 544+A_H;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PATLD[8]);
textxy(10+A_H,175+A_V_P_P, "Calle"); // 30 d
PATLD[9].Up = 175+A_V_P_P; PATLD[9].Down = 195+A_V_P_P;
PATLD[9].Left = 82+A_H; PATLD[9].Right = 382+A_H;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PATLD[9]);
textxy(392+A_H,175+A_V_P_P, ""); // 10 d
PATLD[10].Up = 175+A_V_P_P; PATLD[10].Down = 195+A_V_P_P;
PATLD[10].Left = 422+A_H; PATLD[10].Right = 544+A_H;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PATLD[10]);
textxy(10+A_H,200+A_V_P_P, "Poblaci¢n"); // 18
PATLD[11].Up = 200+A_V_P_P; PATLD[11].Down = 220+A_V_P_P;
PATLD[11].Left = 100+A_H; PATLD[11].Right = 285+A_H;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PATLD[11]);
textxy(290+A_H,200+A_V_P_P, "Provincia"); // 16
PATLD[12].Up = 200+A_V_P_P; PATLD[12].Down = 220+A_V_P_P;
PATLD[12].Left = 380+A_H; PATLD[12].Right = 544+A_H;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PATLD[12]);
textxy(10+A_H,225+A_V_P_P, "C.P.");
PATLD[13].Up = 225+A_V_P_P; PATLD[13].Down = 245+A_V_P_P;
PATLD[13].Left = 82+A_H; PATLD[13].Right = 135+A_H;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PATLD[13]);
Fuente(SMALL_FONT, 4);
PATLD[14].Up = 220+A_V_P; PATLD[14].Down = 235+A_V_P;
PATLD[14].Left = 10+A_H; PATLD[14].Right = 45+A_H;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PATLD[14]);
textxy(55+A_H,220+A_V_P, "Grifo-columna/s.");
PATLD[15].Up = 220+A_V_P; PATLD[15].Down = 235+A_V_P;
PATLD[15].Left = 155+A_H; PATLD[15].Right = 195+A_H;
Imprime_Boton2 (1, GRIS_C, BLANCO, GRIS_O, PATLD[15]);
setcolor(0);
textxy(200+A_H,220+A_V_P, "Ptas.");
PATLD[15].Up = 240+A_V_P; PATLD[15].Down = 255+A_V_P;
PATLD[15].Left = 10+A_H; PATLD[15].Right = 45+A_H;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PATLD[15]);
textxy(55+A_H,240+A_V_P, "Manoreductor/es.");
PATLD[16].Up = 240+A_V_P; PATLD[16].Down = 255+A_V_P;
PATLD[16].Left = 155+A_H; PATLD[16].Right = 195+A_H;
Imprime_Boton2 (1, GRIS_C, BLANCO, GRIS_O, PATLD[16]);
setcolor(0);
textxy(200+A_H,240+A_V_P, "Ptas.");
PATLD[16].Up = 260+A_V_P; PATLD[16].Down = 275+A_V_P;
PATLD[16].Left = 10+A_H; PATLD[16].Right = 45+A_H;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PATLD[16]);
textxy(55+A_H,260+A_V_P, "Serpent¡n/es.");
PATLD[17].Up = 260+A_V_P; PATLD[17].Down = 275+A_V_P;
PATLD[17].Left = 155+A_H; PATLD[17].Right = 195+A_H;
Imprime_Boton2 (1, GRIS_C, BLANCO, GRIS_O, PATLD[17]);
setcolor(0);
textxy(200+A_H,260+A_V_P, "Ptas.");
PATLD[17].Up = 280+A_V_P; PATLD[17].Down = 295+A_V_P;
PATLD[17].Left = 10+A_H; PATLD[17].Right = 45+A_H;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PATLD[17]);
textxy(55+A_H,280+A_V_P, "Dispensador/es.");
PATLD[18].Up = 280+A_V_P; PATLD[18].Down = 295+A_V_P;
PATLD[18].Left = 155+A_H; PATLD[18].Right = 195+A_H;
Imprime_Boton2 (1, GRIS_C, BLANCO, GRIS_O, PATLD[18]);
setcolor(0);
textxy(200+A_H,280+A_V_P, "Ptas.");
textxy(10+A_H,300+A_V_P, "Material auxiliar de");
textxy(10+A_H,310+A_V_P, "tuber¡as y accesorios.");
PATLD[18].Up = 300+A_V_P; PATLD[18].Down = 315+A_V_P;
PATLD[18].Left = 155+A_H; PATLD[18].Right = 195+A_H;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PATLD[18]);
setcolor(0);
textxy(200+A_H,300+A_V_P, "Ptas.");
textxy(10+A_H,340+A_V_P, "FECHA DE INSTALACION:");
PATLD[19].Up = 340+A_V_P; PATLD[19].Down = 355+A_V_P;
PATLD[19].Left = 138+A_H; PATLD[19].Right = 223+A_H;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PATLD[19]);
/*
setcolor(BLANCO);
outtextxy(144+A_H,342+A_V_P, " / / ");
setcolor(ROJO);
outtextxy(144-1+A_H,342-1+A_V_P, " / / ");
*/
Fuente(SMALL_FONT, 6);
setcolor(0);
textxy(10+A_H,370+A_V_P, "N§ Contrato:");
PATLD[20].Up = 370+A_V_P; PATLD[20].Down = 390+A_V_P;
PATLD[20].Left = 130+A_H; PATLD[20].Right = 223+A_H;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PATLD[20]);
Fuente(SMALL_FONT, 4);
/**/ PATLD[22].Up = 400+A_V_P; PATLD[22].Down = 415+A_V_P; /**/
/**/ PATLD[22].Left = 115+A_H; PATLD[22].Right = 223+A_H; /**/
/**/ Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PATLD[22]); /**/
textxy(10+A_H,400+A_V_P, "Distribuidor");
PATLD[21].Up = 400+A_V_P; PATLD[21].Down = 415+A_V_P;
PATLD[21].Left = 80+A_H; PATLD[21].Right = 110+A_H;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PATLD[21]);
// Parte del men£ de compras...
PATLD_c[0].Up = 200+A_V_P; PATLD_c[0].Down = 215+A_V_P;
PATLD_c[0].Left = 240+A_H; PATLD_c[0].Right = 544+A_H;
Imprime_Boton2 (1, GRIS_C, BLANCO, GRIS_O, PATLD_c[0]);
Fuente(SMALL_FONT, 4);
setcolor(0);
textxy(246+A_H, 202+A_V_P, "FECHA REF. CONCEPTO UND. VEND.");
textxy(524+A_H,202+A_V_P,"COD.");
PATLD_c[0].Up = 220+A_V_P; PATLD_c[0].Down = 415+A_V_P;
PATLD_c[0].Left = 240+A_H; PATLD_c[0].Right = 544+A_H;
Imprime_Boton2 (1, GRIS_C, BLANCO, GRIS_O, PATLD_c[0]);
// Para Fecha 6 + 2 '/' digitos
PATLD_c[0].Up = 224+A_V_P; PATLD_c[0].Down = 411+A_V_P;
PATLD_c[0].Left = 244+A_H; PATLD_c[0].Right = 295+A_H;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PATLD_c[0]);
// Para Ref. 5 + 1 '.' digitos
PATLD_c[1].Up = 224+A_V_P; PATLD_c[1].Down = 411+A_V_P;
PATLD_c[1].Left = 300+A_H; PATLD_c[1].Right = 335+A_H;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PATLD_c[1]);
// Para Concepto 20 digitos
PATLD_c[2].Up = 224+A_V_P; PATLD_c[2].Down = 411+A_V_P;
PATLD_c[2].Left = 340+A_H; PATLD_c[2].Right = 464+A_H;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PATLD_c[2]);
// Para Unidades 3 digitos
PATLD_c[3].Up = 224+A_V_P; PATLD_c[3].Down = 411+A_V_P;
PATLD_c[3].Left = 469+A_H; PATLD_c[3].Right = 489+A_H;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PATLD_c[3]);
// Para Vendedor 3 digitos (solo c¢digo de registro)
PATLD_c[4].Up = 224+A_V_P; PATLD_c[4].Down = 411+A_V_P;
PATLD_c[4].Left = 494+A_H; PATLD_c[4].Right = 513+A_H;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PATLD_c[4]);
// Para C¢digo 1 digito
PATLD_c[5].Up = 224+A_V_P; PATLD_c[5].Down = 411+A_V_P;
PATLD_c[5].Left = 524+A_H; PATLD_c[5].Right = 540+A_H;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PATLD_c[5]);
/*
char csm[80]; Fuente(SMALL_FONT, 5);
sprintf(csm, "Altura %d, Ancho %d", textheight("M"), textwidth("M") );
textxy(2,2, csm);
*/
/*
// Barra de ayuda
Boton.Up = 450; Boton.Down = 475;
Boton.Left = 5; Boton.Right = 549;
for(int n=0; n<16; n++) {
Imprime_Boton2 (1, n, GRIS_O, BLANCO, Boton);
getch(); }
*/
Dibuja_Botones_Comunes();
}
void Dibuja_Pantalla_Altas_Rapida(struct Make_Boton *PAR){
// struct boton PAR[12];
Fuente(SMALL_FONT, /*6*/5);
// char buffer[50];
////////////////////////////// Calcula los botones /////////////////////////
// Toda la pantalla
PAR[0].Up = 0; PAR[0].Down = 480;
PAR[0].Left = 0; PAR[0].Right = 640;
Imprime_Boton2 (1, GRIS_C, BLANCO, GRIS_O, PAR[0]);
// Barra de ayuda
PAR[0].Up = 450; PAR[0].Down = 475;
PAR[0].Left = 5; PAR[0].Right = 549;
Imprime_Boton2 (1, GRIS_C, GRIS_O, BLANCO, PAR[0]);
PAR[0].Up = 15; PAR[0].Down = 35;
PAR[0].Left = 15; PAR[0].Right = 490;
Imprime_Boton2 (1, GRIS_C, BLANCO, GRIS_O, PAR[0]);
setcolor(0);
textxy(20,15, "Local Nombre Telf.");
PAR[1].Up = 45; PAR[1].Down = 225;
PAR[1].Left = 15; PAR[1].Right = 259;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PAR[1]);
PAR[2].Up = 45; PAR[2].Down = 225;
PAR[2].Left = 264; PAR[2].Right = 388;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PAR[2]);
PAR[3].Up = 45; PAR[3].Down = 225;
PAR[3].Left = 393; PAR[3].Right = 490;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PAR[3]);
// Barra de Men£ rapido 2, - FECHA -
PAR[4].Up = 232; PAR[4].Down = 247;
PAR[4].Left = 15; PAR[4].Right = 490;
Imprime_Boton2 (1, GRIS_C, BLANCO, GRIS_O, PAR[4]);
setcolor(0);
Fuente(SMALL_FONT, 5);
textxy( 20, 231, "Fecha Ref. Concepto Und Vend Cod");
textxy(425, 231, "TOTAL");
Fuente(SMALL_FONT, 2);
textxy(464, 235, "+ I.V.A.");
Fuente(SMALL_FONT, 5);
//Fecha 8 d
PAR[4].Up = 254; PAR[4].Down = 425;
PAR[4].Left = 15; PAR[4].Right = 80;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PAR[4]);
// Ref. 5 d
PAR[5].Up = 254; PAR[5].Down = 425;
PAR[5].Left = 92; PAR[5].Right = 134;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PAR[5]);
// Concepto 20 d
PAR[6].Up = 254; PAR[6].Down = 425;
PAR[6].Left = 146; PAR[6].Right = 308;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PAR[6]);
// Unidades 3 d
PAR[7].Up = 254; PAR[7].Down = 425;
PAR[7].Left = 320; PAR[7].Right = 347;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PAR[7]);
// Vendedor 3 d
PAR[8].Up = 254; PAR[8].Down = 425;
PAR[8].Left = 359; PAR[8].Right = 386;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PAR[8]);
// C¢digo 1 d
PAR[9].Up = 254; PAR[9].Down = 425;
PAR[9].Left = 398; PAR[9].Right = 415;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PAR[9]);
// TOTAL 8 d
PAR[10].Up = 254; PAR[10].Down = 425;
PAR[10].Left = 424; PAR[10].Right = 490;
Imprime_Boton2 (1, GRIS_C, BLANCO, GRIS_O, PAR[10]);
// BARRA TOTAL TOTAL 8 d
PAR[11].Up = 430; PAR[11].Down = 445;
PAR[11].Left = 15; PAR[11].Right = 490;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PAR[11]);
setcolor(1);
outtextxy(20, 431, "N§ de Contrato: Suma Total:");
// Suma Total == 11 digitos. Long double float 'Lf' -> _atold() <-
// long double _strtold(const char *(s), char **(endptr));
/*
char csm[80]; Fuente(SMALL_FONT, 5);
sprintf(csm, "Altura %d, Ancho %d", textheight("M"), textwidth("M") );
textxy(2,2, csm);
*/
Dibuja_Botones_Comunes();
}
void Dibuja_Pantalla_Vendedores(struct Make_Boton *PV){
Fuente(SMALL_FONT, 6);
// char buffer[50];
////////////////////////////// Calcula los botones /////////////////////////
// Toda la pantalla
PV[0].Up = 0; PV[0].Down = 480;
PV[0].Left = 0; PV[0].Right = 640;
Imprime_Boton2 (1, GRIS_C, BLANCO, GRIS_O, PV[0]);
// Barra de ayuda
PV[0].Up = 450; PV[0].Down = 475;
PV[0].Left = 5; PV[0].Right = 549;
Imprime_Boton2 (1, GRIS_C, GRIS_O, BLANCO, PV[0]);
PV[0].Up = 15; PV[0].Down = 35;
PV[0].Left = 15; PV[0].Right = 490;
Imprime_Boton2 (1, GRIS_C, BLANCO, GRIS_O, PV[0]);
setcolor(0);
textxy(20,15, "N§ Nombre 1er. Apellido Telf.");
// N§ 3 d
PV[0].Up = 45; PV[0].Down = 225;
PV[0].Left = 15; PV[0].Right = 45;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PV[0]);
// Nombre 15
PV[1].Up = 45; PV[1].Down = 225;
PV[1].Left = 52; PV[1].Right = 203;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PV[1]);
// 1er. Apellido 15
PV[2].Up = 45; PV[2].Down = 225;
PV[2].Left = 210; PV[2].Right = 358;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PV[2]);
// Tlf. 12
PV[3].Up = 45; PV[3].Down = 225;
PV[3].Left = 365; PV[3].Right = 490;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PV[3]);
// Datos completos
Fuente(SMALL_FONT, 5);
textxy(15, 235, "Nombre"); // 15, 15, 15 d
PV[4].Up =235; PV[4].Down = 255;
PV[4].Left = 85; PV[4].Right = 205;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PV[4]);
PV[5].Up =235; PV[5].Down = 255;
PV[5].Left =225; PV[5].Right = 345;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PV[5]);
PV[6].Up =235; PV[6].Down = 255;
PV[6].Left =365; PV[6].Right = 490;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PV[6]);
textxy(15, 260, "D.N.I"); // 15 d
PV[7].Up =260; PV[7].Down = 280;
PV[7].Left = 85; PV[7].Right = 205;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PV[7]);
textxy(225, 260, "Telfono"); // 12 + 12 d
PV[8].Up =260; PV[8].Down = 280;
PV[8].Left =289; PV[8].Right = 385;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PV[8]);
PV[9].Up =260; PV[9].Down = 280;
PV[9].Left =394; PV[9].Right = 490;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PV[9]);
textxy(15, 285, "Calle");// 30 d
PV[10].Up =285; PV[10].Down = 305;
PV[10].Left = 85; PV[10].Right = 327;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PV[10]);
textxy(347, 285, "");// 3 d
PV[11].Up =285; PV[11].Down = 305;
PV[11].Left =376; PV[11].Right = 400;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PV[11]);
textxy(424, 285, "Piso"); // 3 d
PV[12].Up =285; PV[12].Down = 305;
PV[12].Left =465; PV[12].Right = 490;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PV[12]);
textxy(15, 310, "Poblaci¢n");// 18 d
PV[13].Up =310; PV[13].Down = 330;
PV[13].Left = 85; PV[13].Right = 230;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PV[13]);
textxy(275, 310, "Provincia");// 16 d
PV[14].Up =310; PV[14].Down = 330;
PV[14].Left =357; PV[14].Right = 490;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PV[14]);
textxy(15, 335, "C.P."); // 5 + 1 d
PV[15].Up =335; PV[15].Down = 355;
PV[15].Left = 85; PV[15].Right = 133;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PV[15]);
textxy(15, 370, "C.C."); // 5 + 1 d
PV[16].Up =370; PV[16].Down = 390;
PV[16].Left = 85; PV[16].Right = 133;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PV[16]);
textxy(140, 370, " P. Producto %"); // 3 d
PV[17].Up =370; PV[17].Down = 390;
PV[17].Left =236; PV[17].Right = 263;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PV[17]);
setcolor(1);
Fuente(SMALL_FONT, 4);
textxy(305, 375, "Contratos realizados"); // 3 d
setcolor(BLANCO);
outtextxy(305, 384, "( y aun activos )");
setcolor(ROJO);
outtextxy(305-1, 384-1, "( y aun activos )");
PV[18].Up =370; PV[18].Down = 390;
PV[18].Left =430; PV[18].Right = 490;
Imprime_Boton2 (1, GRIS_C, BLANCO, GRIS_O, PV[18]);
// Fuente(SMALL_FONT, 5);
/*
PV[xx].Up = 430; PV[xx].Down = 445;
PV[xx].Left = 15; PV[xx].Right = 490;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PV[xx]);
setcolor(1);
textxy(20, 431, "N§ de Contrato: Suma Total:");
*/
/*
char csm[80]; Fuente(SMALL_FONT, 5);
sprintf(csm, "Altura %d, Ancho %d", textheight("M"), textwidth("M") );
textxy(2,2, csm);
*/
Dibuja_Botones_Comunes();
}
void Dibuja_Pantalla_Referencia(struct Make_Boton *PR){
Fuente(SMALL_FONT, 6);
// char buffer[50];
////////////////////////////// Calcula los botones /////////////////////////
// Toda la pantalla
PR[0].Up = 0; PR[0].Down = 480;
PR[0].Left = 0; PR[0].Right = 640;
Imprime_Boton2 (1, GRIS_C, BLANCO, GRIS_O, PR[0]);
// Barra de ayuda
PR[0].Up = 450; PR[0].Down = 475;
PR[0].Left = 5; PR[0].Right = 549;
Imprime_Boton2 (1, GRIS_C, GRIS_O, BLANCO, PR[0]);
PR[0].Up = 15; PR[0].Down = 35;
PR[0].Left = 15; PR[0].Right = 549;
Imprime_Boton2 (1, GRIS_C, BLANCO, GRIS_O, PR[0]);
// 5 + 1 2 5 2
setcolor(0); // 12345 12345678901234567890 123456 123 123456 123
textxy(20,15, "Ref Concepto P. Und % P.V.P. %");
// Ref
PR[0].Up = 40; PR[0].Down = 440;
PR[0].Left = 15; PR[0].Right = 70;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PR[0]);
// Concepto
PR[1].Up = 40; PR[1].Down = 440;
PR[1].Left = 85; PR[1].Right = 285;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PR[1]);
// P. Und
PR[2].Up = 40; PR[2].Down = 440;
PR[2].Left = 298; PR[2].Right = 373;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PR[2]);
// P. Producto
PR[3].Up = 40; PR[3].Down = 440;
PR[3].Left = 386; PR[3].Right = 416;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PR[3]);
// P. V. P.
PR[4].Up = 40; PR[4].Down = 440;
PR[4].Left = 429; PR[4].Right = 504;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PR[4]);
// P. P. P£blico
PR[5].Up = 40; PR[5].Down = 440;
PR[5].Left = 517; PR[5].Right = 549;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PR[5]);
Dibuja_Botones_Comunes();
}
void Dibuja_Pantalla_Compras(struct Make_Boton *PC){
Fuente(SMALL_FONT, 6);
// char buffer[50];
////////////////////////////// Calcula los botones /////////////////////////
// Toda la pantalla
PC[0].Up = 0; PC[0].Down = 480;
PC[0].Left = 0; PC[0].Right = 640;
Imprime_Boton2 (1, GRIS_C, BLANCO, GRIS_O, PC[0]);
// Barra de ayuda
PC[0].Up = 450; PC[0].Down = 475;
PC[0].Left = 5; PC[0].Right = 549;
Imprime_Boton2 (1, GRIS_C, GRIS_O, BLANCO, PC[0]);
PC[0].Up = 15; PC[0].Down = 35;
PC[0].Left = 5; PC[0].Right = 549;
Imprime_Boton2 (1, GRIS_C, BLANCO, GRIS_O, PC[0]);
// 4 + 1 5 + 1 9 + 2
setcolor(0); // 12-12-12123451234567890123456789012345123456123456789--
textxy(10, 15, "Fecha Ref Concepto Und. C P.Und P. Total");
// Fecha 7 + 2
PC[0].Up = 40; PC[0].Down = 440;
PC[0].Left = 5; PC[0].Right = 85;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PC[0]);
// Ref 4
PC[1].Up = 40; PC[1].Down = 440;
PC[1].Left = 88; PC[1].Right = 128;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PC[1]);
// Concepto 20
PC[2].Up = 40; PC[2].Down = 440;
PC[2].Left = 131; PC[2].Right = 331;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PC[2]);
// Unidades 4
PC[3].Up = 40; PC[3].Down = 440;
PC[3].Left = 334; PC[3].Right = 377;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PC[3]);
// Codigo 1
PC[4].Up = 40; PC[4].Down = 440;
PC[4].Left = 380; PC[4].Right = 392;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PC[4]);
// P. Unidad 5
PC[5].Up = 40; PC[5].Down = 440;
PC[5].Left = 395; PC[5].Right = 455;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PC[5]);
// TOTAL --- 9 + 2 ---
PC[6].Up = 40; PC[6].Down = 440;
PC[6].Left = 458; PC[6].Right = 549;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PC[6]);
Dibuja_Botones_Comunes();
}
void Dibuja_Pantalla_Stock(struct Make_Boton *PS){
Fuente(SMALL_FONT, 5);
// char buffer[50];
/*
int ok, ok1;
setcolor(63);
Fuente(SMALL_FONT, 6);
ok = textheight("M");
ok1 = textwidth("M");
sprintf(buffer, "Altura: % 2d Anchura: % 2d Tama¤o: 6", ok, ok1);
textxy(10,10, buffer);
Fuente(SMALL_FONT, 5);
ok = textheight("M");
ok1 = textwidth("M");
sprintf(buffer, "Altura: % 2d Anchura: % 2d Tama¤o: 5", ok, ok1);
textxy(10,30, buffer);
Fuente(SMALL_FONT, 4);
ok = textheight("M");
ok1 = textwidth("M");
sprintf(buffer, "Altura: % 2d Anchura: % 2d Tama¤o: 4", ok, ok1);
textxy(10,45, buffer);
Fuente(SMALL_FONT, 3);
ok = textheight("M");
ok1 = textwidth("M");
sprintf(buffer, "Altura: % 2d Anchura: % 2d Tama¤o: 3", ok, ok1);
textxy(10,60, buffer);
Fuente(SMALL_FONT, 2);
ok = textheight("M");
ok1 = textwidth("M");
sprintf(buffer, "Altura: % 2d Anchura: % 2d Tama¤o: 2", ok, ok1);
textxy(10,70, buffer);
*/
// getch();
Fuente(SMALL_FONT, 4);
////////////////////////////// Calcula los botones /////////////////////////
// Toda la pantalla
PS[0].Up = 0; PS[0].Down = 480;
PS[0].Left = 0; PS[0].Right = 640;
Imprime_Boton2 (1, GRIS_C, BLANCO, GRIS_O, PS[0]);
// Barra de ayuda
PS[0].Up = 450; PS[0].Down = 475;
PS[0].Left = 5; PS[0].Right = 549;
Imprime_Boton2 (1, GRIS_C, GRIS_O, BLANCO, PS[0]);
PS[0].Up = 15; PS[0].Down = 35;
PS[0].Left = 5; PS[0].Right = 325;
Imprime_Boton2 (1, GRIS_C, BLANCO, GRIS_O, PS[0]);
// 1234 123456789-123456789- 1234567 1234567 1234567890
textxy(10, 17, "Ref Concepto Und. 1 Und. 0 Unds Total");
// Ref 4 + 1
PS[0].Up = 40; PS[0].Down = 440;
PS[0].Left = 5; PS[0].Right = 40;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PS[0]);
// Concepto 20
PS[1].Up = 40; PS[1].Down = 440;
PS[1].Left = 45; PS[1].Right = 165;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PS[1]);
// Unidades 1 7
PS[2].Up = 40; PS[2].Down = 440;
PS[2].Left = 170; PS[2].Right = 210;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PS[2]);
// Unidades 2 7
PS[3].Up = 40; PS[3].Down = 440;
PS[3].Left = 215; PS[3].Right = 254;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PS[3]);
// Unidades T. 7
PS[4].Up = 40; PS[4].Down = 440;
PS[4].Left = 259; PS[4].Right = 325;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PS[4]);
struct Make_Boton Ptmp;
// Pantalla de gr ficas.
Ptmp.Up = 15; Ptmp.Down = 213;
Ptmp.Left = 349; Ptmp.Right = 549;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, Ptmp);
Ptmp.Up = 242; Ptmp.Down = 440;
Ptmp.Left = 349; Ptmp.Right = 549;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, Ptmp);
Dibuja_Botones_Comunes();
}
void Dibuja_Botones_Comunes(void){
Comunes[0].Up = 15; Comunes[0].Down = 57;
Comunes[1].Up = 67; Comunes[1].Down =109;
Comunes[2].Up =119; Comunes[2].Down =161;
Comunes[3].Up =171; Comunes[3].Down =213;
Comunes[4].Up =223; Comunes[4].Down =265;
Comunes[5].Up =275; Comunes[5].Down =317;
Comunes[6].Up =327; Comunes[6].Down =369;
Comunes[7].Up =379; Comunes[7].Down =421;
Comunes[8].Up =431; Comunes[8].Down =473;
for(int i=0; i<9; i++) {
Comunes[i].Left =559; Comunes[i].Right =630;
Imprime_Boton2 (1, GRIS_C, BLANCO, GRIS_O, Comunes[i]);
}
}
/*
void Dibuja_Pantalla_Altas_Todos_los_Datos(void);
void Dibuja_Pantalla_Altas_Rapida(void);
void Dibuja_Pantalla_Vendedores(void);
void Dibuja_Pantalla_Referencia(void);
void Dibuja_Pantalla_Compras(void);
void Dibuja_Pantalla_Stock(void);
*/
void Dibuja_Pantalla_Pricipal(void){
Fuente(SMALL_FONT, 5);
// char buffer[50];
Fuente(SMALL_FONT, 5);
////////////////////////////// Calcula los botones /////////////////////////
// Toda la pantalla
PP_S[0].Up = 0; PP_S[0].Down = 480;
PP_S[0].Left = 0; PP_S[0].Right = 640;
Imprime_Boton2 (1, GRIS_C, BLANCO, GRIS_O, PP_S[0]);
// Barra de ayuda
PP_S[0].Up = 450; PP_S[0].Down = 475;
PP_S[0].Left = 5; PP_S[0].Right = /*554*/635;
Imprime_Boton2 (1, GRIS_C, GRIS_O, BLANCO, PP_S[0]);
PP_S[0].Up = 15; PP_S[0].Down = 40;
PP_S[0].Left = 5; PP_S[0].Right = /*554*/635;
Imprime_Boton2 (1, GRIS_C, BLANCO, GRIS_O, PP_S[0]);
// 123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-
textxy(10, 19, " Archivo ³ Gestion de Clientes ³ Mantenimiento ³ Balances ³ Ayuda");
// Archivo Estatico
PP_S[0].Up = 17; PP_S[0].Down = 38;
PP_S[0].Left = 7; PP_S[0].Right = 84;
// Imprime_Boton2 (0, NEGRO, GRIS_O, BLANCO, PP_S[0]);
// Gestion Estatico
PP_S[1].Up = 17; PP_S[1].Down = 38;
PP_S[1].Left = 91; PP_S[1].Right = 259;
// Imprime_Boton2 (0, NEGRO, GRIS_O, BLANCO, PP_S[1]);
// Mantenimiento Estatico
PP_S[2].Up = 17; PP_S[2].Down = 38;
PP_S[2].Left = 266; PP_S[2].Right = 388;
// Imprime_Boton2 (0, NEGRO, GRIS_O, BLANCO, PP_S[2]);
// Balance Estatico
PP_S[3].Up = 17; PP_S[3].Down = 38;
PP_S[3].Left = 395; PP_S[3].Right = 483;
// Imprime_Boton2 (0, NEGRO, GRIS_O, BLANCO, PP_S[3]);
// Ayuda Estatico
PP_S[4].Up = 17; PP_S[4].Down = 38;
PP_S[4].Left = 570/*490*/; PP_S[4].Right = /*552*/633;
// Imprime_Boton2 (0, NEGRO, GRIS_O, BLANCO, PP_S[4]);
}
void textxy(int x, int y, char *text){
setcolor(BLANCO);
outtextxy(x, y, text);
setcolor(NEGRO);
outtextxy(x-1, y-1, text);
}
void Pantalla_de_Facturas(void){
struct Make_Boton Tmp;
Tmp.Up = 130; Tmp.Down = 400;
Tmp.Left = 150; Tmp.Right = 465;
Imprime_Boton2 (1, GRIS_C, GRIS_O, BLANCO, Tmp);
Tmp.Up = 135; Tmp.Down = 395;
Tmp.Left = 155; Tmp.Right = 460;
Imprime_Boton2 (0, GRIS_C, BLANCO, GRIS_O, Tmp);
// Imprime_Todas_Facturas( Para_quien, Devuelve );
textxy( 165, 140, "Porcentaje realizado:");
Tmp.Up = 170; Tmp.Down = 185;
Tmp.Left = 165; Tmp.Right = 450;
Imprime_Boton2 (1, NEGRO, BLANCO, GRIS_O, Tmp);
textxy( 165, 200, "Imprimiendo Contrato ");
Tmp.Up = 197; Tmp.Down = 217;
Tmp.Left = 350; Tmp.Right = 450;
Imprime_Boton2 (1, NEGRO, BLANCO, GRIS_O, Tmp);
textxy( 165, 220, "Fatura para");
textxy( 165, 240, " Empresa");
textxy( 165, 242, " _");
textxy( 165, 265, " Cliente");
textxy( 165, 267, " _");
Check[0].Up = 240; Check[0].Down = 255;
Check[0].Left = 145+90; Check[0].Right = 160+90;
Imprime_Boton2 (1, NEGRO, BLANCO, GRIS_O, Check[0]);
Check[1].Up = 265; Check[1].Down = 280;
Check[1].Left = 145+90; Check[1].Right = 160+90;
Imprime_Boton2 (1, NEGRO, BLANCO, GRIS_O, Check[1]);
Check[2].Up = 320; Check[2].Down = 380;
Check[2].Left = 165; Check[2].Right = 450;
Imprime_Boton2 (1, NEGRO, BLANCO, GRIS_O, Check[2]);
Check[3].Up = 290; Check[3].Down = 310;
Check[3].Left = 165; Check[3].Right = 255;
Imprime_Boton2 (0, NEGRO, GRIS_O, BLANCO, Check[3]);
Check[4].Up = 290; Check[4].Down = 310;
Check[4].Left = 260; Check[4].Right = 350;
Imprime_Boton2 (0, NEGRO, GRIS_O, BLANCO, Check[4]);
textxy(170, 292, " COMENZAR DETENER");
textxy(170, 294, " _ _ ");
}
void Pantalla_Graficas_Compras(struct Make_Boton *PGC){
Fuente(SMALL_FONT, 5);
// char buffer[50];
////////////////////////////// Calcula los botones /////////////////////////
// Toda la pantalla
PGC[0].Up = 0; PGC[0].Down = 480;
PGC[0].Left = 0; PGC[0].Right = 640;
Imprime_Boton2 (1, GRIS_C, BLANCO, GRIS_O, PGC[0]);
// Barra de ayuda
PGC[0].Up = 450; PGC[0].Down = 475;
PGC[0].Left = 5; PGC[0].Right = 549;
Imprime_Boton2 (1, GRIS_C, GRIS_O, BLANCO, PGC[0]);
PGC[0].Up = 15; PGC[0].Down = 35;
PGC[6].Up = 15; PGC[6].Down = 35;
PGC[0].Left = 85; PGC[0].Right = 275;
PGC[6].Left =360; PGC[6].Right = 549;
Imprime_Boton2 (1, NEGRO, BLANCO, GRIS_O, PGC[0]);
Imprime_Boton2 (1, NEGRO, BLANCO, GRIS_O, PGC[6]);
textxy( 7, 17, "Enero" );
textxy( 282, 17, "Julio" );
PGC[1].Up = 40; PGC[1].Down = 60;
PGC[7].Up = 40; PGC[7].Down = 60;
PGC[1].Left = 85; PGC[1].Right = 275;
PGC[7].Left =360; PGC[7].Right = 549;
Imprime_Boton2 (1, NEGRO, BLANCO, GRIS_O, PGC[1]);
Imprime_Boton2 (1, NEGRO, BLANCO, GRIS_O, PGC[7]);
textxy( 7, 42, "Febrero" );
textxy( 282, 42, "Agosto" );
PGC[2].Up = 65; PGC[2].Down = 85;
PGC[8].Up = 65; PGC[8].Down = 85;
PGC[2].Left = 85; PGC[2].Right = 275;
PGC[8].Left =360; PGC[8].Right = 549;
Imprime_Boton2 (1, NEGRO, BLANCO, GRIS_O, PGC[2]);
Imprime_Boton2 (1, NEGRO, BLANCO, GRIS_O, PGC[8]);
textxy( 7, 67, "Marzo" );
textxy( 282, 67, "Septiembre" );
PGC[3].Up = 90; PGC[3].Down = 110;
PGC[9].Up = 90; PGC[9].Down = 110;
PGC[3].Left = 85; PGC[3].Right = 275;
PGC[9].Left =360; PGC[9].Right = 549;
Imprime_Boton2 (1, NEGRO, BLANCO, GRIS_O, PGC[3]);
Imprime_Boton2 (1, NEGRO, BLANCO, GRIS_O, PGC[9]);
textxy( 7, 92, "Abril" );
textxy( 282, 92, "Octubre" );
PGC[4].Up = 115; PGC[4].Down = 135;
PGC[10].Up = 115; PGC[10].Down = 135;
PGC[4].Left = 85; PGC[4].Right = 275;
PGC[10].Left = 360; PGC[10].Right = 549;
Imprime_Boton2 (1, NEGRO, BLANCO, GRIS_O, PGC[4]);
Imprime_Boton2 (1, NEGRO, BLANCO, GRIS_O, PGC[10]);
textxy( 7, 117, "Mayo" );
textxy( 282, 117, "Noviembre" );
PGC[5].Up = 140; PGC[5].Down = 160;
PGC[11].Up = 140; PGC[11].Down = 160;
PGC[5].Left = 85; PGC[5].Right = 275;
PGC[11].Left =360; PGC[11].Right = 549;
Imprime_Boton2 (1, NEGRO, BLANCO, GRIS_O, PGC[5]);
Imprime_Boton2 (1, NEGRO, BLANCO, GRIS_O, PGC[11]);
textxy( 7, 142, "Junio" );
textxy( 282, 142, "Diciembre" );
PGC[12].Up = 165; PGC[12].Down = 185;
PGC[12].Left = 85; PGC[12].Right =549;
Imprime_Boton2 (1, NEGRO, BLANCO, GRIS_O, PGC[12]);
textxy( 7, 167, "Total Anual" );
PGC[13].Up = 195; PGC[13].Down = 440;
PGC[13].Left = 5; PGC[13].Right = 549;
Imprime_Boton2 (1, NEGRO, BLANCO, GRIS_O, PGC[13]);
Fuente(SMALL_FONT, 10);
setcolor(ROJO);
outtextxy( 148, 310, "CALCULANDO..." );
setcolor(BLANCO);
outtextxy( 149, 311, "CALCULANDO..." );
PGC[14].Up = 368; PGC[14].Down = 392;
PGC[14].Left = 148; PGC[14].Right = 402;
Imprime_Boton2 (1, GRIS_C, BLANCO, GRIS_O, PGC[14]);
PGC[14].Up = 370; PGC[14].Down = 390;
PGC[14].Left = 150; PGC[14].Right = 400;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PGC[14]);
/*
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿
³Enero ³ ³Julio ³³ ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ³ ³
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿³ ³
³Febrero ³ ³Agosto ³³ ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÀÄÄÄÄÄÄÄÄÄÄÄÄÙ
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿
³Marzo ³ ³Septiembre ³³ ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ³ ³
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿³ ³
³Abril ³ ³Octubre ³³ ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÀÄÄÄÄÄÄÄÄÄÄÄÄÙ
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿
³Mayo ³ ³Noviembre ³³ ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ³ ³
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿³ ³
³Junio ³ ³Diciembre ³³ ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÀÄÄÄÄÄÄÄÄÄÄÄÄÙ
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ ³³ ³
³ ³³ ³
³ ³³ ³
³ ³³ ³
³ ³ÀÄÄÄÄÄÄÄÄÄÄÄÄÙ
³ ³ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ ³³ ³
³ ³³ ³
³ ³³ ³
³ ³³ ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÀÄÄÄÄÄÄÄÄÄÄÄÄÙ
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
*/
Dibuja_Botones_Comunes();
}
void Pantalla_Graficas_Compras_C(struct Make_Boton *PGC){
Fuente(SMALL_FONT, 5);
// char buffer[50];
////////////////////////////// Calcula los botones /////////////////////////
// Toda la pantalla
PGC[0].Up = 0; PGC[0].Down = 480;
PGC[0].Left = 0; PGC[0].Right = 640;
Imprime_Boton2 (1, GRIS_C, BLANCO, GRIS_O, PGC[0]);
// Barra de ayuda
PGC[0].Up = 450; PGC[0].Down = 475;
PGC[0].Left = 5; PGC[0].Right = 549;
Imprime_Boton2 (1, GRIS_C, GRIS_O, BLANCO, PGC[0]);
PGC[0].Up = 15; PGC[0].Down = 35;
PGC[6].Up = 15; PGC[6].Down = 35;
PGC[0].Left = 85+ 50; PGC[0].Right = 275;
PGC[6].Left =360+ 50; PGC[6].Right = 549;
Imprime_Boton2 (1, NEGRO, BLANCO, GRIS_O, PGC[0]);
Imprime_Boton2 (1, NEGRO, BLANCO, GRIS_O, PGC[6]);
/*
textxy( 7, 17, "Enero" );
textxy( 282, 17, "Julio" );
*/
PGC[1].Up = 40; PGC[1].Down = 60;
PGC[7].Up = 40; PGC[7].Down = 60;
PGC[1].Left = 85 + 50; PGC[1].Right = 275;
PGC[7].Left =360+ 50; PGC[7].Right = 549;
Imprime_Boton2 (1, NEGRO, BLANCO, GRIS_O, PGC[1]);
Imprime_Boton2 (1, NEGRO, BLANCO, GRIS_O, PGC[7]);
/*
textxy( 7, 42, "Febrero" );
textxy( 282, 42, "Agosto" );
*/
PGC[2].Up = 65; PGC[2].Down = 85;
PGC[8].Up = 65; PGC[8].Down = 85;
PGC[2].Left = 85+ 50; PGC[2].Right = 275;
PGC[8].Left =360+ 50; PGC[8].Right = 549;
Imprime_Boton2 (1, NEGRO, BLANCO, GRIS_O, PGC[2]);
Imprime_Boton2 (1, NEGRO, BLANCO, GRIS_O, PGC[8]);
/*
textxy( 7, 67, "Marzo" );
textxy( 282, 67, "Septiembre" );
*/
PGC[3].Up = 90; PGC[3].Down = 110;
PGC[9].Up = 90; PGC[9].Down = 110;
PGC[3].Left = 85+ 50; PGC[3].Right = 275;
PGC[9].Left =360+ 50; PGC[9].Right = 549;
Imprime_Boton2 (1, NEGRO, BLANCO, GRIS_O, PGC[3]);
Imprime_Boton2 (1, NEGRO, BLANCO, GRIS_O, PGC[9]);
/*
textxy( 7, 92, "Abril" );
textxy( 282, 92, "Octubre" );
*/
PGC[4].Up = 115; PGC[4].Down = 135;
PGC[10].Up = 115; PGC[10].Down = 135;
PGC[4].Left = 85+ 50; PGC[4].Right = 275;
PGC[10].Left = 360+ 50; PGC[10].Right = 549;
Imprime_Boton2 (1, NEGRO, BLANCO, GRIS_O, PGC[4]);
Imprime_Boton2 (1, NEGRO, BLANCO, GRIS_O, PGC[10]);
/*
textxy( 7, 117, "Mayo" );
textxy( 282, 117, "Noviembre" );
*/
PGC[5].Up = 140; PGC[5].Down = 160;
PGC[11].Up = 140; PGC[11].Down = 160;
PGC[5].Left = 85+ 50; PGC[5].Right = 275;
PGC[11].Left =360+ 50; PGC[11].Right = 549;
Imprime_Boton2 (1, NEGRO, BLANCO, GRIS_O, PGC[5]);
Imprime_Boton2 (1, NEGRO, BLANCO, GRIS_O, PGC[11]);
/*
textxy( 7, 142, "Junio" );
textxy( 282, 142, "Diciembre" );
*/
/// PGC[12].Up = 165; PGC[12].Down = 185;
/// PGC[12].Left = 85; PGC[12].Right =549;
/// Imprime_Boton2 (1, NEGRO, BLANCO, GRIS_O, PGC[12]);
// textxy( 7, 167, "Total Anual" );
PGC[13].Up = 195; PGC[13].Down = 440;
PGC[13].Left = 5; PGC[13].Right = 549;
Imprime_Boton2 (1, NEGRO, BLANCO, GRIS_O, PGC[13]);
Fuente(SMALL_FONT, 10);
setcolor(ROJO);
outtextxy( 148, 310, "CALCULANDO..." );
setcolor(BLANCO);
outtextxy( 149, 311, "CALCULANDO..." );
PGC[14].Up = 368; PGC[14].Down = 392;
PGC[14].Left = 148; PGC[14].Right = 402;
Imprime_Boton2 (1, GRIS_C, BLANCO, GRIS_O, PGC[14]);
PGC[14].Up = 370; PGC[14].Down = 390;
PGC[14].Left = 150; PGC[14].Right = 400;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PGC[14]);
/*
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿
³Enero ³ ³Julio ³³ ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ³ ³
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿³ ³
³Febrero ³ ³Agosto ³³ ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÀÄÄÄÄÄÄÄÄÄÄÄÄÙ
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿
³Marzo ³ ³Septiembre ³³ ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ³ ³
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿³ ³
³Abril ³ ³Octubre ³³ ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÀÄÄÄÄÄÄÄÄÄÄÄÄÙ
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿
³Mayo ³ ³Noviembre ³³ ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ³ ³
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿³ ³
³Junio ³ ³Diciembre ³³ ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÀÄÄÄÄÄÄÄÄÄÄÄÄÙ
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ ³³ ³
³ ³³ ³
³ ³³ ³
³ ³³ ³
³ ³ÀÄÄÄÄÄÄÄÄÄÄÄÄÙ
³ ³ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ ³³ ³
³ ³³ ³
³ ³³ ³
³ ³³ ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÀÄÄÄÄÄÄÄÄÄÄÄÄÙ
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
*/
Dibuja_Botones_Comunes();
}
void Dibuja_Pantalla_Ventas(struct Make_Boton *PVent){
Fuente(SMALL_FONT, 5);
Fuente(SMALL_FONT, 4);
////////////////////////////// Calcula los botones /////////////////////////
// Toda la pantalla
PVent[0].Up = 0; PVent[0].Down = 480;
PVent[0].Left = 0; PVent[0].Right = 640;
Imprime_Boton2 (1, GRIS_C, BLANCO, GRIS_O, PVent[0]);
// Barra de ayuda
PVent[0].Up = 450; PVent[0].Down = 475;
PVent[0].Left = 5; PVent[0].Right = 549;
Imprime_Boton2 (1, GRIS_C, GRIS_O, BLANCO, PVent[0]);
PVent[0].Up = 15; PVent[0].Down = 35;
PVent[0].Left = 5; PVent[0].Right = /*325*/549;
Imprime_Boton2 (1, GRIS_C, BLANCO, GRIS_O, PVent[0]);
// 1234 123456789-123456789- 1234567 1234567890 1234567 1234567890 1234567890 123456789123
textxy(10, 17, "Ref Concepto Und. 1 V. Bruto 1 Und. 0 V. Bruto 0 Unds Total T. V. Bruto");
// Ref 4 + 1
PVent[0].Up = 40; PVent[0].Down = 440;
PVent[0].Left = 5; PVent[0].Right = 40;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PVent[0]);
// Concepto 20
PVent[1].Up = 40; PVent[1].Down = 440;
PVent[1].Left = 45; PVent[1].Right = 165;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PVent[1]);
// Unidades 1 7
PVent[2].Up = 40; PVent[2].Down = 440;
PVent[2].Left = 170; PVent[2].Right = 210;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PVent[2]);
// Ventas Bruto 1 10
PVent[3].Up = 40; PVent[3].Down = 440;
PVent[3].Left = 215; PVent[3].Right = 305-25;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PVent[3]);
// Unidades 0 7
PVent[4].Up = 40; PVent[4].Down = 440;
PVent[4].Left = 310-25; PVent[4].Right = 350-25;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PVent[4]);
// Ventas Bruto 1 10
PVent[5].Up = 40; PVent[5].Down = 440;
PVent[5].Left = 355-25; PVent[5].Right = 445-25-25;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PVent[5]);
// Unidades Total 7
PVent[6].Up = 40; PVent[6].Down = 440;
PVent[6].Left = 450-25-25; PVent[6].Right = 500-25-20;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PVent[6]);
// Total Ventas Bruto 1 10
PVent[7].Up = 40; PVent[7].Down = 440;
PVent[7].Left = 505-25-20; PVent[7].Right = 549;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, PVent[7]);
// struct boton Ptmp;
// Pantalla de gr ficas.
/*
Ptmp.Up = 15; Ptmp.Down = 213;
Ptmp.Left = 349; Ptmp.Right = 549;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, Ptmp);
Ptmp.Up = 242; Ptmp.Down = 440;
Ptmp.Left = 349; Ptmp.Right = 549;
Imprime_Boton2 (1, NEGRO, GRIS_O, BLANCO, Ptmp);
*/
Dibuja_Botones_Comunes();
}
void Imprime_Boton2(int D_Bord, char Cf, int Cb1, int Cb2, struct Make_Boton Bot_Imp){
int puntos[14];
unsigned char Ab = D_Bord;
if ( Bot_Imp.Down < 0 )
{
if(Bot_Imp.Pb > 0)
{
puntos[1] = 120;
puntos[2] = 300;
} else {
puntos[1] = 60;
puntos[2] = 240;
}
setlinestyle(0, 1, NORM_WIDTH);
setcolor(Cb1);
setfillstyle(SOLID_FILL, Cb1);
for ( puntos[0] = 0; puntos[0] < Ab; puntos[0]++ )
arc( Bot_Imp.Left, Bot_Imp.Up, puntos[1]+puntos[0], puntos[2]+puntos[0], Bot_Imp.Right - puntos[0]);
setcolor(Cb2);
setfillstyle(SOLID_FILL, Cb2);
for ( puntos[0] = 0; puntos[0] < Ab; puntos[0]++ )
arc( Bot_Imp.Left, Bot_Imp.Up, puntos[2]+puntos[0], puntos[1]+puntos[0], Bot_Imp.Right - puntos[0]);
if(D_Bord) {
setcolor(Cf);
setfillstyle(SOLID_FILL, Cf);
pieslice( Bot_Imp.Left, Bot_Imp.Up, 0, 360, Bot_Imp.Right - Ab);
}
if( Ab >= 2 ) {
setcolor( NEGRO );
setfillstyle(EMPTY_FILL, Cf);
circle( Bot_Imp.Left, Bot_Imp.Up, Bot_Imp.Right);
}
} else {
if(Bot_Imp.Pb == 2) {
puntos[0] = Bot_Imp.Left; puntos[1] = Bot_Imp.Up;
puntos[2] = Bot_Imp.Right; puntos[3] = Bot_Imp.Up;
puntos[4] = Bot_Imp.Right; puntos[5] = Bot_Imp.Down;
puntos[6] = (Bot_Imp.Right-Ab); puntos[7] = (Bot_Imp.Down-Ab);
puntos[8] = (Bot_Imp.Right-Ab); puntos[9] = (Bot_Imp.Up+Ab);
puntos[10] = (Bot_Imp.Left+Ab); puntos[11] = (Bot_Imp.Up+Ab);
puntos[12] = Bot_Imp.Left; puntos[13] = Bot_Imp.Up;
} else {
puntos[0] = Bot_Imp.Left; puntos[1] = Bot_Imp.Up;
puntos[2] = Bot_Imp.Right; puntos[3] = Bot_Imp.Up;
puntos[4] = Bot_Imp.Right - Ab; puntos[5] = Bot_Imp.Up + Ab;
puntos[6] = Bot_Imp.Left + Ab; puntos[7] = Bot_Imp.Up + Ab;
puntos[8] = Bot_Imp.Left + Ab; puntos[9] = Bot_Imp.Down - Ab;
puntos[10] = Bot_Imp.Left; puntos[11] = Bot_Imp.Down;
puntos[12] = Bot_Imp.Left; puntos[13] = Bot_Imp.Up;
}
setcolor(Cb1);
setfillstyle(SOLID_FILL, Cb1);
setlinestyle(0, 1, NORM_WIDTH);
fillpoly(7, puntos);
if(Bot_Imp.Pb == 2) {
puntos[0] = Bot_Imp.Left+Ab; puntos[1] = Bot_Imp.Up+Ab;
puntos[2] = Bot_Imp.Left+Ab; puntos[3] = Bot_Imp.Down-Ab;
puntos[4] = Bot_Imp.Right-Ab; puntos[5] = Bot_Imp.Down-Ab;
puntos[6] = Bot_Imp.Right; puntos[7] = Bot_Imp.Down;
puntos[8] = Bot_Imp.Left; puntos[9] = Bot_Imp.Down;
puntos[10] = Bot_Imp.Left; puntos[11] = Bot_Imp.Up;
puntos[12] = Bot_Imp.Left+Ab; puntos[13] = Bot_Imp.Up+Ab;
} else {
puntos[0] = Bot_Imp.Right; puntos[1] = Bot_Imp.Up;
puntos[2] = Bot_Imp.Right; puntos[3] = Bot_Imp.Down;
puntos[4] = Bot_Imp.Left; puntos[5] = Bot_Imp.Down;
puntos[6] = Bot_Imp.Left+Ab; puntos[7] = Bot_Imp.Down-Ab;
puntos[8] = Bot_Imp.Right-Ab; puntos[9] = Bot_Imp.Down-Ab;
puntos[10] = Bot_Imp.Right-Ab; puntos[11] = Bot_Imp.Up+Ab;
puntos[12] = Bot_Imp.Right; puntos[13] = Bot_Imp.Up;
}
setcolor(Cb2);
setfillstyle(SOLID_FILL, Cb2);
setlinestyle(0, 1, NORM_WIDTH);
fillpoly(7, puntos);
if(D_Bord) {
setcolor(Cf);
setfillstyle(SOLID_FILL, Cf);
bar(Bot_Imp.Left+Ab+1, Bot_Imp.Up+Ab+1, Bot_Imp.Right-Ab-1, Bot_Imp.Down-Ab-1);
}
if( Ab >= 2 ) {
setcolor( NEGRO );
setfillstyle(EMPTY_FILL, Cf);
rectangle(Bot_Imp.Left, Bot_Imp.Up, Bot_Imp.Right, Bot_Imp.Down);
}
}
}
void Fuente(int Fuente, int Size )
{
/* select the registered font */
settextstyle( Fuente, HORIZ_DIR, Size);
};