-
Notifications
You must be signed in to change notification settings - Fork 1
/
ac_bankcashcoamapping.php
130 lines (107 loc) · 4.02 KB
/
ac_bankcashcoamapping.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<?php include "jquery.php";
include "getemployee.php";
include "config.php";
?>
<script type="text/javascript">
$(document).ready(function()
{
$('.sortable').each(function(i)
{
var table = $(this),
oTable = table.dataTable({
sDom: '<"block-controls"<"controls-buttons"p>>rti<"block-footer clearfix"lf>',
fnDrawCallback: function()
{
this.parent().applyTemplateSetup();
},
fnInitComplete: function()
{
this.parent().applyTemplateSetup();
}
});
table.find('thead .sort-up').click(function(event)
{
event.preventDefault();
var column = $(this).closest('th'),
columnIndex = column.parent().children().index(column.get(0));
oTable.fnSort([[columnIndex, 'asc']]);
return false;
});
table.find('thead .sort-down').click(function(event)
{
event.preventDefault();
var column = $(this).closest('th'),
columnIndex = column.parent().children().index(column.get(0));
oTable.fnSort([[columnIndex, 'desc']]);
return false;
});
});
});
</script>
<div id="control-bar" class="grey-bg clearfix"><div class="container_12">
<div class="float-right">
<button type="button" onClick="document.location='dashboardsub.php?page=ac_addbankcashcoamappingTop'"><img src="images/icons/fugue/tick-circle.png" width="16" height="16"> Add</button>
</div>
</div></div>
<section class="grid_12">
<div class="block-border">
<form class="block-content form" id="table_form" method="post" action="">
<h1>Bank/Cash to CoA Mapping</h1>
<table class="table sortable no-margin" cellspacing="0" style="size:50%" width="100%">
<thead>
<tr>
<th style="text-align:left"><span class="column-sort">
<a href="javascript:void(0)" title="Sort up" class="sort-up"></a>
<a href="javascript:void(0)" title="Sort down" class="sort-down"></a>
</span>Bank/Cash Code</th>
<th style="text-align:left"><span class="column-sort">
<a href="javascript:void(0)" title="Sort up" class="sort-up"></a>
<a href="javascript:void(0)" title="Sort down" class="sort-down"></a>
</span>Bank/CashBook Name</th>
<th style="text-align:left" title="Chart Of Account Code"><span class="column-sort">
<a href="javascript:void(0)" title="Sort up" class="sort-up"></a>
<a href="javascript:void(0)" title="Sort down" class="sort-down"></a>
</span>CoA Code</th>
<th style="text-align:left">A/c #</th><th>Actions</th>
</tr>
</thead>
<tbody>
<?php
include "config.php";
if($_SESSION['db'] == "feedatives")
{
if($_SESSION['sectorr'] == "all")
{
$query = "SELECT * FROM ac_bankmasters ORDER BY code ASC ";
}
else
{
$sectorr = $_SESSION['sectorr'];
$query = "SELECT * FROM ac_bankmasters WHERE code IN (SELECT code FROM ac_bankcashcodes WHERE sector = '$sectorr' ORDER BY code ASC)";
}
}
else
{
$query = "SELECT * FROM ac_bankmasters ORDER BY code ASC ";
}
$result = mysql_query($query,$conn);
while($row1 = mysql_fetch_assoc($result)) { ?>
<tr>
<td><?php echo $row1['code']; ?></td>
<td><?php echo $row1['name']; ?></td>
<td><?php echo $row1['coacode']; ?></td>
<td><?php echo $row1['acno']; ?></td>
<td><!--<a href="editbankmasters.php?id=<?php echo $row1['id']; ?>"><img src="sticky.png" style="border:0px" title="Edit"/></a> -->
<?php if(($row1['flag'] == '1') OR ($row1['tflag'] == '1')) { ?>
<img src="images/icons/fugue/lock.png" style="border:0px" title="Cannot Delete" /></a>
<?php } else { ?>
<a onclick="if(confirm('Are you sure,want to delete')) document.location ='ac_deletebankcashcoamapping.php?id=<?php echo $row1['id']; ?>'"><img src="images/icons/fugue/cross-circle.png" style="border:0px" title="Delete" /></a>
<?php } ?>
</td>
</tr>
<?php } ?>
</tbody>
</table>
</form>
</div>
</section>