X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=purchasing%2Fallocations%2Fsupplier_allocation_main.php;h=4796399d97770ef515a47560b6165b411abb9e6f;hb=f0f460043b9bcb6153c0f6f82d4a74433efe4ad8;hp=e58582f7dadb735f946723ea0724e09d680a299c;hpb=795cb201893b54ea61d93b74b20fa09df515c310;p=fa-stable.git diff --git a/purchasing/allocations/supplier_allocation_main.php b/purchasing/allocations/supplier_allocation_main.php index e58582f7..4796399d 100644 --- a/purchasing/allocations/supplier_allocation_main.php +++ b/purchasing/allocations/supplier_allocation_main.php @@ -1,16 +1,16 @@ . + See the License here . ***********************************************************************/ -$path_to_root="../.."; -$page_security = 3; +$page_security = 'SA_SUPPLIERALLOC'; +$path_to_root = "../.."; include($path_to_root . "/includes/db_pager.inc"); include_once($path_to_root . "/includes/session.inc"); @@ -25,15 +25,6 @@ if ($use_popup_windows) $js .= get_js_open_window(900, 500); page(_("Supplier Allocations"), false, false, "", $js); -//-------------------------------------------------------------------------------- -if ($ret = context_restore()) { - if(isset($ret['supplier_id'])) - $_POST['supplier_id'] = $ret['supplier_id']; -} -if (isset($_POST['_supplier_id_editor'])) { - context_call($path_to_root.'/purchasing/manage/suppliers.php?supplier_id='.$_POST['supplier_id'] ); -} - //-------------------------------------------------------------------------------- start_form(); @@ -56,7 +47,7 @@ start_form(); end_form(); set_global_supplier($_POST['supplier_id']); - if (isset($_POST['supplier_id']) && ($_POST['supplier_id'] == reserved_words::get_all())) + if (isset($_POST['supplier_id']) && ($_POST['supplier_id'] == ALL_TEXT)) { unset($_POST['supplier_id']); } @@ -71,7 +62,9 @@ start_form(); //-------------------------------------------------------------------------------- function systype_name($dummy, $type) { - return systypes::name($type); + global $systypes_array; + + return $systypes_array[$type]; } function trans_view($trans) @@ -93,7 +86,7 @@ function amount_left($row) function amount_total($row) { - return -$row["Total"]; + return price_format(-$row["Total"]); } function check_settled($row) @@ -108,10 +101,10 @@ $cols = array( _("Transaction Type") => array('fun'=>'systype_name'), _("#") => array('fun'=>'trans_view'), _("Reference"), - _("Date") => array('type'=>'date', 'ord'=>'asc'), + _("Date") => array('name'=>'tran_date', 'type'=>'date', 'ord'=>'asc'), _("Supplier") => array('ord'=>''), _("Currency") => array('align'=>'center'), - _("Total") => 'amount', + _("Total") => array('align'=>'right', 'fun'=>'amount_total'), _("Left to Allocate") => array('align'=>'right','insert'=>true, 'fun'=>'amount_left'), array('insert'=>true, 'fun'=>'alloc_link') ); @@ -124,10 +117,6 @@ if (isset($_POST['customer_id'])) { $table =& new_db_pager('alloc_tbl', $sql, $cols); $table->set_marker('check_settled', _("Marked items are settled."), 'settledbg', 'settledfg'); -if (get_post('_ShowSettled_update') || get_post('_supplier_id_update') ) { - $table->set_sql($sql); - $table->set_columns($cols); -} $table->width = "80%"; start_form();