?
Current Path : /home1/savoy/public_html/savoyglobal.net/sgms/draft/application/views/Customer/ |
Linux gator3171.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 |
Current File : /home1/savoy/public_html/savoyglobal.net/sgms/draft/application/views/Customer/add_customer.php |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); $this->load->view('documentreadyfunctions'); ?> <script type="text/javascript"> function changeform(selectbox) { if(selectbox.value==1) { document.getElementById("corprate_table_1").style.display="none"; document.getElementById("corprate_table_2").style.display="none"; document.getElementById("individual_table").style.display="block"; } else { document.getElementById("corprate_table_1").style.display="block"; document.getElementById("corprate_table_2").style.display="block"; document.getElementById("individual_table").style.display="none"; } if(selectbox.value!= "") { var customer_type = selectbox.value; $.ajax({ type: "POST", url: "<?= site_url('customer/get_customer_no/') ?>/"+customer_type, success: function(msg){ $("#customer_no").val(msg); } }) } else { $("#customer_no").val(""); } } function checkaccount_settings() { $.ajax({ type: "POST", url: "<?= site_url('accounting/checkaccountsettings/') ?>", success: function(msg) { if(msg==0) { $("#success-panel").fadeIn(900,0); $("#success-panel").html("<div style=\"border:2px solid red;padding-top:4px;text-align:center; width:500px;height:20px;margin-left:30%\" ><font color=\"red\" >Sub Account Settings not Set</font></div>"); $("#success-panel").fadeOut(3000,0); $('button[type=submit]#submit').attr('disabled', 'disabled'); } } }); } jQuery(document).ready(function() { suggestemployee('employee'); checkaccount_settings(); }); </script> <link href="<?=base_url()?>assets/css/tablesortnew.css" rel="stylesheet" type="text/css"/> <div class="select-bar"> <label><img src="<?=base_url()?>assets/images/backbutton.png" title="Back" class="clickimage" onclick="viewdata('customer','viewincustomersearch','search_customer','view_customer','<?=$_SESSION['pagenum'];?>')" alt="Back" align = "center" width="25" height="25" /> </label> <span class="heading">Inserting new customer</span> </div> <fieldset> <?php $attributes=array('id'=>'validateform','class'=>'customForm'); echo form_open('customer/addincustomer/insert_customer/view_customer/1',$attributes); $status=$this->mastermodel->getenumvalues('customer', 'customer_status'); ?> <ul> <li> <table class="sortnew"> <tr><th colspan='2' style="text-align: center">Customer Details</th></tr> <tr> <td> Customer Type </td> <td style="width:65%"> <select name="customer_type" id="customer_type" class="required" onchange="changeform(this);"> <option value="">Select</option> <option value="0">Corporate</option> <option value="1">Individual</option> </select> </td> </tr> <tr> <td>Customer ID</td> <td style="width:65%"> <?php $data = array( 'name' => 'customer_no', 'id' => 'customer_no', 'class' =>'required', 'readonly' => true ); echo form_input($data).form_error($data); ?> </td> </tr> <tr> <td> Customer Name </td> <td style="width:65%"> <?php $data = array( 'name' => 'customer_name', 'id' => 'customer_name', 'class' =>'required' ); echo form_input($data).form_error($data); ?> </td> </tr> <tr> <td> Address </td> <td style="width:65%"> <?php $data = array( 'name' => 'customer_address', 'id' => 'customer_address', 'rows' => '10', 'cols' => '5', 'style' => 'width:80%', ); echo form_textarea($data).form_error($data); ?> </td> </tr> <tr> <td> Country </td> <td style="width:65%"> <?php $data = array( 'name' => 'customer_country', 'id' => 'customer_country', ); echo form_input($data).form_error($data); ?> </td> </tr> <tr> <td> P.O Box </td> <td style="width:65%"> <?php $data = array( 'name' => 'customer_pobox', 'id' => 'customer_pobox', ); echo form_input($data).form_error($data); ?> </td> </tr> <tr> <td> City </td> <td style="width:65%"> <?php $data = array( 'name' => 'customer_city', 'id' => 'customer_city', ); echo form_input($data).form_error($data); ?> </td> </tr> <tr> <td> State </td> <td style="width:65%"> <?php $data = array( 'name' => 'customer_state', 'id' => 'customer_state', ); echo form_input($data).form_error($data); ?> </td> </tr> <tr> <td> Country </td> <td style="width:65%"> <?php $data = array( 'name' => 'customer_country', 'id' => 'customer_country', ); echo form_input($data).form_error($data); ?> </td> </tr> <tr> <td> Contact No </td> <td style="width:65%"> <?php $data = array( 'name' => 'customer_contact_no', 'id' => 'customer_acontact_no', 'class' =>'required' ); echo form_input($data).form_error($data); ?> </td> </tr> <tr> <td> Fax </td> <td style="width:65%"> <?php $data = array( 'name' => 'customer_fax', 'id' => 'customer_fax', ); echo form_input($data).form_error($data); ?> </td> </tr> <tr> <td> Email </td> <td style="width:65%"> <?php $data = array( 'name' => 'customer_email', 'id' => 'customer_email', ); echo form_input($data).form_error($data); ?> </td> </tr> <tr> <td> Status </td> <td style="width:65%"> <select name="customer_status" id="customer_status" class="required" > <?php if(count($status['val'])>0) { foreach ($status['val'] as $method) { echo "<option value='".$method. "' >" . $method . "</option>"; } } ?> </select> </td> </tr> </table> <table class="sortnew"> <tr><th colspan="2" style="text-align: center">Customer Reference Information</th></tr> <tr> <td>Employee Name</td> <td> <input type="text" name="employee" id="employee" class="required" /> <input type="hidden" name="employee_id" id="employee_id" class="required" /> </td> </tr> <tr> <td>Date</td> <td> <?php $data = array( 'name' => 'customer_allocation_date', 'id' => 'customer_allocation_date', 'class' =>'required calfocus', 'value' => date('d-m-Y') ); echo form_input($data).form_error($data); ?> </td> </tr> <tr> <td>Description</td> <td> <?php $data = array( 'name' => 'description', 'id' => 'description', 'rows' => '10', 'cols' => '5', 'style' => 'width:80%', ); echo form_textarea($data).form_error($data); ?> </td> </tr> </table> <table class="sortnew" id="individual_table"> <tr><th colspan="2" style="text-align: center">Customer Personal Information</th></tr> <tr> <td>Customer D.O.B</td> <td> <?php $data = array( 'name' => 'customer_dob', 'id' => 'customer_dob', 'class' =>'calfocus' ); echo form_input($data).form_error($data); ?> </td> </tr> <tr> <td>Gender</td> <td> <select name="customer_gender" id="customer_gender" > <option value="">Select</option> <option value="Male">Male</option> <option value="Female">Female</option> </select> </td> </tr> <tr> <td>Profession</td> <td> <?php $data = array( 'name' => 'customer_profession', 'id' => 'customer_profession', ); echo form_input($data).form_error($data); ?> </td> </tr> <tr> <td>Marital Status</td> <td> <select name="customer_marital_status" id="customer_marital_status" > <option value="">Select</option> <option value="married">Married</option> <option value="unmarried">Unmarried</option> </select> </td> </tr> </table> <table class="sortnew" id="corprate_table_1"> <tr><th colspan="2" style="text-align: center">Customer Corporate Information</th></tr> <tr> <td>Group Name</td> <td> <?php $data = array( 'name' => 'customer_group_name', 'id' => 'customer_group_name', ); echo form_input($data).form_error($data); ?> </td> </tr> <tr> <td>Business Activity</td> <td> <?php $data = array( 'name' => 'customer_business_activity', 'id' => 'customer_business_activity', ); echo form_input($data).form_error($data); ?> </td> </tr> <tr> <td>Website:</td> <td> <?php $data = array( 'name' => 'customer_website', 'id' => 'customer_website', ); echo form_input($data).form_error($data); ?> </td> </tr> </table> </li> <li> <table class="sort" cellpadding="0" cellspacing="0" width="200px;" id="corprate_table_2"> <tr> <th>Contact Name</th> <th>Designation</th> <th>Mobile</th> <th>Phone</th> <th>Email</th> <th><input type="button" id="button2" value="Add More" class="addRow" title="Add Row" style="width:75px;"/></th> </tr> <tr> <td><input style="width:100px;" type="text" name="contact_name"/></td> <td><input style="width:100px;" type="text" name="contact_designation"/></td> <td><input style="width:100px;" type="text" name="contact_mobile"/></td> <td><input style="width:100px;" type="text" name="contact_phone"/></td> <td><input style="width:100px;" type="text" name="contact_email"/></td> <td> <img style="float: right; vertical-align: top;"src="<?=base_url()?>assets/images/icons/close.png" alt="Delete Row" class="delRow clickimage" title="Delete Row"/> </td> </tr> </table> </li> <li> <input type="hidden" name="tab_name" value="customer"/> <label for="submit"> </label> <button type="submit" id="submit" class="clickimage" onclick="checkdatavalidity($('input#employee_id').val(),'employee','No existing employee selected');addformdata('validateform')">Save</button> </li> </ul> <?php echo form_close();?> </fieldset>