Lines 216-222
sub GetSerialInformation {
Link Here
|
216 |
my $dbh = C4::Context->dbh; |
216 |
my $dbh = C4::Context->dbh; |
217 |
my $query = qq| |
217 |
my $query = qq| |
218 |
SELECT serial.*, serial.notes as sernotes, serial.status as serstatus,subscription.*,subscription.subscriptionid as subsid |; |
218 |
SELECT serial.*, serial.notes as sernotes, serial.status as serstatus,subscription.*,subscription.subscriptionid as subsid |; |
219 |
if ( C4::Context->preference('IndependantBranches') |
219 |
if ( C4::Context->preference('IndependentBranches') |
220 |
&& C4::Context->userenv |
220 |
&& C4::Context->userenv |
221 |
&& C4::Context->userenv->{'flags'} != 1 |
221 |
&& C4::Context->userenv->{'flags'} != 1 |
222 |
&& C4::Context->userenv->{'branch'} ) { |
222 |
&& C4::Context->userenv->{'branch'} ) { |
Lines 321-327
sub GetSubscription {
Link Here
|
321 |
aqbooksellers.name AS aqbooksellername, |
321 |
aqbooksellers.name AS aqbooksellername, |
322 |
biblio.title AS bibliotitle, |
322 |
biblio.title AS bibliotitle, |
323 |
subscription.biblionumber as bibnum); |
323 |
subscription.biblionumber as bibnum); |
324 |
if ( C4::Context->preference('IndependantBranches') |
324 |
if ( C4::Context->preference('IndependentBranches') |
325 |
&& C4::Context->userenv |
325 |
&& C4::Context->userenv |
326 |
&& C4::Context->userenv->{'flags'} != 1 |
326 |
&& C4::Context->userenv->{'flags'} != 1 |
327 |
&& C4::Context->userenv->{'branch'} ) { |
327 |
&& C4::Context->userenv->{'branch'} ) { |
Lines 336-342
sub GetSubscription {
Link Here
|
336 |
WHERE subscription.subscriptionid = ? |
336 |
WHERE subscription.subscriptionid = ? |
337 |
); |
337 |
); |
338 |
|
338 |
|
339 |
# if (C4::Context->preference('IndependantBranches') && |
339 |
# if (C4::Context->preference('IndependentBranches') && |
340 |
# C4::Context->userenv && |
340 |
# C4::Context->userenv && |
341 |
# C4::Context->userenv->{'flags'} != 1){ |
341 |
# C4::Context->userenv->{'flags'} != 1){ |
342 |
# # $debug and warn "flags: ".C4::Context->userenv->{'flags'}; |
342 |
# # $debug and warn "flags: ".C4::Context->userenv->{'flags'}; |
Lines 370-376
sub GetFullSubscription {
Link Here
|
370 |
biblio.title as bibliotitle, |
370 |
biblio.title as bibliotitle, |
371 |
subscription.branchcode AS branchcode, |
371 |
subscription.branchcode AS branchcode, |
372 |
subscription.subscriptionid AS subscriptionid |; |
372 |
subscription.subscriptionid AS subscriptionid |; |
373 |
if ( C4::Context->preference('IndependantBranches') |
373 |
if ( C4::Context->preference('IndependentBranches') |
374 |
&& C4::Context->userenv |
374 |
&& C4::Context->userenv |
375 |
&& C4::Context->userenv->{'flags'} != 1 |
375 |
&& C4::Context->userenv->{'flags'} != 1 |
376 |
&& C4::Context->userenv->{'branch'} ) { |
376 |
&& C4::Context->userenv->{'branch'} ) { |
Lines 490-496
sub GetSubscriptionsFromBiblionumber {
Link Here
|
490 |
$subs->{ "numberpattern" . $subs->{numberpattern} } = 1; |
490 |
$subs->{ "numberpattern" . $subs->{numberpattern} } = 1; |
491 |
$subs->{ "status" . $subs->{'status'} } = 1; |
491 |
$subs->{ "status" . $subs->{'status'} } = 1; |
492 |
$subs->{'cannotedit'} = |
492 |
$subs->{'cannotedit'} = |
493 |
( C4::Context->preference('IndependantBranches') |
493 |
( C4::Context->preference('IndependentBranches') |
494 |
&& C4::Context->userenv |
494 |
&& C4::Context->userenv |
495 |
&& C4::Context->userenv->{flags} % 2 != 1 |
495 |
&& C4::Context->userenv->{flags} % 2 != 1 |
496 |
&& C4::Context->userenv->{branch} |
496 |
&& C4::Context->userenv->{branch} |
Lines 530-536
sub GetFullSubscriptionsFromBiblionumber {
Link Here
|
530 |
biblio.title as bibliotitle, |
530 |
biblio.title as bibliotitle, |
531 |
subscription.branchcode AS branchcode, |
531 |
subscription.branchcode AS branchcode, |
532 |
subscription.subscriptionid AS subscriptionid|; |
532 |
subscription.subscriptionid AS subscriptionid|; |
533 |
if ( C4::Context->preference('IndependantBranches') |
533 |
if ( C4::Context->preference('IndependentBranches') |
534 |
&& C4::Context->userenv |
534 |
&& C4::Context->userenv |
535 |
&& C4::Context->userenv->{'flags'} != 1 |
535 |
&& C4::Context->userenv->{'flags'} != 1 |
536 |
&& C4::Context->userenv->{'branch'} ) { |
536 |
&& C4::Context->userenv->{'branch'} ) { |
Lines 630-636
sub GetSubscriptions {
Link Here
|
630 |
|
630 |
|
631 |
while ( my $line = $sth->fetchrow_hashref ) { |
631 |
while ( my $line = $sth->fetchrow_hashref ) { |
632 |
$line->{'cannotedit'} = |
632 |
$line->{'cannotedit'} = |
633 |
( C4::Context->preference('IndependantBranches') |
633 |
( C4::Context->preference('IndependentBranches') |
634 |
&& C4::Context->userenv |
634 |
&& C4::Context->userenv |
635 |
&& C4::Context->userenv->{flags} % 2 != 1 |
635 |
&& C4::Context->userenv->{flags} % 2 != 1 |
636 |
&& C4::Context->userenv->{branch} |
636 |
&& C4::Context->userenv->{branch} |