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