
<script> 

function guarda(){ 

	if ( this.document.form1.txtsocialreason.value==0)

{

alert ("Company Name must be not empty");

exit();

} 

	if ( this.document.form1.txtnickname.value==0)

{

alert ("Nick Name must be not empty");

exit();

} 

this.document.form1.submit();

}

</script>

<div align="center"> 

  <p><font size="1" face="Verdana"><strong>Change Customer</strong></font></p>

  <p> 

    <?

include("../../../comun/conexion3.php");
	
$results = mysqli_query("SELECT * FROM customerexpint where id='$id'");

$row=mysqli_fetch_array($results);

 



	$txtid=$row['id'];

	$txtsocialreason= $row['socialreason']; 

	$txtrfc= $row['rfc']; 

	$txtcp= $row['cp']; 

	$txtcity= $row['city']; 

	$txtno_contabilidad=$row['no_contabilidad'];

	$txtdirection= $row['direction']; 

	$txtcontact= $row['contact']; 

	$txttel1= $row['tel1']; 

	$txttel2= $row['tel2']; 

	$txttel3= $row['tel3']; 

	$txtfax = $row['fax']; 

	$txtemail= $row['email']; 

	$txtobservations= $row['observations']; 

	$txtnickname= $row['nickname']; 

	$txtinvoicename= $row['invoicename']; 

	$txtinvoiceaddress=$row['invoiceaddress']; 

	$txtinvoicecity= $row['invoicecity']; 

	$txtinvoicezip= $row['invoicezip']; 

	

	$txtamsfilenumber= strtoupper($row['amsfilenumber']); 

	$txtinvoicerevisiondate= strtoupper($row['invoicerevisiondate']); 

	$txtinvoiceoceanfreights= strtoupper($row['invoiceoceanfreights']); 

	$txtcreditforoceanfreights= strtoupper($row['creditforoceanfreights']); 

	$txtcreditforoceanfreightsdays= strtoupper($row['creditforoceanfreightsdays']); 

	$txtcreditforoceanfreightsfromdate= strtoupper($row['creditforoceanfreightsfromdate']); 

	$txtcreditforlocalcharges= strtoupper($row['creditforlocalcharges']); 

	$txtcreditforlocalchargesdays= strtoupper($row['creditforlocalchargesdays']); 

	$txtcreditforlocalchargesfromdate= strtoupper($row['creditforlocalchargesfromdate']); 

	$txtcustomer_expo=$row['customer_expo'];

	$txtcustomer_impo=$row['customer_impo'];

	$txtcustomer_service=$row['customer_service'];

	$txtcto_ventas=$row['cto_ventas'];

	

	$txtcalle_invoice=$row['calle_invoice'];

$txtno_ext_invoice=$row['no_ext_invoice'];

$txtno_int_invoice=$row['no_int_invoice'];

$txtcolonia_invoice=$row['colonia_invoice'];

$txtmunicipio_invoice=$row['municipio_invoice'];

$txtestado_invoice=$row['estado_invoice'];

$txtlocalidad_invoice=$row['localidad_invoice'];

$txtpais_invoice=$row['pais_invoice'];

	

echo "  <form name=\"form1\" method=\"post\" action=\"guardacambiocustomerexpint.php?id=" . $txtid . "\">";	    

?>

  </p>

    

  <table width="33%" border="0" align="center">

    <tr bordercolor="#FFFFFF"> 

      <td width="41%" bgcolor="#00E1A9"><strong><font color="#000000" size="1" face="Verdana">Company 

        Name </font></strong></td>

      <td width="59%"><input name="txtsocialreason" type="text" id="txtsocialreason" value="<? echo"$txtsocialreason"?>"></td>

    </tr>

    <tr bordercolor="#FFFFFF"> 

      <td bgcolor="#00E1A9"><strong><font color="#000000" size="1" face="Verdana">Nick 

        Name:</font></strong></td>

      <td><input name="txtnickname" type="text" id="txtnickname" value="<? echo"$txtnickname"?>"></td>

    </tr>

    <tr bordercolor="#FFFFFF"> 

      <td bgcolor="#00E1A9"><strong><font color="#000000" size="1" face="Verdana">Address</font></strong></td>

      <td><input name="txtdirection" type="text" id="txtdirection2" value="<? echo"$txtdirection"?>"></td>

    </tr>

    <tr bordercolor="#FFFFFF"> 

      <td bgcolor="#00E1A9"><strong><font color="#000000" size="1" face="Verdana">City</font></strong></td>

      <td><input name="txtcity" type="text" id="txtcity" value="<? echo"$txtcity"?>"></td>

    </tr>

    <tr bordercolor="#FFFFFF"> 

      <td bgcolor="#00E1A9"><strong><font color="#000000" size="1" face="Verdana">Tel</font></strong></td>

      <td><input name="txttel1" type="text" id="txttel1" value="<? echo"$txttel1"?>"></td>

    </tr>

    <tr bordercolor="#FFFFFF"> 

      <td bgcolor="#00E1A9"><strong><font color="#000000" size="1" face="Verdana">Fax</font></strong></td>

      <td><input name="txtfax" type="text" id="txtfax" value="<? echo"$txtfax"?>"></td>

    </tr>

    <tr bordercolor="#FFFFFF"> 

      <td bgcolor="#00E1A9"><strong><font color="#000000" size="1" face="Verdana">Email</font></strong></td>

      <td><input name="txtemail" type="text" id="txtemail" value="<? echo"$txtemail"?>"></td>

    </tr>

    <tr bordercolor="#FFFFFF"> 

      <td bgcolor="#00E1A9"><strong><font color="#000000" size="1" face="Verdana">Web 

        Site </font></strong></td>

      <td><input name="txtobservations" type="text" id="txtobservations" value="<? echo"$txtobservations"?>"></td>

    </tr>

    <tr bordercolor="#FFFFFF"> 

      <td bgcolor="#00E1A9"><strong><font color="#000000" size="1" face="Verdana"> 

        AMS File Number </font></strong></td>

      <td><input name="txtamsfilenumber" type="text" id="txtamsfilenumber" value="<? echo"$txtamsfilenumber"?>"></td>

    </tr>

    <tr bordercolor="#FFFFFF"> 

      <td bgcolor="#00E1A9">&nbsp;</td>

      <td>&nbsp;</td>

    </tr>

    <tr bordercolor="#FFFFFF"> 

      <td bgcolor="#FFFFCC"><strong><font color="#000000" size="1" face="Verdana">Invoice 

        Name</font></strong></td>

      <td><input name="txtinvoicename" type="text" id="txtinvoicename2" value="<? echo"$txtinvoicename"?>"></td>

    </tr>

    <tr bordercolor="#FFFFFF"> 

      <td bgcolor="#FFFFCC"><strong><font color="#000000" size="1" face="Verdana">RFC</font></strong></td>

      <td><input name="txtrfc" type="text" id="txtrfc2" value="<? echo"$txtrfc"?>"></td>

    </tr>

    <tr bordercolor="#FFFFFF"> 

      <td bgcolor="#FFFFCC"><strong><font color="#000000" size="1" face="Verdana">Invoice 

        Address</font></strong></td>

      <td><input name="txtinvoiceaddress" type="text" id="txtinvoiceaddress2" value="<? echo"$txtinvoiceaddress"?>"></td>

    </tr>

    <tr bordercolor="#FFFFFF">

      <td bgcolor="#FFFFCC"><strong><font color="#000000" size="1" face="Verdana">Invoice Calle</font></strong></td>

      <td><input name="txtcalle_invoice" type="text" id="txtcalle_invoice" value="<? echo $txtcalle_invoice; ?>"></td>

    </tr>

    <tr bordercolor="#FFFFFF">

      <td bgcolor="#FFFFCC"><strong><font color="#000000" size="1" face="Verdana">Invoice No Ext</font></strong></td>

      <td><input name="txtno_ext_invoice" type="text" id="txtno_ext_invoice" value="<? echo $txtno_ext_invoice; ?>"></td>

    </tr>

    <tr bordercolor="#FFFFFF">

      <td bgcolor="#FFFFCC"><strong><font color="#000000" size="1" face="Verdana">Invoice No Int</font></strong></td>

      <td><input name="txtno_int_invoice" type="text" id="txtno_int_invoice" value="<? echo $txtno_int_invoice; ?>"></td>

    </tr>

    <tr bordercolor="#FFFFFF">

      <td bgcolor="#00E1A9"><strong><font color="#000000" size="1" face="Verdana">Zip 

        (CP)</font></strong></td>

      <td><input name="txtcp" type="text" id="txtcp" value="<? echo"$txtcp"?>"></td>

    </tr>

    <tr bordercolor="#FFFFFF">

      <td bgcolor="#FFFFCC"><strong><font color="#000000" size="1" face="Verdana">Invoice Colonia</font></strong></td>

      <td><input name="txtcolonia_invoice" type="text" id="txtcolonia_invoice" value="<? echo $txtcolonia_invoice; ?>"></td>

    </tr>

    <tr bordercolor="#FFFFFF">

      <td bgcolor="#FFFFCC"><strong><font color="#000000" size="1" face="Verdana">Invoice Municipio o Delegacion</font></strong></td>

      <td><input name="txtmunicipio_invoice" type="text" id="txtmunicipio_invoice" value="<? echo $txtmunicipio_invoice; ?>"></td>

    </tr>

    <tr bordercolor="#FFFFFF">

      <td bgcolor="#FFFFCC"><strong><font color="#000000" size="1" face="Verdana">Invoice Estado</font></strong></td>

      <td><input name="txtestado_invoice" type="text" id="txtestado_invoice" value="<? echo $txtestado_invoice; ?>"></td>

    </tr>

    <tr bordercolor="#FFFFFF">

      <td bgcolor="#FFFFCC"><strong><font color="#000000" size="1" face="Verdana">Invoice Localidad</font></strong></td>

      <td><input name="txtlocalidad_invoice" type="text" id="txtlocalidad_invoice" value="<? echo $txtlocalidad_invoice; ?>"></td>

    </tr>

    <tr bordercolor="#FFFFFF">

      <td bgcolor="#FFFFCC"><strong><font color="#000000" size="1" face="Verdana">Invoice Pais</font></strong></td>

      <td><input name="txtpais_invoice" type="text" id="txtpais_invoice" value="<? echo $txtpais_invoice; ?>"></td>

    </tr>

    <tr bordercolor="#FFFFFF"> 

      <td >&nbsp;</td>

      <td>&nbsp;</td>

    </tr>

    <tr bordercolor="#FFFFFF"> 

      <td bgcolor="#00E1A9"><strong><font color="#000000" size="1" face="Verdana">Invoice 

        Revision Date</font></strong></td>

      <td><input name="txtinvoicerevisiondate" type="text" id="txtinvoicerevisiondate" value="<? echo"$txtinvoicerevisiondate"?>"></td>

    </tr>

    <tr bordercolor="#FFFFFF"> 

      <td bgcolor="#00E1A9"><strong><font color="#000000" size="1" face="Verdana">Invoice 

        Oceanfreights</font></strong></td>

      <td><select name="txtinvoiceoceanfreights" id="txtinvoiceoceanfreights" >

          <option value="YES">YES</option>

          <option value="NO">NO</option>

          <option value=""></option>		  

		  <?

echo "		  <option value=\"$txtinvoiceoceanfreights\" selected>$txtinvoiceoceanfreights</option>";

		  ?>

        </select></td>

    </tr>

    <tr bordercolor="#FFFFFF"> 

      <td bgcolor="#00E1A9"><strong><font color="#000000" size="1" face="Verdana">Credit 

        for Oceanfreights (days)</font></strong></td>

      <td><select name="txtcreditforoceanfreights" id="txtcreditforoceanfreights" >

          <option value="YES">YES</option>

          <option value="NO">NO</option>

		  		  <?

echo "		  <option value=\"$txtcreditforoceanfreights\" selected>$txtcreditforoceanfreights</option>";

		  ?>



        </select> <input name="txtcreditforoceanfreightsdays" type="text" id="txtcreditforoceanfreightsdays" size="5" maxlength="3" value="<? echo"$txtcreditforoceanfreightsdays"?>"></td>

    </tr>

    <tr bordercolor="#FFFFFF"> 

      <td bgcolor="#00E1A9"><strong><font color="#000000" size="1" face="Verdana">From 

        Date</font></strong></td>

      <td><select name="txtcreditforoceanfreightsfromdate" id="txtcreditforoceanfreightsfromdate">

    <?php

		$authors = mysqli_query("SELECT * FROM calculationdates order by text");

		  while ($author = mysqli_fetch_array($authors)) {

    $aid = $author["text"];

    $aname = htmlspecialchars($author["text"]);

    echo("<option value=\"$aid\">$aname</option>\n"); 			

		  }

		  printf ("<option value=\"%s\" selected>%s</option>",$txtcreditforoceanfreightsfromdate,$txtcreditforoceanfreightsfromdate) ;

		?>





        </select></td>

    </tr>

    <tr bordercolor="#FFFFFF"> 

      <td bgcolor="#00E1A9"><strong><font color="#000000" size="1" face="Verdana">Credit 

        for Local Charges (days)</font></strong></td>

      <td><select name="txtcreditforlocalcharges" id="txtcreditforlocalcharges" >

          <option value="YES" selected>YES</option>

          <option value="NO">NO</option>

		  		  <?

echo "		  <option value=\"$txtcreditforlocalcharges\" selected>$txtcreditforlocalcharges</option>";

		  ?>



        </select> <input name="txtcreditforlocalchargesdays" type="text" id="txtcreditforlocalchargesdays" size="5" maxlength="3" value="<? echo"$txtcreditforlocalchargesdays"?>"></td>

    </tr>

    <tr bordercolor="#FFFFFF"> 

      <td bgcolor="#00E1A9"><strong><font color="#000000" size="1" face="Verdana">From 

      Date</font></strong></td>

      <td><select name="txtcreditforlocalchargesfromdate" id="txtcreditforlocalchargesfromdate" >

    <?php

		$authors = mysqli_query("SELECT * FROM calculationdates order by text");

		  while ($author = mysqli_fetch_array($authors)) {

    $aid = $author["text"];

    $aname = htmlspecialchars($author["text"]);

    echo("<option value=\"$aid\">$aname</option>\n"); 			

		  }

		  printf ("<option value=\"%s\" selected>%s</option>",$txtcreditforlocalchargesfromdate,$txtcreditforlocalchargesfromdate) ;

		?>



        </select></td>

    </tr>

    <tr bordercolor="#FFFFFF">

      <td bgcolor="#00E1A9"><strong><font color="#000000" size="1" face="Verdana">Contacto Ventas Interteam</font></strong></td>

      <td><select name="txtcto_ventas" id="txtcto_ventas" >

        <?php

		$authors = mysqli_query("SELECT * FROM interteam_user order by user");

		  while ($author = mysqli_fetch_array($authors)) {

    $aid = $author["user"];

    $aname = htmlspecialchars($author["user"]);

    echo("<option value=\"$aid\">$aname</option>\n"); 			

		  }

		  printf ("<option value=\"%s\" selected>%s</option>",$txtcto_ventas,$txtcto_ventas) ;

		?>

      </select></td>

    </tr>

    <tr bordercolor="#FFFFFF">

      <td bgcolor="#00E1A9"><strong><font color="#000000" size="1" face="Verdana">Contacto Customer Impo INT.</font></strong></td>

      <td><select name="txtcustomer_impo" id="txtcustomer_impo" >

        <?php

		$authors = mysqli_query("SELECT * FROM interteam_user order by user");

		  while ($author = mysqli_fetch_array($authors)) {

    $aid = $author["user"];

    $aname = htmlspecialchars($author["user"]);

    echo("<option value=\"$aid\">$aname</option>\n"); 			

		  }

		  printf ("<option value=\"%s\" selected>%s</option>",$txtcustomer_impo,$txtcustomer_impo) ;

		?>

      </select></td>

    </tr>

    <tr bordercolor="#FFFFFF">

      <td bgcolor="#00E1A9"><strong><font color="#000000" size="1" face="Verdana">Contacto Customer Expo INT.</font></strong></td>

      <td><select name="txtcustomer_expo" id="txtcustomer_expo" >

        <?php

		$authors = mysqli_query("SELECT * FROM interteam_user order by user");

		  while ($author = mysqli_fetch_array($authors)) {

    $aid = $author["user"];

    $aname = htmlspecialchars($author["user"]);

    echo("<option value=\"$aid\">$aname</option>\n"); 			

		  }

		  printf ("<option value=\"%s\" selected>%s</option>",$txtcustomer_expo,$txtcustomer_expo) ;

		?>

      </select></td>

    </tr>

    <tr bordercolor="#FFFFFF">

      <td bgcolor="#00E1A9"><strong><font color="#000000" size="1" face="Verdana">Contacto Customer Service INT.</font></strong></td>

      <td><select name="txtcustomer_service" id="txtcustomer_service" >

          <?php

		$authors = mysqli_query("SELECT * FROM interteam_user order by user");

		  while ($author = mysqli_fetch_array($authors)) {

    $aid = $author["user"];

    $aname = htmlspecialchars($author["user"]);

    echo("<option value=\"$aid\">$aname</option>\n"); 			

		  }

		  printf ("<option value=\"%s\" selected>%s</option>",$txtcustomer_service,$txtcustomer_service) ;

		?>

      </select></td>

    </tr>

    <tr bordercolor="#FFFFFF"> 

      <td bgcolor="#00E1A9"><strong><font color="#000000" size="1" face="Verdana">No de cliente Contabilidad</font></strong></td>

      <td><input name="txtno_contabilidad" type="text" id="txtno_contabilidad" value="<? echo"$txtno_contabilidad"?>"></td>

    </tr>

  </table>

    

  <p align="center"> 

    <input type="button" name="BAgregar" value="Change"  onClick="guarda()">

  </p>

  </form>

  <form name="form1a" method="post" action="customerexpint.php?id=$id">

    <input type="submit" name="Submit2" value="Back">

  </form>

</div>

