1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| 'Call des variables
Dim qteItem As String = datagridviewListeItems.CurrentRow.Cells(0).Value
Dim prixItem As String = datagridviewListeItems.CurrentRow.Cells(4).Value ' < Le prix unitaire du produit
Dim tauxTaxe1 As String = lblTauxTaxe1.Text / 100
Dim tauxTaxe2 As String = lblTauxTaxe2.Text / 100
Dim prixTotalItem As String = qteItem * prixItem ' < Multiplier la quantité du produit par le prix unitaire pour avoir le prixTotalItem a taxer
'Montant des taxes selon la configuration de l'item
Dim montantTaxe1 As String = prixTotalItem * tauxTaxe1
montantTaxe1 = Format(CType(montantTaxe1, Double), "#0.00") 'Lorsque ce code est ajouté, le round ne se fait pas bien..
Dim montantTaxe2 As String = prixTotalItem * tauxTaxe2
montantTaxe2 = Format(CType(montantTaxe2, Double), "#0.00") 'Lorsque ce code est ajouté, le round ne se fait pas bien..
'Calcul du prix total de l'item avec taxes
Dim prixTotalAvecTaxes As String = Val(prixTotalItem) + Val(montantTaxe1) + Val(montantTaxe2)
prixTotalAvecTaxes = Format(CType(prixTotalAvecTaxes, Double), "#0.00") |
Partager