Lines Matching +refs:match +refs:sign
89 posting._replace(units=-match.units, cost=match.cost)
90 for match in matches)
101 match = matches[0]
102 sign = -1 if posting.units.number < ZERO else 1
103 number = min(abs(match.units.number), abs(posting.units.number))
104 match_units = Amount(number * sign, match.units.currency)
105 booked_reductions.append(posting._replace(units=match_units, cost=match.cost))
106 booked_matches.append(match)
130 sign = -1 if posting.units.number < ZERO else 1
132 for match in sorted(matches, key=lambda p: p.cost and p.cost.date,
138 if match.units.number * sign > ZERO:
142 size = min(abs(match.units.number), remaining)
144 posting._replace(units=Amount(size * sign, match.units.currency),
145 cost=match.cost))
146 booked_matches.append(match)
195 match = matches[0]
196 sign = -1 if posting.units.number < ZERO else 1
197 number = min(abs(match.units.number), abs(posting.units.number))
198 match_units = Amount(number * sign, match.units.currency)
199 booked_reductions.append(posting._replace(units=match_units, cost=match.cost))
205 for match in matches:
206 merged_units.add_amount(match.units)
207 merged_cost.add_amount(convert.get_weight(match))
226 posting._replace(units=-match.units, cost=match.cost,
228 for match in matches)