See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
***********************************************************************/
$page_security = 'SA_STANDARDCOST';
-if (!@$_GET['popup'])
- $path_to_root = "..";
-else
+
+if (@$_GET['page_level'] == 1)
$path_to_root = "../..";
+else
+ $path_to_root = "..";
include_once($path_to_root . "/includes/session.inc");
include_once($path_to_root . "/includes/date_functions.inc");
include_once($path_to_root . "/includes/banking.inc");
include_once($path_to_root . "/includes/data_checks.inc");
include_once($path_to_root . "/inventory/includes/inventory_db.inc");
+include_once($path_to_root . "/includes/ui/items_cart.inc");
$js = "";
if ($SysPrefs->use_popup_windows)
amount_row(_("Standard Material Cost Per Unit"), "material_cost", null, "class='tableheader2'", null, $dec1);
-if ($page_nested)
-{
- hidden('popup', @$_GET['popup']);
-}
if ($myrow["mb_flag"]=='M')
{
amount_row(_("Standard Labour Cost Per Unit"), "labour_cost", null, "class='tableheader2'", null, $dec2);
$sql = "SELECT pdata.*, supplier.supp_name
FROM ".TB_PREF."purch_data pdata
INNER JOIN ".TB_PREF."suppliers supplier ON pdata.supplier_id=supplier.supplier_id
- WHERE pata.supplier_id=".db_escape($selected_id)."
+ WHERE pdata.supplier_id=".db_escape($selected_id)."
AND pdata.stock_id=".db_escape($stock_id);
$result = db_query($sql, "The supplier purchasing details for the selected supplier and item could not be retrieved");
$js .= get_js_open_window(800, 500);
if (user_use_date_picker())
$js .= get_js_date_picker();
-page(_($help_context = "Inventory Item Movement"), @$_GET['popup'], false, "", $js);
+page(_($help_context = "Inventory Item Movement"), isset($_GET['stock_id']), false, "", $js);
//------------------------------------------------------------------------------------------------
check_db_has_stock_items(_("There are no items defined in the system."));
$_POST['stock_id'] = $_GET['stock_id'];
}
-if (!@$_GET['popup'])
- start_form();
+start_form();
if (!isset($_POST['stock_id']))
$_POST['stock_id'] = get_global_stock_item();
submit_cells('ShowMoves',_("Show Movements"),'',_('Refresh Inquiry'), 'default');
end_row();
end_table();
-if (!@$_GET['popup'])
- end_form();
+end_form();
set_global_stock_item($_POST['stock_id']);
$path_to_root = "../..";
include_once($path_to_root . "/includes/session.inc");
-page(_($help_context = "Inventory Item Status"), @$_GET['popup']);
+page(_($help_context = "Inventory Item Status"), isset($_GET['stock_id']));
if (isset($_GET['stock_id']))
$_POST['stock_id'] = $_GET['stock_id'];
if (user_use_date_picker())
$js .= get_js_date_picker();
-page(_($help_context = "Items"), @$_REQUEST['popup'], false, "", $js);
+page(_($help_context = "Items"), false, false, "", $js);
include_once($path_to_root . "/includes/date_functions.inc");
include_once($path_to_root . "/includes/ui.inc");
function item_settings(&$stock_id, $new_item)
{
- global $SysPrefs, $path_to_root;
+ global $SysPrefs, $path_to_root, $page_nested;
start_outer_table(TABLESTYLE2);
else
{
submit_center_first('addupdate', _("Update Item"), '',
- @$_REQUEST['popup'] ? true : 'default');
+ $page_nested ? true : 'default');
submit_return('select', get_post('stock_id'),
_("Select this items and return to document entry."), 'default');
submit('clone', _("Clone This Item"), true, '', true);
break;
case 'sales_pricing':
$_GET['stock_id'] = $stock_id;
- $_GET['popup'] = 1;
+ $_GET['page_level'] = 1;
include_once($path_to_root."/inventory/prices.php");
break;
case 'purchase_pricing':
$_GET['stock_id'] = $stock_id;
- $_GET['popup'] = 1;
+ $_GET['page_level'] = 1;
include_once($path_to_root."/inventory/purchasing_data.php");
break;
case 'standard_cost':
$_GET['stock_id'] = $stock_id;
- $_GET['popup'] = 1;
+ $_GET['page_level'] = 1;
include_once($path_to_root."/inventory/cost_update.php");
break;
case 'reorder_level':
{
break;
}
+ $_GET['page_level'] = 1;
$_GET['stock_id'] = $stock_id;
- $_GET['popup'] = 1;
include_once($path_to_root."/inventory/reorder_level.php");
break;
case 'movement':
$_GET['stock_id'] = $stock_id;
- $_GET['popup'] = 1;
include_once($path_to_root."/inventory/inquiry/stock_movements.php");
break;
case 'status':
$_GET['stock_id'] = $stock_id;
- $_GET['popup'] = 1;
include_once($path_to_root."/inventory/inquiry/stock_status.php");
break;
};
div_end();
-hidden('popup', @$_REQUEST['popup']);
end_form();
//------------------------------------------------------------------------------------
-end_page(@$_REQUEST['popup']);
+end_page();
See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
***********************************************************************/
$page_security = 'SA_SALESPRICE';
-if (!@$_GET['popup'])
- $path_to_root = "..";
-else
+
+if (@$_GET['page_level'] == 1)
$path_to_root = "../..";
+else
+ $path_to_root = "..";
include_once($path_to_root . "/includes/session.inc");
include_once($path_to_root . "/sales/includes/sales_db.inc");
}
hidden('selected_id', $selected_id);
-if ($page_nested)
-{
- hidden('popup', @$_GET['popup']);
-}
+
div_start('price_details');
start_table(TABLESTYLE2);
See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
***********************************************************************/
$page_security = 'SA_PURCHASEPRICING';
-if (!@$_GET['popup'])
- $path_to_root = "..";
-else
+
+if (@$_GET['page_level'] == 1)
$path_to_root = "../..";
+else
+ $path_to_root = "..";
include_once($path_to_root . "/includes/session.inc");
include_once($path_to_root . "/includes/date_functions.inc");
br();
hidden('selected_id', $selected_id);
-if ($page_nested)
-{
- hidden('popup', @$_GET['popup']);
-}
start_table(TABLESTYLE2);
See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
***********************************************************************/
$page_security = 'SA_REORDER';
-if (!@$_GET['popup'])
- $path_to_root = "..";
-else
+
+if (@$_GET['page_level'] == 1)
$path_to_root = "../..";
+else
+ $path_to_root = "..";
include_once($path_to_root . "/includes/session.inc");
include_once($path_to_root . "/includes/date_functions.inc");
$result = get_loc_details($_POST['stock_id']);
-if ($page_nested)
-{
- hidden('popup', @$_GET['popup']);
-}
-
while ($myrow = db_fetch($result))
{
//--------------------------------------------------------------------------------------------
function supplier_settings(&$supplier_id)
{
-
+ global $page_nested;
+
start_outer_table(TABLESTYLE2);
table_section(1);
if ($supplier_id)
{
submit_center_first('submit', _("Update Supplier"),
- _('Update supplier data'), @$_REQUEST['popup'] ? true : 'default');
+ _('Update supplier data'), $page_nested ? true : 'default');
submit_return('select', get_post('supplier_id'), _("Select this supplier and return to document entry."));
submit_center_last('delete', _("Delete Supplier"),
_('Delete supplier data if have been never used'), true);
start_row();
if (!$page_nested)
- customer_list_cells(_("Select a customer: "), 'customer_id', null, true, false, false, !@$_GET['popup']);
+ customer_list_cells(_("Select a customer: "), 'customer_id', null, true, false, false, true);
date_cells(_("From:"), 'TransAfterDate', '', null, -user_transaction_days());
date_cells(_("To:"), 'TransToDate', '', null);
if (user_use_date_picker())
$js .= get_js_date_picker();
-page(_($help_context = "Customers"), @$_REQUEST['popup'], false, "", $js);
+page(_($help_context = "Customers"), false, false, "", $js);
include_once($path_to_root . "/includes/date_functions.inc");
include_once($path_to_root . "/includes/banking.inc");
function customer_settings($selected_id)
{
- global $SysPrefs, $path_to_root;
+ global $SysPrefs, $path_to_root, $page_nested;
if (!$selected_id)
{
start_row();
echo '<td class="label">'._('Customer branches').':</td>';
hyperlink_params_td($path_to_root . "/sales/manage/customer_branches.php",
- '<b>'. (@$_REQUEST['popup'] ? _("Select or &Add") : _("&Add or Edit ")).'</b>',
- "debtor_no=".$selected_id.(@$_REQUEST['popup'] ? '&popup=1':''));
+ '<b>'. ($page_nested ? _("Select or &Add") : _("&Add or Edit ")).'</b>',
+ "debtor_no=".$selected_id.($page_nested ? '&popup=1':''));
end_row();
}
else
{
submit_center_first('submit', _("Update Customer"),
- _('Update customer data'), @$_REQUEST['popup'] ? true : 'default');
+ _('Update customer data'), $page_nested ? true : 'default');
submit_return('select', $selected_id, _("Select this customer and return to document entry."));
submit_center_last('delete', _("Delete Customer"),
_('Delete customer data if have been never used'), true);
br();
tabbed_content_end();
-hidden('popup', @$_REQUEST['popup']);
end_form();
-end_page(@$_REQUEST['popup']);
+end_page();