<?php
require_once "config/database.php";
require_once "config/fungsi_tanggal.php";
require_once "config/fungsi_rupiah.php";


if (empty($_SESSION['username']) && empty($_SESSION['password'])){
	echo "<meta http-equiv='refresh' content='0; url=index.php?alert=1'>";
}
else {
	
	

	if ($_GET['module'] == 'start') {
		include "modules/trade/start/view.php";
	}
	
	/************************************/
	/************ closed ************/
	/************************************/
	
	 elseif ($_GET['module'] == 'closed') {
		include "modules/trade/closed/view.php";
	}

	/************************************/
	/************ PRODUCTOS ************/
	/************************************/
	
	 elseif ($_GET['module'] == 'medicines') {
		include "modules/trade/medicines/view.php";
	}

	elseif ($_GET['module'] == 'form_medicines') {
		include "modules/trade/medicines/form.php";
	}
	/************************************/
	/************ ENTRADAS ************/
	/************************************/
	
	elseif ($_GET['module'] == 'medicines_transaction') {
		include "modules/trade/medicines_transaction/view.php";
	}
	
		elseif ($_GET['module'] == 'medicines_transaction_almacenista') {
		include "modules/trade/medicines_transaction/view_almacenista.php";
	}
	

	elseif ($_GET['module'] == 'form_medicines_transaction') {
		include "modules/trade/medicines_transaction/form.php";
	}
	
	/************************************/
	/************ REMISIONES ************/
	/************************************/
	elseif ($_GET['module'] == 'remision') {
		include "modules/trade/remision/view.php";
	}
	elseif ($_GET['module'] == 'form_remision') {
		include "modules/trade/remision/form.php";
	}
	elseif ($_GET['module'] == 'remision_consulta') {
		include "modules/trade/remision/query.php";
	}
	elseif ($_GET['module'] == 'remision_surtir') {
		include "modules/trade/remision/surtir.php";
	}
	elseif ($_GET['module'] == 'remision_supervisor') {
		include "modules/trade/remision/query_supervisor.php";
	}
	
	elseif ($_GET['module'] == 'remision_almacenista') {
		include "modules/trade/remision/query_almacenista.php";
	}
	/************************************/
	/************ Kardex ************/
	/************************************/
    elseif ($_GET['module'] == 'view_kardex') {
		include "modules/trade/kardex/view.php";
	}
	elseif ($_GET['module'] == 'respaldo') {
		include "modules/respaldo/respaldo.php";
		}
	
	
	/************************************/
	/************ Buqueda por fechas ************/
	/************************************/
	 elseif ($_GET['module'] == 'busqueda_ent_sal') {
		include "modules/trade/busqueda/view.php";
	}
	 elseif ($_GET['module'] == 'record') {
		include "modules/trade/busqueda/record.php";
	}

	/************************************/
	/************ Modulo Start ************/
	/************************************/
	
	 elseif ($_GET['module'] == 'start_almacenista') {
		include "modules/trade/start/view_almacen.php";
	}
	  elseif($_GET['module'] == 'start_supervisor') {
		include "modules/trade/start/view_supervisor.php";
	}
		/************************************/
		/************ Modulo Productos ************/
		/************************************/
        elseif($_GET['module'] == 'view_codigo') {
		include "modules/trade/medicines/view_codigo.php";
	}
		/************************************/
		/************ cancelar salida de almacen ************/
		/************************************/
	elseif ($_GET['module'] == 'salida_consulta') {
		include "modules/trade/medicines_consulta_enc/query.php";
	}
		elseif ($_GET['module'] == 'salida_consulta_almacen') {
		include "modules/trade/medicines_consulta_enc/query_almacen.php";
	}
	elseif ($_GET['module'] == 'salida_consulta_supervisor') {
		include "modules/trade/medicines_consulta_enc/query_supervisor.php";
	}
	
	/************************************/
		/************ cancelar entrada de almacen ************/
		/************************************/
	elseif ($_GET['module'] == 'entrada_consulta') {
		include "modules/trade/consulta_entradas_enc/query.php";
	}
		elseif ($_GET['module'] == 'entrada_consulta_almacen') {
		include "modules/trade/consulta_entradas_enc/query_almacen.php";
	}
	elseif ($_GET['module'] == 'entrada_consulta_supervisor') {
		include "modules/trade/consulta_entradas_enc/query_supervisor.php";
	}
	
		/************************************/
		/************ catalogos ************/
		/************************************/
	elseif ($_GET['module'] == 'catalogo_motivos') {
		include "modules/trade/catalogos/motivos/view_motivos.php";

	}
    elseif ($_GET['module'] == 'form_motivos') {
		include "modules/trade/catalogos/motivos/form.php";
	}

elseif ($_GET['module'] == 'catalogo_motivos_si') {
		include "modules/trade/catalogos/motivos_si/view_motivos.php";

	}
    elseif ($_GET['module'] == 'form_motivos_si') {
		include "modules/trade/catalogos/motivos_si/form.php";
	}	
	
	elseif ($_GET['module'] == 'catalogo_unidades') {
		include "modules/trade/catalogos/unidades/view_unidades.php";

	}

    elseif ($_GET['module'] == 'form_unidades') {
		include "modules/trade/catalogos/unidades/form.php";
	}	
	
	elseif ($_GET['module'] == 'catalogo_correos') {
		include "modules/trade/catalogos/correos/view_correos.php";

	}
    elseif ($_GET['module'] == 'form_correos') {
		include "modules/trade/catalogos/correos/form.php";
	}	
	
	elseif ($_GET['module'] == 'parametro_correos') {
		include "modules/trade/catalogos/parametro_correos/view_parametros_c.php";

	}
    elseif ($_GET['module'] == 'form_parametro_correos') {
		include "modules/trade/catalogos/parametro_correos/form.php";
	}	
	elseif ($_GET['module'] == 'catalogo_perfil') {
		include "modules/trade/catalogos/perfil/view_perfil.php";

	}
    elseif ($_GET['module'] == 'form_perfil') {
		include "modules/trade/catalogos/perfil/form.php";
	}	
	
	elseif ($_GET['module'] == 'parametro_envio') {
		include "modules/trade/catalogos/conf_correo/view.php";

	}
	elseif ($_GET['module'] == 'form_envio') {
		include "modules/trade/catalogos/conf_correo/form.php";
	}


	    /************************************/
		/************ Saldo inicial ************/
		/************************************/
		
	elseif ($_GET['module'] == 'saldo_inicial') {
		include "modules/trade/saldo_inicial/view.php";

	}
  	elseif ($_GET['module'] == 'saldo_inicial_form') {
		include "modules/trade/saldo_inicial/form.php";
		
	}	
	
	  /************************************/
		/************ importacion ************/
		/************************************/
		
	elseif ($_GET['module'] == 'importar_correos') {
		include "modules/trade/importar/correos.php";
	}
	elseif ($_GET['module'] == 'importar_unidades') {
		include "modules/trade/importar/unidades.php";
	}
	elseif ($_GET['module'] == 'importar_productos') {
		include "modules/trade/importar/productos.php";
	}
	
	
	  /************************************/
		/************ apertura o cuerre de almacen ************/
		/************************************/
		
	elseif ($_GET['module'] == 'apertura_view') {
		include "modules/trade/apertura/view_apertura.php";
	}
	  elseif ($_GET['module'] == 'form_apertura') {
		include "modules/trade/apertura/form.php";
	}
	
        /************************************/
		/************ busqueda************/
		/************************************/
	elseif ($_GET['module'] == 'busqueda_view') {
		include "modules/trade/busqueda1/view1.php";
	}	
   /************************************/
		/************ reportes************/
		/************************************/
 
 elseif ($_GET['module'] == 'stock_inventory') {
		include "modules/trade/stock_inventory/view.php";
	}

	elseif ($_GET['module'] == 'stock_report') {
		include "modules/trade/stock_report/view.php";
	}
	elseif ($_GET['module'] == 'stock_report_entradas') {
		include "modules/trade/stock_report_entradas/view.php";
	}
	elseif ($_GET['module'] == 'stock_report_folio') {
	                        
		include "modules/trade/stock_report_folio/view.php";
	}
 
	 /************************************/
		/************ usuarios************/
		/************************************/	
		
		
	elseif ($_GET['module'] == 'user') {
		include "modules/user/view.php";
	}


	elseif ($_GET['module'] == 'form_user') {
		include "modules/user/form.php";
	}

	elseif ($_GET['module'] == 'profile') {
		include "modules/profile/view.php";
		}


	elseif ($_GET['module'] == 'form_profile') {
		include "modules/profile/form.php";
	}

	elseif ($_GET['module'] == 'password') {
		include "modules/password/view.php";
	}
		

}
?>