blob: 8986860a6a6da80d0f5d6fcb27c47c00b867be6e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
|
<?
/*
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Autores: Pedro Obregón Mejías
Rubén D. Mancera Morán
Versión: 1.0
Fecha Liberación del código: 13/07/2004
Galopín para gnuLinEx 2004 -- Extremadura
*/
?>
<html>
<head>
<title>Galopin v1.0</title>
<link href="estilo.css" rel="stylesheet" type="text/css">
</head>
<body>
<img src="images/nuevas/administracionpresupuestos.jpg" alt="Administración de Presupuestos"><br>
<br>
<? $error=1;
include ("conectar.php");
if ($ini=="1") {
include ("controlfecha2.php"); }
if ($error=="0") {
include ("ficha_presupuesto.php"); }
else { ?>
<?
$consulta = "Select * from clientes where codcliente='$codcli'";
$resultado = mysql_query($consulta, $conexion);
$lafila=mysql_fetch_array($resultado);
?>
<table width="85%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#0066FF">
<tr>
<td width="18%" class="primeralineaizquierda">Código de cliente:</td>
<td width="21%"><? echo $lafila["codcliente"]; ?></td>
<td width="12%" class="primeralineaizquierda">Nombre:</td>
<td width="49%"><? echo $lafila["nombre"]; ?></td>
</tr>
<tr>
<td width="18%" class="primeralineaizquierda">CIF/NIF:</td>
<td width="21%"><? echo $lafila["nif"]; ?></td>
<td width="12%" class="primeralineaizquierda">F. Pago:</td>
<? $fp=$lafila["codfp"];
$consulta0 = "Select * from formapago where codfp='$fp'";
$resultado0 = mysql_query($consulta0, $conexion);
$lafila0=mysql_fetch_array($resultado0); ?>
<td width="49%"><? echo $lafila0["denfp"]; ?></td>
</tr>
<tr>
<td class="primeralineaizquierda">Dirección:</td>
<td colspan="2"><? echo $lafila["direccion"]; ?> </td>
<? $prov=$lafila["codprovincia"];
$consulta0 = "Select * from provincias where codprovincia='$prov'";
$resultado0 = mysql_query($consulta0, $conexion);
$lafila0=mysql_fetch_array($resultado0); ?>
<td><? echo $lafila["cp"]; ?>-<? echo $lafila["localidad"]; ?>-<? echo $lafila0["denprovincia"]; ?></td>
</tr>
</table>
<br>
<?
if ($errores<>"")
{
?>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#0066FF">
<tr align="center">
<td><b><font color="#FF0000"><? print $errores; ?></b></font><br></td>
</tr>
</table>
<?
}
?>
<div align="center">
<form name="form1" method="post" action="previo_ficha_presupuesto.php">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#0066FF">
<tr>
<td width="31%" class="primeralineaizquierda">Fecha del presupuesto:</td>
<td width="69%">
<? if ($ini==1) { ?>
<input name="fecha" type="text" id="fecha" size="10" maxlength="10" value="<? echo $fecha; ?>">
<? } else { $hoy=date("d/m/Y"); ?>
<input name="fecha" type="text" id="fecha" size="10" maxlength="10" value="<? echo $hoy; ?>">
<? } ?>
formato (dd/mm/yyyy)</td>
</tr>
<tr>
<td class="primeralineaizquierda">Tipo de IVA aplicado:</td>
<? if ($ini==0) { ?>
<td> <select name="iva0" id="iva0">
<? $cont=0;
while ($cont<=25) {
if ($cont=="18") { ?>
<option value="<? echo $cont; ?>" selected><? echo $cont; ?></option>
<? } else { ?>
<option value="<? echo $cont; ?>"><? echo $cont; ?></option>
<? } $cont++; } ?>
</select>
%</td>
<? } else { ?>
<td> <select name="iva0" id="iva0">
<? $cont=0;
while ($cont<=25) {
if ($cont==$iva0) { ?>
<option value="<? echo $cont; ?>" selected><? echo $cont; ?></option>
<? } else { ?>
<option value="<? echo $cont; ?>"><? echo $cont; ?></option>
<? } $cont++; } ?>
</select>
%</td>
<? } ?>
</tr>
<tr>
<td valign="top" class="primeralineaizquierda">Observaciones:</td>
<? if ($ini==0) { ?>
<td><textarea name="observaciones" cols="50" rows="5" id="observaciones"></textarea></td>
<? } else { ?>
<td><textarea name="observaciones" cols="50" rows="5" id="observaciones"><? echo $observaciones; ?></textarea></td>
<? } ?>
</tr>
<tr>
<td colspan="2"><div align="center">
<input type="submit" name="Submit" value="Enviar datos">
<input type="hidden" name="codcli" value="<? echo $codcli; ?>">
<input type="hidden" name="ini" value="1">
<input type="hidden" name="ini5" value="0">
</div></td>
</tr>
</table>
</form>
</div>
</body>
<? }
@mysql_free_result($resultado);
@mysql_free_result($resultado0);
?>
</html>
|