+
+ $sql = "SELECT trans_type_from, trans_no_from FROM ".TB_PREF."cust_allocations
+ WHERE trans_type_to=".ST_SALESINVOICE." AND trans_no_to=".db_escape($invoice);
+ $result = db_query($sql, "could not retrieve customer allocation");
+ $row = db_fetch($result);
+ if ($row !== false)
+ submenu_print(_("Print &Receipt"), $row['trans_type_from'], $row['trans_no_from']."-".$row['trans_type_from'], 'prtopt');