Maikel Linke
1ea2f37c18
Support international decimals in weight calculator
...
A previous pull request added support for flexible decimal characters
when editing money amounts.
https://github.com/openfoodfoundation/openfoodnetwork/pull/1831
This pull request applies the same principle to the weight calculator
which was missed in the previous pull request.
2019-03-21 12:49:19 +11:00
luisramos0
38ff99717a
Fix bug on calculator_decorator line_items_for where input is line_item with an nil order. Adapted line_items_for so that weight_calculator.line_items_for could be removed.
2018-12-09 19:37:11 +00:00
luisramos0
9490da329a
Move Calculator::Weight from models/open_food_network/calculator to models/calculator
2018-11-07 09:54:30 +00:00
luisramos0
bf55f50a7e
Fix rubocop warnings on weight and weight_spec
2018-11-07 09:54:30 +00:00
luisramos0
275a192270
Convert specs to RSpec 3.7.1 syntax with Transpec
...
This conversion is done by Transpec 3.3.0 with the following command:
transpec spec/models/calculator/weight_spec.rb
* 3 conversions
from: == expected
to: eq(expected)
* 3 conversions
from: obj.should
to: expect(obj).to
For more details: https://github.com/yujinakayama/transpec#supported-conversions
2018-11-07 09:54:30 +00:00
luisramos0
1ef04354fd
Add capacity to weight calculator to calculate based on any object with an order (needed in spree 2 to calculate based on package)
2018-11-07 09:54:30 +00:00
Pierre de Lacroix
f67a8c1f2d
Add tests
2017-12-01 13:37:24 +11:00
Rohan Mitchell
701c047a0a
Move our customisations of FlatPercentItemTotal calculator to a new calc: FlatPercentPerItem
2016-08-26 09:28:29 +10:00
Rohan Mitchell
57f7d489ff
Rename OpenFoodWeb namespace to OpenFoodNetwork
2013-10-18 17:29:55 +11:00
Rohan Mitchell
5f4313b588
Remove itemwise shipping calculator
2013-08-13 10:14:39 +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
ec3e00c128
Refactor LineItem and clients for new fields
2013-08-06 13:47:17 +10:00
Rohan Mitchell
9dd94eaf57
Weight shipping calculator treats variants without weight defined as zero weight
2012-08-08 15:29:47 +10:00
Rohan Mitchell
e6ee6b5164
Itemwise shipping calculator returns 0 instead of nil when there are no items
2012-08-03 08:44:53 +10:00
Rohan Mitchell
06c6422591
Fix by-weight calculator to take line item quantity into account
2012-07-23 18:49:03 +10:00
Rohan Mitchell
28d2292de0
Add by-weight shipping calculator
2012-06-29 12:46:33 +10:00
Rohan Mitchell
eae05ea59c
Add itemwise shipping cost calculator
2012-06-29 07:52:29 +10:00