Correction d'un bug : affichage d'un devis vide
darcs-hash:20071001095709-f46e9-99e4918d3ca5290463e28c27b9cf163fed77a529.gz
This commit is contained in:
parent
ad499ff344
commit
31ad765d3f
2 changed files with 33 additions and 14 deletions
|
@ -108,6 +108,7 @@ class main(ModuleBase):
|
|||
#
|
||||
|
||||
def devis(self):
|
||||
if cherrypy.session.has_key('impression') and cherrypy.session['impression'] != None :
|
||||
return {
|
||||
'template':'impression-devis',
|
||||
'values':
|
||||
|
@ -118,6 +119,12 @@ class main(ModuleBase):
|
|||
},
|
||||
'standalone':True,
|
||||
}
|
||||
else:
|
||||
return {
|
||||
'template':'impression-devis',
|
||||
'values': { },
|
||||
'standalone':True,
|
||||
}
|
||||
devis.exposed=True
|
||||
|
||||
|
||||
|
|
|
@ -29,12 +29,17 @@
|
|||
margin:0;
|
||||
padding:5px 20px;
|
||||
}
|
||||
|
||||
table.factureDetails td.full {
|
||||
text-align:center;
|
||||
border: none;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div style="background:white url(/static/images/petitCr@ns.png) top left no-repeat; padding:2em;width:21cm;border:thin black solid;">
|
||||
<h1 style="margin:1em 1em 1em 50px;">Devis pour impression</h1>
|
||||
<span style="font-weight:bold;">Fichier : </span> $nomFichier
|
||||
<span style="font-weight:bold;">Fichier : </span> $getVar('nomFichier', 'XXXXX')
|
||||
<div id="facture" style="margin:2em 1em 1em 1em;">
|
||||
<table cellspacing="0" border="0" class="factureDetails">
|
||||
<tr>
|
||||
|
@ -44,6 +49,7 @@
|
|||
|
||||
<th>total</th>
|
||||
</tr>
|
||||
#if $getVar('devis', False)
|
||||
#for anItem in $devis
|
||||
<tr>
|
||||
<td>$anItem[0]</td>
|
||||
|
@ -59,7 +65,13 @@
|
|||
<td colspan="3" class="tdTotalDetailIntitule">
|
||||
Total
|
||||
</td>
|
||||
<td class="tdTotalDetail">$total €</td>
|
||||
<td class="tdTotalDetail">$getVar('total', "XXX") €</td>
|
||||
</tr>
|
||||
|
||||
#else
|
||||
<tr><td class="full" colspan="4"><h2>Non disponible </h2></td></tr>
|
||||
#end if
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue