my $samplecat = {
categorycode => 'CAT1',
description => 'Description1',
- enrolmentperiod => 'Null',
- enrolmentperioddate => 'Null',
- dateofbirthrequired => 'Null',
- finetype => 'Null',
- bulk => 'Null',
- enrolmentfee => 'Null',
- overduenoticerequired => 'Null',
- issuelimit => 'Null',
- reservefee => 'Null',
+ enrolmentperiod => undef,
+ enrolmentperioddate => undef,
+ dateofbirthrequired => undef,
+ finetype => undef,
+ bulk => undef,
+ enrolmentfee => undef,
+ overduenoticerequired => undef,
+ issuelimit => undef,
+ reservefee => undef,
hidelostitems => 0,
- category_type => 'Null'
+ category_type => 'A',
};
my $query =
"INSERT INTO categories (categorycode,description,enrolmentperiod,enrolmentperioddate,dateofbirthrequired ,finetype,bulk,enrolmentfee,overduenoticerequired,issuelimit ,reservefee ,hidelostitems ,category_type) VALUES( ?,?,?,?,?,?,?,?,?,?,?,?,?)";
#Test GetIssuingRule
my $sampleissuingrule1 = {
reservecharge => '0.000000',
- chargename => 'Null',
+ chargename => undef,
restrictedtype => 0,
accountsent => 0,
maxissueqty => 5,
hardduedate => '2013-01-01',
branchcode => $samplebranch1->{branchcode},
fine => '0.000000',
- hardduedatecompare => 5,
+ hardduedatecompare => 0,
overduefinescap => '0.000000',
renewalsallowed => 0,
firstremind => 0,
itemtype => 'BOOK',
maxissueqty => 2,
maxonsiteissueqty => 1,
- renewalsallowed => 'Null',
+ renewalsallowed => 0,
renewalperiod => 2,
norenewalbefore => 7,
auto_renew => 0,
- reservesallowed => 'Null',
+ reservesallowed => 0,
issuelength => 2,
lengthunit => 'days',
- hardduedate => 2,
- hardduedatecompare => 'Null',
- fine => 'Null',
- finedays => 'Null',
- firstremind => 'Null',
- chargeperiod => 'Null',
+ hardduedate => undef,
+ hardduedatecompare => 0,
+ fine => undef,
+ finedays => undef,
+ firstremind => undef,
+ chargeperiod => undef,
chargeperiod_charge_at => 0,
rentaldiscount => 2.00,
- overduefinescap => 'Null',
- accountsent => 'Null',
- reservecharge => 'Null',
- chargename => 'Null',
- restrictedtype => 'Null',
+ overduefinescap => undef,
+ accountsent => undef,
+ reservecharge => undef,
+ chargename => undef,
+ restrictedtype => undef,
maxsuspensiondays => 0,
onshelfholds => 1,
opacitemholds => 'Y',
itemtype => 'DVD',
maxissueqty => 3,
maxonsiteissueqty => 2,
- renewalsallowed => 'Null',
+ renewalsallowed => 0,
renewalperiod => 3,
norenewalbefore => 8,
auto_renew => 0,
- reservesallowed => 'Null',
+ reservesallowed => 0,
issuelength => 3,
lengthunit => 'days',
- hardduedate => 3,
- hardduedatecompare => 'Null',
- fine => 'Null',
- finedays => 'Null',
- firstremind => 'Null',
- chargeperiod => 'Null',
+ hardduedate => undef,
+ hardduedatecompare => 0,
+ fine => undef,
+ finedays => undef,
+ firstremind => undef,
+ chargeperiod => undef,
chargeperiod_charge_at => 0,
rentaldiscount => 3.00,
- overduefinescap => 'Null',
- accountsent => 'Null',
- reservecharge => 'Null',
- chargename => 'Null',
- restrictedtype => 'Null',
+ overduefinescap => undef,
+ accountsent => undef,
+ reservecharge => undef,
+ chargename => undef,
+ restrictedtype => undef,
maxsuspensiondays => 0,
onshelfholds => 1,
opacitemholds => 'F',