News arrow Forum
Home    Contacts
Forum Dolibarr
Welcome, Guest
Please Login or Register.    Lost Password?
poids et volume (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: poids et volume
#10721
sladame (User)
Expert Boarder
Posts: 128
graphgraph
User Offline Click here to see the profile of this user
Gender: Male mon site (joomla) Location: lyon Birthdate: 1984-05-13
poids et volume 2008/10/27 17:26 Karma: 2  
bonjour j'ai trouvé un bug sur le total du poids et du volume dans les bons de livraison.
(problème d'unité et de valeur)

Code:
--- /dolibarr/htdocs/expedition/fiche.php 2008-08-21 09:39:38.000000000 +0200 +++ /newdolibarr/htdocs/expedition/fiche.php 2008-10-27 16:06:50.000000000 +0100 @@ -511,13 +540,26 @@ //TODO: ajouter conversion pour le poids et le volume et selection de l'unité de mesure la plus utilisée $totalWeight = ''; $totalVolume = ''; + $weightUnit=-20; + $volumeUnit=-20; for ($i = 0 ; $i < $num_prod ; $i++) { - $totalWeight += $lignes[$i]->weight*$lignes[$i]->qty_shipped; + if ( $lignes[$i]->weight_units > $weightUnit) + { $weightUnit = $lignes[$i]->weight_units; - $totalVolume += $lignes[$i]->volume*$lignes[$i]->qty_shipped; + } + $trueWeightUnit=pow(10,$lignes[$i]->weight_units); + $totalWeight += $lignes[$i]->weight*$lignes[$i]->qty_shipped*$trueWeightUnit; + + if ( $lignes[$i]->volume_units > $volumeUnit) + { $volumeUnit = $lignes[$i]->volume_units; } + $trueVolumeUnit=pow(10,$lignes[$i]->volume_units); + $totalVolume += $lignes[$i]->volume*$lignes[$i]->qty_shipped*$trueVolumeUnit; + } + $totalVolume=$totalVolume*pow(10,3); print '<table class="border" width="100%">';
oups post a déplacer dans bug
 
Logged Logged  
 
Last Edit: 2008/10/28 09:34 By sladame.
 
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop