Topic: Error: no supplier trans found for given params
This commit has made the error on Payment to Supplier process
Function get_supp_trans() at line 407 of allocation_cart.inc will fire the error when allocation table has a purchase order
It's much more fun, when you can discuss your problems with others...
You are not logged in. Please login or register.
FrontAccounting forum → Report Bugs here → Error: no supplier trans found for given params
This commit has made the error on Payment to Supplier process
Function get_supp_trans() at line 407 of allocation_cart.inc will fire the error when allocation table has a purchase order
@notrinos, if you found solution for the bug. Update here. @joe will fix the bug.
Acctually I already made my own solution for the problem by replace line 406 of allocation_cart.inc with this code:
elseif ($_SESSION['alloc']->person_type == PT_SUPPLIER && $_SESSION['alloc']->allocs[$counter]->type != ST_PURCHORDER)
But it will damage the solution of @itronics
A better solution in my opinion is to add a function called get_po() to po_db.inc like this
function get_po($order_no) {
$sql = "SELECT * FROM ".TB_PREF."purch_orders WHERE order_no = ".db_escape($order_no);
$result = db_query($sql);
return db_fetch($result);
}
Then add a check for purchase orders in the allocation table by replace line 407 of allocation_cart.inc by this code:
if ($_SESSION['alloc']->allocs[$counter]->type == ST_PURCHORDER)
$trans = get_po($_SESSION['alloc']->allocs[$counter]->type_no);
else
$trans = get_supp_trans($_SESSION['alloc']->allocs[$counter]->type_no, $_SESSION['alloc']->allocs[$counter]->type);
Thanks @notrinos.
I will fix this later today.
Joe
FrontAccounting forum → Report Bugs here → Error: no supplier trans found for given params
Powered by PunBB, supported by Informer Technologies, Inc.
Currently installed 4 official extensions. Copyright © 2003–2009 PunBB.