Bug 17122

Summary: Paying fines via Koha offline circulation reports false success for non-existing cardnumbers
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: CirculationAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: gmcharlt, kyle.m.hall
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Katrin Fischer 2016-08-14 21:13:24 UTC
If the cardnumber doesn't exist, applying the koc file will still report success.

- Upload .koc file, don't apply directly, but add to queue.
- Take a look at the queue - verify cardnumbers shows in red and is not linked (not found)
- Apply payment anyway - verify it reports "Success."


The logs show:

[Sun Aug 14 23:05:43.150296 2016] [cgi:error] [pid 18058] [client 127.0.0.1:43714] AH01215: [Sun Aug 14 23:05:43 2016] process.pl: DBD::mysql::st execute failed: Column 'borrowernumber' cannot be null [for Statement "INSERT INTO accountlines, referer: http://localhost:8080/cgi-bin/koha/offline_circ/list.pl
[Sun Aug 14 23:05:43.150512 2016] [cgi:error] [pid 18058] [client 127.0.0.1:43714] AH01215: [Sun Aug 14 23:05:43 2016] process.pl:   (borrowernumber, accountno,date,amount,description,accounttype,amountoutstanding,manager_id, note), referer: http://localhost:8080/cgi-bin/koha/offline_circ/list.pl
[Sun Aug 14 23:05:43.150848 2016] [cgi:error] [pid 18058] [client 127.0.0.1:43714] AH01215: [Sun Aug 14 23:05:43 2016] process.pl:   VALUES (?,?,now(),?,'',?,?,?,?)" with ParamValues: 0=undef, 1=1, 2=-1.05, 3='Pay', 4=-1.05, 5="1", 6=''] at /home/katrin/kohaclone/C4/Accounts.pm line 157., referer: http://localhost:8080/cgi-bin/koha/offline_circ/list.pl