Ghost Posted June 21, 2012 at 01:11 PM Report Share #464571 Posted June 21, 2012 at 01:11 PM Boa tarde estou aqui para perguntar como é que se calcula o iva nas vendas a 23% o meu código é o seguinte: Dim PrecoS_ivaTotal, PrecoS_iva1, PrecoS_iva2, PrecoS_iva3, PrecoS_iva4, PrecoS_iva5, PrecoS_iva6 As Double Dim ValorIVATotal, ValorIVA1, ValorIVA2, ValorIVA3, ValorIVA4, ValorIVA5, ValorIVA6 As Double If txtPreco1.Text <> "" And txtQuantidade1.Text <> "" And txtPrecoTotal1.Text <> "" Then ValorIVA1 = CDec(txtPreco1.Text) * CDec(txtQuantidade1.Text) * (CDec(txtPrecoTotal1.Text) / 100) PrecoS_iva1 = CDec(txtPreco1.Text) * CDec(txtQuantidade1.Text) Else PrecoS_iva1 = 0 ValorIVA1 = 0 End If If txtPreco2.Text <> "" And txtQuantidade2.Text <> "" And txtPrecoTotal2.Text <> "" Then ValorIVA2 = CDec(txtPreco2.Text) * CDec(txtQuantidade2.Text) * (CDec(txtPrecoTotal2.Text) / 100) PrecoS_iva2 = CDec(txtPreco2.Text) * CDec(txtQuantidade2.Text) Else PrecoS_iva2 = 0 ValorIVA2 = 0 End If If txtPreco3.Text <> "" And txtQuantidade3.Text <> "" And txtPrecoTotal3.Text <> "" Then ValorIVA3 = CDec(txtPreco3.Text) * CDec(txtQuantidade3.Text) * (CDec(txtPrecoTotal3.Text) / 100) PrecoS_iva3 = CDec(txtPreco3.Text) * CDec(txtQuantidade3.Text) Else PrecoS_iva3 = 0 ValorIVA3 = 0 End If If txtPreco4.Text <> "" And txtQuantidade4.Text <> "" And txtPrecoTotal4.Text <> "" Then ValorIVA4 = CDec(txtPreco4.Text) * CDec(txtQuantidade4.Text) * (CDec(txtPrecoTotal4.Text) / 100) PrecoS_iva4 = CDec(txtPreco4.Text) * CDec(txtQuantidade4.Text) Else PrecoS_iva4 = 0 ValorIVA4 = 0 End If If txtPreco5.Text <> "" And txtQuantidade5.Text <> "" And txtPrecoTotal5.Text <> "" Then ValorIVA5 = CDec(txtPreco5.Text) * CDec(txtQuantidade5.Text) * (CDec(txtPrecoTotal5.Text) / 100) PrecoS_iva5 = CDec(txtPreco5.Text) * CDec(txtQuantidade5.Text) Else PrecoS_iva5 = 0 ValorIVA5 = 0 End If If txtPreco6.Text <> "" And txtQuantidade6.Text <> "" Then ValorIVA6 = CDec(txtPreco6.Text) * CDec(txtQuantidade6.Text) * (CDec(txtPrecoTotal6.Text) / 100) PrecoS_iva6 = CDec(txtPreco6.Text) * CDec(txtQuantidade6.Text) Else PrecoS_iva6 = 0 ValorIVA6 = 0 End If ValorIVATotal = ValorIVA1 + ValorIVA2 + ValorIVA3 + ValorIVA4 + ValorIVA5 + ValorIVA6 PrecoS_ivaTotal = PrecoS_iva1 + PrecoS_iva2 + PrecoS_iva3 + PrecoS_iva4 + PrecoS_iva5 + PrecoS_iva6 txtPrecocIva.Text = ValorIVATotal txtPrecosIva.Text = PrecoS_ivaTotal txtTotal.Text = ValorIVATotal + PrecoS_ivaTotal txtPrecosIva.Text = FormatCurrency(txtPrecosIva.Text.ToString, 2, TriState.UseDefault) txtPrecocIva.Text = FormatCurrency(txtPrecocIva.Text.ToString, 2, TriState.UseDefault) txtTotal.Text = FormatCurrency(txtTotal.Text.ToString, 2, TriState.UseDefault) Preciso da ajuda rapidamente por favor 😕 Ghost Diogo Fernandes Link to comment Share on other sites More sharing options...
bruno1234 Posted June 21, 2012 at 06:32 PM Report Share #464706 Posted June 21, 2012 at 06:32 PM Para obteres o iva a 23%, multiplicas o valor por 0,23. Matraquilhos para Android. Gratuito na Play Store. https://play.google.com/store/apps/details?id=pt.bca.matraquilhos Link to comment Share on other sites More sharing options...
acao Posted June 25, 2012 at 05:57 PM Report Share #465435 Posted June 25, 2012 at 05:57 PM Boa tarde estou aqui para perguntar como é que se calcula o iva nas vendas a 23% o meu código é o seguinte: Dim PrecoS_ivaTotal, PrecoS_iva1, PrecoS_iva2, PrecoS_iva3, PrecoS_iva4, PrecoS_iva5, PrecoS_iva6 As Double Dim ValorIVATotal, ValorIVA1, ValorIVA2, ValorIVA3, ValorIVA4, ValorIVA5, ValorIVA6 As Double If txtPreco1.Text <> "" And txtQuantidade1.Text <> "" And txtPrecoTotal1.Text <> "" Then ValorIVA1 = CDec(txtPreco1.Text) * CDec(txtQuantidade1.Text) * (CDec(txtPrecoTotal1.Text) / 100) PrecoS_iva1 = CDec(txtPreco1.Text) * CDec(txtQuantidade1.Text) Else PrecoS_iva1 = 0 ValorIVA1 = 0 End If Preciso da ajuda rapidamente por favor 😕 Ghost deveria ser assim: If txtPreco1.Text <> "" And txtQuantidade1.Text <> "" And txtPrecoTotal1.Text <> "" Then PrecoS_iva1 = CDec(txtPreco1.Text) * CDec(txtQuantidade1.Text) 'valor sobre o qual incide o iva (ou seja subtotal) ValorIVA1 = PrecoS_iva1 * VariavelComTaxaIvaValor23 / 100 'quantidade «valor» do Iva (euros) ValorTotal = PrecoS_iva1 + ValorIVA1 ' Valor total da factura ValorTotal = CDec(txtPreco1.Text) * CDec(txtQuantidade1.Text) *123 / 100 'Valor total da factura tambem pode ser assim Else cumps acao Link to comment Share on other sites More sharing options...
Ghost Posted June 30, 2012 at 11:59 PM Author Report Share #466626 Posted June 30, 2012 at 11:59 PM olha e como ponho a multiplicar a quantidade e o preço num relatorio sem que o relatório arrebente Diogo Fernandes Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now