Facture et Bon de commande

12 posts in this topic

Posted · Report post

Bonjour à tous,

j'ai plusieurs soucis avec les factures html et PDF:

Pour les factures PDF, dès que j'ai une commande de plus d'une page, elle dépasse du tableau. Les tableaux ne s'adaptent pas au quantitatif de ligne.

Pour les factures HTML, ayant le problème précédent, je voulais rajouter une colonne avec les références (Gain de temps et très utiles pour moi), mais apparemment ça ne fonctionne pas.

Voici le code que j'ai rajouté dans facture_html.php :

		  <td align="center" bgcolor="#F3E2A0" class="label"><?echo REFERENCE?></td>
et
					<td class="normal"><?=$prod['reference'] ?></td>

La colonne apparaît bien et le texte suivant à la place de la référence :

Notice: Undefined index: reference in /homepages/41/d259227695/htdocs/vdi/factures/facture_html.php on line 182

ma version : Peel premium 3.9

Share this post


: post
Share on other sites

Posted · Report post

dans la requête il doit manquer le champ reference

pour les factures en PDF, il est vrai qu'il existe un bug au niveau des pages, je pense que Patrice à apporté une solution il y a quelques temps.

il faut effectuer une recherche sur le forum

Share this post


: post
Share on other sites

Posted · Report post

Oui, merci, mais le problème, c'est que je ne trouve pas la requête.

J'ai vu une solution pour les PDF, mais ça ne marche pas

Share this post


: post
Share on other sites

Posted · Report post

Merci.

La première solution marche... Je n'avais pas vu le topic.

Sais-tu comment insérer la requête pour la partie HTML ?

Share this post


: post
Share on other sites

Posted · Report post

pour la requête c'es le dossier factures et factures_html.php en haut du fichier

$qid_items = mysql_query("

SELECT

p.reference ->ajouter

Share this post


: post
Share on other sites

Posted · Report post

 

Share this post


: post
Share on other sites

Posted · Report post

et comme cela ?

$qid_items = mysql_query("

	SELECT

		 p.reference

		,oi.nom_produit

		,p.prix AS curr_prix

		,oi.prix AS purchase_prix

		,oi.quantite

		,oi.tva

		,oi.promotion

		,oi.prix * oi.quantite AS total

		,oi.comment

		,oi.couleur

		,oi.taille

		,oi.option_prix

		,oi.delivery_stock

		,pc.remise_code

		,pc.remise_client

	FROM peel_commandes pc, peel_commandes_articles oi

		LEFT JOIN peel_produits p ON (oi.produit_id = p.id)

	WHERE commande_id = '$id' AND pc.id = oi.commande_id

	");

Share this post


: post
Share on other sites

Posted · Report post

Je testerai ça Lundi, là, je pars en déplacement, et j'ai encore beaucoup de travail avant de partir, mais merci Paulanna.

@Eric : Salut Eric, ça fait plaisir de te revoir, arf, je ne sais pas si tu te rappelles de moi, mais c'est pas grave... Je te remercie encore pour ton aide passée...

Share this post


: post
Share on other sites

Posted · Report post

Merci Paulanna, j'ai fait quelques modifications et ça marche, juste un petit problème qu'il reste :

Dans la colonne Prix catalogue, j'ai 6 zéros après la virgule. On peut réguler ça comment ?

Voici les modifs que j'ai fait à ton code pour que cela fonctionne :

	SELECT

		 p.reference

		,oi.nom_produit

		,p.prix AS prix_cat

		,oi.prix

		,oi.quantite

		,oi.tva

		,oi.promotion

		,oi.prix * oi.quantite AS total_prix

		,oi.comment

		,oi.couleur

		,oi.taille

		,oi.option_prix

		,oi.delivery_stock

		,pc.remise_code

		,pc.remise_client

	FROM peel_commandes pc, peel_commandes_articles oi

		LEFT JOIN peel_produits p ON (oi.produit_id = p.id)

	WHERE commande_id = '$id' AND pc.id = oi.commande_id

	");

Share this post


: post
Share on other sites

Posted · Report post

Merci Paulanna, j'ai fait quelques modifications et ça marche, juste un petit problème qu'il reste :

Dans la colonne Prix catalogue, j'ai 6 zéros après la virgule. On peut réguler ça comment ?

Voici les modifs que j'ai fait à ton code pour que cela fonctionne :

	SELECT

		 p.reference

		,oi.nom_produit

		,p.prix AS prix_cat

		,oi.prix

		,oi.quantite

		,oi.tva

		,oi.promotion

		,oi.prix * oi.quantite AS total_prix

		,oi.comment

		,oi.couleur

		,oi.taille

		,oi.option_prix

		,oi.delivery_stock

		,pc.remise_code

		,pc.remise_client

	FROM peel_commandes pc, peel_commandes_articles oi

		LEFT JOIN peel_produits p ON (oi.produit_id = p.id)

	WHERE commande_id = '$id' AND pc.id = oi.commande_id

	");

Mettre un appel à la fonction fprix(votre champ) devant le prix

Share this post


: post
Share on other sites

Posted · Report post

Eric lavoisier a apporté une solution totalement fonctionel en 5.3 aussi

Cordialement

Share this post


: post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

Twitter Advisto ecommerce

Facebook PEEL Shopping