[Koha-devel] SQL reports [error]

Paul paul.a at aandc.org
Mon Apr 30 22:38:08 CEST 2012


At 01:41 PM 4/30/2012 -0400, Eric Bégin wrote:
>Paul,
>
>Have you consider having your report generating a list of barcodes and 
>using this list in the Batch Item modification tool to change the 
>accesiondate ?

Eric,

Merci d'avoir pris le temps de répondre...

Yes we did.  And found it somewhat cumbersome (four different 
operations)... then one of our staff used the Barcode list on a windows 
machine (CR+LF) and Koha failed to do anything, but, so I am told, did not 
give an error message so we ended up producing two Tax Receipts for the 
same donation (thank $deity someone noticed.)  I put my foot down at that 
point and wrote the script.

It is now up and running perfectly.  Single click, add the donor and dates 
required, open the report in OpenOffice and save the Tax Receipt as a .PDF 
-- our Treasurer loves it.  And my job is limited to a few seconds, once a 
year, updating our fiscal year end :-)

I apologize for creating a hornet's nest on this list (in fact my first 
email explicitly said that I would not even consider suggesting a "bug"); I 
was not intending to pretend that this type of approach would be 
universally acceptable, just make life easier for my staff by asking for a 
quick helping hand.

Amitiés - Paul


>Regards,
>
>Eric Bégin
>www.inLibro.com
>
>On 2012-04-30 09:13, Paul wrote:
>>Good morning all:
>>
>>I have no problem with the philosophy of the following (bright yellow) 
>>pop-up error message: "The following error was encountered: This report 
>>contains the SQL keyword UPDATE.
>>Use of this keyword is not allowed in Koha reports due to security and 
>>data integrity risks." and would not even consider suggesting a "bug."
>>
>>However, it would be most helpful to staff for a very specific but 
>>repetitive job that we do at year end (batch changing items.accessiondate 
>>after Tax Receipts have been issued for donations) to be able to use Koha 
>>from a work station, rather than getting me to work directly on the 
>>production server (I've already been asked 50 or 60 times, and there's 
>>another 400+ to go ...!)
>>
>>Can anyone point me rapidly to the portion of script that I should have a 
>>look at?
>>
>>For the record, the CLI mysql in question is:
>>
>>UPDATE items
>>SET dateaccessioned='2011-12-31'
>>WHERE price IS NOT NULL and price != '0.00'
>>AND booksellerid = 'xxx'
>>AND DATE(dateaccessioned) BETWEEN '2011-01-01' AND '2011-12-31';
>>
>>Obviously for a report, I would use a construct for the last two 
>>conditions along the lines of:
>>
>>AND booksellerid = <<Pick your donor>>
>>AND DATE(dateaccessioned) BETWEEN <<Accessioned BETWEEN (yyyy-mm-dd)>> 
>>AND <<and (yyyy-mm-dd)>>;
>>
>>Thanks and best regards,
>>Paul



More information about the Koha-devel mailing list