Time |
S |
Nick |
Message |
02:11 |
|
btoumi |
hi all |
02:11 |
|
btoumi |
chris: are u around? |
02:12 |
|
chris |
yes |
02:12 |
|
btoumi |
hi chris how are u today? |
02:12 |
|
chris |
good thanks, and u? |
02:12 |
|
btoumi |
same |
02:13 |
|
btoumi |
do u have some time for me? |
02:13 |
|
chris |
yep |
02:14 |
|
btoumi |
i want to understand all the way from fines |
02:14 |
|
btoumi |
that why i have a lot of question ;=) |
02:15 |
|
chris |
:-) thats fine |
02:15 |
|
btoumi |
ok my first question is about ReplacementCost and replacementprice |
02:16 |
|
btoumi |
field |
02:16 |
|
chris |
right |
02:17 |
|
chris |
replacementprice is on items right? |
02:17 |
|
btoumi |
yes |
02:18 |
|
chris |
thats the value ive always used for the charging a borrower the cost to replace an item |
02:18 |
|
chris |
where is ReplacementCost? |
02:19 |
|
btoumi |
in fines.pm it's a function |
02:19 |
|
chris |
ah ha |
02:21 |
|
btoumi |
my problem that is i don't know where u insert data with Replacementprice value |
02:21 |
|
chris |
ahh thats in full acquisitions |
02:22 |
|
chris |
hmm i think if you linked it to a marc field ... you could add it in the marc editor too |
02:22 |
|
chris |
but im not sure what field it should be in MARC |
02:22 |
|
btoumi |
is it the cost of a book? |
02:22 |
|
chris |
yes |
02:23 |
|
btoumi |
ok i understand |
02:23 |
|
btoumi |
i take some note because i forget all that u say if i don't i'm to much old :=) |
02:24 |
|
chris |
hehe |
02:24 |
|
btoumi |
replacementprice=>cost of book |
02:25 |
|
chris |
yep, the cost it would take to replace it |
02:27 |
|
btoumi |
and this price is configured in aquisition module isn't it? |
02:27 |
|
chris |
yes |
02:27 |
|
btoumi |
ok |
02:27 |
|
Burgundavia |
sorry, to but in, but from a UI point of view, what is ReplacementCost then? |
02:27 |
|
chris |
but if you set up the link in koha2marc links, you could manage it with the marc editor too |
02:28 |
|
btoumi |
ok |
02:28 |
|
chris |
replacementcost is a function in the Fines perl module that fetches the replacementprice from the database |
02:28 |
|
btoumi |
not now because i work only in fine |
02:29 |
|
chris |
burgundavia: its an internal function |
02:29 |
|
Burgundavia |
chris: ah, ok |
02:29 |
|
Burgundavia |
chris: it is exposed to the user at all? |
02:29 |
|
chris |
nope |
02:30 |
|
btoumi |
another question for u chris what is $DEBUG is it a system variable? |
02:30 |
|
chris |
yes |
02:30 |
|
chris |
if the programmer has been good |
02:30 |
|
chris |
in the module, or script |
02:30 |
|
btoumi |
not for me lol |
02:30 |
|
chris |
they will have things like |
02:30 |
|
Burgundavia |
chris: ok, then |
02:31 |
|
chris |
if ($DEBUG) { warn "DEBUG: the query is $query"; } |
02:31 |
|
chris |
then at the top of the module |
02:31 |
|
chris |
if you go |
02:31 |
|
chris |
$DEBUG=1; |
02:31 |
|
chris |
you get debugging statements in your error log |
02:31 |
|
chris |
and $DEBUG=0; |
02:31 |
|
chris |
turns it off again |
02:32 |
|
chris |
saves having to go thru commenting warn's out ... etc |
02:32 |
|
chris |
does that make sense bruno? |
02:32 |
|
btoumi |
ok if i understand this variable use to debug code |
02:32 |
|
chris |
thats right |
02:33 |
|
chris |
it could even be |
02:33 |
|
btoumi |
but u use in this file because u use it in command line not across koha |
02:33 |
|
chris |
yep |
02:34 |
|
btoumi |
ok i understand |
02:34 |
|
chris |
you could use it across koha, and set the debug as an environment variable .. so you could switch it on or off in the apache config |
02:34 |
|
btoumi |
ok |
02:35 |
|
btoumi |
now i look for other question in code |
02:35 |
|
chris |
:) |
02:38 |
|
btoumi |
i think i create 2 function that they return |
02:39 |
|
btoumi |
for the first : how much special days between due date and date of day |
02:39 |
|
chris |
right |
02:39 |
|
btoumi |
the second return how much day close between due date and date of day |
02:39 |
|
chris |
right |
02:40 |
|
btoumi |
i do it in fines.pm |
02:40 |
|
chris |
sounds good to me |
02:40 |
|
btoumi |
ok |
02:40 |
|
btoumi |
another question ;=) |
02:41 |
|
chris |
you could make one that calls those 2 .. that gives you the number of open days between due date and date of day |
02:41 |
|
chris |
so you could go $days_to_charge = DaysOpen($datedue,$datenow); |
02:42 |
|
chris |
then $fine = $days_to_charge * $fine_amount; |
02:42 |
|
chris |
maybe |
02:42 |
|
btoumi |
yes i think so |
02:42 |
|
btoumi |
just one function to calculate |
02:42 |
|
btoumi |
is more optimized |
02:43 |
|
chris |
yeah, maybe 2 internal functions .. and one exported one for the fines-sanop.pl to use |
02:45 |
|
btoumi |
can u explain? |
02:46 |
|
chris |
have your 2 functions you said before just be internal ones, ie ones inside Fines.pm .. that dont get called by other scripts .. and have the other function DaysOpen ... that is exported, that uses the 2 internal ones ... that way ive we ever need to we could just export the other 2 as well |
02:46 |
|
chris |
its hard to explain |
02:47 |
|
btoumi |
its hard to understand ;=) |
02:48 |
|
chris |
:) i just meant write three subroutines in Fines.pm |
02:48 |
|
chris |
but only one, DaysOpen, is exported |
02:50 |
|
btoumi |
ok |
02:50 |
|
btoumi |
if i understand u have two function to calculate the special holydays and repeatable holydays |
02:51 |
|
chris |
yep |
02:51 |
|
btoumi |
and the third join data from the two function and export where it was called |
02:51 |
|
chris |
yes thats right |
02:51 |
|
btoumi |
yesssssssssssssss |
02:52 |
|
chris |
:) |
02:53 |
|
btoumi |
another question if u are ok? |
02:53 |
|
chris |
yep |
02:56 |
|
btoumi |
the itemlost=2 is insert on table when u date day -date due>28 |
02:56 |
|
chris |
thats right |
02:57 |
|
btoumi |
but where do u insert itemlost=1? |
02:57 |
|
chris |
ahh |
02:57 |
|
chris |
in the catalogue |
02:57 |
|
btoumi |
ok |
02:57 |
|
btoumi |
itemlost=2 => lost book by borrowers |
02:58 |
|
btoumi |
itemlost=1 =>? |
02:58 |
|
chris |
marked lost by librarian |
02:59 |
|
chris |
so maybe the borrower rings up, and says i lost the book |
02:59 |
|
chris |
the librarian can mark it lost |
02:59 |
|
chris |
before waiting the 28 days for koha to do it |
02:59 |
|
btoumi |
ok it understand |
03:00 |
|
btoumi |
u can change state of book in borrower interface? |
03:00 |
|
chris |
in the librarian catalogue interface |
03:00 |
|
btoumi |
ok |
03:00 |
|
chris |
ill just find the page |
03:02 |
|
chris |
http://koha.rangitikei.katipo.[…]pe=&submit=modify |
03:03 |
|
btoumi |
ok thanks |
03:03 |
|
btoumi |
i understand |
03:03 |
|
chris |
im not sure where you do it in the marc one tho, id have to ask paul |
03:05 |
|
btoumi |
but perahps there is a problem in fines2.pl in line 143 because u want to insert replacecost value in date field |
03:07 |
|
chris |
yes i think that fines2.pl is perhaps broken |
03:07 |
|
btoumi |
ok |
03:08 |
|
btoumi |
can u tell me all the possible value for accountype if u are ok |
03:08 |
|
chris |
you can really set up whatever you want there |
03:09 |
|
chris |
ill query one of the libraries database |
03:09 |
|
chris |
and see all the ones they are using |
03:10 |
|
btoumi |
ok thanks chris |
03:10 |
|
chris |
here what Rangitikei library uses |
03:10 |
|
chris |
Rent = Rental cost (they charge money to borrow DVD's) |
03:10 |
|
chris |
Pay = A payment |
03:11 |
|
chris |
W = write off (when the library decides to wipe off a charge) |
03:11 |
|
chris |
C = Credit |
03:12 |
|
chris |
F = Fine (overdue charge) |
03:12 |
|
chris |
L = Lost item |
03:12 |
|
chris |
Res = Charge for a reserve |
03:12 |
|
chris |
thats what they are using |
03:13 |
|
chris |
does that help? |
03:13 |
|
btoumi |
is it configured or only configured in code? |
03:13 |
|
btoumi |
yes |
03:13 |
|
chris |
only in code |
03:14 |
|
chris |
its not very good, maybe one day we will fix it so it is configured better |
03:14 |
|
btoumi |
right i think so |
03:14 |
|
btoumi |
ok i understand all the things |
03:15 |
|
btoumi |
big thank u for u chris |
03:15 |
|
btoumi |
i can begin to work |
03:15 |
|
chris |
excellent |
03:16 |
|
btoumi |
i think that fines2-sanop.pl can be use by another library who use the same functionnement |
03:17 |
|
chris |
cool |
03:17 |
|
btoumi |
perahps name fines2-sanop.pl will change in future if it use by another library |
03:17 |
|
chris |
yeah maybe we can think up a better name |
03:17 |
|
chris |
but i dont have a good idea :) |
03:17 |
|
btoumi |
and all library can switch between fines2.pl and fines2-sanop.pl |
03:18 |
|
chris |
yeah |
03:18 |
|
btoumi |
for the name i have no idea but perahps later ;=) |
04:03 |
|
btoumi |
chris: are u always around? |
04:04 |
|
chris |
not always .. but too much as my wife would tell me :) |
04:05 |
|
btoumi |
lol ;=) i don't want to have a problem with ur wife ;=) |
04:05 |
|
btoumi |
just for a point |
04:06 |
|
btoumi |
when u insert a line in accountline u use accounttype=>L (lost ) but for the functionnement of my library i think i must use F before 28 and L after |
04:08 |
|
chris |
that sounds fine |
04:08 |
|
btoumi |
ok ty and good night chris |
04:09 |
|
chris |
night |
07:23 |
|
btoumi |
Toins: are u around? |
07:24 |
|
ToinS |
yep |
07:25 |
|
btoumi |
est ce que tu sais lequel de ces deux module ne sera plus utilise sur koha |
07:26 |
|
btoumi |
date::manip ou date::calc |
07:26 |
|
ToinS |
ah non ca je ne sais pas |
07:26 |
|
ToinS |
désolé |
07:26 |
|
btoumi |
c pas grave |
07:26 |
|
btoumi |
je vais voir si kados est la |
07:27 |
|
btoumi |
kados: are u around? |
07:27 |
|
ToinS |
normalement les americains arrivent un peu plus tard |
07:27 |
|
btoumi |
voui avec le decalage horaire |
08:08 |
|
kados |
btoumi: still around? |
08:09 |
|
kados |
btoumi: date::manip is a very slow module |
08:09 |
|
btoumi |
yes i'm around |
08:09 |
|
kados |
btoumi: if you are working on circulation I would suggest not working with date::manip |
08:09 |
|
btoumi |
i work on fines |
08:09 |
|
kados |
btoumi: I don't know anything about date::calc |
08:09 |
|
kados |
ahh ... fines are calculated nightly then? or on return? or what? |
08:10 |
|
kados |
(can you use C4::Date ?) |
08:10 |
|
btoumi |
in fines2.pl to calculate all fines |
08:10 |
|
kados |
(if you use the existing API it will be easier to maintain) |
08:10 |
|
kados |
ok, fines2.pl runs nightly |
08:10 |
|
btoumi |
yes |
08:10 |
|
kados |
so speed is not that important |
08:11 |
|
kados |
but for maintainability I would look at C4/Date.pm |
08:11 |
|
kados |
I bet the subs in there would be useful to you |
08:11 |
|
btoumi |
but this file use date::manip module |
08:11 |
|
kados |
yep |
08:11 |
|
kados |
but ... we can easily replace it with something else |
08:11 |
|
kados |
but never change the API |
08:12 |
|
kados |
so everything will still work |
08:12 |
|
kados |
(does that make sense?) |
08:12 |
|
btoumi |
yes it's right but if we will decide that don't use date::manip peraphs i try to find some function in date::calc |
08:14 |
|
kados |
btoumi: do you mean you will work on Date.pm? |
08:14 |
|
kados |
btoumi: and move it from date::manip to date::calc? |
08:16 |
|
btoumi |
move function from date::manip to date::calc |
08:18 |
|
btoumi |
kados: it's solution for some function useful |
08:18 |
|
kados |
btoumi: if you have a new date function it should go in C4/Date.pm |
08:20 |
|
btoumi |
is it possible to take a function from a module (for example today() form date::calc) and copy to C4/date.pm? |
08:21 |
|
kados |
you don't need to copy it |
08:21 |
|
kados |
you can simply have, in Date.pm: |
08:21 |
|
kados |
use Date::Calc; |
08:21 |
|
kados |
sub today { |
08:21 |
|
btoumi |
ok sorry i'm very tired |
08:21 |
|
kados |
today(); |
08:21 |
|
kados |
} |
08:22 |
|
kados |
or |
08:22 |
|
kados |
return today(); |
08:22 |
|
kados |
} |
08:22 |
|
kados |
I think |
08:22 |
|
btoumi |
kados:ok sorry i'm very tired |
08:22 |
|
kados |
I slept in today :( |
08:22 |
|
btoumi |
i understand what what u explain |
08:22 |
|
kados |
can't keep eyes open :-) |
08:23 |
|
btoumi |
lol i understand but it's only 15 pm in france |
08:23 |
|
btoumi |
3pm |
08:26 |
|
btoumi |
kados: in use u can do like this => use Date::Calc qw/Today/; |
08:27 |
|
btoumi |
use only function i need |
08:29 |
|
kados |
gotcha |