forked from webERP-team/webERP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathZ_ClearPOBackOrders.php
34 lines (29 loc) · 1.25 KB
/
Z_ClearPOBackOrders.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
<?php
// Z_ClearPOBackOrders.php
//
$PageSecurity =15;
include ('includes/session.php');
$Title = _('UTILITY PAGE To Clear purchase orders with quantity on back order');
include('includes/header.php');
if (isset($_POST['ClearSupplierBackOrders'])) {
$SQL = "UPDATE purchorderdetails INNER JOIN purchorders ON purchorderdetails.orderno=purchorders.orderno SET purchorderdetails.quantityord=purchorderdetails.quantityrecd, purchorderdetails.completed=1 WHERE quantityrecd >0 AND supplierno>= '" . $_POST['FromSupplierNo'] . "' AND supplierno <= '" . $_POST['ToSupplierNo'] . "'";
echo $SQL;
$result = DB_query($SQL);
}
echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">';
echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
echo '
<div class="centre">
<table>
<tr><td>' . _('From Supplier Code') . ':</td>
<td><input type="text" name="FromSupplierNo" size="20" maxlength="20" /></td>
</tr>
<tr><td> ' . _('To Supplier Code') . ':</td>
<td><input type="text" name="ToSupplierNo" size="20" maxlength="20" /></td>
</tr>
</table>
<button type="submit" name="ClearSupplierBackOrders">' . _('Clear Supplier Back Orders') . '</button>
<div>
</form>';
include('includes/footer.php');
?>