Skip to main content

admin invoice.php total HT

More
13 years 2 weeks ago #124096 by erickb
-- HikaShop version -- : 221
-- Joomla version -- 2514

dans /administrator/templates/TPL/html/com_hikashop/order/invoice.php il y a echo JText::_( 'HIKASHOP_TOTAL' )

comment a cet endroit je peux savoir que le prix a ete paye HT ou TTC ? pour ne pas afficher juste Total mais Total TTC ou Total HT
quelle est la variable qui stocke la taxe qui doit etre à 0 en ce cas ?

merci

Please Log in or Create an account to join the conversation.

More
13 years 2 weeks ago #124106 by Xavier
Replied by Xavier on topic admin invoice.php total HT
Bonjour,

Vous pouvez le savoir grâce à la variable:
Code:
$this->config->get('price_with_tax')
Si cela vaut "1" alors c'est TTC sinon c'est HT.

Please Log in or Create an account to join the conversation.

More
13 years 2 weeks ago - 13 years 2 weeks ago #124107 by erickb
Replied by erickb on topic admin invoice.php total HT
merci mais où le placer , je ne récupère jamais la condition == 0

la seule maniere de le recuperer que j'ai trouve c'est dans le foreach ligne 137

if($product->order_product_tax == 0){
$notax = ' ' . JText::_('PRICE_WITHOUT_TAX_FULL');
}

si je fais ligne 370

<?php echo JText::_( 'HIKASHOP_TOTAL' ) . ' ->' . $this->config->get('price_with_tax'); ?>

j'ai toujours la valeur = 1
Last edit: 13 years 2 weeks ago by erickb.

Please Log in or Create an account to join the conversation.

More
13 years 2 weeks ago #124111 by Xavier
Replied by Xavier on topic admin invoice.php total HT
Autant pour moi, ceci vient de la configuration générale, et en aucun cas ne montre comment la commande à été payée.

Pour le savoir il suffit de se baser sur la variables "$taxes".
Si cette dernière est à "0" alors la commande à été payée sans taxes et sinon avec taxes.
The following user(s) said Thank You: erickb

Please Log in or Create an account to join the conversation.

More
13 years 2 weeks ago #124112 by erickb
Replied by erickb on topic admin invoice.php total HT
ca marche tres bien, merci
Code:
<td class="key"> <label> <?php if($taxes == 0){ $notax = ' ' . JText::_('PRICE_WITHOUT_TAX_FULL'); } echo JText::_( 'HIKASHOP_TOTAL' ) . $notax ; ?> </label> </td>

Please Log in or Create an account to join the conversation.

More
13 years 1 week ago - 13 years 1 week ago #124366 by erickb
Replied by erickb on topic admin invoice.php total HT
la variable $taxes marche très bien pour trouver si un total est avec ou sans taxes sur des prix sans réduction
mais des qu'un produits a une remise de 10% (par exemple) cette valeur $taxes est fausse une idée pourquoi ?

ert meme si dans le foreach des produits je fais

if($product->order_product_tax == 0){
$ht = 1;
}

ça me retourne $ht = 0 alors qu'on est dans les dom tom
Last edit: 13 years 1 week ago by erickb.

Please Log in or Create an account to join the conversation.

More
13 years 1 week ago #124461 by erickb
Replied by erickb on topic admin invoice.php total HT
aucune idée ?

je n'arrive pas a determiner à coup sur si le total est HT ou non avec cette variable $taxes, pouvez vous contrôler de votre cote sur un article qui aune réduction en % ?

merci

Please Log in or Create an account to join the conversation.

More
13 years 1 week ago #124514 by Jerome
Replied by Jerome on topic admin invoice.php total HT
Bonjour,

Pourquoi ne pas se baser sur "order_product_total_price_no_vat" et "order_product_total_price" ?
La différence des deux devrait vous donner les informations sur les taxes. non ?

Cordialement,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Please Log in or Create an account to join the conversation.

More
13 years 1 week ago #124587 by erickb
Replied by erickb on topic admin invoice.php total HT
impossible de le récupérer de cette manière , ou d'une maniere directe

je suis obligé de faire
Code:
$hastax = 0; foreach($this->order->products as $product){ if ($product->order_product_tax > 0){ $hastax = 1; }

je comprend mal qu'on n'ait pas une uniformité partout : cart , mail de notification de commande, facture dans l'admin

avec des variables les memes partout pour afficher

sous total
taxe
total

Please Log in or Create an account to join the conversation.

Time to create page: 0.253 seconds
Powered by Kunena Forum