Commit Graph

36 Commits

Author SHA1 Message Date
Luis Ramos
f848a89a00 Rename update_attributes to update #rails4 2020-06-22 16:51:43 +01:00
Matt-Yorkley
ab330e882e Remove product cache 2019-10-18 21:15:11 +01:00
Maikel Linke
73372a58ef Remove unused and dangerous Exchange#eql? override
The `eql?` override has been added in very early commits but was
actually not used except in a test. It also caused performance problems
since each call to `eql?` would issue two database queries. A developer
would unknowingly trigger these when using `exchanges.uniq`. A mistake
that could have happened again in the future.

I moved the implementation to the test that was actually using it and
made a second test a bit more explicit.
2019-07-02 18:42:02 +10:00
luisramos0
ba91abd20e Adapt exchanges.with_any_variant scope to rails 4 2019-06-18 10:40:49 +01:00
luisramos0
86b0d71c7e Result of rubocop auto-correct and rebuilding rubocop_manual_todo 2019-05-28 12:57:29 +01:00
luisramos0
04801e5c2e Run transpec in spec/models 2019-05-09 22:25:29 +01:00
Michael Hughes
9e56198092 references to payment_enterprise_id removed, new migration created 2019-05-04 16:32:48 +01:00
Rob Harrington
59578a73af Changing all references to 'be_true' and 'be_false' to 'be true' and 'be false'
See next commit for changes where this substitution was broken
2017-11-10 08:47:12 +11:00
Rob Harrington
9dc1294ec5 Outgoing exchanges can be tagged
Using panels infrastructure to display tags and products interfaces
2016-05-27 16:25:10 +10:00
Rohan Mitchell
8af6866ae4 Refresh products cache when exchange is changed or destroyed 2016-02-24 15:05:03 +11:00
Rohan Mitchell
8d270e919f Sort exchanges for display when editing an order cycle 2015-12-10 09:17:25 +11:00
Rohan Mitchell
bd854bf2dd Remove receival_time from exchange, just use receival_instructions 2015-12-02 15:05:49 +11:00
Rohan Mitchell
3dbc2e0382 Merge branch 'master' into folklabs-producer-emails 2015-05-29 17:36:11 +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
91ca5f0213 Fix specs for receival_time / instructions 2015-05-01 10:08:24 +10:00
Rob Harrington
85e4b3970c Adding an 'involved' scope to exchanges 2015-03-27 15:56:07 +11:00
Rohan Mitchell
9b15c213d1 When an enterprise user saves an order cycle for which it manages only some of the enterprises involved, do not delete the other exchanges 2014-05-23 11:28:00 +10:00
Rohan Mitchell
85db8859bb On admin order cycle edit page, do not show exchanges for enterprises the user doesn't manage 2014-04-24 15:51:39 +10:00
Rohan Mitchell
32ffd05ba0 Order cycle can have the same enterprise participating as supplier, coordinator and distributor 2014-04-02 11:54:28 +11:00
Rohan Mitchell
f184f0c246 Fix inappropriate intimacy: Extract exchange-specific queries from OrderCycle back into exchange 2014-03-26 11:43:32 +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
98776caa51 Rename Exchange.any_variant to with_any_variant for clarity 2014-03-14 11:18:59 +11:00
Rohan Mitchell
affb2a5743 Fix bug: Whole order fees being charged once per variant. Exchange.any_variant was returning duplicate rows. 2014-03-14 11:18:59 +11:00
Rohan Mitchell
a8373b7bef Fix specs: stale data 2014-03-12 13:34:05 +11:00
Rohan Mitchell
9dec40703a Find exchanges with any of a number of variants 2014-02-26 13: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
Rohan Mitchell
3c95993975 Remove order sensitivity in specs 2013-12-17 15:25:17 +11:00
Rohan Mitchell
52b6c33aaa When converting an exchange to a hash for comparison, ensure id lists are sorted - ordering issues should not indicate inequality 2013-11-15 12:09:26 +11:00
Rohan Mitchell
68fe20c37a Add scope: Exchange.with_product 2013-09-23 17:39:16 +10:00
Rohan Mitchell
f1fa90d7c3 Clone order cycles 2013-08-22 16:53:11 +10:00
Rohan Mitchell
7a75898b2b Find exchanges going to/from any number of enterprises 2013-08-19 10:41:14 +10:00
Rohan Mitchell
dfd1a89975 Test whether exchanges are incoming 2013-08-19 10:41:14 +10:00
Rohan Mitchell
9563aad9fa Find exchanges with a particular variant 2013-08-19 10:41:14 +10:00
Rohan Mitchell
552cecb2e0 Find incoming and outgoing exchanges 2013-08-16 10:22:29 +10:00
Rohan Mitchell
cfa96c7615 Each order cycle may not have duplicate exchanges between the same enterprises 2012-11-30 16:37:29 +11:00
Rohan Mitchell
6b97872a25 Create OrderCycles, Exchanges, ExchangeFees and ExchangeVariants 2012-11-26 11:03:44 +11:00