1
2
3
4
5 import wx
6
7
8
9
10
13
14 from Gnumed.wxpython.gmEMRStructWidgets import cEncounterPhraseWheel
15 from Gnumed.wxpython.gmDateTimeInput import cDateInputPhraseWheel
16 from Gnumed.wxpython.gmBillingWidgets import cBillablePhraseWheel
17
18
19 kwds["style"] = wx.NO_BORDER | wx.TAB_TRAVERSAL
20 wx.ScrolledWindow.__init__(self, *args, **kwds)
21 self._PRW_billable = cBillablePhraseWheel(self, -1, "", style=wx.NO_BORDER)
22 self._PRW_encounter = cEncounterPhraseWheel(self, -1, "", style=wx.NO_BORDER)
23 self._PRW_date = cDateInputPhraseWheel(self, -1, "", style=wx.NO_BORDER)
24 self._TCTRL_count = wx.TextCtrl(self, -1, "", style=wx.NO_BORDER)
25 self._TCTRL_amount = wx.TextCtrl(self, -1, "", style=wx.NO_BORDER)
26 self._LBL_currency = wx.StaticText(self, -1, _("EUR"))
27 self._TCTRL_factor = wx.TextCtrl(self, -1, "", style=wx.NO_BORDER)
28 self._TCTRL_comment = wx.TextCtrl(self, -1, "", style=wx.NO_BORDER)
29
30 self.__set_properties()
31 self.__do_layout()
32
33
35
36 self.SetScrollRate(10, 10)
37 self._PRW_billable.SetToolTipString(_("The billable from which to create the bill item."))
38 self._PRW_encounter.SetToolTipString(_("The encounter this item belongs to (or was created under)."))
39 self._PRW_date.SetToolTipString(_("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."))
40 self._TCTRL_count.SetToolTipString(_("How many units of the item are to be charged."))
41 self._TCTRL_amount.SetToolTipString(_("Base amount w/o VAT."))
42 self._TCTRL_factor.SetToolTipString(_("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"))
43 self._TCTRL_comment.SetToolTipString(_("Optional: An item-specific comment to be put on the bill."))
44
45
47
48 __gszr_main = wx.FlexGridSizer(7, 2, 1, 3)
49 __szr_amount = wx.BoxSizer(wx.HORIZONTAL)
50 __lbl_billable = wx.StaticText(self, -1, _("Item"))
51 __gszr_main.Add(__lbl_billable, 0, 0, 0)
52 __gszr_main.Add(self._PRW_billable, 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
53 __lbl_encounter = wx.StaticText(self, -1, _("Encounter"))
54 __gszr_main.Add(__lbl_encounter, 0, wx.ALIGN_CENTER_VERTICAL, 0)
55 __gszr_main.Add(self._PRW_encounter, 0, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
56 __lbl_name = wx.StaticText(self, -1, _("Charge Date"))
57 __gszr_main.Add(__lbl_name, 0, wx.ALIGN_CENTER_VERTICAL, 0)
58 __gszr_main.Add(self._PRW_date, 0, wx.ALIGN_CENTER_VERTICAL, 0)
59 __lbl_count = wx.StaticText(self, -1, _("No of Units"))
60 __gszr_main.Add(__lbl_count, 0, wx.ALIGN_CENTER_VERTICAL, 0)
61 __gszr_main.Add(self._TCTRL_count, 0, wx.ALIGN_CENTER_VERTICAL, 0)
62 __lbl_amount = wx.StaticText(self, -1, _("Value"))
63 __gszr_main.Add(__lbl_amount, 0, wx.ALIGN_CENTER_VERTICAL, 0)
64 __szr_amount.Add(self._TCTRL_amount, 0, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 3)
65 __szr_amount.Add(self._LBL_currency, 0, wx.ALIGN_CENTER_VERTICAL, 0)
66 __gszr_main.Add(__szr_amount, 1, wx.EXPAND, 0)
67 __lbl_factor = wx.StaticText(self, -1, _("Factor"))
68 __gszr_main.Add(__lbl_factor, 0, wx.ALIGN_CENTER_VERTICAL, 0)
69 __gszr_main.Add(self._TCTRL_factor, 0, 0, 0)
70 __lbl_comment = wx.StaticText(self, -1, _("Comment"))
71 __gszr_main.Add(__lbl_comment, 0, 0, 0)
72 __gszr_main.Add(self._TCTRL_comment, 0, wx.EXPAND, 0)
73 self.SetSizer(__gszr_main)
74 __gszr_main.Fit(self)
75 __gszr_main.AddGrowableCol(1)
76
77
78
79