-
Notifications
You must be signed in to change notification settings - Fork 4
/
UnassignedStkOfCust.php
71 lines (60 loc) · 1.96 KB
/
UnassignedStkOfCust.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
<?php
$row_cnt = 0;
$CustInt = @$CustNo;
$SQLstringEP = "select * from expenses where InvNo = '' and CustNo = $CustInt order by ExpNo desc";
if ($resultEP = mysqli_query($DBConnect, $SQLstringEP)) {
while ($row = mysqli_fetch_assoc($resultEP)) {
$row_cnt = mysqli_num_rows($resultEP);
}
mysqli_free_result($resultEP);
}
if ($row_cnt > 0)
{
echo "<b><br><font size = '3'>Unassigned customer's expenses:</b></font>
</a>UnassignedStkOfCust.php";
echo "<a href='assignStk.php?CustNo=".$CustInt."' target=_blank> Add Expense for customer</a> <a href='editExpCQ.php?CustNo=".$CustInt."' target=_blank> Edit Customer's </a>";
$NN = '';
$NNN = '';
if ($result = mysqli_query($DBConnect, $SQLstringEP)) {
echo "<table border='1' >\n";
echo "<tr><th>ExpNo</th>";
echo "<th>ExpDesc </th>";
echo "<th>SupCode</th>";
echo "<th>PurchDate</th>";
echo "<th>ExVAT</th>";
echo "<th>inVAT</th>";
echo "<th>Inv</th>";
echo "<th>Notes</th>\n";
//echo "<th>CustNo</th>\n";
echo "<th>Serial</th>\n";
echo "</tr>\n";
while ($row = mysqli_fetch_assoc($result))
{
$ExpNo = $row['ExpNo'];
echo "<th> <a href = 'assignStkInvGET.php?CustNo=$CustInt&ExpNo=$ExpNo' target=_blank> ".$row['ExpNo']."</a></th>";
echo "<th>".$row['ExpDesc']."</th>";
echo "<th>".$row['SupCode']."</th>";
echo "<th>".$row['PurchDate']."</th>";
echo "<th>".$row['ProdCostExVAT']."</th>";
$PEX= $row['ProdCostExVAT'];
$PIV = number_format($PEX*1.15 , 2, '.', '');
echo "<th>".$PIV."</th>";
echo "<th>".$row['InvNo']."</th>";
echo "<th>".$row['Notes']."</th>";
//$CCCC = $row['CustNo'];
//$s = "SELECT * from customer where CustNo = '$CCCC'";
//if ($resultCC = mysqli_query($DBConnect, $s)) {
//while ($rowCC = mysqli_fetch_assoc($resultCC))
//{
//$NN = $rowCC['CustLN'];
//$NNN = $rowCC['CustFN'];
//}}
//echo "<th>".$row['CustNo'].$NN.$NNN."</th>";
echo "<th>".$row['SerialNo']."</th>";
echo "</tr>";
}
echo "</table >";
mysqli_free_result($result);
}
}
?>