Gnumed.wxGladeWidgets.wxgBillingPluginPnl

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

# Source Code for Module Gnumed.wxGladeWidgets.wxgBillingPluginPnl

     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  from Gnumed.wxpython.gmBillingWidgets import cBillablePhraseWheel
    14  from Gnumed.wxpython.gmBillingWidgets import cPersonBillItemsManagerPnl
    15  # end wxGlade
    16
    17
    18 -class wxgBillingPluginPnl(wx.ScrolledWindow):
    19 -        def __init__(self, *args, **kwds):
    20                  # begin wxGlade: wxgBillingPluginPnl.__init__
    21                  kwds["style"] = kwds.get("style", 0) | wx.BORDER_NONE | wx.TAB_TRAVERSAL
    22                  wx.ScrolledWindow.__init__(self, *args, **kwds)
    23                  self._CHBOX_show_non_invoiced_only = wx.CheckBox(self, wx.ID_ANY, _("Show non-invoiced only"))
    24                  self._PNL_bill_items = cPersonBillItemsManagerPnl(self, wx.ID_ANY, style=wx.BORDER_NONE | wx.TAB_TRAVERSAL)
    25                  self._PRW_billable = cBillablePhraseWheel(self, wx.ID_ANY, "")
    26                  self._TCTRL_factor = wx.TextCtrl(self, wx.ID_ANY, "")
    27                  self._TCTRL_details = wx.TextCtrl(self, wx.ID_ANY, "")
    28                  self._BTN_insert_item = wx.Button(self, wx.ID_ANY, _("&Insert"), style=wx.BU_EXACTFIT)
    29
    30                  self.__set_properties()
    31                  self.__do_layout()
    32
    33                  self.Bind(wx.EVT_CHECKBOX, self._on_non_invoiced_only_checkbox_toggled, self._CHBOX_show_non_invoiced_only)
    34                  self.Bind(wx.EVT_BUTTON, self._on_insert_bill_item_button_pressed, self._BTN_insert_item)
    35                  # end wxGlade
    36
    37 -        def __set_properties(self):
    38                  # begin wxGlade: wxgBillingPluginPnl.__set_properties
    39                  self.SetScrollRate(10, 10)
    40                  self._CHBOX_show_non_invoiced_only.SetValue(1)
    41                  self._PRW_billable.SetToolTip(_("Select - by code or part of the description - a billable item to add to the patient."))
    42                  self._TCTRL_factor.SetToolTip(_("Modify the factor to apply to the item price."))
    43                  self._TCTRL_factor.Enable(False)
    44                  self._TCTRL_details.SetToolTip(_("Optional: Add a short patient specific comment on this item. Will be shown on the bill."))
    45                  self._TCTRL_details.Enable(False)
    46                  self._BTN_insert_item.SetToolTip(_("Add the selected billing item to the patient."))
    47                  self._BTN_insert_item.Enable(False)
    48                  # end wxGlade
    49
    50 -        def __do_layout(self):
    51                  # begin wxGlade: wxgBillingPluginPnl.__do_layout
    52                  __szr_main = wx.BoxSizer(wx.VERTICAL)
    53                  __szr_add_item = wx.StaticBoxSizer(wx.StaticBox(self, wx.ID_ANY, _("Add billing item to current encounter")), wx.HORIZONTAL)
    54                  __szr_list_options = wx.BoxSizer(wx.HORIZONTAL)
    55                  __szr_list_options.Add(self._CHBOX_show_non_invoiced_only, 0, wx.ALIGN_CENTER_VERTICAL, 5)
    56                  __szr_list_options.Add((20, 20), 1, wx.ALIGN_CENTER_VERTICAL, 0)
    57                  __szr_main.Add(__szr_list_options, 0, wx.BOTTOM | wx.EXPAND, 2)
    58                  __szr_main.Add(self._PNL_bill_items, 1, wx.BOTTOM | wx.EXPAND, 2)
    59                  __lbl_item = wx.StaticText(self, wx.ID_ANY, _("Item:"))
    60                  __szr_add_item.Add(__lbl_item, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 2)
    61                  __szr_add_item.Add(self._PRW_billable, 1, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 3)
    62                  __lbl_factor = wx.StaticText(self, wx.ID_ANY, _("Factor:"))
    63                  __szr_add_item.Add(__lbl_factor, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 2)
    64                  __szr_add_item.Add(self._TCTRL_factor, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 3)
    65                  __lbl_details = wx.StaticText(self, wx.ID_ANY, _("Comment:"))
    66                  __szr_add_item.Add(__lbl_details, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 2)
    67                  __szr_add_item.Add(self._TCTRL_details, 2, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 3)
    68                  __szr_add_item.Add(self._BTN_insert_item, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    69                  __szr_main.Add(__szr_add_item, 0, wx.EXPAND, 0)
    70                  self.SetSizer(__szr_main)
    71                  __szr_main.Fit(self)
    72                  self.Layout()
    73                  # end wxGlade
    74
    75 -        def _on_non_invoiced_only_checkbox_toggled(self, event):  # wxGlade: wxgBillingPluginPnl.<event_handler>
    76                  print("Event handler '_on_non_invoiced_only_checkbox_toggled' not implemented!")
    77                  event.Skip()
    78
    79 -        def _on_insert_bill_item_button_pressed(self, event):  # wxGlade: wxgBillingPluginPnl.<event_handler>
    80                  print("Event handler '_on_insert_bill_item_button_pressed' not implemented!")
    81                  event.Skip()
    82
    83  # end of class wxgBillingPluginPnl
    84