ig3tool 0.4.4 → 0.4.5
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 +2 -2
- data/lib/ui/protjes.rb +10 -1
- metadata +3 -3
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 on
|
3
|
+
<!--Generated with glade3 3.4.3 on Wed Apr 30 00:49:09 2008 -->
|
4
4
|
<glade-interface>
|
5
5
|
<widget class="GtkWindow" id="window">
|
6
6
|
<property name="visible">True</property>
|
@@ -1226,7 +1226,7 @@
|
|
1226
1226
|
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
1227
1227
|
<property name="xalign">1</property>
|
1228
1228
|
<property name="xpad">5</property>
|
1229
|
-
<property name="label" translatable="yes">price:</property>
|
1229
|
+
<property name="label" translatable="yes">total price:</property>
|
1230
1230
|
</widget>
|
1231
1231
|
<packing>
|
1232
1232
|
<property name="position">2</property>
|
data/lib/ui/protjes.rb
CHANGED
@@ -202,7 +202,15 @@ def initialize
|
|
202
202
|
|
203
203
|
@handler4 = @purchase_price.signal_connect("changed"){ price_amount_changed }
|
204
204
|
@handler5 = @purchase_amount.signal_connect("changed"){ price_amount_changed }
|
205
|
-
|
205
|
+
|
206
|
+
%w(focus-out-event activate).each do |s|
|
207
|
+
@purchase_amount.signal_connect s do
|
208
|
+
if @purchase_price.text.strip.to_c == 0
|
209
|
+
@purchase_price.text = (@purchase_amount.text.strip.to_i * @purchase_debuggers_orig.text.to_f).to_s
|
210
|
+
end
|
211
|
+
false
|
212
|
+
end
|
213
|
+
end
|
206
214
|
#@handler8 = @add_categories.signal_connect("changed"){ refresh }
|
207
215
|
@handler9 = @purchase_categories.signal_connect("changed"){ refresh }
|
208
216
|
@handler10 = @stock_categories.signal_connect("changed"){ refresh }
|
@@ -296,6 +304,7 @@ end
|
|
296
304
|
$client.product_save!("barcode" => barcode, "dprice" => @purchase_debuggers.text.strip.to_c, "mprice" => @purchase_members.text.strip.to_c, "nmprice" => @purchase_plebs.text.strip.to_c)
|
297
305
|
end
|
298
306
|
|
307
|
+
raise "Refusing to update stock: price == 0 !" if @purchase_price.text.strip.to_c == 0
|
299
308
|
$client.product_purchase!("debugger" => get_debugger(@purchase_debugger).username, "date" => @purchase_date.text.strip, "barcode" => @purchase_barcode.text.strip, "amount" => @purchase_amount.text.strip.to_i, "price" => @purchase_price.text.strip.to_c)
|
300
309
|
_purchase_clear
|
301
310
|
@purchase_notification.text = "the imps noted this purchase..."
|
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.4.
|
4
|
+
version: 0.4.5
|
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-04-
|
12
|
+
date: 2008-04-30 00:00:00 +02:00
|
13
13
|
default_executable: ig3tool
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
requirements:
|
20
20
|
- - ">="
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 0.4.
|
22
|
+
version: 0.4.5
|
23
23
|
version:
|
24
24
|
description:
|
25
25
|
email: igtool@infogroep.be
|