Bug 12741

Summary: Can not create customized slips for branch
Product: Koha Reporter: Marc Véron <veron>
Component: ToolsAssignee: Galen Charlton <gmcharlt>
Status: CLOSED WORKSFORME QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low    
Version: Main   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7997
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11931
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Marc Véron 2014-08-09 14:18:15 UTC
To reproduce:

- Go to Tools › Notices & Slips
- Locate code ISSUEQSLIP in list, select "Copy to Union" (or other branch) and click "Copy"
- Make some modifications and try to submit. This is not possible without changing the code e.g. to UN-ISSUEQSLIP. But with a changed code, the cusomization will not be visible for this branch when printing a quick slip.

Workaround: Using MySQL, change the code back to ISSUQSLIP in table 'letter'. Now the customized slip prints as expected for it's branch.

Solution: The form should not test for duplicate code, but for duplicate code+branch and allow to submit for same code and different branch.

Related to 7997, 11931 ?
Comment 1 Marc Véron 2015-09-10 14:06:31 UTC
The problem moved: I can now create a customized slip, but it does not print as expected.

To reproduce:

Home > Tools > Notices & Slips

I marked the Quick slip ISSUEQSLIP for all libraries with a text "ALL LIBRARIES"

Then I created a copy for the branch FFL and marked the copy with "FFL"
I double checked by filtering Notices and slips by FFL, the text was saved as expected.

Then I checked out to a patron with an other home library (not FFL)
Result: Slip prints as expected marked with ALL LIBRARIES"

The I checked out to a patron with FFL as home library
Result: It still prints the slip for ALL LIBRARIES (wrong)
Expected: Print the slip marked with "FFL"

Table 'letter' has two entries for the code ISSUEQSLIP:
One with branchcode ''
One with branchcode 'FFL'

It seems that the branchcoude is not taken in account for printing.
Comment 2 Marc Véron 2015-09-10 15:00:50 UTC
OK, found, my mistake:

The branchcode is taken from the staff member's home branch (not the patron's home branch). That makes sense.
 
If I create a slip for the staff member's branch it works fine.