$class='', $id='')
{
$viewer = "purchasing/view/";
- if ($type == systypes::po())
+ if ($type == ST_PURCHORDER)
$viewer .= "view_po.php";
elseif ($type == 20)
$viewer .= "view_supp_invoice.php";
$viewer .= "view_receipt.php";
elseif ($type == 13)
$viewer .= "view_dispatch.php";
- elseif ($type == 30)
+ elseif ($type == 30 || $type == 32)
$viewer .= "view_sales_order.php";
else
return null;
$lbl = $trans;
if($preview_str!='') $preview_str .= ',';
- $preview_str .= viewer_link($lbl, $viewer."?trans_no=$trans",
+ $preview_str .= viewer_link($lbl, $viewer."?trans_no=$trans&trans_type=$type",
$class, $id, $icon);
}
{
$viewer = "inventory/view/";
- if ($type == systypes::inventory_adjustment())
+ if ($type == ST_INVADJUST)
$viewer .= "view_adjustment.php";
- elseif ($type == systypes::location_transfer())
+ elseif ($type == ST_LOCTRANSFER)
$viewer .= "view_transfer.php";
else
return null;
$viewer .= "wo_issue_view.php";
elseif ($type == 29)
$viewer .= "wo_production_view.php";
- elseif ($type == systypes::work_order())
+ elseif ($type == ST_WORKORDER)
$viewer .= "work_order_view.php";
else
return null;
function display_allocations($alloc_result, $total)
{
- global $table_style;
+ global $table_style, $systypes_array;
if (!$alloc_result || db_num_rows($alloc_result) == 0)
return;
alt_table_row_color($k);
- label_cell(systypes::name($alloc_row['type']));
+ label_cell($systypes_array[$alloc_row['type']]);
label_cell(get_trans_view_str($alloc_row['type'],$alloc_row['trans_no']));
label_cell(sql2date($alloc_row['tran_date']));
$alloc_row['Total'] = round2($alloc_row['Total'], user_price_dec());
{
switch ($person_type)
{
- case payment_person_types::customer() :
+ case PT_CUSTOMER :
$alloc_result = get_allocatable_to_cust_transactions($person_id, $type_no, $type);
display_allocations($alloc_result, $total);
return;
- case payment_person_types::supplier() :
+ case PT_SUPPLIER :
$alloc_result = get_allocatable_to_supp_transactions($person_id, $type_no, $type);
display_allocations($alloc_result, $total);
return;
case "t": // post taxes calculated on base amount
case "t+": // ditto & increase base amount
case "t-": // ditto & reduce base amount
- if (substr($qe_line['action'],0,1) != 'T')
+ if (substr($row['action'],0,1) != 'T')
$totrate += get_tax_type_default_rate($row['dest_id']);
}
}