{
// PREVENT DELETES IF DEPENDENT RECORDS IN 'sales_orders'
- if (sales_orders_has_shipper($selected_id))
+ if (key_in_foreign_table($selected_id, 'sales_orders', 'ship_via'))
{
$cancel_delete = 1;
display_error(_("Cannot delete this shipping company because sales orders have been created using this shipper."));
else
{
// PREVENT DELETES IF DEPENDENT RECORDS IN 'debtor_trans'
-
- if (debtor_trans_has_shipper($selected_id))
+ if (key_in_foreign_table($selected_id, 'debtor_trans', 'ship_via'))
{
$cancel_delete = 1;
display_error(_("Cannot delete this shipping company because invoices have been created using this shipping company."));
$result = get_shippers(check_value('show_inactive'));
start_form();
-start_table($table_style);
+start_table(TABLESTYLE);
$th = array(_("Name"), _("Contact Person"), _("Phone Number"), _("Secondary Phone"), _("Address"), "", "");
inactive_control_column($th);
table_header($th);
//----------------------------------------------------------------------------------------------
-start_table($table_style2);
+start_table(TABLESTYLE2);
if ($selected_id != -1)
{
end_form();
end_page();
-?>