CHANGE_VIEW_ALIGNMENT_FIX
This commit is contained in:
parent
6e2df9bcaa
commit
75e6d7653c
@ -244,6 +244,7 @@ class Supplier extends BaseController
|
||||
$file2 = $this->request->getFile('Cert_GST');
|
||||
$file3 = $this->request->getFile('Cert_BANK');
|
||||
$path = ROOTPATH.'public/uploads/images/';
|
||||
|
||||
if($PAN){ $supplier['PAN'] = $PAN;}
|
||||
if($GSTNo){ $supplier['GSTNO'] = $GSTNo;}
|
||||
if ($file2 && $file2->isValid() && !$file2->hasMoved()) {
|
||||
|
||||
@ -769,7 +769,7 @@ if (!empty($filenames)) {
|
||||
url: "<?php echo base_url() ?>companycontroller/deletefile",
|
||||
success: function(data) {
|
||||
if (data) {
|
||||
$('#content').loader('hide');
|
||||
// $('#content').loader('hide');
|
||||
alert(data);
|
||||
|
||||
location.reload();
|
||||
@ -940,7 +940,7 @@ if (!empty($filenames)) {
|
||||
|
||||
//if(bankname != '' || ifsccode != '' || bankaddress != '' )
|
||||
//{
|
||||
$('#content').loader('show');
|
||||
// $('#content').loader('show');
|
||||
$.ajax({
|
||||
|
||||
data: {
|
||||
@ -951,7 +951,7 @@ if (!empty($filenames)) {
|
||||
|
||||
success: function(data) {
|
||||
|
||||
$('#content').loader('hide');
|
||||
// $('#content').loader('hide');
|
||||
alert(data);
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -247,230 +247,234 @@ if (!empty($supplier)) {
|
||||
</style>
|
||||
|
||||
<div class="content-page">
|
||||
<div class="content">
|
||||
<?php helper('form'); ?>
|
||||
<?php
|
||||
$error = session()->getFlashdata('error');
|
||||
if ($error) { ?>
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<?php echo session()->getFlashdata('error'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php
|
||||
$success = session()->getFlashdata('success');
|
||||
if ($success) { ?>
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<?php echo session()->getFlashdata('success'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<!-- Start Content-->
|
||||
<div class="container-fluid">
|
||||
<div class="box box-success">
|
||||
<?php if (!empty($validation)) : ?>
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
<?php foreach ($validation as $error) : ?>
|
||||
<li><?= esc($error) ?></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<!-- form start -->
|
||||
</div>
|
||||
<!-- start page title -->
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<div class="col-6">
|
||||
<div class="page-title-box page-title-box-alt">
|
||||
<h4 class="page-title">Edit Supplier Details</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 text-right">
|
||||
|
||||
<a class="btn btn-dark waves-effect waves-light" href="<?php echo base_url(); ?>supplierlisting"><span class="bold">Back</span></a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
<div class="row">
|
||||
<div class="content">
|
||||
<?php helper('form'); ?>
|
||||
<?php
|
||||
$error = session()->getFlashdata('error');
|
||||
if ($error) { ?>
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<?php echo session()->getFlashdata('error'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php
|
||||
$success = session()->getFlashdata('success');
|
||||
if ($success) { ?>
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<?php echo session()->getFlashdata('success'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<!-- Start Content-->
|
||||
<div class="container-fluid">
|
||||
<div class="box box-success">
|
||||
<?php if (!empty($validation)) : ?>
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
<?php foreach ($validation as $error) : ?>
|
||||
<li><?= esc($error) ?></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<!-- form start -->
|
||||
</div>
|
||||
<!-- start page title -->
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<div class="col-6">
|
||||
<div class="page-title-box page-title-box-alt">
|
||||
<h4 class="page-title">Edit Supplier Details</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 text-right">
|
||||
|
||||
<a class="btn btn-dark waves-effect waves-light" href="<?php echo base_url(); ?>supplierlisting"><span class="bold">Back</span></a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body" style="padding: 1rem 2rem !important;">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body" style="padding: 1rem 2rem !important;">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<form class="form-horizontal" role="form" id="UpdateSupplier" action="<?php echo base_url() ?>editsupplier" method="post" enctype="multipart/form-data">
|
||||
<div class="box-body">
|
||||
<?php if ((int)$chk) { ?>
|
||||
<div class="row">
|
||||
<div class="col-md-6 text-left">
|
||||
<legend style="margin-left:-10px;color: #4f7c97;">Supplier Information</legend>
|
||||
</div>
|
||||
<div class="col-md-6 text-right">
|
||||
<input type="checkbox" id="isactive" <?php echo $IsActive; ?> name="isactive"> IsActive
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<!-- Supplier Information -->
|
||||
<div class="col-md-12" style="margin-bottom: 27px;">
|
||||
<div class="form-row" style="margin-bottom:10px;">
|
||||
<div class="col-md-3">
|
||||
<label class="col-form-label" for="SupplierName">Supplier Name<span class="badge">*</span></label>
|
||||
<input type="text" name="SupplierName" maxlength="100" id="supplierName" class="form-control" required value="<?php echo $SupplierName; ?>">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label class="col-form-label" for="ContactNumber">Contact Number<span class="badge">*</span></label>
|
||||
<input type="text" name="ContactNumber" onchange="return getContactNumberValidation();" id="ContactNumber" required maxlength="13" class="form-control" value="<?php echo $ContactNumber; ?>" title="Please Enter Mobile Number (or) Telephone Number" onkeypress="return isNumberKey(event)">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label class="col-form-label" for="AlternateContactNumber">Alternate Contact Number</label>
|
||||
<input type="text" name="AlternateContactNumber" onchange="return getValidAlternateNumber();" id="AlternateContactNumber" maxlength="13" class="form-control" value="<?php echo $AlternateContactNumber; ?>" title="Please Enter Mobile Number (or) Telephone Number" onkeypress="return isNumberKey(event)">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label class="col-form-label" for="EmailAddress">Email ID<span class="badge">*</span></label>
|
||||
<input type="email" name="emailid" id="emailid" required maxlength="100" class="form-control" value="<?php echo $EmailAddress; ?>" title="Please Enter valid mail address" onchange="validateEmail();">
|
||||
</div>
|
||||
</div>
|
||||
<form class="form-horizontal" role="form" id="UpdateSupplier" action="<?php echo base_url() ?>editsupplier" method="post" enctype="multipart/form-data">
|
||||
<div class="box-body">
|
||||
<?php if ((int)$chk) { ?>
|
||||
<div class="row">
|
||||
<div class="col-md-6 text-left">
|
||||
<legend style="margin-left:-10px;color: #4f7c97;">Supplier Information</legend>
|
||||
</div>
|
||||
<div class="col-md-6 text-right">
|
||||
<input type="checkbox" id="isactive" <?php echo $IsActive; ?> name="isactive"> IsActive
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<!-- Supplier Information -->
|
||||
<div class="col-md-12" style="margin-bottom: 27px;">
|
||||
<div class="form-row" style="margin-bottom:10px;">
|
||||
<div class="col-md-2">
|
||||
<label class="col-form-label" for="SupplierID">Supplier ID<span class="badge">*</span></label>
|
||||
<input type="text" name="SupplierID" id="SupplierID" class="form-control" readonly value="<?php echo $SupplierID; ?>">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label class="col-form-label" for="SupplierName">Supplier Name<span class="badge">*</span></label>
|
||||
<input type="text" name="SupplierName" maxlength="100" id="supplierName" class="form-control" required value="<?php echo $SupplierName; ?>">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label class="col-form-label" for="ContactNumber">Contact Number<span class="badge">*</span></label>
|
||||
<input type="text" name="ContactNumber" onchange="return getContactNumberValidation();" id="ContactNumber" required maxlength="13" class="form-control" value="<?php echo $ContactNumber; ?>" title="Please Enter Mobile Number (or) Telephone Number" onkeypress="return isNumberKey(event)">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label class="col-form-label" for="AlternateContactNumber">Alternate Contact Number</label>
|
||||
<input type="text" name="AlternateContactNumber" onchange="return getValidAlternateNumber();" id="AlternateContactNumber" maxlength="13" class="form-control" value="<?php echo $AlternateContactNumber; ?>" title="Please Enter Mobile Number (or) Telephone Number" onkeypress="return isNumberKey(event)">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label class="col-form-label" for="EmailAddress">Email ID<span class="badge">*</span></label>
|
||||
<input type="email" name="emailid" id="emailid" required maxlength="100" class="form-control" value="<?php echo $EmailAddress; ?>" title="Please Enter valid mail address" onchange="validateEmail();">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="col-md-12" style="margin-top:5px">
|
||||
<label for="SupplierType">Supplier Type</label>
|
||||
</div>
|
||||
<div class="col-md-1" style="margin-top:5px">
|
||||
<input type="checkbox" id="service" <?php echo $IsService; ?> name="service" value="1"> <b>SERVICE</b>
|
||||
</div>
|
||||
<div class="col-md-1.5" style="margin-top:5px">
|
||||
<input type="checkbox" id="rawmaterial" <?php echo $IsRawMaterial; ?> name="rawmaterial" value="1"> <b>RAW MATERIALS</b>
|
||||
</div>
|
||||
<div class="col-md-2" style="margin-top:5px">
|
||||
<input type="checkbox" id="maintanance" <?php echo $IsMaintanance; ?> name="maintanance" value="1"> <b>MAINTENANCE</b>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="col-md-12" style="margin-top:5px">
|
||||
<label for="SupplierType">Supplier Type</label>
|
||||
</div>
|
||||
<div class="col-md-1" style="margin-top:5px">
|
||||
<input type="checkbox" id="service" <?php echo $IsService; ?> name="service" value="1"> <b>SERVICE</b>
|
||||
</div>
|
||||
<div class="col-md-1.5" style="margin-top:5px">
|
||||
<input type="checkbox" id="rawmaterial" <?php echo $IsRawMaterial; ?> name="rawmaterial" value="1"> <b>RAW MATERIALS</b>
|
||||
</div>
|
||||
<div class="col-md-2" style="margin-top:5px">
|
||||
<input type="checkbox" id="maintanance" <?php echo $IsMaintanance; ?> name="maintanance" value="1"> <b>MAINTENANCE</b>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Address Section -->
|
||||
<legend style="margin-left:-10px;color: #4f7c97;">Address Details</legend>
|
||||
<div class="col-md-12" style="margin-bottom: 27px;">
|
||||
<div class="form-row">
|
||||
<div class="col-md-6">
|
||||
<label for="Address2">Address<span class="badge">*</span></label>
|
||||
<textarea type="text" class="form-control" id="Address" name="Address" maxlength="500" required rows="3"><?php echo $Address; ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Address Section -->
|
||||
<legend style="margin-left:-10px;color: #4f7c97;">Address Details</legend>
|
||||
<div class="col-md-12" style="margin-bottom: 27px;">
|
||||
<div class="form-row">
|
||||
<div class="col-md-6">
|
||||
<label for="Address2">Address<span class="badge">*</span></label>
|
||||
<textarea type="text" class="form-control" id="Address" name="Address" maxlength="500" required rows="3"><?php echo $Address; ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Tax Related Data -->
|
||||
<legend style="margin-left:-10px;color: #4f7c97;">Tax Related Data</legend>
|
||||
<div class="col-md-12" style="margin-bottom: 27px;">
|
||||
<div class="form-row" style="margin-bottom: 20px;">
|
||||
<div class="col-md-3">
|
||||
<label for="GSTNo">GST Number</label>
|
||||
<input type="text" id="GSTNo" name="GSTNo" onchange="validateGST();" maxlength="15" class="form-control" value="<?php echo $GSTNO; ?>" pattern="([0-9]){2}([A-Za-z]){5}([0-9]){4}([A-Za-z]){1}([0-9]){1}([Zz]){1}([A-Za-z0-9]){1}" style="text-transform:uppercase;" title="Please Enter 2 Digit Number and 5 Character and 4 Digit Numbers and 1 Character and 1 Number and 'Z' Character and 1 Number (or) Character " onkeypress="return alphaNumberic(event)">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label for="PAN">PAN</label>
|
||||
<input type="text" id="panno" maxlength="10" name="panno" onchange="validatePAN();" class="form-control" value="<?php echo $PAN; ?>" title="Please Enter 5 Character and 4 digit numbers and 1 Character format (Character must be in caps format)" pattern="([A-Za-z]){5}([0-9]){4}([A-Za-z]){1}" onkeypress="return alphaNumberic(event)" style="text-transform:uppercase;">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label style="margin-bottom: 1px !important;" for="Cert_GST">Select GST Document<br /><small>(only .pdf, .doc, .png, .jpg)</small></label>
|
||||
<input type="file" size="20" accept=".docx,.pdf,.doc,.jpg,.png" id="Cert_GST" name="Cert_GST" />
|
||||
<input type="hidden" id="hidden_Cert_GST" name="hidden_Cert_GST" value="<?php echo $hidden_Cert_GST; ?>" />
|
||||
</div>
|
||||
<?php if ($hidden_Cert_GST) { ?>
|
||||
<div class="col-md-3">
|
||||
<u><a title="previously uploaded GST Document" href="<?php echo base_url() . 'public/uploads/images/' . $hidden_Cert_GST ?>"><span>previously uploaded GST Document - </span><small><?= $hidden_Cert_GST; ?></small></a></u>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Tax Related Data -->
|
||||
<legend style="margin-left:-10px;color: #4f7c97;">Tax Related Data</legend>
|
||||
<div class="col-md-12" style="margin-bottom: 27px;">
|
||||
<div class="form-row" style="margin-bottom: 20px;">
|
||||
<div class="col-md-3">
|
||||
<label for="GSTNo">GST Number</label>
|
||||
<input type="text" id="GSTNo" name="GSTNo" onchange="validateGST();" maxlength="15" class="form-control" value="<?php echo $GSTNO; ?>" pattern="([0-9]){2}([A-Za-z]){5}([0-9]){4}([A-Za-z]){1}([0-9]){1}([Zz]){1}([A-Za-z0-9]){1}" style="text-transform:uppercase;" title="Please Enter 2 Digit Number and 5 Character and 4 Digit Numbers and 1 Character and 1 Number and 'Z' Character and 1 Number (or) Character " onkeypress="return alphaNumberic(event)">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label for="PAN">PAN</label>
|
||||
<input type="text" id="panno" maxlength="10" name="panno" onchange="validatePAN();" class="form-control" value="<?php echo $PAN; ?>" title="Please Enter 5 Character and 4 digit numbers and 1 Character format (Character must be in caps format)" pattern="([A-Za-z]){5}([0-9]){4}([A-Za-z]){1}" onkeypress="return alphaNumberic(event)" style="text-transform:uppercase;">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label style="margin-bottom: 1px !important;" for="Cert_GST">Select GST Document<br /><small>(only .pdf, .doc, .png, .jpg)</small></label>
|
||||
<input type="file" size="20" accept=".docx,.pdf,.doc,.jpg,.png" id="Cert_GST" name="Cert_GST" />
|
||||
<input type="hidden" id="hidden_Cert_GST" name="hidden_Cert_GST" value="<?php echo $hidden_Cert_GST; ?>" />
|
||||
</div>
|
||||
<?php if ($hidden_Cert_GST) { ?>
|
||||
<div class="col-md-3">
|
||||
<u><a title="previously uploaded GST Document" href="<?php echo base_url() . 'public/uploads/images/' . $hidden_Cert_GST ?>"><span>previously uploaded GST Document - </span><small><?= $hidden_Cert_GST; ?></small></a></u>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<legend style="margin-left:-10px;color: #4f7c97;">Bank Details</legend>
|
||||
<legend style="margin-left:-10px;color: #4f7c97;">Bank Details</legend>
|
||||
|
||||
<!-- Bank Details Inputs -->
|
||||
<div class="col-md-12" style="margin-bottom: 27px;">
|
||||
<div class="form-row" style="margin-bottom: 20px;">
|
||||
<div class="col-md-4">
|
||||
<label for="accno">Account Number <span class="badge">*</span></label>
|
||||
<input type="text" id="accno" maxlength="20" name="accno" value="<?php echo $accno; ?>" class="form-control" onkeypress="return isNumberKey(event)" required>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label for="ifsc">IFSC Code <span class="badge">*</span></label>
|
||||
<input type="text" id="ifsc" name="ifsc" value="<?php echo $IFSCCode; ?>" class="form-control" maxlength="12" style="text-transform: uppercase" required>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label for="branchname">Bank Branch Name</label>
|
||||
<input type="text" id="branchname" name="branchname" value="<?php echo $branchname; ?>" class="form-control" maxlength="200">
|
||||
</div>
|
||||
</div>
|
||||
<!-- Bank Document Upload -->
|
||||
<div class="form-row" style="margin-bottom: 27px;">
|
||||
<div class="col-md-4">
|
||||
<label for="bankaddress">Bank Address</label>
|
||||
<input type="text" id="bankaddress" name="bankaddress" value="<?php echo $bankaddress; ?>" class="form-control" maxlength="200">
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label class="col-form-label" for="Cert_BANK">Select Bank Document<small> (only .pdf, .doc, .png, .jpg)</small></label>
|
||||
<input type="file" size="20" accept=".docx,.pdf,.doc,.jpg,.png" id="Cert_BANK" name="Cert_BANK" />
|
||||
<input type="hidden" id="hidden_Cert_BANK" name="hidden_Cert_BANK" value="<?php echo $hidden_Cert_BANK; ?>" />
|
||||
</div>
|
||||
<?php if ($hidden_Cert_BANK) { ?>
|
||||
<div class="col-md-4">
|
||||
<u>
|
||||
<a title="Previously uploaded Bank Document" href="<?php echo base_url() . 'public/uploads/images/' . $hidden_Cert_BANK ?>">
|
||||
<span>Previously uploaded BANK Document - </span>
|
||||
<small><?php echo $hidden_Cert_BANK; ?></small>
|
||||
</a>
|
||||
</u>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Bank Details Inputs -->
|
||||
<div class="col-md-12" style="margin-bottom: 27px;">
|
||||
<div class="form-row" style="margin-bottom: 20px;">
|
||||
<div class="col-md-4">
|
||||
<label for="accno">Account Number <span class="badge">*</span></label>
|
||||
<input type="text" id="accno" maxlength="20" name="accno" value="<?php echo $accno; ?>" class="form-control" onkeypress="return isNumberKey(event)" required>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label for="ifsc">IFSC Code <span class="badge">*</span></label>
|
||||
<input type="text" id="ifsc" name="ifsc" value="<?php echo $IFSCCode; ?>" class="form-control" maxlength="12" style="text-transform: uppercase" required>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label for="branchname">Bank Branch Name</label>
|
||||
<input type="text" id="branchname" name="branchname" value="<?php echo $branchname; ?>" class="form-control" maxlength="200">
|
||||
</div>
|
||||
</div>
|
||||
<!-- Bank Document Upload -->
|
||||
<div class="form-row" style="margin-bottom: 27px;">
|
||||
<div class="col-md-4">
|
||||
<label for="bankaddress">Bank Address</label>
|
||||
<input type="text" id="bankaddress" name="bankaddress" value="<?php echo $bankaddress; ?>" class="form-control" maxlength="200">
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label class="col-form-label" for="Cert_BANK">Select Bank Document<small> (only .pdf, .doc, .png, .jpg)</small></label>
|
||||
<input type="file" size="20" accept=".docx,.pdf,.doc,.jpg,.png" id="Cert_BANK" name="Cert_BANK" />
|
||||
<input type="hidden" id="hidden_Cert_BANK" name="hidden_Cert_BANK" value="<?php echo $hidden_Cert_BANK; ?>" />
|
||||
</div>
|
||||
<?php if ($hidden_Cert_BANK) { ?>
|
||||
<div class="col-md-4">
|
||||
<u>
|
||||
<a title="Previously uploaded Bank Document" href="<?php echo base_url() . 'public/uploads/images/' . $hidden_Cert_BANK ?>">
|
||||
<span>Previously uploaded BANK Document - </span>
|
||||
<small><?php echo $hidden_Cert_BANK; ?></small>
|
||||
</a>
|
||||
</u>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Payment Details -->
|
||||
<legend style="margin-left:-10px;color: #4f7c97;">Payment Details</legend>
|
||||
<!-- Payment Details -->
|
||||
<legend style="margin-left:-10px;color: #4f7c97;">Payment Details</legend>
|
||||
|
||||
<!-- Payable Terms Selection -->
|
||||
<div class="col-md-12" style="margin-bottom: 27px;">
|
||||
<div class="form-row" style="margin-bottom: 20px;">
|
||||
<div class="col-md-4">
|
||||
<label for="payablefrom">Payable Terms</label>
|
||||
<select class="form-control required select2" id="PaymentTerms" name="PaymentTerms" onchange="payment_hidden();">
|
||||
<option value="<?php echo $PaymentTerms; ?>"><?php echo $PaymentTerms; ?></option>
|
||||
<?php
|
||||
if (!empty($payment)) {
|
||||
foreach ($payment as $pm) { ?>
|
||||
<option value="<?php echo $pm->PaymentID; ?>"><?php echo $pm->PaymentTerms; ?></option>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<input type="hidden" id="paymentid" name="paymentid" value="<?php echo $PaymentId; ?>">
|
||||
<!-- Uncomment the next line if you need the payment name in hidden input -->
|
||||
<!-- <input type="hidden" id="paymentname" name="paymentname" value="<?php echo $PaymentId; ?>"> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Payable Terms Selection -->
|
||||
<div class="col-md-12" style="margin-bottom: 27px;">
|
||||
<div class="form-row" style="margin-bottom: 20px;">
|
||||
<div class="col-md-4">
|
||||
<label for="payablefrom">Payable Terms</label>
|
||||
<select class="form-control required select2" id="PaymentTerms" name="PaymentTerms" onchange="payment_hidden();">
|
||||
<option value="<?php echo $PaymentTerms; ?>"><?php echo $PaymentTerms; ?></option>
|
||||
<?php
|
||||
if (!empty($payment)) {
|
||||
foreach ($payment as $pm) { ?>
|
||||
<option value="<?php echo $pm->PaymentID; ?>"><?php echo $pm->PaymentTerms; ?></option>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<input type="hidden" id="paymentid" name="paymentid" value="<?php echo $PaymentId; ?>">
|
||||
<!-- Uncomment the next line if you need the payment name in hidden input -->
|
||||
<!-- <input type="hidden" id="paymentname" name="paymentname" value="<?php echo $PaymentId; ?>"> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<br />
|
||||
<div class="col-md-12">
|
||||
<div class="form-group row text-right">
|
||||
<div class="col-12">
|
||||
<button type="submit" class="btn btn-info pull-right">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
</div>
|
||||
</form>
|
||||
</div> <!-- end col -->
|
||||
</div> <!-- end row -->
|
||||
</div> <!-- end card-body -->
|
||||
</div> <!-- end card -->
|
||||
<br />
|
||||
<div class="col-md-12">
|
||||
<div class="form-group row text-right">
|
||||
<div class="col-12">
|
||||
<button type="submit" class="btn btn-info pull-right">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
</div>
|
||||
</form>
|
||||
</div> <!-- end col -->
|
||||
</div> <!-- end row -->
|
||||
</div> <!-- end container-fluid -->
|
||||
</div> <!-- end content -->
|
||||
</div> <!-- end row -->
|
||||
</div> <!-- end card-body -->
|
||||
</div> <!-- end card -->
|
||||
</div> <!-- end col -->
|
||||
</div> <!-- end row -->
|
||||
</div> <!-- end container-fluid -->
|
||||
</div> <!-- end content -->
|
||||
</div> <!-- end content-page -->
|
||||
|
||||
|
||||
|
||||
@ -183,7 +183,7 @@
|
||||
],
|
||||
pageLength: 10, // Default rows per page
|
||||
lengthMenu: [ [10, 20, 30, 50, -1], [10, 20, 30, 50, "All"] ], // Rows per page options
|
||||
responsive: true, // Responsive table
|
||||
// responsive: true, // Responsive table
|
||||
order: [], // Default ordering (column index 0, descending)
|
||||
language: {
|
||||
paginate: {
|
||||
|
||||
@ -204,7 +204,7 @@
|
||||
<label for="cost" class="col-form-label">Cost</label>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<input type="number" name="cost" id="cost" class="form-control" onchange="totalCalculate()">
|
||||
<input type="number" name="cost" id="cost" class="form-control" required onchange="totalCalculate()">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
@ -323,7 +323,7 @@
|
||||
var expenseId = $(this).data('id');
|
||||
var supplier_list = [<?php echo $supplier_list; ?>];
|
||||
$('#supplierid').empty(); // Clear the supplier dropdown
|
||||
$('#supplierid').append('<option>Select Supplier</option>');
|
||||
$('#supplierid').append('<option value="0">Select Supplier</option>');
|
||||
supplier_list[0].forEach(function(supplier) {
|
||||
$('#supplierid').append('<option value="' + supplier.SupplierID + '">' + supplier.SupplierName + '</option>');
|
||||
});
|
||||
@ -392,7 +392,7 @@
|
||||
$('#payment_method').val('');
|
||||
var supplier_list = [<?php echo $supplier_list; ?>];
|
||||
$('#supplierid').empty(); // Clear the supplier dropdown
|
||||
$('#supplierid').append('<option>Select Supplier</option>');
|
||||
$('#supplierid').append('<option value="0">Select Supplier</option>');
|
||||
|
||||
supplier_list[0].forEach(function(supplier) {
|
||||
$('#supplierid').append('<option value="' + supplier.SupplierID + '">' + supplier.SupplierName + '</option>');
|
||||
@ -405,36 +405,41 @@
|
||||
$('#tempClick').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
// Native HTML5 form validation
|
||||
if ($('#expenseForm')[0].checkValidity()) {
|
||||
var formData = new FormData($('#expenseForm')[0]); // Use FormData to handle file upload
|
||||
console.log(formActionUrl);
|
||||
if ($('#supplierid').val() != 0) {
|
||||
// Native HTML5 form validation
|
||||
if ($('#expenseForm')[0].checkValidity()) {
|
||||
|
||||
$.ajax({
|
||||
url: formActionUrl,
|
||||
type: 'POST',
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: function(response) {
|
||||
console.log(response);
|
||||
var formData = new FormData($('#expenseForm')[0]); // Use FormData to handle file upload
|
||||
console.log(formActionUrl);
|
||||
|
||||
if (response) {
|
||||
$('#expenseModal').modal('hide');
|
||||
$('#expenseForm')[0].reset();
|
||||
$('#file-name-display').text(''); // Clear the file name display
|
||||
window.location.reload();
|
||||
} else {
|
||||
console.log(response);
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
alert('An error occurred: ' + error);
|
||||
}
|
||||
});
|
||||
$.ajax({
|
||||
url: formActionUrl,
|
||||
type: 'POST',
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: function(response) {
|
||||
console.log(response);
|
||||
|
||||
if (response) {
|
||||
$('#expenseModal').modal('hide');
|
||||
$('#expenseForm')[0].reset();
|
||||
$('#file-name-display').text(''); // Clear the file name display
|
||||
window.location.reload();
|
||||
} else {
|
||||
console.log(response);
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
alert('An error occurred: ' + error);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// If form is invalid, show native validation messages
|
||||
$('#expenseForm')[0].reportValidity();
|
||||
}
|
||||
} else {
|
||||
// If form is invalid, show native validation messages
|
||||
$('#expenseForm')[0].reportValidity();
|
||||
alert("Select Supplier");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@ -178,7 +178,7 @@
|
||||
url: "<?php echo base_url() ?>deletesupplier",
|
||||
success: function(data) {
|
||||
if (data) {
|
||||
$('#content').loader('hide');
|
||||
// $('#content').loader('hide');
|
||||
alert(data);
|
||||
location.reload();
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user