Commit Graph

146 Commits

Author SHA1 Message Date
Rohan Mitchell
9563aad9fa Find exchanges with a particular variant 2013-08-19 10:41:14 +10:00
Rohan Mitchell
1d23446c40 ProductDistribution validates_presence_of enterprise fee, check no longer required 2013-08-19 10:41:14 +10:00
Rohan Mitchell
591f6a8a57 Move ProductDistribution#clear_all_enterprise_fee_adjustments_for to EnterpriseFee class 2013-08-19 10:41:14 +10:00
Andrew Spinks
38522e2b74 Fix order cycle permissions for enterprise user. 2013-08-18 19:41:04 +10:00
Andrew Spinks
82726d032c Add enterprise roles for order cycles. 2013-08-16 11:34:07 +10:00
Rohan Mitchell
552cecb2e0 Find incoming and outgoing exchanges 2013-08-16 10:22:29 +10:00
alexs
b8bc30d4ab Fixed the test setup and added the text for the bug found in 'Enterprise.find_near'. 2013-08-15 17:34:51 +10:00
Andrew Spinks
9c6c4724be Ensure line items only get created in correct orders when adding a product to a cart. 2013-08-14 10:49:55 +10:00
Andrew Spinks
d5791657f3 Support multiple orders when adding a product to a cart. 2013-08-14 10:49:55 +10:00
Andrew Spinks
dd3aaccf9f When adding a variant to a cart, split into multiple orders depending on the distributors that it contains. 2013-08-14 10:49:55 +10:00
alexs
e90ccef337 Merge branch 'master' of github.com:eaterprises/openfoodweb 2013-08-13 11:40:54 +10:00
Rohan Mitchell
5f4313b588 Remove itemwise shipping calculator 2013-08-13 10:14:39 +10:00
Rohan Mitchell
7677f79f17 Remove the now-unused Product#shipping_method_for_distributor 2013-08-13 09:11:26 +10:00
Rohan Mitchell
94e49d4190 Remove line item specs for removed functionality 2013-08-13 09:11:26 +10:00
Rohan Mitchell
9aad44f093 Strip shipping method mechanics out of LineItem and Order 2013-08-13 09:11:25 +10:00
alexs
03b36bb14b Merge branch 'master' of github.com:eaterprises/openfoodweb 2013-08-12 17:35:36 +10:00
alexs
f2f507c5c7 Suburb auto-complete functionality for the new landing page. 2013-08-12 17:34:56 +10:00
David Cook
c915bb91cf More tests for distributor enterprise user roles 2013-08-12 14:44:26 +10:00
Rohan Mitchell
14268b7be0 Create adjustment metadata when creating adjustment 2013-08-12 10:00:35 +10:00
Rohan Mitchell
149d48ff5a Add AdjustmentMetadata, for holding info about enterprise fee adjustments at time of creation 2013-08-12 10:00:35 +10:00
Rohan Mitchell
b065d7db36 When updating product distribution charge, skip line items that don't have a product distribution 2013-08-09 15:30:35 +10:00
Rohan Mitchell
b4a7ccf1b4 Adjustments on LineItems don't modify the order total. Make adjustments on Order instead. 2013-08-09 15:28:48 +10:00
Rohan Mitchell
513993324d Clean up old adjustments when changing distributor 2013-08-09 15:27:52 +10:00
Rohan Mitchell
fd989e3a77 Create adjustments so computation is performed against line item. Simplify specs now that weight calculator is compatible with line items. 2013-08-09 15:27:52 +10:00
Rohan Mitchell
239dd29511 Weight calculator will calculate against a single line item as well as an order 2013-08-09 15:27:52 +10:00
Rohan Mitchell
a338c974f8 Create line item adjustments for product distributions 2013-08-09 15:27:52 +10:00
Rohan Mitchell
8c9a3c8a91 Add Product#product_distribution_for 2013-08-09 15:26:57 +10:00
alexs
4ff8e825e9 Merge branch 'master' of github.com:eaterprises/openfoodweb 2013-08-09 13:21:24 +10:00
alexs
39623d45d6 Tests for building full addresses. 2013-08-09 13:19:07 +10:00
alexs
7c96c17c88 Tests for geo search. 2013-08-09 13:15:36 +10:00
Andrew Spinks
7fe1aab903 Simplest version of a cart that supports multiple orders. 2013-08-08 18:31:56 +10:00
David Cook
c247c2d3ea WIP: Allow distributor enterprise user to access their orders 2013-08-07 09:19:28 +10:00
alexs
3f82147024 Merge branch 'master' of github.com:eaterprises/openfoodweb
Conflicts:
	db/schema.rb
2013-08-06 18:32:53 +10:00
alexs
82ea8adfe3 Added list of geocoded suburbs. 2013-08-06 18:31:08 +10:00
Rohan Mitchell
ec3e00c128 Refactor LineItem and clients for new fields 2013-08-06 13:47:17 +10:00
alexs
57e185af78 Merge branch 'landing_page' 2013-08-06 12:35:06 +10:00
David Cook
27c17d6b07 Test that enterprise user can't access other enterprises' products 2013-08-06 11:22:44 +10:00
David Cook
0a7c5d4992 Add cancan ability tests on enterprise user roles 2013-08-06 11:12:37 +10:00
alexs
24d559cd3a Merge branch 'master' into landing_page
Conflicts:
	db/schema.rb
	db/seeds.rb
2013-08-05 17:08:39 +10:00
alexs
38b0a581e0 New landing page - initial layout and functionality 2013-08-05 17:04:56 +10:00
Andrew Spinks
e75021d7bd Fix loading of products for an enterprise in the admin section. NOTE: this is a major hack - had to copy the current fetch data from the spree product_controller and modify it to get the roles to take affect. There must be a better way. 2013-08-02 18:13:42 +10:00
Andrew Spinks
9d32a5775a Enterprise user admin: only allow suppliers and distributors that we manage to be selected when creating and editing products. 2013-08-02 16:08:10 +10:00
Andrew Spinks
5bccd38b5e Fix tests - don't have feature toggle overrides on when running tests! 2013-08-01 15:37:42 +10:00
Rohan Mitchell
122b9b5617 Make order cycle coordinator fees many-to-many 2013-07-30 11:34:10 +10:00
Rohan Mitchell
7640eb497a Merge branch 'supplied-active-products-on-hand'
Conflicts:
	app/controllers/application_controller.rb
	app/models/enterprise.rb
	app/views/spree/products/_source_sidebar.html.haml
	spec/features/consumer/distributors_spec.rb
	spec/models/enterprises_spec.rb
2013-07-29 11:05:42 +10:00
Andrew Spinks
8e560a59c9 Fix selection of itemwise shipping method that broke after the spree upgrade. 2013-07-23 15:46:07 +10:00
Andrew Spinks
7cb054f430 Merge branch 'master' into order-cycle-selection
Conflicts:
	Gemfile
	Gemfile.lock
	app/controllers/spree/orders_controller_decorator.rb
	app/models/enterprise.rb
	app/models/spree/order_decorator.rb
	app/views/spree/checkout/_other_available_distributors.html.erb
	app/views/spree/products/_add_to_cart.html.haml
	lib/open_food_web/distributor_change_validator.rb
	spec/spec_helper.rb
2013-07-23 14:42:57 +10:00
Rohan Mitchell
fe61cddda6 Merge branch 'local-organics'
Conflicts:
	Gemfile
	Gemfile.lock
	app/assets/stylesheets/store/variables.css.scss
	app/overrides/add_feedback_script.rb
	app/views/spree/shared/_order_details_steps_data.html.erb
	db/schema.rb
	script/rails
	spec/spec_helper.rb
2013-07-23 11:40:03 +10:00
Rohan Mitchell
37a4ad3372 Don't 500 when setting cart order cycle to nil 2013-06-21 17:04:47 +10:00
David Cook
0525abb084 Test that scopes don't return deleted products 2013-06-21 15:53:12 +10:00