Bug 17279

Summary: Edifact::Line quantity should ensure its returning invoiced quantity
Product: Koha Reporter: Colin Campbell <colin.campbell>
Component: AcquisitionsAssignee: Colin Campbell <colin.campbell>
Status: RESOLVED DUPLICATE QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low    
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Proposed Patch

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 ***