Skip to content

Fork Sync Branch 18.0 - #13

Merged
btl-bot merged 2 commits into
BTLzdravtech:18.0from
ingadhoc:18.0
Aug 13, 2026
Merged

btl-bot merged 2 commits into
BTLzdravtech:18.0from
ingadhoc:18.0

Conversation

@btl-bot

@btl-bot btl-bot commented Aug 13, 2026

Copy link
Copy Markdown

No description provided.

cem-adhoc and others added 2 commits August 6, 2026 14:23
…hing

The previous fix switched the purchase matching filter to qty_to_invoice
for both bills and credit notes. That works for credit notes but breaks
bills: on products controlled on received quantities, qty_to_invoice is
qty_received - qty_invoiced, so a confirmed purchase order with no
receipt yet gives 0 and every line was hidden from the matcher.

Use the criterion that fits each document type instead:

* in_invoice: product_qty > qty_invoiced, ie. ordered quantity not
  billed yet, received or not.
* in_refund: qty_to_invoice < 0, ie. the pending credit left by a
  return on a line that is already fully billed.

closes #353

Signed-off-by: Juan Carreras <jc@adhoc.com.ar>

@sireko sireko left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto approved

@btl-bot
btl-bot merged commit 0176904 into BTLzdravtech:18.0 Aug 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants