projects
/
fa-stable.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9af5690
)
Fixed tabbed dialogs. Removed redundant 'popup' variables.
author
Joe Hunt
<joe.hunt.consulting@gmail.com>
Mon, 9 Nov 2015 11:04:08 +0000
(12:04 +0100)
committer
Joe Hunt
<joe.hunt.consulting@gmail.com>
Mon, 9 Nov 2015 11:04:08 +0000
(12:04 +0100)
inventory/cost_update.php
patch
|
blob
|
history
inventory/includes/db/items_purchases_db.inc
patch
|
blob
|
history
inventory/inquiry/stock_movements.php
patch
|
blob
|
history
inventory/inquiry/stock_status.php
patch
|
blob
|
history
inventory/manage/items.php
patch
|
blob
|
history
inventory/prices.php
patch
|
blob
|
history
inventory/purchasing_data.php
patch
|
blob
|
history
inventory/reorder_level.php
patch
|
blob
|
history
purchasing/manage/suppliers.php
patch
|
blob
|
history
sales/inquiry/customer_inquiry.php
patch
|
blob
|
history
sales/manage/customers.php
patch
|
blob
|
history
diff --git
a/inventory/cost_update.php
b/inventory/cost_update.php
index efd99593f8a2bf1e60b3befe8d9895e9942b2f4d..11ab6fc39c7ed9c8121c9d577ad243ab0a985b20 100644
(file)
--- a/
inventory/cost_update.php
+++ b/
inventory/cost_update.php
@@
-10,10
+10,11
@@
See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
***********************************************************************/
$page_security = 'SA_STANDARDCOST';
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 = "../..";
$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/session.inc");
include_once($path_to_root . "/includes/date_functions.inc");
@@
-21,6
+22,7
@@
include_once($path_to_root . "/includes/ui.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/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)
$js = "";
if ($SysPrefs->use_popup_windows)
@@
-112,10
+114,6
@@
$_POST['overhead_cost'] = price_decimal_format($myrow["overhead_cost"], $dec3);
amount_row(_("Standard Material Cost Per Unit"), "material_cost", null, "class='tableheader2'", null, $dec1);
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);
if ($myrow["mb_flag"]=='M')
{
amount_row(_("Standard Labour Cost Per Unit"), "labour_cost", null, "class='tableheader2'", null, $dec2);
diff --git
a/inventory/includes/db/items_purchases_db.inc
b/inventory/includes/db/items_purchases_db.inc
index 33f765a80dc2d1975c34e7de843cf3cb98a0cbe5..eecd91239de1df8c9805419fa92c78495976c601 100644
(file)
--- a/
inventory/includes/db/items_purchases_db.inc
+++ b/
inventory/includes/db/items_purchases_db.inc
@@
-57,7
+57,7
@@
function get_item_purchasing_data($selected_id, $stock_id)
$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
$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 p
d
ata.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");
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");
diff --git
a/inventory/inquiry/stock_movements.php
b/inventory/inquiry/stock_movements.php
index 363f4dc9b8d402ce65d864009ed56d57febfb12d..a0783eabc9b96ef71ac419ca550f95e2ee83ea57 100644
(file)
--- a/
inventory/inquiry/stock_movements.php
+++ b/
inventory/inquiry/stock_movements.php
@@
-23,7
+23,7
@@
if ($SysPrefs->use_popup_windows)
$js .= get_js_open_window(800, 500);
if (user_use_date_picker())
$js .= get_js_date_picker();
$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."));
//------------------------------------------------------------------------------------------------
check_db_has_stock_items(_("There are no items defined in the system."));
@@
-38,8
+38,7
@@
if (isset($_GET['stock_id']))
$_POST['stock_id'] = $_GET['stock_id'];
}
$_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();
if (!isset($_POST['stock_id']))
$_POST['stock_id'] = get_global_stock_item();
@@
-62,8
+61,7
@@
date_cells(_("To:"), 'BeforeDate');
submit_cells('ShowMoves',_("Show Movements"),'',_('Refresh Inquiry'), 'default');
end_row();
end_table();
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']);
set_global_stock_item($_POST['stock_id']);
diff --git
a/inventory/inquiry/stock_status.php
b/inventory/inquiry/stock_status.php
index f409307517172f8e9ca7cadbdd996f775a59715e..6c0c0ba96422474333c1fcf93fbefbec1bd09ce1 100644
(file)
--- a/
inventory/inquiry/stock_status.php
+++ b/
inventory/inquiry/stock_status.php
@@
-13,7
+13,7
@@
$page_security = 'SA_ITEMSSTATVIEW';
$path_to_root = "../..";
include_once($path_to_root . "/includes/session.inc");
$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 (isset($_GET['stock_id']))
$_POST['stock_id'] = $_GET['stock_id'];
diff --git
a/inventory/manage/items.php
b/inventory/manage/items.php
index 3725aca9e84b5d5fa783c142d3be74c05ebced4b..fc7f1a7a8f3ff4b634ecc7d2eeb6337614a185d4 100644
(file)
--- a/
inventory/manage/items.php
+++ b/
inventory/manage/items.php
@@
-19,7
+19,7
@@
if ($SysPrefs->use_popup_windows)
if (user_use_date_picker())
$js .= get_js_date_picker();
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");
include_once($path_to_root . "/includes/date_functions.inc");
include_once($path_to_root . "/includes/ui.inc");
@@
-265,7
+265,7
@@
if (isset($_POST['delete']) && strlen($_POST['delete']) > 1)
function item_settings(&$stock_id, $new_item)
{
function item_settings(&$stock_id, $new_item)
{
- global $SysPrefs, $path_to_root;
+ global $SysPrefs, $path_to_root
, $page_nested
;
start_outer_table(TABLESTYLE2);
start_outer_table(TABLESTYLE2);
@@
-428,7
+428,7
@@
function item_settings(&$stock_id, $new_item)
else
{
submit_center_first('addupdate', _("Update Item"), '',
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);
submit_return('select', get_post('stock_id'),
_("Select this items and return to document entry."), 'default');
submit('clone', _("Clone This Item"), true, '', true);
@@
-487,17
+487,17
@@
tabbed_content_start('tabs', array(
break;
case 'sales_pricing':
$_GET['stock_id'] = $stock_id;
break;
case 'sales_pricing':
$_GET['stock_id'] = $stock_id;
- $_GET['p
opup
'] = 1;
+ $_GET['p
age_level
'] = 1;
include_once($path_to_root."/inventory/prices.php");
break;
case 'purchase_pricing':
$_GET['stock_id'] = $stock_id;
include_once($path_to_root."/inventory/prices.php");
break;
case 'purchase_pricing':
$_GET['stock_id'] = $stock_id;
- $_GET['p
opup
'] = 1;
+ $_GET['p
age_level
'] = 1;
include_once($path_to_root."/inventory/purchasing_data.php");
break;
case 'standard_cost':
$_GET['stock_id'] = $stock_id;
include_once($path_to_root."/inventory/purchasing_data.php");
break;
case 'standard_cost':
$_GET['stock_id'] = $stock_id;
- $_GET['p
opup
'] = 1;
+ $_GET['p
age_level
'] = 1;
include_once($path_to_root."/inventory/cost_update.php");
break;
case 'reorder_level':
include_once($path_to_root."/inventory/cost_update.php");
break;
case 'reorder_level':
@@
-505,18
+505,16
@@
tabbed_content_start('tabs', array(
{
break;
}
{
break;
}
+ $_GET['page_level'] = 1;
$_GET['stock_id'] = $stock_id;
$_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;
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;
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;
};
include_once($path_to_root."/inventory/inquiry/stock_status.php");
break;
};
@@
-525,9
+523,8
@@
tabbed_content_end();
div_end();
div_end();
-hidden('popup', @$_REQUEST['popup']);
end_form();
//------------------------------------------------------------------------------------
end_form();
//------------------------------------------------------------------------------------
-end_page(
@$_REQUEST['popup']
);
+end_page();
diff --git
a/inventory/prices.php
b/inventory/prices.php
index c537752ecb4222ff661d729e07238b3d26cd8e80..a464e62e6000581119d6a7bea3fd44313be5caf6 100644
(file)
--- a/
inventory/prices.php
+++ b/
inventory/prices.php
@@
-10,10
+10,11
@@
See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
***********************************************************************/
$page_security = 'SA_SALESPRICE';
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 = "../..";
$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");
include_once($path_to_root . "/includes/session.inc");
include_once($path_to_root . "/sales/includes/sales_db.inc");
@@
-182,10
+183,7
@@
if ($Mode == 'Edit')
}
hidden('selected_id', $selected_id);
}
hidden('selected_id', $selected_id);
-if ($page_nested)
-{
- hidden('popup', @$_GET['popup']);
-}
+
div_start('price_details');
start_table(TABLESTYLE2);
div_start('price_details');
start_table(TABLESTYLE2);
diff --git
a/inventory/purchasing_data.php
b/inventory/purchasing_data.php
index d0302261ed86e5b857ff4e8cac0b3577e7ac28e3..8c36581ddd5d30823652d613f56eb02dc3c01b47 100644
(file)
--- a/
inventory/purchasing_data.php
+++ b/
inventory/purchasing_data.php
@@
-10,10
+10,11
@@
See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
***********************************************************************/
$page_security = 'SA_PURCHASEPRICING';
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 = "../..";
$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/session.inc");
include_once($path_to_root . "/includes/date_functions.inc");
@@
-193,10
+194,6
@@
if ($Mode =='Edit')
br();
hidden('selected_id', $selected_id);
br();
hidden('selected_id', $selected_id);
-if ($page_nested)
-{
- hidden('popup', @$_GET['popup']);
-}
start_table(TABLESTYLE2);
start_table(TABLESTYLE2);
diff --git
a/inventory/reorder_level.php
b/inventory/reorder_level.php
index 8eca2ef19a629c473162ed111f43569d3da2bc97..cc0d6979ff33d6f929be01c234df133d1a16a743 100644
(file)
--- a/
inventory/reorder_level.php
+++ b/
inventory/reorder_level.php
@@
-10,10
+10,11
@@
See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
***********************************************************************/
$page_security = 'SA_REORDER';
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 = "../..";
$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/session.inc");
include_once($path_to_root . "/includes/date_functions.inc");
@@
-72,11
+73,6
@@
$k=0; //row colour counter
$result = get_loc_details($_POST['stock_id']);
$result = get_loc_details($_POST['stock_id']);
-if ($page_nested)
-{
- hidden('popup', @$_GET['popup']);
-}
-
while ($myrow = db_fetch($result))
{
while ($myrow = db_fetch($result))
{
diff --git
a/purchasing/manage/suppliers.php
b/purchasing/manage/suppliers.php
index 4613de18a4000df654e84bc9bdd2c10241696100..d17950c4800b9ecfe7fd3fcddb55a298a2669a66 100644
(file)
--- a/
purchasing/manage/suppliers.php
+++ b/
purchasing/manage/suppliers.php
@@
-35,7
+35,8
@@
$supplier_id = get_post('supplier_id');
//--------------------------------------------------------------------------------------------
function supplier_settings(&$supplier_id)
{
//--------------------------------------------------------------------------------------------
function supplier_settings(&$supplier_id)
{
-
+ global $page_nested;
+
start_outer_table(TABLESTYLE2);
table_section(1);
start_outer_table(TABLESTYLE2);
table_section(1);
@@
-169,7
+170,7
@@
function supplier_settings(&$supplier_id)
if ($supplier_id)
{
submit_center_first('submit', _("Update Supplier"),
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);
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);
diff --git
a/sales/inquiry/customer_inquiry.php
b/sales/inquiry/customer_inquiry.php
index b90eacec5b5a41b3e637717ba31c3796a38f29a4..720edc35bf4ffb3b0c477dc07ff60b134e17b26d 100644
(file)
--- a/
sales/inquiry/customer_inquiry.php
+++ b/
sales/inquiry/customer_inquiry.php
@@
-41,7
+41,7
@@
start_table(TABLESTYLE_NOBORDER);
start_row();
if (!$page_nested)
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);
date_cells(_("From:"), 'TransAfterDate', '', null, -user_transaction_days());
date_cells(_("To:"), 'TransToDate', '', null);
diff --git
a/sales/manage/customers.php
b/sales/manage/customers.php
index e7e21e894dab641b8f74eb2ac02a33e674f2833d..953d776289d2fbf2f16e5bf40af2388fe3178efb 100644
(file)
--- a/
sales/manage/customers.php
+++ b/
sales/manage/customers.php
@@
-20,7
+20,7
@@
if ($SysPrefs->use_popup_windows)
if (user_use_date_picker())
$js .= get_js_date_picker();
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");
include_once($path_to_root . "/includes/date_functions.inc");
include_once($path_to_root . "/includes/banking.inc");
@@
-187,7
+187,7
@@
if (isset($_POST['delete']))
function customer_settings($selected_id)
{
function customer_settings($selected_id)
{
- global $SysPrefs, $path_to_root;
+ global $SysPrefs, $path_to_root
, $page_nested
;
if (!$selected_id)
{
if (!$selected_id)
{
@@
-284,8
+284,8
@@
function customer_settings($selected_id)
start_row();
echo '<td class="label">'._('Customer branches').':</td>';
hyperlink_params_td($path_to_root . "/sales/manage/customer_branches.php",
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();
}
end_row();
}
@@
-308,7
+308,7
@@
function customer_settings($selected_id)
else
{
submit_center_first('submit', _("Update Customer"),
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);
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);
@@
-374,7
+374,6
@@
tabbed_content_start('tabs', array(
br();
tabbed_content_end();
br();
tabbed_content_end();
-hidden('popup', @$_REQUEST['popup']);
end_form();
end_form();
-end_page(
@$_REQUEST['popup']
);
+end_page();