Bug 11001 - The aqorders.branchcode field is missing in the DB
Summary: The aqorders.branchcode field is missing in the DB
Status: CLOSED INVALID
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-07 07:44 UTC by Jonathan Druart
Modified: 2014-12-07 20:02 UTC (History)
2 users (show)

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


Attachments
Bug 11001: aqorders.branchcode is missing (6.20 KB, patch)
2013-10-07 07:48 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 11001: aqorders.branchcode is missing (6.21 KB, patch)
2013-10-07 08:13 UTC, Jonathan Druart
Details | Diff | Splinter Review
aqorders.branchcode is missing (6.30 KB, patch)
2013-10-07 13:47 UTC, Paola Rossi
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2013-10-07 07:44:09 UTC

    
Comment 1 Jonathan Druart 2013-10-07 07:48:03 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2013-10-07 08:13:33 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2013-10-07 09:17:06 UTC
Hi Jonathan,

I am a bit worried about the consequences of this. I think we can not assume safely that a library only orders items for itself, but there are also use cases where items for other branches will be ordered. How will this appear in the interface? As ordering branch? Or do we assume that the order will go to this library as well?
Comment 4 Paola Rossi 2013-10-07 13:47:02 UTC
Created attachment 21850 [details] [review]
aqorders.branchcode is missing

I sign off the patch
Comment 5 Jonathan Druart 2013-10-07 13:51:19 UTC
(In reply to Katrin Fischer from comment #3)
> Hi Jonathan,
> 
> I am a bit worried about the consequences of this. I think we can not assume
> safely that a library only orders items for itself, but there are also use
> cases where items for other branches will be ordered. How will this appear
> in the interface? As ordering branch? Or do we assume that the order will go
> to this library as well?

Katrin, the idea behind this value is to know the library where the order will be sent.
Comment 6 Katrin Fischer 2013-10-07 13:53:51 UTC
Sorry, just trying to think how this will work :)
We have the option to set a different billing and delivery place in basket groups, so this would overwrite the aqorders branch then?
Comment 7 Jonathan Druart 2013-10-08 07:43:14 UTC
(In reply to Katrin Fischer from comment #6)
> Sorry, just trying to think how this will work :)
> We have the option to set a different billing and delivery place in basket
> groups, so this would overwrite the aqorders branch then?

After a discussion with Laurence, it appears this field is not fundamental and not obvious.
So we decide to drop it. I will provide a patch (in another report) for the filter by library in the invoices search.
Comment 8 Katrin Fischer 2013-10-08 08:20:06 UTC
Hm, I didn't want to discourage you :(. Just wanted to say that we have a lot of possibilities here where the branch can be a bit confusing and it should be clear what it does and what it does not.
Comment 9 Jonathan Druart 2013-10-08 08:23:33 UTC
(In reply to Katrin Fischer from comment #8)
No worries :)
With your question, we doubt on the usefulness of this field. It's a good thing :)
But now we have a search by library on the invoices search page (which does nothing), and I don't know how could we search invoices by library...
Comment 10 Mathieu Saby 2013-10-08 22:14:15 UTC
Hi

Rather than a unique field for searching invoice for library, why not 2 fields, one for billing library and one for delivery library, which will use either aqorders.deliveryplace and aqorders.billingplace (if the basket is NOT in a basketgroup), or aqbasketgroups.deliveryplace and aqbasketgroups.billingplace (if it is in a basketgroup) ?

M. Saby
Comment 11 Jonathan Druart 2013-10-09 07:13:13 UTC
(In reply to mathieu saby from comment #10)
> Hi
> 
> Rather than a unique field for searching invoice for library, why not 2
> fields, one for billing library and one for delivery library, which will use
> either aqorders.deliveryplace and aqorders.billingplace (if the basket is
> NOT in a basketgroup), or aqbasketgroups.deliveryplace and
> aqbasketgroups.billingplace (if it is in a basketgroup) ?

The main problem is an invoice can contain any orders from a vendor (so from any basket, basketgroup link to this vendor).
The billing and delivery places can differ.
Comment 12 Mathieu Saby 2013-10-09 07:31:03 UTC
(In reply to Jonathan Druart from comment #11)
> (In reply to mathieu saby from comment #10)
> > Hi
> > 
> > Rather than a unique field for searching invoice for library, why not 2
> > fields, one for billing library and one for delivery library, which will use
> > either aqorders.deliveryplace and aqorders.billingplace (if the basket is
> > NOT in a basketgroup), or aqbasketgroups.deliveryplace and
> > aqbasketgroups.billingplace (if it is in a basketgroup) ?
> 
> The main problem is an invoice can contain any orders from a vendor (so from
> any basket, basketgroup link to this vendor).
> The billing and delivery places can differ.


Oh, I did not think of that, because that's not our workflow...

(By the way, I am not sure that current "flexibility" is really needed, because in real word (for my library at least), I think invoices sent by a vendor always contains orders from a single basketgroup. But maybe it is usefull for other libraries.)

Mathieu
Comment 13 Katrin Fischer 2013-10-09 07:33:19 UTC
I think multiple basket groups is a possiblity, but I think they should all go to the shipping address, so that branch woudl be the same... unless someone makes a mistake.

Would it be an option to say the branch searched here is the branch where the invoice has been processed? (logged in branch of the staff member doing it?)
Comment 14 Mathieu Saby 2013-10-09 08:01:20 UTC
(In reply to Katrin Fischer from comment #13)
> I think multiple basket groups is a possiblity, but I think they should all
> go to the shipping address, so that branch woudl be the same... unless
> someone makes a mistake.
> 
> Would it be an option to say the branch searched here is the branch where
> the invoice has been processed? (logged in branch of the staff member doing
> it?)


Maybe create a new field in aqinvoice, which will be filled at receipt either with (basket or basketgroup) delivery address or the library of the staff member, depending on a syspref?
No sure it is needed to search on billing adress.

Mathieu