Doc_MatchInv doesn't work correctly with negatives

Description

Test case:

Purchase Order: -1 Azalea

  • No Posting
    Material Receipt: -1 Azalea

  • 14120 DB -15

  • 21190 CR -15
    Invoice Vendor: -1 Azalea

  • 51400 DB -15

  • 21100 CR -15

Now, the MatchInv is intended to close the transit accounts, but:
MatchInv: -1 Azalea

  • 21190 DB +15 *

    (this must be negative!)

    *

  • 51400 CR +15 *

    (this must be negative!)

    *

Environment

None

Attachments

1

Activity

Show:

Carlos Ruiz January 18, 2019 at 3:24 PM

In most cases it is a bad practice to use BigDecimal.abs() for quantities or money amounts - unless the case clearly requires it.

Noticed the class Doc_MatchInv has 4 calls to BigDecimal.abs() and one sign manually negated.

I tested the attached patch

for some cases and it seems to work, but didn't conduct full tests yet.

Regards,

Carlos Ruiz

Fixed

Details

Assignee

Reporter

Labels

Priority

Created January 18, 2019 at 3:20 PM
Updated March 1, 2019 at 11:44 AM
Resolved January 24, 2019 at 5:31 PM