-
-
Notifications
You must be signed in to change notification settings - Fork 102
Open

Description
Prior to this change, Money::of('1', 'USD')->allocateWithRemainder(400, 0, 40, 20, 2)
returned 86, 0, 8, 4, 0, 2
(as cents wrapped in Money instances of course), and I distributed the 2 cents remainder by adding one to the 86 figure, one to the 8 figure.
After the change, Money::of('1', 'USD')->allocateWithRemainder(400, 0, 40, 20, 2)
returns 0, 0, 0, 0, 0, 100
.
I understand the reason behind this, however allocateWithRemainder()
is no longer helpful in cases like the above, as it does no allocation at all.
Is there anything within the library that can help me with that? Or should I resort to allocating the 100 cents myself (probably by weight)?
Thanks!
Metadata
Metadata
Assignees
Labels
No labels