From c6cad25ff528b9b4e6a56cfa29c8a5fb23713a5d Mon Sep 17 00:00:00 2001 From: tetragon Date: Sun, 28 Oct 2007 19:13:38 +0000 Subject: Get purchase order retreival to work git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1824 4979c152-3d1c-0410-bac9-87ea11338e46 --- LedgerSMB/PriceMatrix.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'LedgerSMB/PriceMatrix.pm') diff --git a/LedgerSMB/PriceMatrix.pm b/LedgerSMB/PriceMatrix.pm index 87e04fd3..41226ee6 100644 --- a/LedgerSMB/PriceMatrix.pm +++ b/LedgerSMB/PriceMatrix.pm @@ -102,7 +102,7 @@ sub price_matrix_query { SELECT partnumber FROM partsvendor WHERE parts_id = ? - AND vendor_id = $entity_id|; + AND entity_id = $entity_id|; $sth = $dbh->prepare($query) || $form->dberror($query); } @@ -122,9 +122,9 @@ sub price_matrix { if ( $form->{customer_id} ) { $pmh->execute( $ref->{id}, $ref->{id}, $ref->{id}, $ref->{id} ); - while ( $mref = $pmh->fetchrow_hashref(NAME_lc) ) { + while ( $mref = $pmh->fetchrow_hashref('NAME_lc') ) { - $form->db_parse_numeric(sth=>$sth, hashref=>$mref); + $form->db_parse_numeric(sth=>$pmh, hashref=>$mref); # check date if ( $mref->{validfrom} ) { next @@ -195,8 +195,8 @@ sub price_matrix { if ( $form->{vendor_id} ) { $pmh->execute( $ref->{id} ); - $mref = $pmh->fetchrow_hashref(NAME_lc); - $form->db_parse_numeric(sth=>$sth, hashref=>$mref); + $mref = $pmh->fetchrow_hashref('NAME_lc'); + $form->db_parse_numeric(sth=>$pmh, hashref=>$mref); if ( $mref->{partnumber} ne "" ) { $ref->{partnumber} = $mref->{partnumber}; -- cgit v1.2.3