Lines 789-844
subtest 'get_lostreturn_policy() tests' => sub {
Link Here
|
789 |
); |
789 |
); |
790 |
|
790 |
|
791 |
# Make sure we have an unused branchcode |
791 |
# Make sure we have an unused branchcode |
792 |
my $branchcode4 = $builder->build( { source => 'Branch' } )->{branchcode}; |
792 |
my $branch_without_rule = $builder->build( { source => 'Branch' } )->{branchcode}; |
793 |
my $specific_lost_rule_dummy = $builder->build( |
|
|
794 |
{ |
795 |
source => 'CirculationRule', |
796 |
value => { |
797 |
branchcode => $branchcode4, |
798 |
categorycode => undef, |
799 |
itemtype => undef, |
800 |
rule_name => 'lostreturn', |
801 |
rule_value => 'refund' |
802 |
} |
803 |
} |
804 |
); |
805 |
my $specific_proc_rule_dummy = $builder->build( |
806 |
{ |
807 |
source => 'CirculationRule', |
808 |
value => { |
809 |
branchcode => $branchcode4, |
810 |
categorycode => undef, |
811 |
itemtype => undef, |
812 |
rule_name => 'processingreturn', |
813 |
rule_value => 'refund' |
814 |
} |
815 |
} |
816 |
); |
817 |
my $branch_without_rule = $specific_lost_rule_dummy->{ branchcode }; |
818 |
Koha::CirculationRules |
819 |
->search( |
820 |
{ |
821 |
branchcode => $branch_without_rule, |
822 |
categorycode => undef, |
823 |
itemtype => undef, |
824 |
rule_name => 'lostreturn', |
825 |
rule_value => 'refund' |
826 |
} |
827 |
) |
828 |
->next |
829 |
->delete; |
830 |
Koha::CirculationRules |
831 |
->search( |
832 |
{ |
833 |
branchcode => $branch_without_rule, |
834 |
categorycode => undef, |
835 |
itemtype => undef, |
836 |
rule_name => 'processingreturn', |
837 |
rule_value => 'refund' |
838 |
} |
839 |
) |
840 |
->next |
841 |
->delete; |
842 |
|
793 |
|
843 |
my $item = $builder->build_sample_item( |
794 |
my $item = $builder->build_sample_item( |
844 |
{ |
795 |
{ |
845 |
- |
|
|