View | Details | Raw Unified | Return to bug 7615
Collapse All | Expand All

(-)a/C4/Labels/Label.pm (-3 / +4 lines)
Lines 78-84 sub _get_label_item { Link Here
78
#        FIXME This makes for a very bulky data structure; data from tables w/duplicate col names also gets overwritten.
78
#        FIXME This makes for a very bulky data structure; data from tables w/duplicate col names also gets overwritten.
79
#        Something like this, perhaps, but this also causes problems because we need more fields sometimes.
79
#        Something like this, perhaps, but this also causes problems because we need more fields sometimes.
80
#        SELECT i.barcode, i.itemcallnumber, i.itype, bi.isbn, bi.issn, b.title, b.author
80
#        SELECT i.barcode, i.itemcallnumber, i.itype, bi.isbn, bi.issn, b.title, b.author
81
    my $sth = $dbh->prepare("SELECT bi.*, i.*, b.* FROM items AS i, biblioitems AS bi ,biblio AS b WHERE itemnumber=? AND i.biblioitemnumber=bi.biblioitemnumber AND bi.biblionumber=b.biblionumber;");
81
    my $sth = $dbh->prepare("SELECT bi.*, i.*, b.*,br.* FROM items AS i, biblioitems AS bi ,biblio AS b, branches AS br WHERE itemnumber=? AND i.biblioitemnumber=bi.biblioitemnumber AND bi.biblionumber=b.biblionumber AND i.homebranch=br.branchcode;");
82
    $sth->execute($item_number);
82
    $sth->execute($item_number);
83
    if ($sth->err) {
83
    if ($sth->err) {
84
        warn sprintf('Database returned the following error: %s', $sth->errstr);
84
        warn sprintf('Database returned the following error: %s', $sth->errstr);
Lines 185-191 sub _get_barcode_data { Link Here
185
        (
185
        (
186
            @{ $kohatables->{'biblio'} },
186
            @{ $kohatables->{'biblio'} },
187
            @{ $kohatables->{'biblioitems'} },
187
            @{ $kohatables->{'biblioitems'} },
188
            @{ $kohatables->{'items'} }
188
            @{ $kohatables->{'items'} },
189
            @{ $kohatables->{'branches'} }
189
        )
190
        )
190
    );
191
    );
191
    FIELD_LIST:
192
    FIELD_LIST:
Lines 249-255 sub _get_barcode_data { Link Here
249
sub _desc_koha_tables {
250
sub _desc_koha_tables {
250
	my $dbh = C4::Context->dbh();
251
	my $dbh = C4::Context->dbh();
251
	my $kohatables;
252
	my $kohatables;
252
	for my $table ( 'biblio','biblioitems','items' ) {
253
	for my $table ( 'biblio','biblioitems','items','branches' ) {
253
		my $sth = $dbh->column_info(undef,undef,$table,'%');
254
		my $sth = $dbh->column_info(undef,undef,$table,'%');
254
		while (my $info = $sth->fetchrow_hashref()){
255
		while (my $info = $sth->fetchrow_hashref()){
255
		        push @{$kohatables->{$table}} , $info->{'COLUMN_NAME'} ;
256
		        push @{$kohatables->{$table}} , $info->{'COLUMN_NAME'} ;
(-)a/labels/label-create-pdf.pl (-2 / +1 lines)
Lines 29-35 use C4::Labels 1.000000; Link Here
29
29
30
my $cgi = new CGI;
30
my $cgi = new CGI;
31
31
32
my ( $template, $loggedinuser, $cookie ) = get_template_and_user({
32
my ( undef, $loggedinuser, $cookie ) = get_template_and_user({
33
								     template_name   => "labels/label-home.tt",
33
								     template_name   => "labels/label-home.tt",
34
								     query           => $cgi,
34
								     query           => $cgi,
35
								     type            => "intranet",
35
								     type            => "intranet",
36
- 

Return to bug 7615