bräuchte mal hilfe bei Handelskalkulation

  • 1.Frage
    Und zwar wie bekomme ich den das hin das 16 2/3 als prozent rechen kann immer wenn ich 16,6666 eingebe kommt er nicht auf 80 €

    Orginalrechnung

    Spoiler anzeigen


    Listenpreis = 500,00 €
    - Lieferrabatt (10%) = 50,00 €
    = Zieleinkaufspreis = 450,00 €
    - Lieferskonto (2%) = 9,00 €
    =Bareinkaufspreis = 441,00 €
    +Bezugskosten = 39,00 €
    = Bezugspreis
    +Handlungskosten (16 2/3 %)=16,6666667 = 80,00 €
    =Selbstkostenpreis = 560,00 €
    +Gewinnzuschlag (8%) = 44,80 €
    = Nettoverkaufspreis = 604,80 €
    + Umsatzsteuer (19 % ) = 114,91 €
    = Bruttoverkauspreis = 719,71 €

    und wenn ich das in meinen script eintrage kommt dieses ergebniss nicht raus was ist da falsch ?

    Script

    Spoiler anzeigen


    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Verkaufskalkulation", 281, 502, 360, 332)
    $Label1 = GUICtrlCreateLabel("Listenpreis.:", 8, 24, 60, 17)
    $Input1 = GUICtrlCreateInput("", 152, 24, 121, 21)
    GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    GUICtrlSetColor(-1, 0x000000)
    $Label2 = GUICtrlCreateLabel("Lieferrabatt.:", 8, 56, 63, 17)
    $Input2 = GUICtrlCreateInput("", 104, 56, 25, 21)
    GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    GUICtrlSetColor(-1, 0x000000)
    $Label3 = GUICtrlCreateLabel("%", 136, 56, 12, 17)
    $Input3 = GUICtrlCreateInput("", 152, 56, 121, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $Label4 = GUICtrlCreateLabel("Zieleinkaufspreis.:", 8, 88, 89, 17)
    $Input4 = GUICtrlCreateInput("", 152, 88, 121, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $Label5 = GUICtrlCreateLabel("Lieferskonto.:", 8, 120, 68, 17)
    $Input5 = GUICtrlCreateInput("", 104, 120, 25, 21)
    GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    GUICtrlSetColor(-1, 0x000000)
    $Label6 = GUICtrlCreateLabel("%", 136, 120, 12, 17)
    $Input6 = GUICtrlCreateInput("", 152, 120, 121, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $Label7 = GUICtrlCreateLabel("Bareinkaufspreis.:", 8, 152, 88, 17)
    $Input7 = GUICtrlCreateInput("", 152, 152, 121, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $Label8 = GUICtrlCreateLabel("Bezugskosten.:", 8, 184, 77, 17)
    $Input8 = GUICtrlCreateInput("", 152, 184, 121, 21)
    GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    GUICtrlSetColor(-1, 0x000000)
    $Label9 = GUICtrlCreateLabel("Bezugspreis.:", 8, 216, 67, 17)
    $Input9 = GUICtrlCreateInput("", 152, 216, 121, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $Label10 = GUICtrlCreateLabel("Handlungskosten.:", 8, 248, 93, 17)
    $Input10 = GUICtrlCreateInput("", 104, 248, 25, 21)
    GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    GUICtrlSetColor(-1, 0x000000)
    $Label11 = GUICtrlCreateLabel("%", 136, 248, 12, 17)
    $Input11 = GUICtrlCreateInput("", 152, 248, 121, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $Label12 = GUICtrlCreateLabel("Selbstkostenpreis.:", 8, 280, 93, 17)
    $Input12 = GUICtrlCreateInput("", 152, 280, 121, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $Label13 = GUICtrlCreateLabel("Gewinnzuschlag.:", 8, 312, 88, 17)
    $Input13 = GUICtrlCreateInput("", 104, 312, 25, 21)
    GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    GUICtrlSetColor(-1, 0x000000)
    $Label14 = GUICtrlCreateLabel("%", 136, 312, 12, 17)
    $Input14 = GUICtrlCreateInput("", 152, 312, 121, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $Label15 = GUICtrlCreateLabel("Nettoverkaufspreis.:", 8, 344, 99, 17)
    $Input15 = GUICtrlCreateInput("", 152, 344, 121, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $Label16 = GUICtrlCreateLabel("Umsatzsteuer.:", 8, 376, 74, 17)
    $Input16 = GUICtrlCreateInput("", 104, 376, 25, 21)
    $Label17 = GUICtrlCreateLabel("%", 136, 376, 12, 17)
    $Input17 = GUICtrlCreateInput("", 152, 376, 121, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $Label18 = GUICtrlCreateLabel("Bruttoverkauspreis.:", 8, 408, 98, 17)
    $Input18 = GUICtrlCreateInput("", 104, 408, 169, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $Button1 = GUICtrlCreateButton("Berechnen", 8, 456, 75, 25)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Button1
    $1= GUICtrlRead($Input1)*GUICtrlRead($Input2)/100
    GUICtrlSetData($Input3,$1 & " €")
    $2 = GUICtrlRead($Input1) - GUICtrlRead($Input3)
    GUICtrlSetData($Input4,$2 & " €")
    $3= GUICtrlRead($Input4)* GUICtrlRead($Input5)/100
    GUICtrlSetData($Input6,$3 & " €")
    $4 = GUICtrlRead($Input4) - GUICtrlRead($Input6)
    GUICtrlSetData($Input7,$4 & " €")
    $5 = GUICtrlRead($Input7) + GUICtrlRead($Input8)
    GUICtrlSetData($Input9,$5 & " €")
    $6 = GUICtrlRead($Input9) * GUICtrlRead(Round($Input10))/100
    GUICtrlSetData($Input11,$6 & " €")
    $7 = GUICtrlRead($Input9) + GUICtrlRead($Input11)
    GUICtrlSetData($Input12,$7 & " €")
    $8 = GUICtrlRead($Input12)* GUICtrlRead($Input13)/100
    GUICtrlSetData($Input14,$8 & " €")
    $9 = GUICtrlRead($Input12)+ GUICtrlRead($Input14)
    GUICtrlSetData($Input15,$9 & " €")
    $10 = GUICtrlRead($Input15)* GUICtrlRead($Input16)/100
    GUICtrlSetData($Input17,$10 & " €")
    $11 = GUICtrlRead($Input15)+ GUICtrlRead($Input17)
    GUICtrlSetData($Input18,$11 & " €")
    EndSwitch
    WEnd

    2. Frage wäre wie mach ich das wenn oben beim Listenpreis sage ich mal 500,99 € stehen würde da rechnet er auch das komma nicht mit

    Einmal editiert, zuletzt von Sirocool (22. Mai 2010 um 15:32)