|
Server IP : 217.21.85.138 / Your IP : 216.73.216.103 Web Server : LiteSpeed System : Linux in-mum-web906.main-hosting.eu 4.18.0-553.37.1.lve.el8.x86_64 #1 SMP Mon Feb 10 22:45:17 UTC 2025 x86_64 User : u915722082 ( 915722082) PHP Version : 7.4.33 Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail MySQL : OFF | cURL : ON | WGET : ON | Perl : OFF | Python : OFF Directory (0755) : /home/u915722082/.nvm/../public_html/invoicebill/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php include 'templates/header.php'; ?>
<?php include 'templates/navbar.php'; ?>
<div class="container mt-4">
<h2>New Order Entry</h2>
<form action="process_order.php" method="POST">
<div class="form-group">
<label for="order_date">Order Date</label>
<input type="date" class="form-control" id="order_date" name="order_date" value="<?php echo date('Y-m-d'); ?>" required>
</div>
<div class="form-group">
<label>Order Type</label><br>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="order_type" id="invoiceType" value="Invoice" required>
<label class="form-check-label" for="invoiceType">Invoice (Directly Invoiced)</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="order_type" id="slipType" value="SlipOnly">
<label class="form-check-label" for="slipType">Slip Only</label>
</div>
</div>
<!-- Invoice checkbox visible only if Invoice order type is selected -->
<div class="form-group" id="invoiceCheckboxDiv" style="display:none;">
<div class="form-check">
<input class="form-check-input" type="checkbox" id="is_accounted" name="is_accounted" value="1">
<label class="form-check-label" for="is_accounted">Mark Invoice as Accounted</label>
</div>
</div>
<!-- Order Items (for simplicity, a single item entry is shown) -->
<div class="form-group">
<label for="product_id">Select Finished Good</label>
<select class="form-control" id="product_id" name="product_id" required>
<!-- Options can be generated dynamically from finished_goods table -->
<option value="1">Chemical A - Liquid - 1L</option>
<option value="2">Chemical B - Powder - 500g</option>
</select>
</div>
<div class="form-group">
<label for="quantity">Quantity</label>
<input type="number" class="form-control" id="quantity" name="quantity" required>
</div>
<div class="form-group">
<label for="packaging_type">Packaging Type</label>
<select class="form-control" id="packaging_type" name="packaging_type" required>
<option value="Carton">Carton</option>
<option value="Sack">Sack</option>
</select>
</div>
<button type="submit" class="btn btn-primary">Submit Order</button>
</form>
</div>
<script>
// Toggle invoice checkbox based on order type
document.addEventListener('DOMContentLoaded', function(){
const invoiceType = document.getElementById('invoiceType');
const slipType = document.getElementById('slipType');
const invoiceCheckboxDiv = document.getElementById('invoiceCheckboxDiv');
function toggleInvoiceCheckbox(){
if(invoiceType.checked){
invoiceCheckboxDiv.style.display = 'block';
} else {
invoiceCheckboxDiv.style.display = 'none';
}
}
invoiceType.addEventListener('change', toggleInvoiceCheckbox);
slipType.addEventListener('change', toggleInvoiceCheckbox);
});
</script>
<?php include 'templates/footer.php'; ?>