diff --git a/htdocs/product/canvas/livre/fiche-view.tpl b/htdocs/product/canvas/livre/fiche-view.tpl
index d8a4f8c9c6b..b934d63d65d 100644
--- a/htdocs/product/canvas/livre/fiche-view.tpl
+++ b/htdocs/product/canvas/livre/fiche-view.tpl
@@ -33,11 +33,19 @@
| Prix de revient |
- {$prod_pxrevient} |
+ {$prod_pxrevient} |
+
+
| Prix de vente |
{$prod_pxvente} |
+
+ Taux TVA |
+ {$prod_tva_tx} |
+
+
+
@@ -63,11 +71,15 @@
| {$prod_pages} |
+
+ | Statut |
+ |
+
+
-
| Durée du contrat : |
{$prod_contrat_duree} |
@@ -82,7 +94,23 @@
{$prod_contrat_quant} |
-
+
+
+
+
+
+
+
+ | Description |
+ {$prod_description} |
+
+
+
+ | Note (non visible sur les factures, propals...) |
+ {$prod_note} |
+
+
+
diff --git a/htdocs/product/canvas/livrecontrat/fiche-edit.tpl b/htdocs/product/canvas/livrecontrat/fiche-edit.tpl
new file mode 100644
index 00000000000..f3c60e35d6b
--- /dev/null
+++ b/htdocs/product/canvas/livrecontrat/fiche-edit.tpl
@@ -0,0 +1,192 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/htdocs/product/canvas/livrecontrat/fiche-view.tpl b/htdocs/product/canvas/livrecontrat/fiche-view.tpl
new file mode 100644
index 00000000000..dec203cf943
--- /dev/null
+++ b/htdocs/product/canvas/livrecontrat/fiche-view.tpl
@@ -0,0 +1,53 @@
+
+
+
+
+ | Titre |
+ {$prod_label} |
+
+
+
+
+
+
+
+
+ | Stock |
+
+ {$prod_stock_dispo}
+ |
+ Seuil d'alerte |
+ {$prod_stock_alert} |
+
+
+
+ | Stock réel |
+ {$prod_stock_reel} |
+ Exemplaires en commande |
+ {$prod_stock_in_command} |
+
+
+
+
+
+
+
+
+
+
+ | Durée du contrat : |
+ {$prod_contrat_duree} |
+ Date d'application |
+ |
+
+
+
+ | Taux conclu |
+ {$prod_contrat_taux} |
+ Quantité achetée |
+ {$prod_contrat_quant} |
+
+
+
+
+
\ No newline at end of file
diff --git a/htdocs/product/canvas/livrecouverture/fiche-view.tpl b/htdocs/product/canvas/livrecouverture/fiche-view.tpl
new file mode 100644
index 00000000000..f4ad1b1232e
--- /dev/null
+++ b/htdocs/product/canvas/livrecouverture/fiche-view.tpl
@@ -0,0 +1,32 @@
+
+
+
+
+ | Titre du livre |
+ {$prod_label} |
+
+
+
+
+
+
+
+
+ | Stock |
+
+ {$prod_stock_dispo}
+ |
+ Seuil d'alerte |
+ {$prod_stock_alert} |
+
+
+
+ | Stock réel |
+ {$prod_stock_reel} |
+ Exemplaires en commande |
+ {$prod_stock_in_command} |
+
+
+
+
+
\ No newline at end of file
diff --git a/htdocs/product/canvas/product.livre.class.php b/htdocs/product/canvas/product.livre.class.php
index b600377edb8..ad61b66401a 100644
--- a/htdocs/product/canvas/product.livre.class.php
+++ b/htdocs/product/canvas/product.livre.class.php
@@ -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"');
}
-
-
}
}
diff --git a/htdocs/product/canvas/product.livrecontrat.class.php b/htdocs/product/canvas/product.livrecontrat.class.php
index c78c05ffa78..2de836ea679 100644
--- a/htdocs/product/canvas/product.livrecontrat.class.php
+++ b/htdocs/product/canvas/product.livrecontrat.class.php
@@ -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"');
+ }
+ }
+
}
?>
diff --git a/htdocs/product/canvas/product.livrecouverture.class.php b/htdocs/product/canvas/product.livrecouverture.class.php
index f9c6c554aba..fe1006b3d8b 100644
--- a/htdocs/product/canvas/product.livrecouverture.class.php
+++ b/htdocs/product/canvas/product.livrecouverture.class.php
@@ -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"');
+ }
+ }
}