X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=purchasing%2Fallocations%2Fsupplier_allocation_main.php;h=4796399d97770ef515a47560b6165b411abb9e6f;hb=498f13d19b716779a3b986ff399121fb2ac9a53a;hp=f13b7593e09e2cff40e7c57ae2c039fdf1cc21a7;hpb=a5242af68e65661edb7175412444dce536a7f311;p=fa-stable.git diff --git a/purchasing/allocations/supplier_allocation_main.php b/purchasing/allocations/supplier_allocation_main.php index f13b7593..4796399d 100644 --- a/purchasing/allocations/supplier_allocation_main.php +++ b/purchasing/allocations/supplier_allocation_main.php @@ -9,8 +9,8 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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) @@ -111,7 +104,7 @@ $cols = array( _("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();