?
Current Path : /home1/savoy/www/savoyglobal.net/drafthr/system/application/views/Accounting/ |
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/www/savoyglobal.net/drafthr/system/application/views/Accounting/add_trans_code.php |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');?> <script> function code_set(thisone) { $("#temp").load("<?= site_url('accounting/code_exist/') ?>" +"/transaction_code/trans/" + thisone.value,function(data) { if(data>0) { alert("Code already Set for this transaction"); document.getElementById('codefor').selectedIndex=0; return false; } }); } function code_exist(thisone) { $("#temp").load("<?= site_url('accounting/code_exist/') ?>" +"/transaction_code/code/" + thisone.value,function(data) { if(data>0) { alert("Code already Exist"); document.getElementById('code').value=''; document.getElementById('code').focus(); return false; } }); } </script> <div class="select-bar"> <label> <img src="<?=base_url()?>/assets/images/backbutton.png" title="Back" class="clickimage" onclick="showtranscode_page(1,'code','')" alt="Back" align = "center" width="25" height="25" /></label> </div> <?php $attributes = array('id' => 'customForm'); echo form_open('',$attributes); ?> <fieldset> <div style="display:none" id="temp"></div> <table style="padding:15px 0 0 25px" > <caption>ADD Transaction Code</caption> <tr height="35px"> <td> <label> Code:</label> </td> <td> <input type="text" onblur="code_exist(this)" name="code" id="code" /> <span id="codeInfo" class="red_bold">*</span> </td> </tr> <tr height="25px"> <td> <label> Type :</label> </td> <td> <input type="text" name="type" id="type"/> <span id="typeInfo" class="red_bold">*</span> </td> </tr> <!-- <tr height="25px"> <td> <label> Account Type :</label> </td> <td> <input type="text" name="description" id="description"/> <span id="descriptionInfo" class="red_bold">*</span> </td> </tr>--> <tr height="25px"> <td> <label> Account Type :</label> </td> <td> <select name="codefor" id="codefor" onchange="code_set(this)"> <option value="">Select</option> <?php $trans_type=$this->mastermodel->getdatas('transaction_types'); foreach ($trans_type as $key => $accsub) { echo "<option value='". $accsub['id']. "' >" . $accsub['transaction'] . "</option>"; } ?> </select> <span id="codeforInfo" class="red_bold">*</span> </td> </tr> <tr height="55px"> <td></td> <td> <button type="button" class="clickimage" name="class-save" onclick="insert_trans_code()" id="class-save"> Add Code </button> </td> </tr> </table> </fieldset> <?php echo form_close(); ?>