?
Current Path : /home1/savoy/www/savoyglobal.net/eldertree/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/eldertree/application/views/accounting/post_auto_journal.php |
<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); $this->load->view('documentreadyfunctions'); $this->load->view('accounting/accountingfunctions'); $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(); }); </script> <div class="row-fluid"> <div class="tab-pane " id="tab_2"> <div class="portlet box yellow"> <div class="portlet-title"> <div class="caption"><i class="icon-reorder"></i>Creating Journal Voucher</div> <div class="tools"> <a href="#" onclick="viewdata('accounting','viewinaccountingsearch','search_auto_journal','view_fixed_journal','<?= $_SESSION['pagenum']; ?>')" class="remove"></a> </div> </div> <div class="portlet-body form"> <div id="viewmsg" style="width: 100%;float: left;height: 25px;"></div> <?php $attributes = array('id' => 'validateform', 'class' => 'form-horizontal validate'); echo form_open('accounting/addinaccounting/journal_unpost/view_fixed_journal/1', $attributes); ?> <input type="hidden" name="transaction_id" value="3"/> <h4 style="text-align: center;"> Add Auto Journal</h4> <table class="table table-striped table-hover table-bordered" id="sample_3"> <tr> <th>Transaction Code</th> <th>Date</th> </tr> <tr> <td> <input class="span12" type="text" readonly="readonly" value="Auto - Generated"/> </td> <td> <input class="span12 calfocus required" type="text" name="journal_voucher_date" id="journal_voucher_date"/> </td> </tr> </table> <h4 style="text-align: center;"> Deposit Items</h4> <input type="hidden" name="counter" id="counter" value="0"/> <input type="hidden" name="counter_check" id="counter_check"/> <input type="hidden" name="class_ch" id="class_ch"/> <table class="table table-striped table-hover table-bordered" id="sample_3"> <tr> <td colspan="6" style="padding: 5px 0;"></td> </tr> <tr> <th>Acc code</th> <th>Debit</th> <th>Credit</th> <th>Description</th> </tr> <?php $sumdebit = 0; $sumcredit = 0; $i = 1; foreach ($journal as $row) { $debit = 0; $credit = 0; if ($row['debit'] > 0) $debit = $row['debit']; if ($row['credit'] > 0) $credit = $row['credit']; $sumdebit+=$debit; $sumcredit+=$credit ?> <tr id="dvFiles0"> <td> <?php foreach ($accounts as $value) { if ($value["chart_account_code"] == $row['chart_account_code']) { ?> <input style='width:185px;' type="hidden" id="code<?= $i ?>" name="code<?= $i ?>" readonly="readonly" value="<?= $value["chart_account_code"] ?>"/> <input class="span12" type="text" id="code_id<?= $i ?>" name="code_id<?= $i ?>" readonly="readonly" value="<?= $value["chart_account_code"] . $value["chart_account_name"] ?>"/> <?php } } ?> </td> <td> <input type="text" class="auto span12" id="debit<?= $i ?>" name="debit<?= $i ?>" readonly="readonly" value="<?= $debit ?>"/> </td> <td> <input type="text" class="auto span12" id="credit<?= $i ?>" name="credit<?= $i ?>" readonly="readonly" value="<?= $credit ?>"/> </td> <td style="padding-bottom:15px;"> <textarea id="description<?= $i ?>" name="description<?= $i ?>" class="span12" readonly="readonly" ></textarea> </td> </tr> <?php $i++; } ?> </table> <div id="adddiv"></div> <table class="table table-striped table-hover table-bordered" id="sample_3"> <tr> <th width="30%" style="text-align: right">Total</th> <th width="15%"> <input type="text" id="sumdebit" class="newcls" readonly="readonly" value="<?= $sumdebit ?>" name="sumdebit" style="text-align: right;width: 180px;"/> </th> <th width="15%"> <input type="text" id="sumcredit" class="newcls" readonly="readonly" value="<?= $sumcredit ?>" name="sumcredit" style="text-align: right;width: 180px;"/> </th> <th colspan="2"></th> </tr> </table> <input type="hidden" value="0" name="refid"> <br/> <div class="form-actions"> <button type="submit" id="button1" class="btn blue" onclick="addformdata('validateform')"><i class="icon-ok"></i>Post</button> <button type="button" onclick="viewdata('accounting','viewinaccountingsearch','search_auto_journal','view_fixed_journal','<?= $_SESSION['pagenum']; ?>')" class="btn">Cancel</button> </div> </div> </div> </div> </div>