-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrep_noyact.php
89 lines (77 loc) · 2.46 KB
/
rep_noyact.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
<?php
// $flagNoAuth =true;
require ('common/auth.php');
if ($_GET['tab']){
require ('classes/reports.class.php');
$sql = "SELECT *, edit_date as timestamp FROM vw_master
LEFT JOIN vw_journal ON source=guid
LEFT JOIN stbl_user ON usrID=edit_by
WHERE posted=1 AND vw_master.scenario='{$_GET['tab']}' AND company='{$company}'
AND (IFNULL(account,'') = '' OR IFNULL(item,'')='')
GROUP BY guid
ORDER BY vw_master.timestamp DESC";
$rs =$oSQL->q($sql);
while ($rw=$oSQL->f($rs)){
$data[] = $rw;
}
?>
<h3>Missing YACT or Account</h3>
<button onclick="repost('<?php echo $_GET['tab']; ?>', event);">Repost documents</button>
<div id='div_<?php echo $_GET['tab'];?>'>
<?php
Reports::getJournalEntries($data);
?>
</div>
<?php
$data = Array();
$sql = "SELECT *, edit_date as timestamp FROM vw_master
LEFT JOIN vw_journal ON source=guid
LEFT JOIN stbl_user ON usrID=edit_by
WHERE posted=1 AND vw_master.scenario='{$_GET['tab']}' AND company='{$company}'
AND IFNULL(vw_master.pc,0) = 0
GROUP BY guid
ORDER BY vw_master.timestamp DESC";
$rs =$oSQL->q($sql);
while ($rw=$oSQL->f($rs)){
$data[] = $rw;
}
?>
<h3>Missing PC</h3>
<?php
Reports::getJournalEntries($data);
$data = Array();
$sql = "SELECT yctID,yctTitle FROM vw_yact WHERE yctID LIKE 'J%'";
$rs = $oSQL->q($sql);
while ($rw = $oSQL->f($rs)){
$arrYact['code'][] = $rw['yctID'];
$arrYact['title'][] = $rw['yctTitle'];
}
$strAccounts = "'".implode("','",$arrYact['code'])."'";
$sql = "SELECT *, edit_date as timestamp FROM vw_master
LEFT JOIN vw_journal ON source=guid
LEFT JOIN stbl_user ON usrID=edit_by
WHERE posted=1 AND vw_master.scenario='{$_GET['tab']}' AND company='{$company}'
##AND IFNULL(vw_master.activity,'') = ''
AND IFNULL(prtGHQ,'')=''
AND account IN ({$strAccounts})
GROUP BY guid
ORDER BY vw_master.timestamp DESC";
// echo '<pre>',$sql,'</pre>';
$rs =$oSQL->q($sql);
while ($rw=$oSQL->f($rs)){
$data[] = $rw;
}
?>
<h3>Missing Activity</h3>
<p><?php echo implode(", ",$arrYact['title']);?></p>
<?php
Reports::getJournalEntries($data);
} else {
require ('classes/budget.class.php');
$arrJS[] = 'js/journal.js';
include ('includes/inc-frame_top.php');
echo '<h1>',$arrUsrData["pagTitle$strLocal"],'</h1>';
echo Budget::getScenarioTabs();
include ('includes/inc-frame_bottom.php');
}
?>