Package Gnumed :: Package wxGladeWidgets :: Module wxgBillItemEAPnl |
[frames] | no frames]

# Source Code for Module Gnumed.wxGladeWidgets.wxgBillItemEAPnl

     1  # -*- coding: UTF-8 -*-
     2  #
     3  # generated by wxGlade
     4  #
     5
     6  import wx
     7
     8  # begin wxGlade: dependencies
     9  import gettext
    10  # end wxGlade
    11
    12  # begin wxGlade: extracode
    13  # end wxGlade
    14
    15
    16 -class wxgBillItemEAPnl(wx.ScrolledWindow):
    17 -        def __init__(self, *args, **kwds):
    18                  # begin wxGlade: wxgBillItemEAPnl.__init__
    19                  kwds["style"] = kwds.get("style", 0) | wx.BORDER_NONE | wx.TAB_TRAVERSAL
    20                  wx.ScrolledWindow.__init__(self, *args, **kwds)
    21                  from Gnumed.wxpython.gmBillingWidgets import cBillablePhraseWheel
    22                  self._PRW_billable = cBillablePhraseWheel(self, wx.ID_ANY, "")
    23                  from Gnumed.wxpython.gmEncounterWidgets import cEncounterPhraseWheel
    24                  self._PRW_encounter = cEncounterPhraseWheel(self, wx.ID_ANY, "")
    25                  from Gnumed.wxpython.gmDateTimeInput import cDateInputPhraseWheel
    26                  self._PRW_date = cDateInputPhraseWheel(self, wx.ID_ANY, "")
    27                  self._TCTRL_count = wx.TextCtrl(self, wx.ID_ANY, "")
    28                  self._TCTRL_amount = wx.TextCtrl(self, wx.ID_ANY, "")
    29                  self._LBL_currency = wx.StaticText(self, wx.ID_ANY, _("EUR"))
    30                  self._TCTRL_factor = wx.TextCtrl(self, wx.ID_ANY, "")
    31                  self._TCTRL_comment = wx.TextCtrl(self, wx.ID_ANY, "")
    32
    33                  self.__set_properties()
    34                  self.__do_layout()
    35                  # end wxGlade
    36
    37 -        def __set_properties(self):
    38                  # begin wxGlade: wxgBillItemEAPnl.__set_properties
    39                  self.SetScrollRate(10, 10)
    40                  self._PRW_billable.SetToolTip(_("The billable from which to create the bill item."))
    41                  self._PRW_encounter.SetToolTip(_("The encounter this item belongs to (or was created under)."))
    42                  self._PRW_date.SetToolTip(_("Optional: Pick the date at which to bill this item. If this is left blank the bill will show the date of the corresponding encounter."))
    43                  self._TCTRL_count.SetToolTip(_("How many units of the item are to be charged."))
    44                  self._TCTRL_amount.SetToolTip(_("Base amount w/o VAT."))
    45                  self._TCTRL_factor.SetToolTip(_("The factor by which to multiply the base amount. Normally 1.\n\n 0: complimentary items\n >1: increases\n <1: rebates\n <0:  credit notes"))
    46                  self._TCTRL_comment.SetToolTip(_("Optional: An item-specific comment to be put on the bill."))
    47                  # end wxGlade
    48
    49 -        def __do_layout(self):
    50                  # begin wxGlade: wxgBillItemEAPnl.__do_layout
    51                  __gszr_main = wx.FlexGridSizer(7, 2, 1, 3)
    52                  __szr_amount = wx.BoxSizer(wx.HORIZONTAL)
    53                  __lbl_billable = wx.StaticText(self, wx.ID_ANY, _("Item"))
    54                  __gszr_main.Add(__lbl_billable, 0, 0, 0)
    55                  __gszr_main.Add(self._PRW_billable, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    56                  __lbl_encounter = wx.StaticText(self, wx.ID_ANY, _("Encounter"))
    57                  __gszr_main.Add(__lbl_encounter, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    58                  __gszr_main.Add(self._PRW_encounter, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    59                  __lbl_name = wx.StaticText(self, wx.ID_ANY, _("Charge Date"))
    60                  __gszr_main.Add(__lbl_name, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    61                  __gszr_main.Add(self._PRW_date, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    62                  __lbl_count = wx.StaticText(self, wx.ID_ANY, _("No of Units"))
    63                  __gszr_main.Add(__lbl_count, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    64                  __gszr_main.Add(self._TCTRL_count, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    65                  __lbl_amount = wx.StaticText(self, wx.ID_ANY, _("Value"))
    66                  __gszr_main.Add(__lbl_amount, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    67                  __szr_amount.Add(self._TCTRL_amount, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 3)
    68                  __szr_amount.Add(self._LBL_currency, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    69                  __gszr_main.Add(__szr_amount, 1, wx.EXPAND, 0)
    70                  __lbl_factor = wx.StaticText(self, wx.ID_ANY, _("Factor"))
    71                  __gszr_main.Add(__lbl_factor, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    72                  __gszr_main.Add(self._TCTRL_factor, 0, 0, 0)
    73                  __lbl_comment = wx.StaticText(self, wx.ID_ANY, _("Comment"))
    74                  __gszr_main.Add(__lbl_comment, 0, 0, 0)
    75                  __gszr_main.Add(self._TCTRL_comment, 0, wx.EXPAND, 0)
    76                  self.SetSizer(__gszr_main)
    77                  __gszr_main.Fit(self)
    78                  __gszr_main.AddGrowableCol(1)
    79                  self.Layout()
    80                  # end wxGlade
    81
    82  # end of class wxgBillItemEAPnl
    83