Beispiel #1
0
def SpesometroPanelFunc(parent, call_fit=True, set_sizer=True):
    item0 = wx.FlexGridSizer(0, 1, 0, 0)

    item1 = wx.FlexGridSizer(1, 0, 0, 0)

    item2 = AcquistiVenditeCorrispettiviRadioBox(
        parent, ID_ACQVENCOR, "Tipo", wx.DefaultPosition, wx.DefaultSize,
        ["Acquisti", "Vendite", "Corrisp.", "TUTTO"], 2, wx.RA_SPECIFY_ROWS)
    item2.SetName("acqvencor")
    item1.Add(item2, 0, wx.GROW | wx.ALIGN_CENTER_HORIZONTAL | wx.ALL, 5)

    item4 = wx.StaticBox(parent, -1, "Periodo")
    item3 = wx.StaticBoxSizer(item4, wx.VERTICAL)

    item5 = wx.FlexGridSizer(0, 4, 0, 0)

    item6 = wx.StaticText(parent, ID_TEXT, "Anno:", wx.DefaultPosition,
                          wx.DefaultSize, 0)
    item5.Add(item6, 0, wx.ALIGN_CENTER | wx.BOTTOM, 5)

    item7 = NumCtrl(parent,
                    ID_ANNO,
                    integerWidth=4,
                    fractionWidth=0,
                    groupDigits=False)
    item7.SetName('anno')
    item5.Add(item7, 0, wx.ALIGN_CENTER | wx.LEFT | wx.RIGHT | wx.BOTTOM, 5)

    item8 = wx.StaticText(parent, ID_TEXT, "Registrazioni dal:",
                          wx.DefaultPosition, wx.DefaultSize, 0)
    item5.Add(item8, 0,
              wx.ALIGN_RIGHT | wx.ALIGN_CENTER_VERTICAL | wx.LEFT | wx.BOTTOM,
              5)

    item9 = DateCtrl(parent, ID_DATA1, "", wx.DefaultPosition, [80, -1], 0)
    item9.SetName("data1")
    item5.Add(item9, 0, wx.ALIGN_CENTER_VERTICAL | wx.LEFT | wx.BOTTOM, 5)

    item5.Add([2, 20], 0, wx.ALIGN_CENTER, 5)

    item5.Add([20, 2], 0, wx.ALIGN_CENTER, 5)

    item10 = wx.StaticText(parent, ID_TEXT, "al:", wx.DefaultPosition,
                           wx.DefaultSize, 0)
    item5.Add(item10, 0, wx.ALIGN_RIGHT | wx.ALIGN_CENTER_VERTICAL | wx.LEFT,
              5)

    item11 = DateCtrl(parent, ID_DATA2, "", wx.DefaultPosition, [80, -1], 0)
    item11.SetName("data2")
    item5.Add(item11, 0, wx.ALIGN_CENTER_VERTICAL | wx.LEFT, 5)

    item3.Add(item5, 0, wx.GROW | wx.ALIGN_CENTER_VERTICAL, 5)

    item1.Add(
        item3, 0,
        wx.GROW | wx.ALIGN_CENTER_HORIZONTAL | wx.RIGHT | wx.TOP | wx.BOTTOM,
        5)

    item13 = wx.StaticBox(parent, -1, "Anagrafiche")
    item12 = wx.StaticBoxSizer(item13, wx.VERTICAL)

    item14 = wx.CheckBox(parent, ID_SOLO_ALL, "Solo in allegato",
                         wx.DefaultPosition, wx.DefaultSize, 0)
    item14.SetValue(True)
    item14.SetName("solo_all")
    item12.Add(item14, 0, wx.GROW | wx.ALIGN_CENTER_VERTICAL, 5)

    item15 = wx.StaticLine(parent, ID_LINE, wx.DefaultPosition, [20, -1],
                           wx.LI_HORIZONTAL)
    item12.Add(item15, 0, wx.GROW | wx.ALIGN_CENTER_VERTICAL, 5)

    item16 = wx.FlexGridSizer(0, 2, 0, 0)

    item17 = wx.StaticText(parent, ID_TEXT, "Escludi blacklist:",
                           wx.DefaultPosition, wx.DefaultSize, 0)
    item16.Add(item17, 0, wx.ALIGN_CENTER | wx.RIGHT, 5)

    item18 = wx.CheckBox(parent, ID_ESCLUDI_BLA, "Anagr.", wx.DefaultPosition,
                         wx.DefaultSize, 0)
    item18.SetValue(True)
    item18.SetName("escludi_bla")
    item16.Add(item18, 0, wx.GROW | wx.ALIGN_CENTER_VERTICAL, 5)

    item16.Add([2, 2], 0, wx.ALIGN_CENTER | wx.ALL, 5)

    item19 = wx.CheckBox(parent, ID_ESCLUDI_BLS, "Stato", wx.DefaultPosition,
                         wx.DefaultSize, 0)
    item19.SetValue(True)
    item19.SetName("escludi_bls")
    item16.Add(item19, 0,
               wx.GROW | wx.ALIGN_CENTER_VERTICAL | wx.RIGHT | wx.TOP, 5)

    item16.AddGrowableCol(1)

    item12.Add(item16, 0, wx.GROW | wx.ALIGN_CENTER_VERTICAL, 5)

    item1.Add(
        item12, 0,
        wx.GROW | wx.ALIGN_CENTER_VERTICAL | wx.RIGHT | wx.TOP | wx.BOTTOM, 5)

    item20 = wx.Button(parent, ID_BUTUPDATE, "Aggiorna", wx.DefaultPosition,
                       wx.DefaultSize, 0)
    item20.SetDefault()
    item20.SetName("butupdate")
    item1.Add(item20, 0,
              wx.ALIGN_RIGHT | wx.ALIGN_BOTTOM | wx.RIGHT | wx.TOP | wx.BOTTOM,
              5)

    item0.Add(item1, 0, wx.GROW | wx.ALIGN_CENTER_VERTICAL, 5)

    item21 = wx.FlexGridSizer(1, 0, 0, 0)

    item22 = wx.StaticText(parent, ID_TEXT, "Elenco transazioni",
                           wx.DefaultPosition, wx.DefaultSize, 0)
    item22.SetForegroundColour(wx.BLUE)
    item22.SetName("gridtitle")
    item21.Add(
        item22, 0,
        wx.GROW | wx.ALIGN_CENTER_VERTICAL | wx.LEFT | wx.RIGHT | wx.TOP, 5)

    item23 = RCheckBox(parent, ID_REGSPY, "Reg.Spy", wx.DefaultPosition,
                       wx.DefaultSize, 0)
    item23.SetName("regspy")
    item21.Add(item23, 0, wx.ALIGN_CENTER | wx.LEFT | wx.RIGHT | wx.TOP, 5)

    item21.AddGrowableCol(0)

    item0.Add(item21, 0, wx.GROW | wx.ALIGN_CENTER_VERTICAL, 5)

    item24 = wx.Panel(parent, ID_GRIDPANEL, wx.DefaultPosition, [900, 300],
                      wx.SUNKEN_BORDER)
    item24.SetName("gridpanel")
    item0.Add(
        item24, 0,
        wx.GROW | wx.ALIGN_CENTER_VERTICAL | wx.LEFT | wx.RIGHT | wx.BOTTOM, 5)

    item25 = wx.FlexGridSizer(1, 0, 0, 0)

    item26 = wx.FlexGridSizer(0, 1, 0, 0)

    item27 = wx.FlexGridSizer(1, 0, 0, 0)

    item29 = wx.StaticBox(parent, -1, "Totali anagrafica")
    item28 = wx.StaticBoxSizer(item29, wx.VERTICAL)

    item30 = wx.FlexGridSizer(0, 4, 0, 0)

    item31 = wx.StaticText(parent, ID_TEXT, "Anagrafica", wx.DefaultPosition,
                           [250, -1], wx.ST_NO_AUTORESIZE)
    item30.Add(item31, 0,
               wx.GROW | wx.ALIGN_CENTER_VERTICAL | wx.LEFT | wx.RIGHT, 5)

    item32 = wx.StaticText(parent, ID_TEXT, "Tot.Operazioni",
                           wx.DefaultPosition, [80, -1],
                           wx.ST_NO_AUTORESIZE | wx.ALIGN_RIGHT)
    item30.Add(item32, 0,
               wx.ALIGN_RIGHT | wx.ALIGN_CENTER_VERTICAL | wx.LEFT | wx.RIGHT,
               5)

    item33 = wx.StaticText(parent, ID_TEXT, "Tot.Imposta", wx.DefaultPosition,
                           [80, -1], wx.ST_NO_AUTORESIZE | wx.ALIGN_RIGHT)
    item30.Add(item33, 0,
               wx.ALIGN_RIGHT | wx.ALIGN_CENTER_VERTICAL | wx.LEFT | wx.RIGHT,
               5)

    item34 = wx.StaticText(parent, ID_TEXT, "Tot.Op.+IVA", wx.DefaultPosition,
                           [80, -1], wx.ST_NO_AUTORESIZE | wx.ALIGN_RIGHT)
    item30.Add(item34, 0,
               wx.ALIGN_RIGHT | wx.ALIGN_CENTER_VERTICAL | wx.LEFT | wx.RIGHT,
               5)

    item35 = wx.StaticText(parent, ID_TOTANADES, "-", wx.DefaultPosition,
                           [-1, 30], wx.ST_NO_AUTORESIZE)
    item35.SetFont(wx.Font(10, wx.SWISS, wx.NORMAL, wx.BOLD))
    item35.SetName("totanades")
    item30.Add(item35, 0, wx.GROW | wx.LEFT | wx.RIGHT, 5)

    item36 = wx.StaticText(parent, ID_TOTANAIMP, "0", wx.DefaultPosition,
                           [80, -1], wx.ST_NO_AUTORESIZE | wx.ALIGN_RIGHT)
    item36.SetFont(wx.Font(10, wx.SWISS, wx.NORMAL, wx.BOLD))
    item36.SetName("totanaimp")
    item30.Add(item36, 0, wx.ALIGN_RIGHT | wx.LEFT | wx.RIGHT, 5)

    item37 = wx.StaticText(parent, ID_TOTANAIVA, "0", wx.DefaultPosition,
                           [80, -1], wx.ST_NO_AUTORESIZE | wx.ALIGN_RIGHT)
    item37.SetFont(wx.Font(10, wx.SWISS, wx.NORMAL, wx.BOLD))
    item37.SetName("totanaiva")
    item30.Add(item37, 0, wx.ALIGN_RIGHT | wx.LEFT | wx.RIGHT, 5)

    item38 = wx.StaticText(parent, ID_TOTANATOT, "0", wx.DefaultPosition,
                           [80, -1], wx.ST_NO_AUTORESIZE | wx.ALIGN_RIGHT)
    item38.SetFont(wx.Font(10, wx.SWISS, wx.NORMAL, wx.BOLD))
    item38.SetName("totanatot")
    item30.Add(item38, 0, wx.ALIGN_RIGHT | wx.LEFT | wx.RIGHT, 5)

    item30.AddGrowableCol(0)

    item28.Add(item30, 0, wx.GROW | wx.ALIGN_CENTER_VERTICAL, 5)

    item27.Add(
        item28, 0,
        wx.GROW | wx.ALIGN_CENTER_VERTICAL | wx.LEFT | wx.RIGHT | wx.BOTTOM, 5)

    item39 = TipValoriRadioBox(
        parent, ID_TIPVALORI, "Valori", wx.DefaultPosition, wx.DefaultSize,
        ["Solo eccedenti i massimali", "Tutte le operazioni"], 1,
        wx.RA_SPECIFY_COLS)
    item39.SetName("tipvalori")
    item27.Add(item39, 0,
               wx.GROW | wx.ALIGN_CENTER_VERTICAL | wx.RIGHT | wx.BOTTOM, 5)

    item41 = wx.StaticBox(parent, -1, "Massimali")
    item40 = wx.StaticBoxSizer(item41, wx.VERTICAL)

    item42 = wx.FlexGridSizer(0, 2, 0, 0)

    item43 = wx.StaticText(parent, ID_TEXT, "Aziende:", wx.DefaultPosition,
                           wx.DefaultSize, 0)
    item42.Add(
        item43, 0,
        wx.ALIGN_RIGHT | wx.ALIGN_CENTER_VERTICAL | wx.RIGHT | wx.BOTTOM, 5)

    item44 = NumCtrl(parent, ID_MAXAZI, integerWidth=10, fractionWidth=2)
    item44.SetName('maxazi')
    item44.Disable()
    item42.Add(item44, 0,
               wx.ALIGN_RIGHT | wx.ALIGN_CENTER_VERTICAL | wx.BOTTOM, 5)

    item45 = wx.StaticText(parent, ID_TEXT, "Privati:", wx.DefaultPosition,
                           wx.DefaultSize, 0)
    item42.Add(item45, 0, wx.ALIGN_RIGHT | wx.ALIGN_CENTER_VERTICAL | wx.RIGHT,
               5)

    item46 = NumCtrl(parent, ID_MAXPRI, integerWidth=10, fractionWidth=2)
    item46.SetName('maxpri')
    item46.Disable()
    item42.Add(item46, 0, wx.ALIGN_RIGHT | wx.ALIGN_CENTER_VERTICAL, 5)

    item40.Add(item42, 0, wx.GROW | wx.ALIGN_CENTER_VERTICAL, 5)

    item27.Add(item40, 0,
               wx.GROW | wx.ALIGN_CENTER_VERTICAL | wx.RIGHT | wx.BOTTOM, 5)

    item27.AddGrowableCol(0)

    item26.Add(item27, 0, wx.GROW | wx.ALIGN_CENTER_VERTICAL, 5)

    item47 = wx.StaticLine(parent, ID_LINE, wx.DefaultPosition, [20, -1],
                           wx.LI_HORIZONTAL)
    item26.Add(item47, 0,
               wx.GROW | wx.ALIGN_CENTER_VERTICAL | wx.LEFT | wx.RIGHT, 5)

    item48 = wx.StaticText(parent, ID_WARNING, "-", wx.DefaultPosition,
                           wx.DefaultSize, 0)
    item48.SetForegroundColour(wx.RED)
    item48.SetFont(wx.Font(12, wx.SWISS, wx.NORMAL, wx.BOLD))
    item48.SetName("warning")
    item26.Add(item48, 0, wx.GROW | wx.ALIGN_CENTER_VERTICAL | wx.ALL, 5)

    item26.AddGrowableCol(0)

    item25.Add(item26, 0, wx.GROW | wx.ALIGN_CENTER_VERTICAL, 5)

    item49 = wx.FlexGridSizer(0, 1, 0, 0)

    item50 = wx.Button(parent, ID_BUTESTRAI, "&Estrai", wx.DefaultPosition,
                       wx.DefaultSize, 0)
    item50.SetName("butestrai")
    item50.Enable(False)
    item49.Add(item50, 0, wx.ALIGN_RIGHT | wx.RIGHT | wx.TOP | wx.BOTTOM, 5)

    item51 = wx.Button(parent, ID_BUTGENERA, "Genera file", wx.DefaultPosition,
                       wx.DefaultSize, 0)
    item51.SetName("butgenera")
    item49.Add(item51, 0, wx.ALIGN_RIGHT | wx.RIGHT | wx.BOTTOM, 5)

    item25.Add(item49, 0, wx.ALIGN_CENTER_HORIZONTAL, 5)

    item25.AddGrowableCol(0)

    item0.Add(item25, 0, wx.GROW | wx.ALIGN_CENTER_VERTICAL, 5)

    item0.AddGrowableCol(0)

    item0.AddGrowableRow(2)

    if set_sizer == True:
        parent.SetSizer(item0)
        if call_fit == True:
            item0.SetSizeHints(parent)

    return item0
Beispiel #2
0
def ReddVendFunc(parent, call_fit=True, set_sizer=True):
    item0 = wx.FlexGridSizer(0, 1, 0, 0)

    item1 = wx.FlexGridSizer(1, 0, 0, 0)

    item3 = wx.StaticBox(parent, -1, "Selezioni")
    item2 = wx.StaticBoxSizer(item3, wx.HORIZONTAL)

    item4 = wx.StaticText(parent, ID_TEXT, "Vendite dal:", wx.DefaultPosition,
                          wx.DefaultSize, 0)
    item2.Add(item4, 0, wx.ALIGN_CENTER | wx.LEFT | wx.TOP | wx.BOTTOM, 5)

    item5 = DateCtrl(parent, ID_DATA1, "", wx.DefaultPosition, [80, -1], 0)
    item5.SetName("data1")
    item2.Add(item5, 0, wx.ALIGN_CENTER | wx.ALL, 5)

    item6 = wx.StaticText(parent, ID_TEXT, "al:", wx.DefaultPosition,
                          wx.DefaultSize, 0)
    item2.Add(item6, 0, wx.ALIGN_CENTER | wx.LEFT | wx.TOP | wx.BOTTOM, 5)

    item7 = DateCtrl(parent, ID_DATA2, "", wx.DefaultPosition, [80, -1], 0)
    item7.SetName("data2")
    item2.Add(item7, 0, wx.ALIGN_CENTER | wx.ALL, 5)

    item1.Add(item2, 0, wx.ALIGN_CENTER | wx.ALL, 5)

    item8 = wx.Button(parent, ID_BUTUPD, "Aggiorna", wx.DefaultPosition,
                      wx.DefaultSize, 0)
    item8.SetDefault()
    item8.SetName("butupd")
    item1.Add(item8, 0, wx.ALIGN_BOTTOM | wx.ALIGN_CENTER_HORIZONTAL | wx.ALL,
              5)

    item1.AddGrowableCol(1)

    item0.Add(item1, 0, wx.ALIGN_CENTER_VERTICAL, 5)

    item9 = wx.StaticText(parent, ID_TEXT, "Elenco delle vendite:",
                          wx.DefaultPosition, wx.DefaultSize, 0)
    item9.SetForegroundColour(wx.BLUE)
    item0.Add(item9, 0,
              wx.GROW | wx.ALIGN_CENTER_VERTICAL | wx.LEFT | wx.RIGHT | wx.TOP,
              5)

    item10 = wx.Panel(parent, ID_PANGRIDVEN, wx.DefaultPosition, [700, 400],
                      wx.SUNKEN_BORDER)
    item10.SetName("pangridven")
    item0.Add(
        item10, 0,
        wx.GROW | wx.ALIGN_CENTER_VERTICAL | wx.LEFT | wx.RIGHT | wx.BOTTOM, 5)

    item11 = wx.FlexGridSizer(0, 2, 0, 0)

    item12 = wx.FlexGridSizer(0, 5, 0, 0)

    item13 = wx.StaticText(parent, ID_TEXT, "Tot.Ricavo:", wx.DefaultPosition,
                           wx.DefaultSize, 0)
    item12.Add(item13, 0,
               wx.ALIGN_RIGHT | wx.ALIGN_CENTER_VERTICAL | wx.LEFT | wx.TOP, 5)

    item14 = wx.StaticText(parent, ID_TEXT, "Tot.Costo:", wx.DefaultPosition,
                           wx.DefaultSize, 0)
    item12.Add(item14, 0,
               wx.ALIGN_RIGHT | wx.ALIGN_CENTER_VERTICAL | wx.LEFT | wx.TOP, 5)

    item15 = wx.StaticText(parent, ID_TEXT, "Tot.Utile:", wx.DefaultPosition,
                           wx.DefaultSize, 0)
    item12.Add(item15, 0,
               wx.ALIGN_RIGHT | wx.ALIGN_CENTER_VERTICAL | wx.LEFT | wx.TOP, 5)

    item16 = wx.StaticText(parent, ID_TEXT, "%Margine", wx.DefaultPosition,
                           wx.DefaultSize, 0)
    item12.Add(item16, 0,
               wx.ALIGN_RIGHT | wx.ALIGN_CENTER_VERTICAL | wx.LEFT | wx.TOP, 5)

    item17 = wx.StaticText(parent, ID_TEXT, "%Ricarica", wx.DefaultPosition,
                           wx.DefaultSize, 0)
    item12.Add(item17, 0,
               wx.ALIGN_RIGHT | wx.ALIGN_CENTER_VERTICAL | wx.LEFT | wx.TOP, 5)

    item18 = NumCtrl(parent,
                     ID_TOTRICAVO,
                     name='totricavo',
                     integerWidth=8,
                     fractionWidth=2)
    item18.Disable()
    item12.Add(item18, 0, wx.ALIGN_CENTER | wx.LEFT | wx.BOTTOM, 5)

    item19 = NumCtrl(parent,
                     ID_TOTCOSTO,
                     name='totcosto',
                     integerWidth=8,
                     fractionWidth=2)
    item19.Disable()
    item12.Add(item19, 0, wx.ALIGN_CENTER | wx.LEFT | wx.BOTTOM, 5)

    item20 = NumCtrl(parent,
                     ID_TOTUTILE,
                     name='totutile',
                     integerWidth=8,
                     fractionWidth=2)
    item20.Disable()
    item12.Add(item20, 0, wx.ALIGN_CENTER | wx.LEFT | wx.BOTTOM, 5)

    item21 = NumCtrl(parent,
                     ID_PRCMAR,
                     name='prcmar',
                     integerWidth=4,
                     fractionWidth=2)
    item21.Disable()
    item12.Add(item21, 0, wx.ALIGN_CENTER | wx.LEFT | wx.BOTTOM, 5)

    item22 = NumCtrl(parent,
                     ID_PRCRIC,
                     name='prcric',
                     integerWidth=4,
                     fractionWidth=2)
    item22.Disable()
    item12.Add(item22, 0, wx.ALIGN_CENTER | wx.LEFT | wx.BOTTOM, 5)

    item11.Add(item12, 0, wx.GROW | wx.ALIGN_CENTER_VERTICAL, 5)

    item23 = wx.Button(parent, ID_BUTPRT, "Lista", wx.DefaultPosition,
                       wx.DefaultSize, 0)
    item23.SetName("butprt")
    item11.Add(item23, 0, wx.ALIGN_RIGHT | wx.LEFT | wx.RIGHT | wx.BOTTOM, 5)

    item11.AddGrowableCol(1)

    item0.Add(item11, 0, wx.GROW | wx.ALIGN_CENTER_VERTICAL, 5)

    item0.AddGrowableCol(0)

    item0.AddGrowableRow(2)

    if set_sizer == True:
        parent.SetSizer(item0)
        if call_fit == True:
            item0.SetSizeHints(parent)

    return item0