?
Current Path : /home1/savoy/public_html/savoyglobal.net/sec/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/public_html/savoyglobal.net/sec/application/views/accounting/edit_journal_voucher.php |
<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); $this->load->view('accounting/accountingfunctions'); $this->load->view('documentreadyfunctions'); $accounts = $this->mastermodel->getdatas('finance_chart_master', 'chart_type_id'); ?> <script src="<?= base_url() ?>assets/scripts/jquery.autocomplete.js"></script> <script type="text/javascript"> $(document).ready(function() { checkfiscalyear(); suggestaccount('.payment_account'); $(".delRow_payment").btnDelRow(function() { getSum(); }); $(".addRow_payment").btnAddRow({inputBoxAutoNumber: true}, function(row) { suggestaccount('.payment_account'); }, function(row) { var rowIndex = row.index() + 1; return validateRow(); } ); }); </script> <div class="row-fluid"> <div class="tab-pane " id="tab_2"> <div class="portlet box blue"> <div class="portlet-title"> <div class="caption"><i class="icon-reorder"></i>Updating Journal Voucher</div> <div class="tools"> <a href="#" onclick="viewdata('accounting', 'viewinaccountingsearch', 'search_journal_voucher', 'view_journal_voucher', '<?= $_SESSION['pagenum']; ?>')" class="remove"></a> </div> </div> <div class="portlet-body form"> <!-- BEGIN FORM--> <?php $attributes = array('id' => 'validateform', 'class' => 'form-horizontal validate'); echo form_open('accounting/addinaccounting/update_journal_voucher/view_journal_voucher/1', $attributes); ?> <input type="hidden" value="<?= $journal_refs->journal_id ?>" name="journal_id" id="journal_id"> <input type="hidden" name="transaction_id" value="3"/> <h3>Edit Journal Voucher</h3> <div class="row-fluid"> <div class="span6 "> <div class="control-group"> <label class="control-label">Transaction Cod:</label> <div class="controls"> <input class="span12" type="text" readonly="readonly" value="<?= $journal_refs->reference ?>"/> </div> </div> </div> <div class="span6 "> <div class="control-group"> <label class="control-label">Date:</label> <div class="controls"> <input class="span12 required calfocus" type="text" name="journal_voucher_date" id="journal_voucher_date" value="<?= $this->mastermodel->convertdatenormalformat($journal_refs->journal_date) ?>"/> </div> </div> </div> </div> <div class="portlet box blue"> <div class="portlet-title"> <div class="caption"><i class="icon-check"></i> Deposit Items</div> </div> <div class="portlet-body"> <div class="row-fluid"> <div class="control-group"> <table class="table table-striped table-hover table-bordered" id="sample_3" style="background-color: white;"> <tr> <th>Acc code</th> <th>Debit</th> <th>Credit</th> <th>Description</th> <th><input type="button" id="button2" value="Add More" class="addRow_payment" title="Add Row" style="width:75px;"/></th> </tr> <?php $k = 1; $sum_deb = 0; $sum_cre = 0; foreach ($journal as $row) { if ($row['debit'] > 0) { $debit = $row['debit']; $sum_deb+=$debit; $credit = '0'; } else { $credit = $row['credit']; $sum_cre+=$credit; $debit = '0'; } $account=$this->mastermodel->get_data_srow('finance_chart_master', $row['chart_account_code'], 'chart_account_code'); ?> <tr> <td> <input type="text" name="account<?=$k?>" id="account1" data-id='account_id<?=$k?>' value='<?=$account->chart_account_name.'-'.$row['chart_account_code']?>' class="required span12 payment_account" /> <input type="hidden" name="account_id<?=$k?>" id="account_id<?=$k?>" value="<?=$account->chart_master_id.'~'.$account->chart_account_code.'~'.$account->chart_account_name?>"/> </td> <td> <input type="text" name="debit<?=$k?>" id="debit<?=$k?>" onblur="validateAmount(this)" class="auto text_r span12" value="<?=$row['debit']?>"/> </td> <td> <input type="text" name="credit<?=$k?>" id="credit<?=$k?>" onblur="validateAmount(this)" class="auto text_r span12" value="<?=$row['credit']?>"/> </td> <td> <textarea name="description<?=$k?>" id="description<?=$k?>" class="span12"><?=$row['description']?></textarea> </td> <td> <img style="float: right; vertical-align: top;"src="<?= base_url() ?>assets/img/close.png" alt="Delete Row" class="delRow clickimage" title="Delete Row"/> </td> </tr> <?php $k++; } ?> </table> <table class="table table-striped table-hover table-bordered" style="background-color: white;"> <tr> <th width="25%" style="text-align: right">Total</th> <th width="20%"> <input type="text" id="sumdebit" class="newcls text_r" readonly="readonly" value="<?= number_format($sum_deb,2)?>" name="sumdebit"/> <!--<input type="text" id="showsumdebit" style="width:135px" class="newcls auto" readonly="readonly" value="0.00" />--> </th> <th width="20%"> <input type="text" id="sumcredit" class="newcls text_r" readonly="readonly" value="<?= number_format($sum_cre,2)?>" name="sumcredit"/> <!--<input type="text" id="showsumcredit" style="width:135px" class="newcls auto" readonly="readonly" value="0.00" />--> </th> <th width="35%" colspan="2"></th> </tr> </table> </div> </div> </div> </div> <div class="form-actions"> <input type="hidden" name="tab_name" value="payment_voucher"/> <input type="hidden" name="resfunction" value="search_payment_voucher"/> <button type="submit" onclick="return insertpayment()" class="btn blue"><i class="icon-ok"></i> Process Deposit</button> <button type="button" onclick="viewdata('accounting', 'viewinaccountingsearch', 'search_journal_voucher', 'view_journal_voucher', '<?= $_SESSION['pagenum']; ?>')" class="btn">Cancel</button> </div> <?php echo form_close(); ?> <!-- END FORM--> </div> </div> </div> </div>