My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions

Issue 140 attachment: allow_promos.diff (540 bytes)

1
2
3
4
5
6
7
8
9
10
11
12
Index: plugins/substruct/app/models/order.rb
===================================================================
--- plugins/substruct/app/models/order.rb (revision 163)
+++ plugins/substruct/app/models/order.rb (working copy)
@@ -411,6 +411,7 @@
removed_items = []
self.order_line_items.each do |oli|
# Find the item in the db, because oli.item is cached.
+ next unless oli.item_id # skip promos
db_item = Item.find(oli.item_id)
if oli.quantity > db_item.quantity
removed_items << oli.name.clone
Powered by Google Project Hosting