| Summary: | Cash register should not record writeoff as cash received | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Esther Melander <esther.melander> |
| Component: | Fines and fees | Assignee: | Bugs List <koha-bugs> |
| Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
| Severity: | normal | ||
| Priority: | P5 - low | CC: | martin.renvoize, nick |
| Version: | 20.05 | ||
| Hardware: | All | ||
| OS: | All | ||
| See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24786 | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Crowdfunding goal: | 0 |
| Patch complexity: | --- | Documentation contact: | |
| Documentation submission: | Text to go in the release notes: | ||
| Version(s) released in: | Circulation function: | ||
| Attachments: | Write off error | ||
|
Description
Esther Melander
2021-03-31 21:06:40 UTC
Created attachment 119061 [details]
Write off error
Looking closer at my write off example, the total added to the drawer does not make sense. I've attached a screen shot.
The lost item was automatically credited ($10.00) to the patron because the item was returned. The two remaining fines were written off and totaled $0.85. So where did the $0.55 come from?
Fixed in master by 24786
Before that bug, we had:
80 my $cash_register_id;
81 if ( C4::Context->preference('UseCashRegisters') ) {
82 $cash_register_id = $input->param('cash_register');
...
93 if ( !$cash_register_id ) {
94 my $default_register = Koha::Cash::Registers->find(
95 { branch => $library_id, branch_default => 1 } );
96 $cash_register_id = $default_register->id if $default_register;
97 }
98 $cash_register_id = $registers->next->id if !$cash_register_id;
Which would set the cash register even for a write-off
After that patch we get the value from the template - and don't set it for WRITEOFF
(In reply to Nick Clemens from comment #2) > Fixed in master by 24786 > > Before that bug, we had: > 80 my $cash_register_id; > 81 if ( C4::Context->preference('UseCashRegisters') ) { > 82 $cash_register_id = $input->param('cash_register'); > ... > 93 if ( !$cash_register_id ) { > 94 my $default_register = Koha::Cash::Registers->find( > 95 { branch => $library_id, branch_default => 1 } ); > 96 $cash_register_id = $default_register->id if > $default_register; > 97 } > 98 $cash_register_id = $registers->next->id if !$cash_register_id; > > > Which would set the cash register even for a write-off > > After that patch we get the value from the template - and don't set it for > WRITEOFF Bug 24786 is in 20.11, so it should be ok in all maintained versions. |