Bug 11010

Summary: Useless column purchaseordernumber in aqorders table
Product: Koha Reporter: Mathieu Saby <mathsabypro>
Component: DatabaseAssignee: Galen Charlton <gmcharlt>
Status: CLOSED INVALID QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: colin.campbell, jonathan.druart, m.de.rooy
Version: master   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36002
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:

Description Mathieu Saby 2013-10-07 15:43:08 UTC
In Schemaspy, column purchaseordernumber is reported as "not used? always NULL".
"grep -r cancelledby *" give this result : 

C4/Acquisition.pm:The following keys are used: "biblionumber", "title", "basketno", "quantity", "notes", "rrp", "ecost", "gstrate", "unitprice", "subscription", "sort1", "sort2", "booksellerinvoicenumber", "listprice", "budgetdate", "purchaseordernumber", "branchcode", "booksellerinvoicenumber", "budget_id".
C4/Acquisition.pm:                datereceived,purchaseordernumber,
installer/data/mysql/update22to30.pl:                field   => 'purchaseordernumber',
installer/data/mysql/kohastructure.sql:  `purchaseordernumber` mediumtext, -- not used? always NULL
installer/data/Pg/kohastructure.sql:purchaseordernumber text,
t/db_dependent/Acquisition.t:                         purchaseordernumber


In C4::Acquisition.pm::GetParcels, the SELECT statement retreives purchaseordernumber, but no value is pushed to that column in any part of Koha's code. So I think it is useless.

I propose the deletion of this column.

M. Saby
Comment 1 Colin Campbell 2013-10-07 16:26:16 UTC
There is a patch on bug 4456 to utilize this field. see also bug 4960
Comment 2 Mathieu Saby 2013-10-07 17:20:59 UTC
Thank you.
4456 is very old, and there is nothing attached to 4456.
Do you think these enh could be "revived" ?
What's the difference between the ordernumber and the purchaseordernumber?

M. Saby
Comment 3 Mathieu Saby 2013-10-07 17:21:43 UTC
oups, the patch attached to 4456 is not very old, sorry for that.

M. Saby
Comment 4 Jonathan Druart 2014-07-18 10:32:12 UTC
Since bug 4456 will use this field, this bug report is invalid.
Comment 5 Marcel de Rooy 2024-02-06 13:28:12 UTC
(In reply to Jonathan Druart from comment #4)
> Since bug 4456 will use this field, this bug report is invalid.

Bug 4456 died prematurely. I opened 36002 to resurrect removal of this confusing column.