Rohan Mitchell
22230294ab
Merge branch 'master' into optimise-shopfront
2015-06-03 10:07:42 +10:00
Rohan Mitchell
7486daa2a3
Merge branch 'master' into require_standard_variant
...
Conflicts:
spec/controllers/spree/admin/variants_controller_spec.rb
spec/lib/open_food_network/permissions_spec.rb
spec/lib/open_food_network/products_and_inventory_report_spec.rb
spec/models/enterprise_spec.rb
2015-05-28 15:08:13 +10:00
Rohan Mitchell
97e49c2bdb
Replace 'array.sort.should == expected.sort' pattern with match_array
2015-05-28 10:46:08 +10:00
Rohan Mitchell
769edbe9d5
Find the earliest closing times for each distributor in an active order cycle
2015-05-27 15:44:01 +10:00
Rob Harrington
b9f19d5777
Fixing broken specs
2015-04-17 13:00:20 +10:00
Victor Nava
d6c30ae1ef
OrderCycle#recently_closed doesn't return orders that are open
2015-03-05 17:28:24 +11:00
Victor Nava
1b709a3e03
Do not load Order Cycles that closed more than a month a go
2015-03-05 16:04:36 +11:00
Maikel Linke
8e280919ac
Using simple_order_cycle in clone spec
...
Creating a coordinator fee and two exchanges in the spec instead of
using a full order_cycle. Timing of this single test:
Before: 15.32 seconds
After: 6.26 seconds
2014-11-28 15:36:34 +11:00
Maikel Linke
aa2cefb88c
Using simple_order_cycle where applicable
...
Before: 3 minutes 0 seconds
After: 1 minute 21.02 seconds
2014-11-28 13:45:25 +11:00
Rafael Schouten
b821107c27
bugfix migration ad specs
2014-09-27 18:14:10 +10:00
Rohan Mitchell
66cece5903
WIP: Extract order cycle fee calculations to EnterpriseFeeCalculator
2014-07-31 11:36:53 +10:00
Will Marshall
0479a0a55d
Fixing bugs, improving dates
2014-04-23 15:46:14 +10:00
Rohan Mitchell
47ac097eb7
Do not show deleted variants on shopfront
2014-04-11 19:08:55 +10:00
Rohan Mitchell
ec0191806a
Update specs to explicitly specify exchange direction
2014-03-26 12:17:49 +11:00
Rohan Mitchell
ac92d0919a
Add incoming boolean field to Exchange, determine exchange direction from this field rather than sender/receiver roles
2014-03-26 11:19:35 +11:00
Rohan Mitchell
638e922ae2
Do not allow customer to purchase the obsolete master of a product
2014-03-20 10:56:46 +11:00
Rohan Mitchell
a8373b7bef
Fix specs: stale data
2014-03-12 13:34:05 +11:00
Rohan Mitchell
f7e1befc75
Spec fees_for only sums per-item fees
2014-02-26 15:16:30 +11:00
Rohan Mitchell
11fb6c96a1
Charge per-order fees on orders exactly once
2014-02-26 14:34:30 +11:00
Rohan Mitchell
75c8da1774
Rename create_adjustments_for to create_line_item_adjustments_for, only show per-item fees
2014-02-26 12:07:38 +11:00
Rohan Mitchell
da8a8e8a1a
Rename method
2014-02-21 15:49:10 +11:00
Rohan Mitchell
08009d4020
Extract application of enterprise fees as adjustments into its own class
2014-02-21 15:48:58 +11:00
Will Marshall
1ca9a86042
Getting in a spec asserting that percentage-based fees are applied
2014-02-07 11:09:47 +11:00
Will Marshall
202f95a8fc
Fix for broken percentage Enterprise Fees in place, no test yet
2014-02-07 11:09:47 +11:00
Rohan Mitchell
d0fd48456e
Variant calculates fees and its price inclusive of fees
2014-02-05 14:01:10 +11:00
Rohan Mitchell
04487da22a
Decouple OrderCycle#fees_for from LineItem
2014-02-05 13:27:17 +11:00
Will Marshall
12743850b4
Removing a chili, refactoring order mailer
2013-12-13 15:40:22 +11:00
Rohan Mitchell
124b6df75d
Show undated order cycles on index page
2013-12-13 14:51:43 +11:00
Will Marshall
e574185c95
Fixing an ordering issue in the order cycle spec
2013-11-29 14:48:06 +11:00
Rohan Mitchell
459b2c1050
Add #upcoming? and #open? to OrderCycle
2013-11-22 11:15:12 +11:00
Rohan Mitchell
3a2394675f
Rename OrderCycle#expired? to #closed?
2013-11-22 11:08:42 +11:00
Rohan Mitchell
5ad63d08f3
Add some more open/close time scopes to order cycles
2013-11-22 10:57:33 +11:00
Rohan Mitchell
7a8bd16083
On enterprise page, do not display products outside of the outgoing exchange
2013-11-15 15:08:45 +11:00
Rohan Mitchell
59935619e3
Rename OrderCycle#distributed_variants_by to variants_distributed_by
2013-11-15 14:34:05 +11:00
Rohan Mitchell
04387aa6b7
Scope time since last oc expired to distributor
2013-11-06 16:17:36 +11:00
Will Marshall
9f150c8d87
Adding a small display on the distributor page indicating when the next order cycle is, if any - BugHerd#127
2013-11-01 16:12:31 +11:00
Rohan Mitchell
fb22b5e2b7
When there are no order cycles open, display an 'orders closed' message
2013-10-24 10:32:30 +11:00
Rohan Mitchell
30bc45370b
When order cycle expires mid-order, clear the order cycle and display a message
2013-09-30 16:56:11 +10:00
Rohan Mitchell
dac49d1044
Order cycle-aware pickup time
2013-09-27 11:17:24 +10:00
David Cook
5ec3c1831d
Only show order cycles that the user has access to in reports drop-down
2013-09-18 09:26:50 +10:00
Rohan Mitchell
a929312979
Add scope: OrderCycle.with_distributor
2013-09-17 09:54:21 +10:00
Rohan Mitchell
d32a8b56d0
When order cycle is selected, only show variants that are in it
2013-09-09 10:40:15 +10:00
Rohan Mitchell
f1fa90d7c3
Clone order cycles
2013-08-22 16:53:11 +10:00
Rohan Mitchell
ba4d3d5d7d
Removing a product from cart removes its fees
2013-08-19 12:19:03 +10:00
Rohan Mitchell
e15e9a1476
Charge order cycle fees
2013-08-19 10:41:14 +10:00
Rohan Mitchell
122b9b5617
Make order cycle coordinator fees many-to-many
2013-07-30 11:34:10 +10:00
Rohan Mitchell
27b5dc071a
Order cycle reports on the variants distributed by a particular distributor
2013-06-17 14:58:13 +10:00
Rohan Mitchell
9ef7da1339
Add OrderCycle#distributed_variants
2013-05-28 14:01:04 +10:00
Rohan Mitchell
3bedfc3d1d
Add OrderCycle distributing_product scope
2013-05-28 13:27:52 +10:00
Rohan Mitchell
3aa44c3e9a
Setting a remote distributor clears the order cycle, and vice versa
2013-03-08 15:17:23 +11:00