NonInventPurchasingSystem/CPRNIMS.WebApps/Views/POMgmt/CustomPO.cshtml
2026-05-20 16:50:48 +08:00

204 lines
8.9 KiB
Plaintext

<body>
<div class="container-fluid">
<div class="row table-container shadow-lg p-2 mb-3 bg-white rounded">
<div class="header-container" style="margin-bottom:10px">
<h2 id="customPOHeading">Custom P.O. Creation</h2>
</div>
<div class="row" style="margin-bottom:10px">
<!-- Left side (half of the row) -->
<div class="col-12 mb-2">
<div class="row align-items-end">
<!-- PO No -->
<div class="col-md-2">
<div class="form-group">
<label for="poNo">
PO No.
<i class="bx bx-pencil"
style="color: orange; font-size: 1.2rem; cursor: pointer;"
onclick="enablePONoAutocomplete()"></i>
</label>
<input type="search" readonly id="poNo" class="form-control">
<input type="hidden"
id="poId"
class="form-control"
name="poId" />
</div>
</div>
<!-- Final PO No -->
<div class="col-md-2">
<div class="form-group">
<label for="poNoFinal">Final PO No.</label>
<input readonly id="poNoFinal" class="form-control">
</div>
</div>
<!-- PO Type -->
<div class="col-md-2">
<div class="form-group">
<label for="poType">PO Type</label>
<select class="form-control"
name="poType"
id="poType"
onchange="customFormPOElemComponent(this.value)">
<option value="0" disabled selected>
-Select PO Type-
</option>
<option value="1">SI</option>
<option value="2">DR</option>
<option value="3">Import</option>
</select>
</div>
</div>
<!-- Supplier (Wider) -->
<div class="col-md-6">
<div class="form-group">
<label for="supplierName">Supplier</label>
<input type="search"
id="supplierName"
class="form-control"
name="supplierName" />
<input type="hidden"
id="supplierId"
name="supplierId" />
</div>
</div>
</div>
</div>
</div>
<br />
<div id="CustomFormPOElemContainer">
</div>
</div>
<div class="table-container shadow-lg p-3 mb-3 bg-white rounded">
<button type="button" class="btn-choose"
id="chooseItem" onclick="viewPRWOCanvass()">
Choose Item
</button>
<br />
<div class="table-container shadow-lg p-2 mb-3 bg-white rounded">
<table id="PODataTable" class="row-border" style="width: 100%;">
<thead class="thead-dark">
<tr>
<th>Action</th>
<th style="width:6%;">PRNo</th>
<th style="width:7%;">Qty</th>
<th style="width:7%;">UOM</th>
<th style="width:8%;">ItemNo</th>
<th style="width:15%;">ItemName</th>
<th style="width:29%;">Specification</th>
<th style="width:8%;">UnitPrice</th>
<th style="width:10%;">TotalAmount</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<div class="modal-footer">
<button type="button" id="clearCustomPage"
onclick="clearCustomTable()"
class="btn btn-outline-secondary px-4"
style="margin-bottom:20px; margin-right:10px;">
<i class="bi bi-x-circle me-2"></i>Cancel
</button>
<button id="btnSubmitPO" type="button" class="btn btn-success" onclick="postPutCustomPO();" style="margin-bottom:20px; margin-right:10px;">
<i class="bi bi-check-circle me-2"></i> Submit
</button>
</div>
</div>
</div>
</div>
<!-- Modal OtherCharges-->
<div class="modal fade custom-modal-backdrop" id="addCharges"
tabindex="-1" aria-labelledby="addChargesLabel" data-bs-backdrop="static">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h3 id="addChargesLabel" class="modal-title">
Other Charges List
</h3>
</div>
<div class="modal-body">
<button type="button" class="btn btn-success"
id="chooseItem" onclick="viewOtherChargesModal(0,'n/a')">
Add new
</button>
<br />
<br />
<table id="SourceChargesTable" class="row-border" style="width: 100%;">
<colgroup>
<col style="width:10%" />
<col style="width:65%" />
<col style="width:15%" />
<col style="width:10%" />
</colgroup>
<thead>
<tr>
<th>
All
<input id="selectAllCheckboxItem" type="checkbox" class="selectAllCheckboxItem" />
</th>
<th>Charges</th>
<th style="text-align:center;width:15%;">Amount</th>
<th>Action</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-bs-dismiss="modal">Back</button>
<button type="button" id="btnAddCharges" onclick="AddOtherCharges()" class="btn btn-success">Add</button>
</div>
</div>
</div>
</div>
</div>
<!-- Modal viewOtherChargesModal-->
<div class="modal fade custom-modal-backdrop" id="viewOtherChargesModal" tabindex="-1"
aria-labelledby="docsRequiredLabel"
data-bs-backdrop="static">
<div class="modal-dialog modal-lg" role="document" data-bs-backdrop="static">
<div class="modal-content">
<div class="modal-header">
<h5 id="otherChargesHeader" class="modal-title">
Update other charges
</h5>
</div>
<div class="modal-body">
<div class="form-group">
<label for="otherChargesName">Other Charges Name</label>
<input id="otherChargesName" class="form-control" style="margin-top:10px" placeholder="input here..." />
</div>
</div>
<input hidden id="otherChargesId" />
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-bs-dismiss="modal">Back</button>
<button type="button" id="btnPostPutDoc" onclick="postPutOtherCharges()" class="btn btn-success">Save</button>
</div>
</div>
</div>
</div>
<input hidden id="poTypeId"/>
<link href="~/css/po/CustomPOV3.css" rel="stylesheet" />
<script src="~/JsFunctions/PO/CustomPOV9.js"></script>
@await Html.PartialAsync("PagesView/PR/_PRWOCanvass")
@await Html.PartialAsync("PagesView/PO/_POScripts")
</body>