Merge branch 'main' of bitbucket.org:venbainformationtechnology/the_mechanic
This commit is contained in:
commit
1d5a02d688
@ -66,6 +66,10 @@
|
|||||||
<!-- Datatables init -->
|
<!-- Datatables init -->
|
||||||
<script src="<?php echo base_url(); ?>/assets/js/pages/datatables.init.js"></script>
|
<script src="<?php echo base_url(); ?>/assets/js/pages/datatables.init.js"></script>
|
||||||
|
|
||||||
|
<!-- Toster -->
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/toastr@2.1.4/toastr.min.js"></script>
|
||||||
|
<link href="https://cdn.jsdelivr.net/npm/toastr@2.1.4/build/toastr.min.css" rel="stylesheet">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@ -26,7 +26,14 @@
|
|||||||
|
|
||||||
<!-- icons -->
|
<!-- icons -->
|
||||||
<link href="<?php echo base_url()?>/assets/css/icons.min.css" rel="stylesheet" type="text/css" />
|
<link href="<?php echo base_url()?>/assets/css/icons.min.css" rel="stylesheet" type="text/css" />
|
||||||
|
<style>
|
||||||
|
/* Override toastr font color */
|
||||||
|
.toast-warning {
|
||||||
|
color: black !important;
|
||||||
|
background-color: #edd179 !important; /* Set background color to a solid color */
|
||||||
|
opacity: 1 !important; /* Set opacity to 1 to remove transparency */
|
||||||
|
}
|
||||||
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="loading" data-layout-mode="detached" data-layout='{"mode": "light", "width": "fluid", "menuPosition": "fixed", "sidebar": { "color": "light", "size": "default", "showuser": true}, "topbar": {"color": "dark"}, "showRightSidebarOnPageLoad": true}'>
|
<body class="loading" data-layout-mode="detached" data-layout='{"mode": "light", "width": "fluid", "menuPosition": "fixed", "sidebar": { "color": "light", "size": "default", "showuser": true}, "topbar": {"color": "dark"}, "showRightSidebarOnPageLoad": true}'>
|
||||||
|
|||||||
@ -25,8 +25,8 @@
|
|||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<label for="inputEmail4" class="col-form-label">Client Name</label>
|
<label for="inputEmail4" class="col-form-label">Client Name</label>
|
||||||
<select class="form-control cleint-select SelExample" name="client_id" required id="SelExample" >
|
<select class="form-control cleint-select SelExample" name="client_id" id="SelExample" <?= $sales['client_id'] == 0 ? 'required' : '' ?>>
|
||||||
<option value="">Select a Client</option>
|
<?= $sales['client_id'] == 0 ? '<option value="">Select a Client</option>' : '' ?>
|
||||||
<?php foreach ($client as $value) : ?>
|
<?php foreach ($client as $value) : ?>
|
||||||
<?php if ((int)$value["isactive"] === 1) : ?>
|
<?php if ((int)$value["isactive"] === 1) : ?>
|
||||||
<option value="<?= $value["client_id"] ?>" <?= isset($sales['client_id']) && $sales['client_id'] == $value["client_id"] ? 'selected' : '' ?>>
|
<option value="<?= $value["client_id"] ?>" <?= isset($sales['client_id']) && $sales['client_id'] == $value["client_id"] ? 'selected' : '' ?>>
|
||||||
@ -50,7 +50,7 @@
|
|||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-4">
|
<div class="form-group col-md-4">
|
||||||
<label for="inputPassword4" class="col-form-label">Address</label>
|
<label for="inputPassword4" class="col-form-label">Address</label>
|
||||||
<input type="text" class="form-control" name="billing_address" placeholder="Address"value="<?= isset($sales['billing_address']) ? $sales['billing_address'] : '' ?>" >
|
<input type="text" class="form-control" name="billing_address" placeholder="Address"value="<?= isset($sales['billing_address']) ? $sales['billing_address'] : '' ?>" required>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@ -58,24 +58,24 @@
|
|||||||
|
|
||||||
<div class="form-group col-md-4">
|
<div class="form-group col-md-4">
|
||||||
<label for="inputPassword4" class="col-form-label">City</label>
|
<label for="inputPassword4" class="col-form-label">City</label>
|
||||||
<input type="text" class="form-control" name="city" placeholder="City"value="<?= isset($sales['billing_city']) ? $sales['billing_city'] : '' ?>" >
|
<input type="text" class="form-control" name="city" placeholder="City"value="<?= isset($sales['billing_city']) ? $sales['billing_city'] : '' ?>" required>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-4">
|
<div class="form-group col-md-4">
|
||||||
<label for="inputPassword4" class="col-form-label">State</label>
|
<label for="inputPassword4" class="col-form-label">State</label>
|
||||||
<input type="text" class="form-control" name="state" placeholder="State"value="<?= isset($sales['billing_state']) ? $sales['billing_state'] : '' ?>" >
|
<input type="text" class="form-control" name="state" placeholder="State"value="<?= isset($sales['billing_state']) ? $sales['billing_state'] : '' ?>" required>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-4">
|
<div class="form-group col-md-4">
|
||||||
<label for="inputPassword4" class="col-form-label">Country</label>
|
<label for="inputPassword4" class="col-form-label">Country</label>
|
||||||
<input type="text" class="form-control" name="country" placeholder="Country"value="<?= isset($sales['billing_country']) ? $sales['billing_country'] : '' ?>" >
|
<input type="text" class="form-control" name="country" placeholder="Country"value="<?= isset($sales['billing_country']) ? $sales['billing_country'] : '' ?>" required>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-4">
|
<div class="form-group col-md-4">
|
||||||
<label for="inputPassword4" class="col-form-label">Pin Code</label>
|
<label for="inputPassword4" class="col-form-label">Pin Code</label>
|
||||||
<input type="text" class="form-control" name="postalcode" placeholder="Pin Code"value="<?= isset($sales['billing_postal_code']) ? $sales['billing_postal_code'] : '' ?>" maxlength="6" minlength="6">
|
<input type="text" class="form-control" name="postalcode" placeholder="Pin Code"value="<?= isset($sales['billing_postal_code']) ? $sales['billing_postal_code'] : '' ?>" maxlength="6" minlength="6" required>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group col-md-4">
|
<div class="form-group col-md-4">
|
||||||
<label for="inputPassword4" class="col-form-label">Mobile No</label>
|
<label for="inputPassword4" class="col-form-label">Mobile No</label>
|
||||||
<input type="text" class="form-control" name="mobile_no" placeholder="Mobile"value="<?= isset($sales['mobile_no']) ? $sales['mobile_no'] : '' ?>" >
|
<input type="text" class="form-control" name="mobile_no" placeholder="Mobile" value="<?= isset($sales['mobile_no']) ? $sales['mobile_no'] : '' ?>" maxlength="10" minlength="10" onkeypress = "return onlyNumbers(event)" required>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -221,7 +221,8 @@ $(document).ready(function() {
|
|||||||
function validateProductAdded() {
|
function validateProductAdded() {
|
||||||
var rowCount = $('#itemTable tbody tr').length;
|
var rowCount = $('#itemTable tbody tr').length;
|
||||||
if (rowCount < 1) {
|
if (rowCount < 1) {
|
||||||
alert("Please add at least one product.");
|
toastr.warning("Please add at least one product.");
|
||||||
|
// alert("Please add at least one product.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@ -427,6 +428,14 @@ $(document).ready(function() {
|
|||||||
// Define the clients array and populate it with data
|
// Define the clients array and populate it with data
|
||||||
var clients = <?php echo json_encode($client); ?>;
|
var clients = <?php echo json_encode($client); ?>;
|
||||||
</script>
|
</script>
|
||||||
|
<script>
|
||||||
|
function onlyNumbers(event){
|
||||||
|
var charcode;
|
||||||
|
charcode = event.which || event.keyCode;
|
||||||
|
if(charcode>= 48 && charcode <= 57)return true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
<link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-beta.1/dist/css/select2.min.css" rel="stylesheet">
|
<link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-beta.1/dist/css/select2.min.css" rel="stylesheet">
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.13/js/select2.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.13/js/select2.min.js"></script>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user