Bug 17279 - Edifact::Line quantity should ensure its returning invoiced quantity
Summary: Edifact::Line quantity should ensure its returning invoiced quantity
Status: RESOLVED DUPLICATE of bug 18267
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Colin Campbell
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-08 13:02 UTC by Colin Campbell
Modified: 2020-11-12 16:34 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Proposed Patch (6.88 KB, patch)
2016-09-08 14:34 UTC, Colin Campbell
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Colin Campbell 2016-09-08 13:02:06 UTC
Edifact::Line 's quantity method is currently used in the context of receipting from an invoice, but the line object only looks at tag in populating the value. It should check the quantity qualifier to ensure that another type of quantity is not being incorrectly returned.

The method should be renamed to be more specific e.g. invoiced_quantity rather than quantity, in order to self document
Comment 1 Colin Campbell 2016-09-08 14:34:00 UTC
Created attachment 55344 [details] [review]
Proposed Patch

Tests added to Edifact.t and EdiInvoice.t to ensure correct values returned

Realised the need when only one copy of 6 got receipted at a site because invoice included multiple delivery instructions (each with a qty of 1)
Comment 2 Owen Leonard 2017-04-10 18:02:43 UTC
How should this be tested?
Comment 3 Colin Campbell 2017-04-12 09:53:54 UTC
(In reply to Owen Leonard from comment #2)
> How should this be tested?

The unit tests check that the two fields are now being returned separately as expected. Previously they were not distinguished.
Comment 4 Katrin Fischer 2020-01-11 15:22:03 UTC
Should this be FAILED QA?
Comment 5 Colin Campbell 2020-11-12 16:34:47 UTC
Distinction is maintained by code in patch 18267 which incorporates tests from this

*** This bug has been marked as a duplicate of bug 18267 ***