Lines 992-1001
C<$order> are fields from the biblio, biblioitems, aqorders tables of the Koha d
Link Here
|
992 |
sub GetOrder { |
992 |
sub GetOrder { |
993 |
my ($ordernumber) = @_; |
993 |
my ($ordernumber) = @_; |
994 |
my $dbh = C4::Context->dbh; |
994 |
my $dbh = C4::Context->dbh; |
995 |
my $query = qq{SELECT biblio.*,biblioitems.*, |
995 |
my $query = qq{SELECT |
996 |
aqorders.*, |
996 |
aqorders.*, |
997 |
aqbudgets.*, |
997 |
biblio.title, |
998 |
aqbasket.*, |
998 |
biblio.author, |
|
|
999 |
aqbasket.basketname, |
1000 |
borrowers.branchcode, |
1001 |
biblioitems.publicationyear, |
1002 |
biblio.copyrightdate, |
1003 |
biblioitems.editionstatement, |
1004 |
biblioitems.isbn, |
1005 |
biblioitems.ean, |
1006 |
biblio.seriestitle, |
1007 |
biblioitems.publishercode, |
999 |
aqorders.rrp AS unitpricesupplier, |
1008 |
aqorders.rrp AS unitpricesupplier, |
1000 |
aqorders.ecost AS unitpricelib, |
1009 |
aqorders.ecost AS unitpricelib, |
1001 |
aqorders.claims_count AS claims_count, |
1010 |
aqorders.claims_count AS claims_count, |
Lines 1006-1012
sub GetOrder {
Link Here
|
1006 |
biblioitems.publishercode AS publisher, |
1015 |
biblioitems.publishercode AS publisher, |
1007 |
ADDDATE(aqbasket.closedate, INTERVAL aqbooksellers.deliverytime DAY) AS estimateddeliverydate, |
1016 |
ADDDATE(aqbasket.closedate, INTERVAL aqbooksellers.deliverytime DAY) AS estimateddeliverydate, |
1008 |
DATE(aqbasket.closedate) AS orderdate, |
1017 |
DATE(aqbasket.closedate) AS orderdate, |
1009 |
aqorders.quantity - COALESCE(aqorders.quantityreceived,0) AS quantity, |
1018 |
aqorders.quantity - COALESCE(aqorders.quantityreceived,0) AS quantity_to_receive, |
1010 |
(aqorders.quantity - COALESCE(aqorders.quantityreceived,0)) * aqorders.rrp AS subtotal, |
1019 |
(aqorders.quantity - COALESCE(aqorders.quantityreceived,0)) * aqorders.rrp AS subtotal, |
1011 |
DATEDIFF(CURDATE( ),closedate) AS latesince |
1020 |
DATEDIFF(CURDATE( ),closedate) AS latesince |
1012 |
FROM aqorders LEFT JOIN biblio ON biblio.biblionumber = aqorders.biblionumber |
1021 |
FROM aqorders LEFT JOIN biblio ON biblio.biblionumber = aqorders.biblionumber |