Ajout des templates couverture et contrat
This commit is contained in:
parent
b2df3ce32b
commit
445c6239e1
@ -33,11 +33,19 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Prix de revient</td>
|
||||
<td>{$prod_pxrevient}</td>
|
||||
<td colspan="3">{$prod_pxrevient}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Prix de vente</td>
|
||||
<td>{$prod_pxvente}</td>
|
||||
|
||||
<td width="15%">Taux TVA</td>
|
||||
<td width="35%">{$prod_tva_tx}</td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
</table>
|
||||
<br>
|
||||
<table class="border" width="100%">
|
||||
@ -63,11 +71,15 @@
|
||||
<td colspan="3">{$prod_pages}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Statut</td>
|
||||
<td colspan="3"></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
<br>
|
||||
<table class="border" width="100%">
|
||||
|
||||
|
||||
<tr>
|
||||
<td width="15%">Durée du contrat : </td>
|
||||
<td width="35%">{$prod_contrat_duree}</td>
|
||||
@ -82,7 +94,23 @@
|
||||
<td>{$prod_contrat_quant}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
|
||||
<table class="border" width="100%">
|
||||
|
||||
<tr>
|
||||
<td width="15%" valign="top">Description</td>
|
||||
<td width="85%">{$prod_description}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="15%" valign="top">Note (non visible sur les factures, propals...)</td>
|
||||
<td width="85%">{$prod_note}</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
192
htdocs/product/canvas/livrecontrat/fiche-edit.tpl
Normal file
192
htdocs/product/canvas/livrecontrat/fiche-edit.tpl
Normal file
@ -0,0 +1,192 @@
|
||||
<!-- BEGIN SMARTY TEMPLATE -->
|
||||
|
||||
<form id="evolForm" action="fiche.php" method="post">
|
||||
<input type="hidden" name="action" value="update">
|
||||
<input type="hidden" name="id" value="{$prod_id}">
|
||||
<input type="hidden" name="canvas" value="{$prod_canvas}">
|
||||
|
||||
<table class="border" width="100%">
|
||||
<tr>
|
||||
<td width="15%">Réf.</td>
|
||||
<td colspan="2">
|
||||
<input name="ref" size="20" value="{$prod_ref}"
|
||||
class="normal" onfocus="this.className='focus';" onblur="this.className='normal';">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="15%">Titre</td>
|
||||
<td width="85%" colspan="3">
|
||||
<input name="libelle" size="40" value="{$prod_label}"
|
||||
class="normal" onfocus="this.className='focus';" onblur="this.className='normal';">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="15%">ISBN</td>
|
||||
<td width="35%">
|
||||
<input name="isbna" size="2" maxlength="12" value="{$prod_isbna}"
|
||||
class="normal" onfocus="this.className='focus';" onblur="this.className='normal';">-
|
||||
<input name="isbnb" size="8" maxlength="7" value="{$prod_isbnb}"
|
||||
class="normal" onfocus="this.className='focus';" onblur="this.className='normal';">-
|
||||
<input name="isbnc" size="13" maxlength="12" class="normal" value="{$prod_isbnc}"
|
||||
onfocus="this.className='focus';" onblur="this.className='normal';" >
|
||||
{$prod_isbn}
|
||||
</td>
|
||||
<td width="15%">ISBN-13</td>
|
||||
<td width="35%">978-
|
||||
<input name="isbn13" size="13" maxlength="12" class="normal"
|
||||
onfocus="this.className='focus';" onblur="this.className='normal';" value="{$prod_isbn}">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="15%">EAN</td>
|
||||
<td width="35%">
|
||||
<input class="normal" name="ean" size="16" maxlength="15" value="{$prod_ean}"
|
||||
onfocus="this.className='focus';" onblur="this.className='normal';">
|
||||
</td>
|
||||
<td>Code barre</td>
|
||||
<td>{$prod_ean}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Pages</td>
|
||||
<td>
|
||||
<input name="pages" size="6" maxlength="5" value="{$prod_pages}"
|
||||
class="normal" onfocus="this.className='focus';" onblur="this.className='normal';">
|
||||
</td>
|
||||
<td>Format</td>
|
||||
<td>
|
||||
<input name="format" size="8" maxlength="7" value="{$prod_format}"
|
||||
class="normal" onfocus="this.className='focus';" onblur="this.className='normal';">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Prix au feuillet</td>
|
||||
<td>
|
||||
<input name="px_feuillet" type="text" size="7" maxlength="6" value="{$prod_pxfeuil}"
|
||||
class="normal" onfocus="this.className='focus';" onblur="this.className='normal';">
|
||||
</td>
|
||||
<td>Prix couverture</td>
|
||||
<td>
|
||||
<input name="px_couverture" type="text" size="7" maxlength="6" value="{$prod_pxcouv}"
|
||||
class="normal" onfocus="this.className='focus';" onblur="this.className='normal';">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Prix de revient</td>
|
||||
<td colspan="3">{$prod_pxrevient}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
|
||||
<table class="border" width="100%">
|
||||
<tr>
|
||||
<td width="15%">Prix de vente</td>
|
||||
<td width="35%">{$prod_pxvente}</td>
|
||||
<td width="15%">Taux TVA</td>
|
||||
<td width="35%">
|
||||
<select class="flat" name="tva_tx">
|
||||
<option value="0">0%</option>
|
||||
<option value="5.5">5.5%</option>
|
||||
<option value="19.6" selected="true">19.6%</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
|
||||
<table class="border" width="100%">
|
||||
<tr>
|
||||
<td width="15%">Stock</td>
|
||||
<td width="35%"><b>{$prod_stock_dispo}</b></td>
|
||||
<td width="15%">Seuil d'alerte stock</td>
|
||||
<td width="35%">
|
||||
<input name="seuil_stock_alerte" size="4" value="{$prod_seuil_stock_alerte}"
|
||||
class="normal" onfocus="this.className='focus';" onblur="this.className='normal';">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="15%">Emplacement Stock</td>
|
||||
<td width="85%" colspan="3">
|
||||
<input name="stock_loc" size="8" value=""
|
||||
class="normal" onfocus="this.className='focus';" onblur="this.className='normal';">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Statut</td>
|
||||
<td colspan="3">
|
||||
<select class="flat" name="statut">
|
||||
<option value="1" selected="true">En vente</option>
|
||||
<option value="0">Hors vente</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
|
||||
<table class="border" width="100%">
|
||||
<tr>
|
||||
<td width="15%">Durée du contrat :</td>
|
||||
<td width="35%">
|
||||
<input name="contrat_duree" type="text" size="7" maxlength="6" value="{$prod_contrat_duree}"
|
||||
class="normal" onfocus="this.className='focus';" onblur="this.className='normal';">
|
||||
</td>
|
||||
<td width="15%">Date d'application</td>
|
||||
<td width="35%">
|
||||
<input name="contrat_date_app" type="text" size="7" maxlength="6" value="{$prod_contrat_date_app}"
|
||||
class="normal" onfocus="this.className='focus';" onblur="this.className='normal';">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Taux conclu</td>
|
||||
<td>
|
||||
<input name="contrat_taux" type="text" size="7" maxlength="6" value="{$prod_contrat_taux}"
|
||||
class="normal" onfocus="this.className='focus';" onblur="this.className='normal';">%
|
||||
</td>
|
||||
<td>Quantité achetée</td>
|
||||
<td>
|
||||
<input name="contrat_quant" type="text" size="7" maxlength="6" value="{$prod_contrat_quant}"
|
||||
class="normal" onfocus="this.className='focus';" onblur="this.className='normal';">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top">Description</td>
|
||||
<td colspan="3">
|
||||
<textarea name="desc" rows="6" cols="70"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top">Note (non visible sur les factures, propals...)
|
||||
</td>
|
||||
<td colspan="3">
|
||||
<textarea name="note" rows="4" cols="70"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4" align="center">
|
||||
<input type="submit" class="button" value="Enregistrer">
|
||||
<input type="submit" class="button" name="cancel" value="Annuler">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</form>
|
||||
<!-- CUT HERE -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- END SMARTY TEMPLATE -->
|
||||
53
htdocs/product/canvas/livrecontrat/fiche-view.tpl
Normal file
53
htdocs/product/canvas/livrecontrat/fiche-view.tpl
Normal file
@ -0,0 +1,53 @@
|
||||
<!-- BEGIN SMARTY TEMPLATE -->
|
||||
</table>
|
||||
<table class="border" width="100%">
|
||||
<tr>
|
||||
<td width="15%">Titre</td>
|
||||
<td width="85%" colspan="3">{$prod_label}</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</table>
|
||||
<br>
|
||||
<table class="border" width="100%">
|
||||
|
||||
<tr>
|
||||
<td width="15%">Stock</td>
|
||||
<td width="35%" {$smarty_stock_dispo_class}>
|
||||
{$prod_stock_dispo}
|
||||
</td>
|
||||
<td width="15%">Seuil d'alerte</td>
|
||||
<td width="35%">{$prod_stock_alert}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="15%">Stock réel</td>
|
||||
<td width="35%">{$prod_stock_reel}</td>
|
||||
<td width="15%">Exemplaires en commande</td>
|
||||
<td width="35%">{$prod_stock_in_command}</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
</table>
|
||||
<br>
|
||||
<table class="border" width="100%">
|
||||
|
||||
|
||||
<tr>
|
||||
<td width="15%">Durée du contrat : </td>
|
||||
<td width="35%">{$prod_contrat_duree}</td>
|
||||
<td width="15%">Date d'application</td>
|
||||
<td width="35%"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Taux conclu</td>
|
||||
<td>{$prod_contrat_taux}</td>
|
||||
<td>Quantité achetée</td>
|
||||
<td>{$prod_contrat_quant}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<!-- END SMARTY TEMPLATE -->
|
||||
32
htdocs/product/canvas/livrecouverture/fiche-view.tpl
Normal file
32
htdocs/product/canvas/livrecouverture/fiche-view.tpl
Normal file
@ -0,0 +1,32 @@
|
||||
<!-- BEGIN SMARTY TEMPLATE -->
|
||||
</table>
|
||||
<table class="border" width="100%">
|
||||
<tr>
|
||||
<td width="15%">Titre du livre</td>
|
||||
<td width="85%" colspan="3">{$prod_label}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
|
||||
<table class="border" width="100%">
|
||||
|
||||
<tr>
|
||||
<td width="15%">Stock</td>
|
||||
<td width="35%" {$smarty_stock_dispo_class}>
|
||||
{$prod_stock_dispo}
|
||||
</td>
|
||||
<td width="15%">Seuil d'alerte</td>
|
||||
<td width="35%">{$prod_stock_alert}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="15%">Stock réel</td>
|
||||
<td width="35%">{$prod_stock_reel}</td>
|
||||
<td width="15%">Exemplaires en commande</td>
|
||||
<td width="35%">{$prod_stock_in_command}</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<!-- END SMARTY TEMPLATE -->
|
||||
@ -349,12 +349,16 @@ class ProductLivre extends Product
|
||||
|
||||
$smarty->assign('prod_isbn13', '978-'.substr($this->isbn,0,12).substr($this->ean,-1,1));
|
||||
|
||||
$smarty->assign('prod_ref', $this->ref);
|
||||
$smarty->assign('prod_pages', $this->pages);
|
||||
$smarty->assign('prod_format', $this->format);
|
||||
$smarty->assign('prod_pxfeuil', $this->px_feuillet);
|
||||
$smarty->assign('prod_ref', $this->ref);
|
||||
$smarty->assign('prod_tva_tx', $this->tva_tx);
|
||||
$smarty->assign('prod_description', $this->description);
|
||||
$smarty->assign('prod_note', $this->note);
|
||||
|
||||
$smarty->assign('prod_pxcouv', $this->couverture->price);
|
||||
$smarty->assign('prod_pages', $this->pages);
|
||||
$smarty->assign('prod_format', $this->format);
|
||||
$smarty->assign('prod_pxfeuil', $this->px_feuillet);
|
||||
|
||||
$smarty->assign('prod_pxcouv', $this->couverture->price);
|
||||
|
||||
$smarty->assign('prod_pxrevient', price($this->px_revient));
|
||||
$smarty->assign('prod_pxvente', price($this->price));
|
||||
@ -373,8 +377,6 @@ class ProductLivre extends Product
|
||||
{
|
||||
$smarty->assign('smarty_stock_dispo_class', 'class="alerte"');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -170,5 +170,41 @@ class ProductLivreContrat extends Product
|
||||
|
||||
return $error;
|
||||
}
|
||||
/**
|
||||
* \brief Assigne les valeurs pour les templates Smarty
|
||||
* \param smarty Instance de smarty
|
||||
*/
|
||||
function assign_values(&$smarty)
|
||||
{
|
||||
$smarty->assign('prod_canvas', 'livre');
|
||||
$smarty->assign('prod_id', $this->id);
|
||||
|
||||
$smarty->assign('prod_isbn', $this->isbn);
|
||||
|
||||
$isbn_parts = explode('-',$this->isbn);
|
||||
|
||||
$smarty->assign('prod_isbna', $isbn_parts[0]);
|
||||
$smarty->assign('prod_isbnb', $isbn_parts[1]);
|
||||
$smarty->assign('prod_isbnc', $isbn_parts[2]);
|
||||
|
||||
$smarty->assign('prod_ean', $this->ean);
|
||||
|
||||
$smarty->assign('prod_isbn13', '978-'.substr($this->isbn,0,12).substr($this->ean,-1,1));
|
||||
|
||||
$smarty->assign('prod_contrat_taux', $this->contrat->taux);
|
||||
$smarty->assign('prod_contrat_duree', $this->contrat_duree);
|
||||
$smarty->assign('prod_contrat_quant', $this->contrat_quantite);
|
||||
|
||||
$smarty->assign('prod_stock_reel', $this->stock_reel);
|
||||
$smarty->assign('prod_stock_dispo', ($this->stock_reel - $this->stock_in_command));
|
||||
$smarty->assign('prod_stock_in_command', $this->stock_in_command);
|
||||
$smarty->assign('prod_stock_alert', $this->seuil_stock_alerte);
|
||||
|
||||
if ($this->seuil_stock_alerte > ($this->stock_reel - $this->stock_in_command) && $this->status == 1)
|
||||
{
|
||||
$smarty->assign('smarty_stock_dispo_class', 'class="alerte"');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
@ -92,6 +92,41 @@ class ProductLivreCouverture extends Product
|
||||
return $error;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Assigne les valeurs pour les templates Smarty
|
||||
* \param smarty Instance de smarty
|
||||
*/
|
||||
function assign_values(&$smarty)
|
||||
{
|
||||
$smarty->assign('prod_canvas', 'livre');
|
||||
$smarty->assign('prod_id', $this->id);
|
||||
|
||||
$smarty->assign('prod_isbn', $this->isbn);
|
||||
|
||||
$isbn_parts = explode('-',$this->isbn);
|
||||
|
||||
$smarty->assign('prod_isbna', $isbn_parts[0]);
|
||||
$smarty->assign('prod_isbnb', $isbn_parts[1]);
|
||||
$smarty->assign('prod_isbnc', $isbn_parts[2]);
|
||||
|
||||
$smarty->assign('prod_ean', $this->ean);
|
||||
|
||||
$smarty->assign('prod_isbn13', '978-'.substr($this->isbn,0,12).substr($this->ean,-1,1));
|
||||
|
||||
$smarty->assign('prod_contrat_taux', $this->contrat->taux);
|
||||
$smarty->assign('prod_contrat_duree', $this->contrat_duree);
|
||||
$smarty->assign('prod_contrat_quant', $this->contrat_quantite);
|
||||
|
||||
$smarty->assign('prod_stock_reel', $this->stock_reel);
|
||||
$smarty->assign('prod_stock_dispo', ($this->stock_reel - $this->stock_in_command));
|
||||
$smarty->assign('prod_stock_in_command', $this->stock_in_command);
|
||||
$smarty->assign('prod_stock_alert', $this->seuil_stock_alerte);
|
||||
|
||||
if ($this->seuil_stock_alerte > ($this->stock_reel - $this->stock_in_command) && $this->status == 1)
|
||||
{
|
||||
$smarty->assign('smarty_stock_dispo_class', 'class="alerte"');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user