if this prefence is switched on: the document returned in another library than homebranch, the system automaticly transfer the document to his homebranch (with notification for librarian in returns.tmpl) .
switch off : the document stay in the holdingbranch ...
correcting bugs :
- comment C4::acquisition (not using in request.pl).
- correcting date in request.pl
-add the new call of function getbranches in request.pl
- the system check if we don't have another reserv for the document returned, we return the document to his homebranch, ......
- improvement of returns, adapt item reservation , loan rules, and transfer rules ....
* synch with rel_2_2. Probably the last non manual synch, as rel_2_2 should not be modified deeply.
* code cleaning (cleaning warnings from perl -w) continued
This 1st commit reorders deeply the circulation module.
The goal is to :
* have something 100% templated/translatable.
* have something easy to read & modify, to say to customers/users : you can define your circulation rules as you want if you accept to look in C4/Circ/Circ2.pm
The circulation now works :
1=> ask for the borrower barcode (as previously)
2=> ask for the item barcode.
3=> check "canbookbeissued". This new sub returns 2 arrays :
- IMPOSSIBLE : if something is here, then the issue is not possible and is not done.
- TOBECONFIRMED : if something is here, then the issue can be donc if the user confirms it.
4=> if TOBECONFIRMED is set : ask for confirmation, loop. if neither are set or confirmation flag is set (2nd pass of the loop), then issue.
The IMPOSSIBLE & TOBECONFIRMED hashs contains :
* the reason of the line. always in capitals, with words separated by _ : BARCODE_UNKNOWN, DEBTS ... as key of the hash
* more information, as value of the hash ( TOBECONFIRMED{ALREADY_ISSUED} = "previous_borrower_name", for example)
This commit :
* compiles
* works on certain situations, not on other
* does NOT issue (the line is # )
* does not check issuing rules depending of # of books allowed / already issued
The next step is :
- check issuing rule.
- extend issuing rule to have a 3D array : for each branch / itemtype / borrowertype = issuing number and issuing length.
The file does not use 4-character tabs, nor 8-character tabs, it uses both
(!); updated comments.
Catch more $code's; is this (and the change to Circ2.pm) what was intended?
1. Circ2::returnbook will throw an exception if $branch is undef
2. branch/printer-getting code is modularized into getbranch and getprinter
with correct logic from circulation.pl (temporarily put into Circ2.pm)
3. circulation.pl and returns.pl modified to use above functions
Noted correct tab sizes for the files; returns.pl partially reformatted to
conform to the dominant correct tab size
Handle non-latin1 charsets for returns.pl
added returns.pl -> deals with the returns only
moved old circulation.pl to circulationold.pl which still deals with issues.
fixed up branchtransfers.pl
moved circulation2.pl to circulation.pl
Note more changes coming next week