check_db_has_purchasable_items(_("There are no purchasable inventory items defined in the system."));
check_db_has_suppliers(_("There are no suppliers defined in the system."));
+//----------------------------------------------------------------------------------------
+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'],
+ array( 'supplier_id', 'stock_id','_stock_id_edit', 'price',
+ 'suppliers_uom', 'supplier_description','conversion_factor'));
+}
simple_page_mode(true);
//--------------------------------------------------------------------------------------------------
$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'] );
+}
+
//--------------------------------------------------------------------------------
function display_allocatable_transactions()
check_db_has_tax_groups(_("There are no tax groups defined in the system. At least one tax group is required before proceeding."));
+if (isset($_GET['supplier_id']))
+{
+ $_POST['supplier_id'] = $_GET['supplier_id'];
+}
$new_supplier = get_post('supplier_id') == '';
if (isset($_POST['submit']))
$Ajax->activate('_page_body');
} //end if Delete supplier
}
+elseif (isset($_POST['select']))
+{
+ context_return(array('supplier_id' => $_POST['supplier_id']));
+}
start_form();
{
submit_center_first('submit', _("Update Supplier"),
_('Update supplier data'), true);
+ submit_return('select', _("Return"), _("Select this supplier and return to document entry."), true);
submit_center_last('delete', _("Delete Supplier"),
_('Delete supplier data if have been never used'), true);
}
check_db_has_suppliers(_("There are no suppliers defined in the system."));
+//---------------------------------------------------------------------------------------------------------------
+if ($ret = context_restore()) {
+ // return from supplier editor
+ copy_from_trans($_SESSION['supp_trans']);
+ if(isset($ret['supplier_id']))
+ $_POST['supplier_id'] = $ret['supplier_id'];
+}
+if (isset($_POST['_supplier_id_editor'])) {
+ copy_to_trans($_SESSION['supp_trans']);
+ context_call($path_to_root.'/purchasing/manage/suppliers.php?supplier_id='.$_POST['supplier_id'], 'supp_trans');
+}
+
//---------------------------------------------------------------------------------------------------------------
if (isset($_GET['AddedID']))
check_db_has_suppliers(_("There are no suppliers defined in the system."));
+//---------------------------------------------------------------------------------------------------------------
+if ($ret = context_restore()) {
+ // return from supplier editor
+ copy_from_trans($_SESSION['supp_trans']);
+ if(isset($ret['supplier_id']))
+ $_POST['supplier_id'] = $ret['supplier_id'];
+}
+if (isset($_POST['_supplier_id_editor'])) {
+ copy_to_trans($_SESSION['supp_trans']);
+ context_call($path_to_root.'/purchasing/manage/suppliers.php?supplier_id='.$_POST['supplier_id'], 'supp_trans');
+}
+
//---------------------------------------------------------------------------------------------------------------
if (isset($_GET['AddedID']))
check_db_has_bank_trans_types(_("There are no bank payment types defined in the system."));
+//----------------------------------------------------------------------------------------
+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'],
+ array( 'supplier_id', 'bank_account', 'DatePaid',
+ 'PaymentType', 'ref', 'amount', 'discount', 'memo_') );
+}
//----------------------------------------------------------------------------------------
if (isset($_GET['AddedID']))