Commit c416047
committed
Fix Spree::Shipment#item_cost for split shipments
This commit is going to fix the bug reported here solidusio#2919.
Now when shipment is split, it creates two shipment but associated
line_item has quantity 2 which is resulting in incorrect item_cost
because it is taken from line_item not from shipment.
Shipment manifest know the right quantity for every shipment, use it to
calculate the item_cost as sum of
`(single_line item + weighted adjustment per line item) * quantity`1 parent 622aa25 commit c416047
File tree
2 files changed
+21
-1
lines changed- core
- app/models/spree
- spec/models/spree
2 files changed
+21
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
189 | | - | |
| 189 | + | |
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
144 | 164 | | |
145 | 165 | | |
146 | 166 | | |
| |||
0 commit comments