ig3tool 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/glade/protjes.glade +35 -11
- data/lib/glade/sales.glade +120 -119
- data/lib/lib/util.rb +6 -0
- data/lib/ui/bibliotheekwindow.rb +2 -2
- data/lib/ui/interne.rb +1 -1
- data/lib/ui/printingwindow.rb +23 -1
- data/lib/ui/protjes.rb +28 -2
- data/lib/ui/saleswindow.rb +22 -12
- metadata +2 -2
data/lib/glade/protjes.glade
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
2
|
<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
|
3
|
-
<!--Generated with glade3 3.4.
|
3
|
+
<!--Generated with glade3 3.4.5 on Tue Oct 21 15:06:07 2008 -->
|
4
4
|
<glade-interface>
|
5
5
|
<widget class="GtkWindow" id="window">
|
6
6
|
<property name="visible">True</property>
|
@@ -152,7 +152,7 @@
|
|
152
152
|
<property name="visible">True</property>
|
153
153
|
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
154
154
|
<child>
|
155
|
-
<widget class="GtkAlignment" id="
|
155
|
+
<widget class="GtkAlignment" id="alignment1">
|
156
156
|
<property name="visible">True</property>
|
157
157
|
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
158
158
|
<child>
|
@@ -217,6 +217,17 @@
|
|
217
217
|
<property name="position">3</property>
|
218
218
|
</packing>
|
219
219
|
</child>
|
220
|
+
<child>
|
221
|
+
<widget class="GtkLabel" id="label27">
|
222
|
+
<property name="visible">True</property>
|
223
|
+
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
224
|
+
<property name="xalign">1</property>
|
225
|
+
<property name="xpad">5</property>
|
226
|
+
</widget>
|
227
|
+
<packing>
|
228
|
+
<property name="position">4</property>
|
229
|
+
</packing>
|
230
|
+
</child>
|
220
231
|
</widget>
|
221
232
|
</child>
|
222
233
|
</widget>
|
@@ -279,6 +290,19 @@
|
|
279
290
|
<property name="position">3</property>
|
280
291
|
</packing>
|
281
292
|
</child>
|
293
|
+
<child>
|
294
|
+
<widget class="GtkCheckButton" id="continuous_stock_check">
|
295
|
+
<property name="visible">True</property>
|
296
|
+
<property name="can_focus">True</property>
|
297
|
+
<property name="tooltip" translatable="yes">check this box if this product doesn't have a real stock</property>
|
298
|
+
<property name="label" translatable="yes">continuous stock?</property>
|
299
|
+
<property name="response_id">0</property>
|
300
|
+
<property name="draw_indicator">True</property>
|
301
|
+
</widget>
|
302
|
+
<packing>
|
303
|
+
<property name="position">4</property>
|
304
|
+
</packing>
|
305
|
+
</child>
|
282
306
|
</widget>
|
283
307
|
</child>
|
284
308
|
</widget>
|
@@ -521,11 +545,11 @@
|
|
521
545
|
<property name="visible">True</property>
|
522
546
|
<property name="top_padding">10</property>
|
523
547
|
<child>
|
524
|
-
<widget class="GtkHButtonBox" id="
|
548
|
+
<widget class="GtkHButtonBox" id="hbuttonbox3">
|
525
549
|
<property name="visible">True</property>
|
526
550
|
<property name="layout_style">GTK_BUTTONBOX_END</property>
|
527
551
|
<child>
|
528
|
-
<widget class="GtkButton" id="
|
552
|
+
<widget class="GtkButton" id="button1">
|
529
553
|
<property name="visible">True</property>
|
530
554
|
<property name="can_focus">True</property>
|
531
555
|
<property name="receives_default">True</property>
|
@@ -1007,7 +1031,7 @@
|
|
1007
1031
|
</widget>
|
1008
1032
|
</child>
|
1009
1033
|
<child>
|
1010
|
-
<widget class="GtkAlignment" id="
|
1034
|
+
<widget class="GtkAlignment" id="alignment2">
|
1011
1035
|
<property name="visible">True</property>
|
1012
1036
|
<child>
|
1013
1037
|
<widget class="GtkAlignment" id="alignment55">
|
@@ -1545,7 +1569,7 @@
|
|
1545
1569
|
</widget>
|
1546
1570
|
</child>
|
1547
1571
|
<child>
|
1548
|
-
<widget class="GtkAlignment" id="
|
1572
|
+
<widget class="GtkAlignment" id="alignment8">
|
1549
1573
|
<property name="visible">True</property>
|
1550
1574
|
<child>
|
1551
1575
|
<widget class="GtkLabel" id="purchase_notification">
|
@@ -2065,7 +2089,7 @@
|
|
2065
2089
|
</widget>
|
2066
2090
|
</child>
|
2067
2091
|
<child>
|
2068
|
-
<widget class="GtkAlignment" id="
|
2092
|
+
<widget class="GtkAlignment" id="alignment17">
|
2069
2093
|
<property name="visible">True</property>
|
2070
2094
|
<child>
|
2071
2095
|
<widget class="GtkLabel" id="stock_notification">
|
@@ -2368,11 +2392,11 @@
|
|
2368
2392
|
<widget class="GtkAlignment" id="alignment37">
|
2369
2393
|
<property name="visible">True</property>
|
2370
2394
|
<child>
|
2371
|
-
<widget class="GtkHButtonBox" id="
|
2395
|
+
<widget class="GtkHButtonBox" id="hbuttonbox4">
|
2372
2396
|
<property name="visible">True</property>
|
2373
2397
|
<property name="layout_style">GTK_BUTTONBOX_END</property>
|
2374
2398
|
<child>
|
2375
|
-
<widget class="GtkButton" id="
|
2399
|
+
<widget class="GtkButton" id="button4">
|
2376
2400
|
<property name="visible">True</property>
|
2377
2401
|
<property name="can_focus">True</property>
|
2378
2402
|
<property name="receives_default">True</property>
|
@@ -2383,7 +2407,7 @@
|
|
2383
2407
|
</widget>
|
2384
2408
|
</child>
|
2385
2409
|
<child>
|
2386
|
-
<widget class="GtkButton" id="
|
2410
|
+
<widget class="GtkButton" id="button5">
|
2387
2411
|
<property name="visible">True</property>
|
2388
2412
|
<property name="can_focus">True</property>
|
2389
2413
|
<property name="receives_default">True</property>
|
@@ -2455,7 +2479,7 @@
|
|
2455
2479
|
</widget>
|
2456
2480
|
</child>
|
2457
2481
|
<child>
|
2458
|
-
<widget class="GtkAlignment" id="
|
2482
|
+
<widget class="GtkAlignment" id="alignment18">
|
2459
2483
|
<property name="visible">True</property>
|
2460
2484
|
<property name="right_padding">25</property>
|
2461
2485
|
<child>
|
data/lib/glade/sales.glade
CHANGED
@@ -24,86 +24,40 @@
|
|
24
24
|
<placeholder/>
|
25
25
|
</child>
|
26
26
|
<child>
|
27
|
-
<widget class="
|
28
|
-
<property name="visible">True</property>
|
29
|
-
<child>
|
30
|
-
<widget class="GtkLabel" id="saldo_label">
|
31
|
-
<property name="visible">True</property>
|
32
|
-
<property name="xalign">0</property>
|
33
|
-
</widget>
|
34
|
-
</child>
|
35
|
-
</widget>
|
36
|
-
<packing>
|
37
|
-
<property name="left_attach">2</property>
|
38
|
-
<property name="right_attach">3</property>
|
39
|
-
<property name="top_attach">1</property>
|
40
|
-
<property name="bottom_attach">2</property>
|
41
|
-
</packing>
|
42
|
-
</child>
|
43
|
-
<child>
|
44
|
-
<widget class="GtkAlignment" id="alignment1">
|
45
|
-
<property name="visible">True</property>
|
46
|
-
<child>
|
47
|
-
<widget class="GtkLabel" id="saldo">
|
48
|
-
<property name="visible">True</property>
|
49
|
-
<property name="xalign">0</property>
|
50
|
-
<property name="use_markup">True</property>
|
51
|
-
</widget>
|
52
|
-
</child>
|
53
|
-
</widget>
|
54
|
-
<packing>
|
55
|
-
<property name="left_attach">3</property>
|
56
|
-
<property name="right_attach">4</property>
|
57
|
-
<property name="top_attach">1</property>
|
58
|
-
<property name="bottom_attach">2</property>
|
59
|
-
</packing>
|
60
|
-
</child>
|
61
|
-
<child>
|
62
|
-
<widget class="GtkComboBox" id="debugger">
|
27
|
+
<widget class="GtkLabel" id="label6">
|
63
28
|
<property name="visible">True</property>
|
64
|
-
<property name="
|
65
|
-
<property name="
|
66
|
-
<signal name="changed" handler="debugger_changed"/>
|
29
|
+
<property name="xalign">0</property>
|
30
|
+
<property name="label" translatable="yes">Debugger:</property>
|
67
31
|
</widget>
|
68
32
|
<packing>
|
69
|
-
<property name="left_attach">1</property>
|
70
|
-
<property name="right_attach">2</property>
|
71
33
|
<property name="top_attach">1</property>
|
72
34
|
<property name="bottom_attach">2</property>
|
35
|
+
<property name="x_options">GTK_FILL</property>
|
36
|
+
<property name="y_options"></property>
|
73
37
|
</packing>
|
74
38
|
</child>
|
75
39
|
<child>
|
76
|
-
<widget class="GtkEntry" id="
|
40
|
+
<widget class="GtkEntry" id="count">
|
77
41
|
<property name="visible">True</property>
|
78
42
|
<property name="can_focus">True</property>
|
79
|
-
<
|
43
|
+
<property name="text" translatable="yes">1</property>
|
44
|
+
<signal name="activate" handler="count_activate"/>
|
80
45
|
</widget>
|
81
46
|
<packing>
|
82
47
|
<property name="left_attach">1</property>
|
83
48
|
<property name="right_attach">2</property>
|
49
|
+
<property name="top_attach">2</property>
|
50
|
+
<property name="bottom_attach">3</property>
|
84
51
|
<property name="y_options"></property>
|
85
52
|
</packing>
|
86
53
|
</child>
|
87
54
|
<child>
|
88
|
-
<widget class="GtkLabel" id="
|
89
|
-
<property name="visible">True</property>
|
90
|
-
<property name="xalign">0</property>
|
91
|
-
<property name="label" translatable="yes">Smartzap:</property>
|
92
|
-
</widget>
|
93
|
-
<packing>
|
94
|
-
<property name="x_options">GTK_FILL</property>
|
95
|
-
<property name="y_options"></property>
|
96
|
-
</packing>
|
97
|
-
</child>
|
98
|
-
<child>
|
99
|
-
<widget class="GtkLabel" id="label7">
|
55
|
+
<widget class="GtkLabel" id="label5">
|
100
56
|
<property name="visible">True</property>
|
101
57
|
<property name="xalign">0</property>
|
102
|
-
<property name="label" translatable="yes">
|
58
|
+
<property name="label" translatable="yes">Aantal:</property>
|
103
59
|
</widget>
|
104
60
|
<packing>
|
105
|
-
<property name="left_attach">2</property>
|
106
|
-
<property name="right_attach">3</property>
|
107
61
|
<property name="top_attach">2</property>
|
108
62
|
<property name="bottom_attach">3</property>
|
109
63
|
<property name="x_options">GTK_FILL</property>
|
@@ -115,7 +69,8 @@
|
|
115
69
|
<property name="visible">True</property>
|
116
70
|
<property name="active">0</property>
|
117
71
|
<property name="items" translatable="yes">non member
|
118
|
-
debugger
|
72
|
+
debugger
|
73
|
+
member</property>
|
119
74
|
<signal name="changed" handler="member_changed"/>
|
120
75
|
<child internal-child="entry">
|
121
76
|
<widget class="GtkEntry" id="comboboxentry-entry1">
|
@@ -133,12 +88,14 @@ debugger</property>
|
|
133
88
|
</packing>
|
134
89
|
</child>
|
135
90
|
<child>
|
136
|
-
<widget class="GtkLabel" id="
|
91
|
+
<widget class="GtkLabel" id="label7">
|
137
92
|
<property name="visible">True</property>
|
138
93
|
<property name="xalign">0</property>
|
139
|
-
<property name="label" translatable="yes">
|
94
|
+
<property name="label" translatable="yes">Lid:</property>
|
140
95
|
</widget>
|
141
96
|
<packing>
|
97
|
+
<property name="left_attach">2</property>
|
98
|
+
<property name="right_attach">3</property>
|
142
99
|
<property name="top_attach">2</property>
|
143
100
|
<property name="bottom_attach">3</property>
|
144
101
|
<property name="x_options">GTK_FILL</property>
|
@@ -146,31 +103,75 @@ debugger</property>
|
|
146
103
|
</packing>
|
147
104
|
</child>
|
148
105
|
<child>
|
149
|
-
<widget class="
|
106
|
+
<widget class="GtkLabel" id="label1">
|
107
|
+
<property name="visible">True</property>
|
108
|
+
<property name="xalign">0</property>
|
109
|
+
<property name="label" translatable="yes">Smartzap:</property>
|
110
|
+
</widget>
|
111
|
+
<packing>
|
112
|
+
<property name="x_options">GTK_FILL</property>
|
113
|
+
<property name="y_options"></property>
|
114
|
+
</packing>
|
115
|
+
</child>
|
116
|
+
<child>
|
117
|
+
<widget class="GtkEntry" id="smartzap">
|
150
118
|
<property name="visible">True</property>
|
151
119
|
<property name="can_focus">True</property>
|
152
|
-
<
|
153
|
-
<signal name="activate" handler="count_activate"/>
|
120
|
+
<signal name="activate" handler="smartzap_activate"/>
|
154
121
|
</widget>
|
155
122
|
<packing>
|
156
123
|
<property name="left_attach">1</property>
|
157
124
|
<property name="right_attach">2</property>
|
158
|
-
<property name="top_attach">2</property>
|
159
|
-
<property name="bottom_attach">3</property>
|
160
125
|
<property name="y_options"></property>
|
161
126
|
</packing>
|
162
127
|
</child>
|
163
128
|
<child>
|
164
|
-
<widget class="
|
129
|
+
<widget class="GtkComboBox" id="debugger">
|
165
130
|
<property name="visible">True</property>
|
166
|
-
<property name="
|
167
|
-
<property name="
|
131
|
+
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
132
|
+
<property name="active">0</property>
|
133
|
+
<signal name="changed" handler="debugger_changed"/>
|
168
134
|
</widget>
|
169
135
|
<packing>
|
136
|
+
<property name="left_attach">1</property>
|
137
|
+
<property name="right_attach">2</property>
|
138
|
+
<property name="top_attach">1</property>
|
139
|
+
<property name="bottom_attach">2</property>
|
140
|
+
</packing>
|
141
|
+
</child>
|
142
|
+
<child>
|
143
|
+
<widget class="GtkAlignment" id="alignment1">
|
144
|
+
<property name="visible">True</property>
|
145
|
+
<child>
|
146
|
+
<widget class="GtkLabel" id="saldo">
|
147
|
+
<property name="visible">True</property>
|
148
|
+
<property name="xalign">0</property>
|
149
|
+
<property name="use_markup">True</property>
|
150
|
+
</widget>
|
151
|
+
</child>
|
152
|
+
</widget>
|
153
|
+
<packing>
|
154
|
+
<property name="left_attach">3</property>
|
155
|
+
<property name="right_attach">4</property>
|
156
|
+
<property name="top_attach">1</property>
|
157
|
+
<property name="bottom_attach">2</property>
|
158
|
+
</packing>
|
159
|
+
</child>
|
160
|
+
<child>
|
161
|
+
<widget class="GtkAlignment" id="alignment2">
|
162
|
+
<property name="visible">True</property>
|
163
|
+
<child>
|
164
|
+
<widget class="GtkLabel" id="saldo_label">
|
165
|
+
<property name="visible">True</property>
|
166
|
+
<property name="xalign">0</property>
|
167
|
+
</widget>
|
168
|
+
</child>
|
169
|
+
</widget>
|
170
|
+
<packing>
|
171
|
+
<property name="left_attach">2</property>
|
172
|
+
<property name="right_attach">3</property>
|
170
173
|
<property name="top_attach">1</property>
|
171
174
|
<property name="bottom_attach">2</property>
|
172
|
-
<property name="x_options">GTK_FILL</property>
|
173
|
-
<property name="y_options"></property>
|
174
175
|
</packing>
|
175
176
|
</child>
|
176
177
|
</widget>
|
@@ -251,27 +252,33 @@ debugger</property>
|
|
251
252
|
<property name="column_spacing">6</property>
|
252
253
|
<property name="row_spacing">3</property>
|
253
254
|
<child>
|
254
|
-
<widget class="
|
255
|
+
<widget class="GtkEntry" id="change">
|
255
256
|
<property name="visible">True</property>
|
256
|
-
<property name="
|
257
|
-
<property name="
|
257
|
+
<property name="can_focus">True</property>
|
258
|
+
<property name="editable">False</property>
|
259
|
+
<property name="has_frame">False</property>
|
260
|
+
<property name="width_chars">9</property>
|
258
261
|
</widget>
|
259
262
|
<packing>
|
260
|
-
<property name="left_attach">
|
261
|
-
<property name="right_attach">
|
263
|
+
<property name="left_attach">1</property>
|
264
|
+
<property name="right_attach">2</property>
|
265
|
+
<property name="top_attach">2</property>
|
266
|
+
<property name="bottom_attach">3</property>
|
262
267
|
<property name="x_options">GTK_FILL</property>
|
263
268
|
<property name="y_options"></property>
|
264
269
|
</packing>
|
265
270
|
</child>
|
266
271
|
<child>
|
267
|
-
<widget class="
|
272
|
+
<widget class="GtkEntry" id="paid">
|
268
273
|
<property name="visible">True</property>
|
269
|
-
<property name="
|
270
|
-
<property name="
|
274
|
+
<property name="can_focus">True</property>
|
275
|
+
<property name="has_frame">False</property>
|
276
|
+
<property name="width_chars">9</property>
|
277
|
+
<signal name="changed" handler="price_entries_changed"/>
|
271
278
|
</widget>
|
272
279
|
<packing>
|
273
|
-
<property name="left_attach">
|
274
|
-
<property name="right_attach">
|
280
|
+
<property name="left_attach">1</property>
|
281
|
+
<property name="right_attach">2</property>
|
275
282
|
<property name="top_attach">1</property>
|
276
283
|
<property name="bottom_attach">2</property>
|
277
284
|
<property name="x_options">GTK_FILL</property>
|
@@ -279,27 +286,31 @@ debugger</property>
|
|
279
286
|
</packing>
|
280
287
|
</child>
|
281
288
|
<child>
|
282
|
-
<widget class="
|
289
|
+
<widget class="GtkEntry" id="total">
|
283
290
|
<property name="visible">True</property>
|
284
|
-
<property name="
|
285
|
-
<property name="
|
291
|
+
<property name="can_focus">True</property>
|
292
|
+
<property name="editable">False</property>
|
293
|
+
<property name="has_frame">False</property>
|
294
|
+
<property name="width_chars">9</property>
|
295
|
+
<property name="text" translatable="yes">0.00</property>
|
296
|
+
<signal name="changed" handler="price_entries_changed"/>
|
286
297
|
</widget>
|
287
298
|
<packing>
|
288
|
-
<property name="left_attach">
|
289
|
-
<property name="right_attach">
|
290
|
-
<property name="top_attach">2</property>
|
291
|
-
<property name="bottom_attach">3</property>
|
299
|
+
<property name="left_attach">1</property>
|
300
|
+
<property name="right_attach">2</property>
|
292
301
|
<property name="x_options">GTK_FILL</property>
|
293
302
|
<property name="y_options"></property>
|
294
303
|
</packing>
|
295
304
|
</child>
|
296
305
|
<child>
|
297
|
-
<widget class="GtkLabel" id="
|
306
|
+
<widget class="GtkLabel" id="label14">
|
298
307
|
<property name="visible">True</property>
|
299
308
|
<property name="xalign">0</property>
|
300
|
-
<property name="label" translatable="yes">
|
309
|
+
<property name="label" translatable="yes">Terug:</property>
|
301
310
|
</widget>
|
302
311
|
<packing>
|
312
|
+
<property name="top_attach">2</property>
|
313
|
+
<property name="bottom_attach">3</property>
|
303
314
|
<property name="x_options">GTK_FILL</property>
|
304
315
|
<property name="y_options"></property>
|
305
316
|
</packing>
|
@@ -318,46 +329,40 @@ debugger</property>
|
|
318
329
|
</packing>
|
319
330
|
</child>
|
320
331
|
<child>
|
321
|
-
<widget class="GtkLabel" id="
|
332
|
+
<widget class="GtkLabel" id="label12">
|
322
333
|
<property name="visible">True</property>
|
323
334
|
<property name="xalign">0</property>
|
324
|
-
<property name="label" translatable="yes">
|
335
|
+
<property name="label" translatable="yes">Totaal:</property>
|
325
336
|
</widget>
|
326
337
|
<packing>
|
327
|
-
<property name="top_attach">2</property>
|
328
|
-
<property name="bottom_attach">3</property>
|
329
338
|
<property name="x_options">GTK_FILL</property>
|
330
339
|
<property name="y_options"></property>
|
331
340
|
</packing>
|
332
341
|
</child>
|
333
342
|
<child>
|
334
|
-
<widget class="
|
343
|
+
<widget class="GtkLabel" id="label11">
|
335
344
|
<property name="visible">True</property>
|
336
|
-
<property name="
|
337
|
-
<property name="
|
338
|
-
<property name="has_frame">False</property>
|
339
|
-
<property name="width_chars">9</property>
|
340
|
-
<property name="text" translatable="yes">0.00</property>
|
341
|
-
<signal name="changed" handler="price_entries_changed"/>
|
345
|
+
<property name="xalign">0</property>
|
346
|
+
<property name="label" translatable="yes">€</property>
|
342
347
|
</widget>
|
343
348
|
<packing>
|
344
|
-
<property name="left_attach">
|
345
|
-
<property name="right_attach">
|
349
|
+
<property name="left_attach">2</property>
|
350
|
+
<property name="right_attach">3</property>
|
351
|
+
<property name="top_attach">2</property>
|
352
|
+
<property name="bottom_attach">3</property>
|
346
353
|
<property name="x_options">GTK_FILL</property>
|
347
354
|
<property name="y_options"></property>
|
348
355
|
</packing>
|
349
356
|
</child>
|
350
357
|
<child>
|
351
|
-
<widget class="
|
358
|
+
<widget class="GtkLabel" id="label10">
|
352
359
|
<property name="visible">True</property>
|
353
|
-
<property name="
|
354
|
-
<property name="
|
355
|
-
<property name="width_chars">9</property>
|
356
|
-
<signal name="changed" handler="price_entries_changed"/>
|
360
|
+
<property name="xalign">0</property>
|
361
|
+
<property name="label" translatable="yes">€</property>
|
357
362
|
</widget>
|
358
363
|
<packing>
|
359
|
-
<property name="left_attach">
|
360
|
-
<property name="right_attach">
|
364
|
+
<property name="left_attach">2</property>
|
365
|
+
<property name="right_attach">3</property>
|
361
366
|
<property name="top_attach">1</property>
|
362
367
|
<property name="bottom_attach">2</property>
|
363
368
|
<property name="x_options">GTK_FILL</property>
|
@@ -365,18 +370,14 @@ debugger</property>
|
|
365
370
|
</packing>
|
366
371
|
</child>
|
367
372
|
<child>
|
368
|
-
<widget class="
|
373
|
+
<widget class="GtkLabel" id="label9">
|
369
374
|
<property name="visible">True</property>
|
370
|
-
<property name="
|
371
|
-
<property name="
|
372
|
-
<property name="has_frame">False</property>
|
373
|
-
<property name="width_chars">9</property>
|
375
|
+
<property name="xalign">0</property>
|
376
|
+
<property name="label" translatable="yes">€</property>
|
374
377
|
</widget>
|
375
378
|
<packing>
|
376
|
-
<property name="left_attach">
|
377
|
-
<property name="right_attach">
|
378
|
-
<property name="top_attach">2</property>
|
379
|
-
<property name="bottom_attach">3</property>
|
379
|
+
<property name="left_attach">2</property>
|
380
|
+
<property name="right_attach">3</property>
|
380
381
|
<property name="x_options">GTK_FILL</property>
|
381
382
|
<property name="y_options"></property>
|
382
383
|
</packing>
|
data/lib/lib/util.rb
CHANGED
data/lib/ui/bibliotheekwindow.rb
CHANGED
@@ -59,10 +59,10 @@ module Ig3tool
|
|
59
59
|
@loan_list.model = @loan_list_store = Gtk::ListStore.new(Object, String, String, String, String, String, String)
|
60
60
|
ll = Gtk::CellRendererText.new
|
61
61
|
@loan_list.insert_column(-1, "loan date", ll) do |tvc, cell, m ,iter|
|
62
|
-
cell.text =
|
62
|
+
cell.text = iter[0].loan_date.strftime("%d/%m/%y")
|
63
63
|
end
|
64
64
|
@loan_list.insert_column(-1, "return on", ll) do |tvc, cell, m ,iter|
|
65
|
-
date =
|
65
|
+
date = iter[0].return_date
|
66
66
|
ll.foreground = "red" if date > Time.now
|
67
67
|
cell.text = date.strftime("%d/%m/%y")
|
68
68
|
ll.foreground = "black"
|
data/lib/ui/interne.rb
CHANGED
@@ -27,7 +27,7 @@ module Ig3tool
|
|
27
27
|
@transactions.model = @transactions_store = Gtk::ListStore.new(Object, String, String, String, String, String)
|
28
28
|
l = Gtk::CellRendererText.new
|
29
29
|
@transactions.insert_column(-1, "time", l) do |tvc, cell, m, iter|
|
30
|
-
|
30
|
+
cell.text = Time.parse(iter[0].time).strftime("%d/%m/%y")
|
31
31
|
end
|
32
32
|
@transactions.insert_column(-1, "amount", l) do |tvc, cell, m, iter|
|
33
33
|
cell.text = iter[0].amount.from_c.to_s
|
data/lib/ui/printingwindow.rb
CHANGED
@@ -133,7 +133,17 @@ module Ig3tool
|
|
133
133
|
@log_menu = Gtk::Menu.new
|
134
134
|
log_menu_refund_item = Gtk::MenuItem.new("refund")
|
135
135
|
log_menu_show_item = Gtk::MenuItem.new("show")
|
136
|
+
log_menu_reprint_item = Gtk::MenuItem.new("reprint")
|
136
137
|
# Treeview heeft default Mode Gtk::SELECTION_SINGLE
|
138
|
+
log_menu_reprint_item.signal_connect("activate") {
|
139
|
+
@filteredlog.selection.selected_each do |model, path, iter|
|
140
|
+
logentry = iter[0]
|
141
|
+
# do reprint stuff
|
142
|
+
$client.print_reprint!({ "logid" => logentry["id"]})
|
143
|
+
@notification.text = "attempting reprint of job #{logentry["job"]} for #{logentry["username"]}"
|
144
|
+
_update_log
|
145
|
+
end
|
146
|
+
}
|
137
147
|
log_menu_show_item.signal_connect("activate") {
|
138
148
|
@filteredlog.selection.selected_each do |model, path, iter|
|
139
149
|
logentry = iter[0]
|
@@ -158,7 +168,8 @@ module Ig3tool
|
|
158
168
|
}
|
159
169
|
|
160
170
|
@log_menu.append(log_menu_show_item)
|
161
|
-
@log_menu.append(log_menu_refund_item)
|
171
|
+
@log_menu.append(log_menu_refund_item)
|
172
|
+
@log_menu.append(log_menu_reprint_item)
|
162
173
|
@log_menu.show_all
|
163
174
|
|
164
175
|
end
|
@@ -167,7 +178,17 @@ module Ig3tool
|
|
167
178
|
@log_big_menu = Gtk::Menu.new
|
168
179
|
log_menu_refund_item = Gtk::MenuItem.new("refund")
|
169
180
|
log_menu_show_item = Gtk::MenuItem.new("show")
|
181
|
+
log_menu_reprint_item = Gtk::MenuItem.new("reprint")
|
170
182
|
# Treeview heeft default Mode Gtk::SELECTION_SINGLE
|
183
|
+
log_menu_reprint_item.signal_connect("activate") {
|
184
|
+
@filteredlog.selection.selected_each do |model, path, iter|
|
185
|
+
logentry = iter[0]
|
186
|
+
# do reprint stuff
|
187
|
+
$client.print_reprint!({ "logid" => logentry["id"]})
|
188
|
+
@notification.text = "attempting reprint of job #{logentry["job"]} for #{logentry["username"]}"
|
189
|
+
_update_log
|
190
|
+
end
|
191
|
+
}
|
171
192
|
log_menu_show_item.signal_connect("activate") {
|
172
193
|
@log.selection.selected_each do |model, path, iter|
|
173
194
|
logentry = iter[0]
|
@@ -194,6 +215,7 @@ module Ig3tool
|
|
194
215
|
|
195
216
|
@log_big_menu.append(log_menu_show_item)
|
196
217
|
@log_big_menu.append(log_menu_refund_item)
|
218
|
+
@log_big_menu.append(log_menu_reprint_item)
|
197
219
|
@log_big_menu.show_all
|
198
220
|
|
199
221
|
end
|
data/lib/ui/protjes.rb
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
require 'time'
|
2
2
|
|
3
|
+
class String
|
4
|
+
|
5
|
+
def to_boolean
|
6
|
+
return true if (self == "t" or self.to_i != 0)
|
7
|
+
return false
|
8
|
+
end
|
9
|
+
|
10
|
+
end
|
3
11
|
|
4
12
|
module Ig3tool
|
5
13
|
|
@@ -25,6 +33,7 @@ def initialize
|
|
25
33
|
@add_stock = @glade.get_widget("add_stock")
|
26
34
|
@add_prodcat = @glade.get_widget("add_prodcat")
|
27
35
|
@add_categories = @glade.get_widget("add_categories")
|
36
|
+
@continuous_stock = @glade.get_widget("continuous_stock_check")
|
28
37
|
|
29
38
|
@categories = $client.product_categories.collect {|x| x.name}.sort
|
30
39
|
|
@@ -189,6 +198,8 @@ def initialize
|
|
189
198
|
@slog_categories.model = cat6_model
|
190
199
|
@slog_categories.active = 0
|
191
200
|
|
201
|
+
@continuous_stock.active = false
|
202
|
+
|
192
203
|
toggle_purchase_fields(false)
|
193
204
|
_add_clear
|
194
205
|
_purchase_clear
|
@@ -205,6 +216,7 @@ def initialize
|
|
205
216
|
|
206
217
|
%w(focus-out-event activate).each do |s|
|
207
218
|
@purchase_amount.signal_connect s do
|
219
|
+
number_eval_widget(@purchase_amount, "0.0")
|
208
220
|
if @purchase_price.text.strip.to_c == 0
|
209
221
|
@purchase_price.text = (@purchase_amount.text.strip.to_i * @purchase_debuggers_orig.text.to_f).to_s
|
210
222
|
end
|
@@ -550,7 +562,12 @@ end
|
|
550
562
|
raise Needed, "please scan a barcode" if @add_barcode.text.strip.empty?
|
551
563
|
raise Needed, "please enter a descriptive name" if @add_name.text.strip.empty?
|
552
564
|
raise Needed, "please select a category" if @add_prodcat.active == -1
|
553
|
-
|
565
|
+
if @continuous_stock.active?
|
566
|
+
cs = 1
|
567
|
+
else
|
568
|
+
cs = 0
|
569
|
+
end
|
570
|
+
$client.product_save!("barcode" => @add_barcode.text.strip, "name" => @add_name.text.strip, "continuous_stock" => cs, "dprice" => @manage_debuggers.text.strip.to_c, "mprice" => @manage_members.text.strip.to_c, "nmprice" => @manage_plebs.text.strip.to_c, "category" => @categories[@add_prodcat.active])
|
554
571
|
_update_add_products(false)
|
555
572
|
@add_notification.text = "the imps saved the product!"
|
556
573
|
_add_clear(false)
|
@@ -615,6 +632,9 @@ end
|
|
615
632
|
@add_barcode.text = prod.barcode
|
616
633
|
@add_stock.text = prod.stock
|
617
634
|
@add_name.text = prod.name
|
635
|
+
puts prod.continuous_stock.class
|
636
|
+
puts prod.continuous_stock
|
637
|
+
@continuous_stock.active = prod.continuous_stock.to_boolean
|
618
638
|
@add_prodcat.active = @categories.index(prod.category)
|
619
639
|
rescue Exception => e
|
620
640
|
@add_notification.text = e.message
|
@@ -635,7 +655,12 @@ end
|
|
635
655
|
@purchase_name.text = prod.name
|
636
656
|
@purchase_category.text = prod.category
|
637
657
|
price_amount_changed
|
638
|
-
|
658
|
+
if prod.continuous_stock.to_boolean
|
659
|
+
toggle_purchase_fields(false)
|
660
|
+
@purchase_notification.text = "this product has a continuous stock"
|
661
|
+
else
|
662
|
+
toggle_purchase_fields(true)
|
663
|
+
end
|
639
664
|
Thread.new do
|
640
665
|
ps = $client.product_purchases(barcode)
|
641
666
|
last_purchase = ps.first
|
@@ -811,6 +836,7 @@ end
|
|
811
836
|
@add_name.text = ""
|
812
837
|
@add_prodcat.active = -1
|
813
838
|
@add_notification.text = "" if all
|
839
|
+
@continuous_stock.active = false
|
814
840
|
end
|
815
841
|
|
816
842
|
def _purchase_clear(all=true)
|
data/lib/ui/saleswindow.rb
CHANGED
@@ -9,7 +9,7 @@ module Ig3tool
|
|
9
9
|
@status = "non member"
|
10
10
|
@target = nil
|
11
11
|
|
12
|
-
@statushash = {0 => "non member", 1 => "debugger"}
|
12
|
+
@statushash = {0 => "non member", 1 => "debugger", 2 => "member"}
|
13
13
|
@statushashi = @statushash.invert
|
14
14
|
|
15
15
|
# init items
|
@@ -71,6 +71,13 @@ module Ig3tool
|
|
71
71
|
toggle_saldo_label(false)
|
72
72
|
@member_id.active = @statushashi[@status]
|
73
73
|
return
|
74
|
+
|
75
|
+
when "member"
|
76
|
+
@target = nil
|
77
|
+
@status = "member"
|
78
|
+
toggle_saldo_label(false)
|
79
|
+
@member_id.active = @statushashi[@status]
|
80
|
+
return
|
74
81
|
|
75
82
|
when "kaching"
|
76
83
|
_kaching
|
@@ -115,20 +122,21 @@ module Ig3tool
|
|
115
122
|
jaar = Time.werkjaar % 100
|
116
123
|
lidkaartx = sprintf("^00%02d%02d", jaar, jaar+1).to_re
|
117
124
|
if value =~ lidkaartx # yay! fascets! (fascisme?)
|
118
|
-
|
125
|
+
begin
|
126
|
+
$client.person_member(value)
|
127
|
+
# als deze lidkaart overeenkomt met een member =>
|
128
|
+
# zet value op member
|
129
|
+
@target = value
|
130
|
+
@status = "member"
|
131
|
+
@member_id.active = @statushashi[@status]
|
132
|
+
puts "member found.."
|
133
|
+
rescue Ig3tool::NotAMember => e
|
134
|
+
# alst gene member is => verkoop een lidkaart :)
|
135
|
+
value = "lidkaart"
|
136
|
+
end
|
119
137
|
end
|
120
138
|
end
|
121
139
|
|
122
|
-
# is het een member?
|
123
|
-
begin
|
124
|
-
memb = $client.person_member(value)
|
125
|
-
|
126
|
-
@target = value
|
127
|
-
@status = "member"
|
128
|
-
@member_id.active = @statushashi[@status]
|
129
|
-
return
|
130
|
-
rescue Exception => e
|
131
|
-
end
|
132
140
|
|
133
141
|
# is het een product?
|
134
142
|
begin
|
@@ -155,6 +163,7 @@ module Ig3tool
|
|
155
163
|
end
|
156
164
|
|
157
165
|
def member_changed
|
166
|
+
puts "member_changed"
|
158
167
|
chosen = @member_id.active_text.strip
|
159
168
|
@target = nil
|
160
169
|
|
@@ -176,6 +185,7 @@ module Ig3tool
|
|
176
185
|
|
177
186
|
@target = chosen
|
178
187
|
@status = "member"
|
188
|
+
puts "member found.."
|
179
189
|
rescue NotAMember => e
|
180
190
|
end
|
181
191
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ig3tool
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Pinte
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-
|
12
|
+
date: 2008-11-26 00:00:00 +01:00
|
13
13
|
default_executable: ig3tool
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|