FIX_tracker issues : ps
This commit is contained in:
parent
ec8574993b
commit
5fa3ffbe1d
@ -69,6 +69,8 @@ class Business extends BaseController
|
|||||||
|
|
||||||
$data['master_organzation_details']=$this->organzation_details();
|
$data['master_organzation_details']=$this->organzation_details();
|
||||||
$data['session_bid']=$session_bid;
|
$data['session_bid']=$session_bid;
|
||||||
|
$data['country_details'] = $this->get_country_details();
|
||||||
|
// print_r($data['donation']);die;
|
||||||
$this->render_page('business_form', $data);
|
$this->render_page('business_form', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -129,6 +131,8 @@ class Business extends BaseController
|
|||||||
|
|
||||||
## Business Data
|
## Business Data
|
||||||
$BusinessModel = new BusinessModel();
|
$BusinessModel = new BusinessModel();
|
||||||
|
print_r( $this->request->getPost('currency'));
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'title' => $this->request->getPost('bname'),
|
'title' => $this->request->getPost('bname'),
|
||||||
'email' => $this->request->getPost('bmail'),
|
'email' => $this->request->getPost('bmail'),
|
||||||
@ -149,13 +153,12 @@ class Business extends BaseController
|
|||||||
'admin_email' => $this->request->getPost('admin_email'),
|
'admin_email' => $this->request->getPost('admin_email'),
|
||||||
'site_mobile'=> $this->request->getPost('site_mobile'),
|
'site_mobile'=> $this->request->getPost('site_mobile'),
|
||||||
'copyright'=> $this->request->getPost('copyright'),
|
'copyright'=> $this->request->getPost('copyright'),
|
||||||
'currency'=> $this->request->getPost('currency'),
|
'currency'=> serialize($this->request->getPost('currency')),
|
||||||
'country'=> $this->request->getPost('country'),
|
'country'=> $this->request->getPost('country'),
|
||||||
'start_no'=> $this->request->getPost('start_no'),
|
'start_no'=> $this->request->getPost('start_no'),
|
||||||
'left_pad'=> $this->request->getPost('left_pad'),
|
'left_pad'=> $this->request->getPost('left_pad'),
|
||||||
'prefix_format'=> $this->request->getPost('prefix_format'),
|
'prefix_format'=> $this->request->getPost('prefix_format'),
|
||||||
];
|
];
|
||||||
|
|
||||||
if ($fileName !== "") {
|
if ($fileName !== "") {
|
||||||
$data['business_logo'] = $fileName;
|
$data['business_logo'] = $fileName;
|
||||||
}
|
}
|
||||||
@ -167,7 +170,7 @@ class Business extends BaseController
|
|||||||
}
|
}
|
||||||
|
|
||||||
$business_id = $this->request->getPost('business_id'); // Get the business ID for update
|
$business_id = $this->request->getPost('business_id'); // Get the business ID for update
|
||||||
|
// print_r($data);die;
|
||||||
if (empty($business_id)) {
|
if (empty($business_id)) {
|
||||||
// It's an insert operation
|
// It's an insert operation
|
||||||
$data['created_by'] = $session_uid;
|
$data['created_by'] = $session_uid;
|
||||||
@ -305,4 +308,12 @@ class Business extends BaseController
|
|||||||
$db->table('donation_business')->insertBatch($donationData);
|
$db->table('donation_business')->insertBatch($donationData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function get_country_details()
|
||||||
|
{
|
||||||
|
$model = new BusinessModel();
|
||||||
|
$model->setTable('countries');
|
||||||
|
$country_details = $model->orderBy('country_id', 'ASC')->findAll();
|
||||||
|
return $country_details;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -658,41 +658,45 @@ class Customer extends BaseController
|
|||||||
$spreadsheet = $reader->load($path.$fileNewName);
|
$spreadsheet = $reader->load($path.$fileNewName);
|
||||||
$sheet_data = $spreadsheet->getActiveSheet()->toArray();
|
$sheet_data = $spreadsheet->getActiveSheet()->toArray();
|
||||||
if (!empty($sheet_data)) {
|
if (!empty($sheet_data)) {
|
||||||
$flag = 0;
|
|
||||||
$final_notes = [];
|
$final_notes = [];
|
||||||
$list = [];
|
$list = [];
|
||||||
foreach ($sheet_data as $key => $val) {
|
foreach ($sheet_data as $key => $val) {
|
||||||
|
|
||||||
if ($key != 0 && trim($val[0]) && trim($val[1])) { // key zero - header
|
if ($key != 0 && trim($val[0]) && trim($val[1])) { // key zero - header
|
||||||
$flag = 0;
|
// $flag = 0;
|
||||||
|
$is_duplicate = false;
|
||||||
$notes = [];
|
$notes = [];
|
||||||
if ($val[4]) {
|
$invalid_fields = [];
|
||||||
$validate = $this->check_existing($val[4], 'donor', 'mobile_no');
|
if($val[6] != ""){
|
||||||
if ($validate) { $notes[] = $validate; $flag++;}
|
if ($this->check_existing($val[6], 'donor', 'pan_no')) {
|
||||||
|
$is_duplicate = true;
|
||||||
|
$invalid_fields[] = "PAN number";
|
||||||
}
|
}
|
||||||
if ($val[5]) {
|
|
||||||
$validate = $this->check_existing($val[5], 'donor', 'email');
|
|
||||||
if ($validate) { $notes[] = $validate; $flag++;}
|
|
||||||
}
|
}
|
||||||
if ($val[6]) {
|
if($val[7] != ""){
|
||||||
$validate = $this->check_existing($val[6], 'donor', 'pan_no');
|
if ($this->check_existing($val[7], 'donor', 'adhar_no')) {
|
||||||
if ($validate) { $notes[] = $validate; $flag++;}
|
$is_duplicate = true;
|
||||||
|
$invalid_fields[] = "Aadhar number";
|
||||||
}
|
}
|
||||||
if ($val[7]) {
|
|
||||||
$validate = $this->check_existing($val[7], 'donor', 'adhar_no');
|
|
||||||
if ($validate) { $notes[] = $validate; $flag++;}
|
|
||||||
}
|
}
|
||||||
if ($val[8]) {
|
if($val[8] != ""){
|
||||||
$validate = $this->check_existing($val[8], 'donor', 'passport_no');
|
if ($this->check_existing($val[8], 'donor', 'passport_no')) {
|
||||||
if ($validate) { $notes[] = $validate; $flag++;}
|
$is_duplicate = true;
|
||||||
|
$invalid_fields[] = "passport number";
|
||||||
}
|
}
|
||||||
if ($flag > 0) {
|
}
|
||||||
$final_notes[] = $val[0] . ' has duplicate entries: ' . implode(',', $notes);
|
if ($is_duplicate) {
|
||||||
|
$notes[] = $val[0] . " is invalid because " . implode(" and ", $invalid_fields) . " (already exists)";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if ($is_duplicate) {
|
||||||
|
$final_notes = array_merge($final_notes, $notes);
|
||||||
} else {
|
} else {
|
||||||
$list[] = [
|
$list[] = [
|
||||||
'business_id' => $session_bid,
|
'business_id' => $session_bid,
|
||||||
'first_name' => $val[0],
|
'first_name' => $val[0],
|
||||||
'donor_type' => ucfirst(strtolower($val[1])),
|
'donor_type' => strtolower($val[1]),
|
||||||
'org_name' => $val[2] ? $val[2] : null,
|
'org_name' => $val[2] ? $val[2] : null,
|
||||||
'org_reg_details' => $val[3] ? $val[3] : null,
|
'org_reg_details' => $val[3] ? $val[3] : null,
|
||||||
'mobile_no' => $val[4] ? $val[4] : null,
|
'mobile_no' => $val[4] ? $val[4] : null,
|
||||||
@ -718,13 +722,16 @@ class Customer extends BaseController
|
|||||||
$CustomerModel = new CustomerModel();
|
$CustomerModel = new CustomerModel();
|
||||||
$result = $CustomerModel->bulkInsert($list);
|
$result = $CustomerModel->bulkInsert($list);
|
||||||
$response = $result ? [
|
$response = $result ? [
|
||||||
'success_message' => count($list) . " Contributors imported successfully. " . implode("\n", $final_notes)
|
'success_message' => count($list) . " Contributors imported successfully.".(count($final_notes) > 0 ? count($final_notes) . " duplicate entries found. <br>" : ""),
|
||||||
] : ['error_message' => "Something went wrong. Please try again."];
|
] : ['error_message' => "Something went wrong. Please try again."];
|
||||||
|
$response['message_in_details'] = implode(" <br> ", $final_notes);
|
||||||
} else {
|
} else {
|
||||||
$response = ['error_message' => "No new record is found." . implode("\n", $final_notes)];
|
$response = [
|
||||||
}
|
'error_message' => "No new record is found.",
|
||||||
|
'message_in_details' => implode(" <br> ", $final_notes),
|
||||||
|
]; }
|
||||||
} else {
|
} else {
|
||||||
$response = ['error_message' => "There is no record to import"];
|
$response = ['error_message' => "There is no record to import", 'message_in_details' => ''];
|
||||||
}
|
}
|
||||||
return $this->response->setJSON($response);
|
return $this->response->setJSON($response);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -148,6 +148,8 @@ class Invoice extends BaseController
|
|||||||
// Get customer names for the dropdown, events details, and books details
|
// Get customer names for the dropdown, events details, and books details
|
||||||
$data['currency'] = $this->BusinessModel->select('currency')->where($where)->findAll();
|
$data['currency'] = $this->BusinessModel->select('currency')->where($where)->findAll();
|
||||||
$data['currency_code'] = $this->BusinessModel->select('currency')->where($where)->first()['currency'] ?? null;
|
$data['currency_code'] = $this->BusinessModel->select('currency')->where($where)->first()['currency'] ?? null;
|
||||||
|
$query = $this->BusinessModel->select('currency')->where($where)->first();
|
||||||
|
$data['currencies'] = unserialize($query['currency']);
|
||||||
|
|
||||||
$data['causes'] = $bmodel->select('*')->where('business_id', (int)get_business_id())->where('isactive',1)->get()->getResult();
|
$data['causes'] = $bmodel->select('*')->where('business_id', (int)get_business_id())->where('isactive',1)->get()->getResult();
|
||||||
$data['campaign'] = $model->getData('campaign', $where);
|
$data['campaign'] = $model->getData('campaign', $where);
|
||||||
@ -526,14 +528,15 @@ class Invoice extends BaseController
|
|||||||
}
|
}
|
||||||
|
|
||||||
$options = new Options();
|
$options = new Options();
|
||||||
|
$options->set('defaultFont', 'DejaVu Sans');
|
||||||
$options->set('isHtml5ParserEnabled', true);
|
$options->set('isHtml5ParserEnabled', true);
|
||||||
|
$options->set('isFontSubsettingEnabled', true);
|
||||||
$options->set('isPhpEnabled', true);
|
$options->set('isPhpEnabled', true);
|
||||||
$options->set('isRemoteEnabled', true);
|
$options->set('isRemoteEnabled', true);
|
||||||
$options->set('font_subsetting', true);
|
$options->set('font_subsetting', true);
|
||||||
$options->set('tempDir', sys_get_temp_dir());
|
$options->set('tempDir', sys_get_temp_dir());
|
||||||
$options->set('defaultFont', 'DejaVuSans');
|
//$options->set('chroot', base_url()."public/uploads");
|
||||||
|
$options->set('chroot', FCPATH . 'public/uploads');
|
||||||
$options->set('chroot', base_url()."public/uploads");
|
|
||||||
|
|
||||||
$dompdf = new Dompdf($options);
|
$dompdf = new Dompdf($options);
|
||||||
|
|
||||||
@ -542,14 +545,9 @@ class Invoice extends BaseController
|
|||||||
|
|
||||||
clearstatcache();
|
clearstatcache();
|
||||||
|
|
||||||
// var_dump(file_exists($logoPath));
|
$logoPath = FCPATH . "public/uploads/" . $data[0]->business_logo;
|
||||||
if ($data[0]->business_logo && file_exists(ROOTPATH."public/uploads/".$data[0]->business_logo)) {
|
$baseurl = $data[0]->business_logo && file_exists($logoPath) ? base_url("public/uploads/" . $data[0]->business_logo) : base_url("public/uploads/default.png");
|
||||||
// echo "Inside: Logo exists<br>";
|
|
||||||
$baseurl = base_url()."public/uploads/".$data[0]->business_logo;
|
|
||||||
} else {
|
|
||||||
// echo "Inside: Logo does not exist<br>"; die;
|
|
||||||
$baseurl = base_url()."public/uploads/default.png";
|
|
||||||
}
|
|
||||||
$digits = strlen((string)$data[0]->amount);
|
$digits = strlen((string)$data[0]->amount);
|
||||||
$amount_in_words = $digits <= 9 ? $this->convertNumberToWords($data[0]->amount) : $data[0]->amount;
|
$amount_in_words = $digits <= 9 ? $this->convertNumberToWords($data[0]->amount) : $data[0]->amount;
|
||||||
$html = view('invoice_pdf_template', [
|
$html = view('invoice_pdf_template', [
|
||||||
@ -569,7 +567,9 @@ class Invoice extends BaseController
|
|||||||
//echo $html;die;
|
//echo $html;die;
|
||||||
|
|
||||||
$dompdf->loadHtml($html);
|
$dompdf->loadHtml($html);
|
||||||
$dompdf->setPaper('letter', 'landscape');
|
// $dompdf->setPaper('letter', 'landscape');
|
||||||
|
|
||||||
|
$dompdf->setPaper('A5', 'landscape');
|
||||||
|
|
||||||
$dompdf->render();
|
$dompdf->render();
|
||||||
|
|
||||||
|
|||||||
@ -9,7 +9,7 @@ class BusinessModel extends Model
|
|||||||
{
|
{
|
||||||
protected $table = 'business';
|
protected $table = 'business';
|
||||||
protected $primaryKey = 'business_id';
|
protected $primaryKey = 'business_id';
|
||||||
protected $allowedFields = ['business_id','title','email','mobile_no','terms','address','city','state','postal_code' ,'business_logo','isactive', 'pan_no', 'org_reg_no', '80G', 'signature','favicon','start_no','left_pad','prefix_format','site_name','site_title','site_mobile','site_info','admin_email','terms_service','footer_about','copyright','pagination_limit','about_info','currency','12AA','80G_vaildupto','12AA_vaildupto'];
|
protected $allowedFields = ['business_id','title','email','mobile_no','terms','address','city','state','postal_code' ,'business_logo','isactive', 'pan_no', 'org_reg_no', '80G', 'signature','favicon','start_no','left_pad','prefix_format','site_name','site_title','site_mobile','site_info','admin_email','terms_service','footer_about','copyright','pagination_limit','about_info','country','currency','12AA','80G_vaildupto','12AA_vaildupto'];
|
||||||
|
|
||||||
public function insertBusiness($data)
|
public function insertBusiness($data)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -42,7 +42,7 @@
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
<a href="javascript:void(0);" class="logo logo-light text-center">
|
<a href="javascript:void(0);" class="logo logo-light text-center">
|
||||||
<span class="logo-lg">
|
<span class="logo-lg" style="background: white;">
|
||||||
<img src="<?= base_url() . "public/uploads/default.png" ?>" alt="" height="55">
|
<img src="<?= base_url() . "public/uploads/default.png" ?>" alt="" height="55">
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@ -40,7 +40,7 @@
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
<a href="javascript:void(0);" class="logo logo-light text-center">
|
<a href="javascript:void(0);" class="logo logo-light text-center">
|
||||||
<span class="logo-lg">
|
<span class="logo-lg" style="background: white;">
|
||||||
<img src="<?= base_url() . "public/uploads/default.png" ?>" alt="" height="55">
|
<img src="<?= base_url() . "public/uploads/default.png" ?>" alt="" height="55">
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@ -43,7 +43,7 @@
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
<a href="javascript: void(0);" class="logo logo-light text-center">
|
<a href="javascript: void(0);" class="logo logo-light text-center">
|
||||||
<span class="logo-lg">
|
<span class="logo-lg" style="background: white;">
|
||||||
<img src="<?= base_url() . "public/uploads/default.png" ?>" alt="" height="80">
|
<img src="<?= base_url() . "public/uploads/default.png" ?>" alt="" height="80">
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@ -41,7 +41,7 @@
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
<a href="javascript:void(0);" class="logo logo-light text-center">
|
<a href="javascript:void(0);" class="logo logo-light text-center">
|
||||||
<span class="logo-lg">
|
<span class="logo-lg" style="background: white;">
|
||||||
<img src="<?= base_url() . "public/uploads/default.png" ?>" alt="" height="55">
|
<img src="<?= base_url() . "public/uploads/default.png" ?>" alt="" height="55">
|
||||||
</span><br/>
|
</span><br/>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@ -115,21 +115,34 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-4">
|
<div class="form-group col-md-3">
|
||||||
<label for="bcity" class="col-form-label">City<span class="text-danger">*</span></label>
|
<label for="bcity" class="col-form-label">City<span class="text-danger">*</span></label>
|
||||||
<input type="text" class="form-control" name="bcity" value="<?= isset($organzations['city']) ? $organzations['city'] : '' ?>" placeholder="City" required pattern="[A-Za-z\s]+" title="Please enter alphabets only" />
|
<input type="text" class="form-control" name="bcity" value="<?= isset($organzations['city']) ? $organzations['city'] : '' ?>" placeholder="City" required pattern="[A-Za-z\s]+" title="Please enter alphabets only" />
|
||||||
<div class="invalid-feedback"> Please provide. </div>
|
<div class="invalid-feedback"> Please provide. </div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-4">
|
<div class="form-group col-md-3">
|
||||||
<label for="bstate" class="col-form-label">State<span class="text-danger">*</span></label>
|
<label for="bstate" class="col-form-label">State<span class="text-danger">*</span></label>
|
||||||
<input type="text" class="form-control" name="bstate" value="<?= isset($organzations['state']) ? $organzations['state'] : '' ?>" placeholder="State" required pattern="[A-Za-z\s]+" title="Please enter alphabets only" />
|
<input type="text" class="form-control" name="bstate" value="<?= isset($organzations['state']) ? $organzations['state'] : '' ?>" placeholder="State" required pattern="[A-Za-z\s]+" title="Please enter alphabets only" />
|
||||||
<div class="invalid-feedback"> Please provide. </div>
|
<div class="invalid-feedback"> Please provide. </div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-4">
|
<div class="form-group col-md-3">
|
||||||
<label for="bzip" class="col-form-label">Postal Code<span class="text-danger">*</span></label>
|
<label for="bzip" class="col-form-label">Postal Code<span class="text-danger">*</span></label>
|
||||||
<input type="text" class="form-control" name="bzip" value="<?= isset($organzations['postal_code']) ? $organzations['postal_code'] : '' ?>" placeholder="Postal Code (Eg: Pincode)" pattern="[0-9]{6}" maxlength="6" required />
|
<input type="text" class="form-control" name="bzip" value="<?= isset($organzations['postal_code']) ? $organzations['postal_code'] : '' ?>" placeholder="Postal Code (Eg: Pincode)" pattern="[0-9]{6}" maxlength="6" required />
|
||||||
<div class="invalid-feedback"> Please provide. </div>
|
<div class="invalid-feedback"> Please provide. </div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group col-md-3">
|
||||||
|
<label for="country" class="col-form-label">Country</label>
|
||||||
|
<select class="form-control" id="country" name="country" >
|
||||||
|
<option value="<?= isset($organzations['country']) ? $organzations['country'] : '' ?>"><?= isset($organzations['country']) ? $organzations['country'] : '--Select--';?></option>
|
||||||
|
<?php foreach ($country_details as $value) { ?>
|
||||||
|
<option value="<?php echo $value['country_name']; ?>">
|
||||||
|
<?php
|
||||||
|
echo $value['country_name'];
|
||||||
|
?>
|
||||||
|
</option>
|
||||||
|
<?php } ?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Existing form fields above this section -->
|
<!-- Existing form fields above this section -->
|
||||||
@ -186,17 +199,25 @@
|
|||||||
<input type="text" class="form-control" id="copyright" name="copyright" placeholder="Copy Right" value="<?= isset($organzations['copyright']) ? $organzations['copyright'] : '' ?>" />
|
<input type="text" class="form-control" id="copyright" name="copyright" placeholder="Copy Right" value="<?= isset($organzations['copyright']) ? $organzations['copyright'] : '' ?>" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<label for="currency" class="col-form-label">Currency</label>
|
<label for="currency" class="col-form-label">Currency<span class="text-danger">*</span></label>
|
||||||
<input type="text" class="form-control" id="currency" name="currency" placeholder="Currency (eg : Rupees,Dollar,Euro)" value="<?= isset($organzations['currency']) ? $organzations['currency'] : '' ?>" />
|
<select class="form-control" placeholder="Currency (eg : Rupees,Dollar,Euro - symbols)" id="currency" name="currency[]" required data-toggle="select2" multiple>
|
||||||
|
<option value="0" disabled>--Select--</option>
|
||||||
|
<?php
|
||||||
|
$defaultCurrencies = isset($organzations['currency']) ? unserialize((string)$organzations['currency']) : ['INR'];
|
||||||
|
foreach ($country_details as $val) {
|
||||||
|
echo '<option value="' . $val['currency_code'] . '" ' . (in_array($val['currency_code'], $defaultCurrencies) ? 'selected' : '') . '>';
|
||||||
|
echo $val['currency_code'];
|
||||||
|
echo '</option>';
|
||||||
|
}?>
|
||||||
|
<!-- echo $val['currency_code'] . ' (' . $val['currency_name'] . ' - ' . $val['currency_symbol'] . ')'; -->
|
||||||
|
|
||||||
|
</select>
|
||||||
|
<div class="invalid-feedback"> Please provide. </div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
|
|
||||||
<div class="form-group col-md-6">
|
|
||||||
<label for="country" class="col-form-label">Country</label>
|
|
||||||
<input type="text" class="form-control" id="country" name="country" placeholder="Country" value="<?= isset($organzations['country']) ? $organzations['country'] : '' ?>" />
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -292,7 +313,7 @@
|
|||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<label for="logo" class="col-form-label">Logo</label>
|
<label for="logo" class="col-form-label">Logo</label>
|
||||||
<input type="file" class="form-control" style="border: 0px !important; " id="logo" name="business_logo" placeholder="Logo Name" accept=".png, .jpg, .jpeg" value="<?= isset($organzations['business_logo']) ? $organzations['business_logo'] : '' ?>" />
|
<input type="file" class="form-control" style="border: 0px !important; " id="logo" name="business_logo" placeholder="Logo Name" accept=".png, .jpg, .jpeg" value="<?= isset($organzations['business_logo']) ? $organzations['business_logo'] : '' ?>" />
|
||||||
<span class="help-block"><small>Image dimensions should be between <strong>140x45</strong> pixels and <strong>150x50</strong> pixels. (formats: .png, .jpg, .jpeg)</small></span>
|
<span class="help-block"><small>Image dimensions should be between <strong>140x45</strong> pixels and <strong>300x100</strong> pixels. (formats: .png, .jpg, .jpeg)</small></span>
|
||||||
<p id="logo-error-message" style="color: red;"></p>
|
<p id="logo-error-message" style="color: red;"></p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -305,7 +326,7 @@
|
|||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<label for="favicon" class="col-form-label">Favicon</label>
|
<label for="favicon" class="col-form-label">Favicon</label>
|
||||||
<input type="file" class="form-control" style="border: 0px !important; " id="favic" name="favicon" placeholder="Fav-icon Name" accept=".png, .jpg, .jpeg" value="<?= isset($organzations['favicon']) ? $organzations['favicon'] : '' ?>" />
|
<input type="file" class="form-control" style="border: 0px !important; " id="favic" name="favicon" placeholder="Fav-icon Name" accept=".png, .jpg, .jpeg" value="<?= isset($organzations['favicon']) ? $organzations['favicon'] : '' ?>" />
|
||||||
<span class="help-block"><small>Image dimensions should be <strong>216x216</strong> pixels.(formats: .png, .jpg, .jpeg) </small></span>
|
<span class="help-block"><small>Image dimensions should be <strong>256x256</strong> pixels.(formats: .png, .jpg, .jpeg) </small></span>
|
||||||
<p id="favic-error-message" style="color: red;"></p>
|
<p id="favic-error-message" style="color: red;"></p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -323,7 +344,7 @@
|
|||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<label for="bfile" class="col-form-label">Signature</label>
|
<label for="bfile" class="col-form-label">Signature</label>
|
||||||
<input type="file" onchange="validateImage(this)" class="form-control" style="border: 0px !important;" id="signature" name="signature" value="<?= isset($organzations['signature']) ? $organzations['signature'] : null ?>" accept=".png, .jpg, .jpeg"/>
|
<input type="file" onchange="validateImage(this)" class="form-control" style="border: 0px !important;" id="signature" name="signature" value="<?= isset($organzations['signature']) ? $organzations['signature'] : null ?>" accept=".png, .jpg, .jpeg"/>
|
||||||
<span class="help-block"><small>Image dimensions should be <strong>50x50</strong> pixels. (formats: .png, .jpg, .jpeg) </small></span>
|
<span class="help-block"><small>Image dimensions should be <strong>150x30</strong> pixels. (formats: .png, .jpg, .jpeg) </small></span>
|
||||||
<p id="error-message"></p>
|
<p id="error-message"></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -505,8 +526,8 @@
|
|||||||
|
|
||||||
img.onload = function() {
|
img.onload = function() {
|
||||||
if (
|
if (
|
||||||
img.width >= 140 && img.width <= 150 &&
|
img.width >= 140 && img.width <= 300 &&
|
||||||
img.height >= 45 && img.height <= 50
|
img.height >= 45 && img.height <= 100
|
||||||
) {
|
) {
|
||||||
// Valid size, clear error message
|
// Valid size, clear error message
|
||||||
errorMessageElement.textContent = '';
|
errorMessageElement.textContent = '';
|
||||||
@ -535,14 +556,14 @@
|
|||||||
|
|
||||||
img.onload = function() {
|
img.onload = function() {
|
||||||
if (
|
if (
|
||||||
img.width === 216 && img.height === 216
|
img.width === 256 && img.height === 256
|
||||||
) {
|
) {
|
||||||
// Valid size, clear error message
|
// Valid size, clear error message
|
||||||
errorMessageElement.textContent = '';
|
errorMessageElement.textContent = '';
|
||||||
} else {
|
} else {
|
||||||
// Invalid size, reset the input and display an error message
|
// Invalid size, reset the input and display an error message
|
||||||
input.value = '';
|
input.value = '';
|
||||||
errorMessageElement.textContent = 'Image dimensions should not exceed 216x216.';
|
errorMessageElement.textContent = 'Image dimensions should not exceed 256x256.';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -83,7 +83,6 @@
|
|||||||
<label for="csname" class="col-form-label"><span class="contactPerson">Organization </span> PAN Number <i class="text-danger contactPerson"> *</i> </label>
|
<label for="csname" class="col-form-label"><span class="contactPerson">Organization </span> PAN Number <i class="text-danger contactPerson"> *</i> </label>
|
||||||
<input type="text" class="form-control" id="pan_no"name="pan_no" required value="<?= isset($customer['pan_no']) ? $customer['pan_no'] : '' ?>" placeholder="PAN Number" onchange="checkExisting(this,'pan_no','pan_no')"/>
|
<input type="text" class="form-control" id="pan_no"name="pan_no" required value="<?= isset($customer['pan_no']) ? $customer['pan_no'] : '' ?>" placeholder="PAN Number" onchange="checkExisting(this,'pan_no','pan_no')"/>
|
||||||
<span id="panValidationMessage"></span>
|
<span id="panValidationMessage"></span>
|
||||||
<span id="errorMessage" style="color: red;"></span>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-4" id="adhar_no_individual">
|
<div class="form-group col-md-4" id="adhar_no_individual">
|
||||||
<label for="csname" class="col-form-label"><span class="contactPerson"> </span>Aadhaar Number</label>
|
<label for="csname" class="col-form-label"><span class="contactPerson"> </span>Aadhaar Number</label>
|
||||||
@ -173,30 +172,12 @@
|
|||||||
function checkValidityAndSetRequired() {
|
function checkValidityAndSetRequired() {
|
||||||
var type = document.getElementById('DonorType').value;
|
var type = document.getElementById('DonorType').value;
|
||||||
var panInput = document.getElementById('pan_no');
|
var panInput = document.getElementById('pan_no');
|
||||||
var passportInput = document.getElementById('passport_no');
|
|
||||||
var errorMessage = document.getElementById('errorMessage');
|
|
||||||
var passportValidationMessage = document.getElementById('passportValidationMessage');
|
|
||||||
|
|
||||||
// Clear previous error messages
|
// Clear previous error messages
|
||||||
errorMessage.textContent = "";
|
|
||||||
passportValidationMessage.textContent = "";
|
|
||||||
|
|
||||||
if (type === 'organization') {
|
if (type === 'organization') {
|
||||||
panInput.setAttribute('required', 'required');
|
panInput.setAttribute('required', 'required');
|
||||||
passportInput.removeAttribute('required');
|
|
||||||
} else if (type === 'individual') {
|
} else if (type === 'individual') {
|
||||||
if (panInput.value === "" && passportInput.value === "") {
|
|
||||||
panInput.setAttribute('required', 'required');
|
|
||||||
passportInput.setAttribute('required', 'required');
|
|
||||||
errorMessage.textContent = "Either PAN or Passport is required.";
|
|
||||||
passportValidationMessage.textContent = "Either PAN or Passport is required.";
|
|
||||||
} else {
|
|
||||||
panInput.removeAttribute('required');
|
panInput.removeAttribute('required');
|
||||||
passportInput.removeAttribute('required');
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
panInput.removeAttribute('required');
|
|
||||||
passportInput.removeAttribute('required');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -235,10 +216,6 @@
|
|||||||
event.preventDefault(); // Prevent form submission if Aadhaar is not valid
|
event.preventDefault(); // Prevent form submission if Aadhaar is not valid
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (panValue === '' && passportValue === '') {
|
|
||||||
event.preventDefault(); // Prevent form submission if both PAN and Passport are empty
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (panValue !== '' && !validatePANNumber(panValue)) {
|
if (panValue !== '' && !validatePANNumber(panValue)) {
|
||||||
event.preventDefault(); // Prevent form submission if PAN is not valid
|
event.preventDefault(); // Prevent form submission if PAN is not valid
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -241,6 +241,7 @@ $(document).on('click', '.view-receipts', function(e) {
|
|||||||
</div>
|
</div>
|
||||||
<div class="result"></div>
|
<div class="result"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="text-left message_in_details"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
@ -274,14 +275,19 @@ $(document).ready(function(){
|
|||||||
} else {
|
} else {
|
||||||
$(".result").html(result.error_message).css("color", "red");
|
$(".result").html(result.error_message).css("color", "red");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!$.isEmptyObject(result.message_in_details)) {
|
||||||
|
$(".message_in_details").html(result.message_in_details+" <center> <br><br> After 12 seconds. Import Contributor pop will be closed </center>").css("color", "blue");
|
||||||
|
}
|
||||||
|
|
||||||
$("#form-upload")[0].reset();
|
$("#form-upload")[0].reset();
|
||||||
$(".upload-loader").hide();
|
$(".upload-loader").hide();
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
$("#standard-modal").dialog("close");
|
console.log("Timeout executed!"); // Check if this message appears in the console
|
||||||
refreshPage();
|
refreshPage();
|
||||||
}, 10000); // 10000 milliseconds = 10 seconds
|
$(".result").html('');
|
||||||
|
$(".message_in_details").html('');
|
||||||
|
}, 12000); // 10000 milliseconds = 10 seconds now setted as 12 seconds.
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@ -54,6 +54,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<?php
|
<?php
|
||||||
|
// print_r($currencies);
|
||||||
$uniqueData = [];
|
$uniqueData = [];
|
||||||
$mobileNumbers = [];
|
$mobileNumbers = [];
|
||||||
$selected_donor_mobile = "";
|
$selected_donor_mobile = "";
|
||||||
@ -147,13 +148,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<input type="hidden" id="currency" name="currency" value="<?= isset($receipt_details['currency']) ? $receipt_details['currency'] : $currency_code; ?>" />
|
<div class="form-group col-md-2">
|
||||||
<!-- <div class="form-group col-md-1">
|
<label for="currency" class="col-form-label">Currency<span class="text-danger"> *</span></label>
|
||||||
<label for="csname" class="col-form-label">Currency<span class="text-danger"> *</span></label>
|
|
||||||
<select class="form-control" id="currency" name="currency" data-toggle="select2" required>
|
<select class="form-control" id="currency" name="currency" data-toggle="select2" required>
|
||||||
<?php
|
<?php
|
||||||
$currencies = explode(",", $currency[0]['currency']);
|
$selectedCurrency = isset($receipt_details['currency']) ? (gettype($receipt_details['currency']) == 'string' ? [] :$receipt_details['currency']) : '';
|
||||||
$selectedCurrency = isset($receipt_details['currency']) ? $receipt_details['currency'] : '';
|
|
||||||
?>
|
?>
|
||||||
<?php foreach ($currencies as $index => $currencyOption) : ?>
|
<?php foreach ($currencies as $index => $currencyOption) : ?>
|
||||||
<option value="<?= $currencyOption ?>" <?= ($index === 0 || $selectedCurrency === $currencyOption) ? 'selected' : '' ?>>
|
<option value="<?= $currencyOption ?>" <?= ($index === 0 || $selectedCurrency === $currencyOption) ? 'selected' : '' ?>>
|
||||||
@ -161,15 +160,10 @@
|
|||||||
</option>
|
</option>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</select>
|
</select>
|
||||||
</div> -->
|
</div>
|
||||||
|
<div class="form-group col-md-4 ">
|
||||||
|
|
||||||
<div class="form-group col-md-6">
|
|
||||||
<label for="csname" class="col-form-label">Amount<span class="text-danger"> *</span></label>
|
<label for="csname" class="col-form-label">Amount<span class="text-danger"> *</span></label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<!-- <div class="input-group-prepend">
|
|
||||||
<span class="input-group-text" id="validationTooltipUsernamePrepend"><?= $currency_code; ?></span>
|
|
||||||
</div> -->
|
|
||||||
<input type="text" class="form-control" id="org_name_field" name="amount" value="<?= isset($receipt_details['amount']) ? $receipt_details['amount'] : '' ?>" placeholder="Amount" oninput="this.value = this.value.replace(/[^0-9]/g, '')" required maxlength="9" aria-describedby="validationTooltipUsernamePrepend"/>
|
<input type="text" class="form-control" id="org_name_field" name="amount" value="<?= isset($receipt_details['amount']) ? $receipt_details['amount'] : '' ?>" placeholder="Amount" oninput="this.value = this.value.replace(/[^0-9]/g, '')" required maxlength="9" aria-describedby="validationTooltipUsernamePrepend"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -306,6 +300,7 @@
|
|||||||
|
|
||||||
$('#donor_mobile').on('change', function() {
|
$('#donor_mobile').on('change', function() {
|
||||||
var Rtype = $('.receipt_type:checked').val();
|
var Rtype = $('.receipt_type:checked').val();
|
||||||
|
$('#donor_first_name').html('');
|
||||||
if ($(this).val()) {
|
if ($(this).val()) {
|
||||||
if ($(this).val() == '0') {
|
if ($(this).val() == '0') {
|
||||||
$('#standard-modal').modal('show');
|
$('#standard-modal').modal('show');
|
||||||
|
|||||||
@ -83,29 +83,7 @@
|
|||||||
} ?>
|
} ?>
|
||||||
<td><?= $donor; ?></td>
|
<td><?= $donor; ?></td>
|
||||||
<td id="<?= $row['receipt_id'] ?>">
|
<td id="<?= $row['receipt_id'] ?>">
|
||||||
|
<?= $row['amount'].'('.$row['currency'].')'; ?>
|
||||||
<?php
|
|
||||||
$currencySymbol = '';
|
|
||||||
switch (strtoupper($row['currency'])) {
|
|
||||||
case 'RS':
|
|
||||||
$currencySymbol = '₹'; // Rupees symbol
|
|
||||||
break;
|
|
||||||
case 'USD':
|
|
||||||
$currencySymbol = '$'; // Dollar symbol
|
|
||||||
break;
|
|
||||||
case 'EUR':
|
|
||||||
$currencySymbol = '€'; // Euro symbol
|
|
||||||
break;
|
|
||||||
case 'INR':
|
|
||||||
$currencySymbol = '₹';
|
|
||||||
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
$currencySymbol = ''; // Default to empty string if no match
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
echo $currencySymbol . ' ' . $row['amount'];
|
|
||||||
?>
|
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- Assuming this is the cell where you want to display payment_mode -->
|
<!-- Assuming this is the cell where you want to display payment_mode -->
|
||||||
|
|||||||
@ -83,7 +83,7 @@
|
|||||||
<td style="width: 80%; height: 20px;border: none;">
|
<td style="width: 80%; height: 20px;border: none;">
|
||||||
<h3 style="text-align: right;text-decoration: underline"><strong><?= $data->title ?></strong></h3>
|
<h3 style="text-align: right;text-decoration: underline"><strong><?= $data->title ?></strong></h3>
|
||||||
<p class="sub-add" style="padding-left: 80px; text-align: right;"><?= $data->org_address ?> <?= $data->org_city ? ",".$data->org_city :""; ?> <?= $data->org_state ? ",".$data->org_state :""; ?> <?= $data->org_zip ? ",".$data->org_zip.".":""; ?><br>
|
<p class="sub-add" style="padding-left: 80px; text-align: right;"><?= $data->org_address ?> <?= $data->org_city ? ",".$data->org_city :""; ?> <?= $data->org_state ? ",".$data->org_state :""; ?> <?= $data->org_zip ? ",".$data->org_zip.".":""; ?><br>
|
||||||
<?= $data->org_mobile ? "Mobile No: ".$data->org_mobile.", ":""; ?> <?= $data->org_email ? "Email: ".$data->org_email.", ":""; ?><br>
|
<?= $data->org_mobile ? "Mobile No: ".$data->org_mobile.", ":""; ?> <?= $data->org_email ? "Email: ".$data->org_email.", <br>":""; ?>
|
||||||
<?= $data->org_pan ? "PAN No: ".$data->org_pan.", ":""; ?> <?= $data->org_reg_no ? "Register No: ".$data->org_reg_no:""; ?></p>
|
<?= $data->org_pan ? "PAN No: ".$data->org_pan.", ":""; ?> <?= $data->org_reg_no ? "Register No: ".$data->org_reg_no:""; ?></p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -97,7 +97,7 @@
|
|||||||
<td style="width: 49% !important; height: 18px; text-align: right;border: none;"><strong>Date:</strong> <?=date("d-m-Y", strtotime($data->receipt_date));?></td>
|
<td style="width: 49% !important; height: 18px; text-align: right;border: none;"><strong>Date:</strong> <?=date("d-m-Y", strtotime($data->receipt_date));?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr style="height: 18px;">
|
<tr style="height: 18px;">
|
||||||
<td style="width: 100%; height: 18px; text-align: justify;border: none;padding:30px;" colspan="2"><p>Received with thanks from <b><?= $data->customer_name . ($data->cust_org_name ? ' (' . $data->cust_org_name . ')' : '') ?></b><?php if($data->cust_pan_no) { echo ', PAN <b>'.$data->cust_pan_no.'</b>'; } ?>, a sum of <b><?= $currency ?> <?= $currency_in_words ? $currency_in_words.' Only' :'' ?></b> (<?= $currency ?>.<?= $data->amount ?>), towards <b><?= $data->cause_name ?></b>.</td>
|
<td style="width: 100%; height: 18px; text-align: justify;border: none;padding:30px;" colspan="2"><p>Received with thanks from <b><?= $data->customer_name . ($data->cust_org_name ? ' (' . $data->cust_org_name . ')' : '') ?></b><?php if($data->cust_pan_no) { echo ', PAN <b>'.$data->cust_pan_no.'</b>'; } ?>,<br> a sum of <b><?= $currency ?> <?= $currency_in_words ? $currency_in_words.' Only' :'' ?></b> (<?= $currency ?>.<?= $data->amount ?>), <br> towards <b><?= $data->cause_name ?></b>.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr style="height: 18px;">
|
<tr style="height: 18px;">
|
||||||
<td style="width: 30.5118%; height: 18px;border: none;"><strong>Collected by:</strong> <?= $staff_name ?></td>
|
<td style="width: 30.5118%; height: 18px;border: none;"><strong>Collected by:</strong> <?= $staff_name ?></td>
|
||||||
@ -119,10 +119,12 @@
|
|||||||
<td style="width: 69.4882%;border: none; font-size: 9px; text-align: right;"> <?php if($twelveAAVaildUpto) { ?> <strong>Valid Upto: </strong> <?= date("d-m-Y", strtotime($twelveAAVaildUpto)) ?><?php } ?></td>
|
<td style="width: 69.4882%;border: none; font-size: 9px; text-align: right;"> <?php if($twelveAAVaildUpto) { ?> <strong>Valid Upto: </strong> <?= date("d-m-Y", strtotime($twelveAAVaildUpto)) ?><?php } ?></td>
|
||||||
<tr>
|
<tr>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
<?php if($Notes != "") { ?>
|
||||||
<tr style="height: 0px; padding:1px;">
|
<tr style="height: 0px; padding:1px;">
|
||||||
<td style="width: 100%; text-align: center;border: none;font-size: 9px; " colspan="2">
|
<td style="width: 100%; text-align: center;border: none;font-size: 9px; " colspan="2">
|
||||||
<strong>Note:</strong> <?= $Notes ?></td>
|
<strong>Note:</strong> <?= $Notes ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<?php } ?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -66,10 +66,10 @@
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
<a href="dashboard" class="logo logo-light text-center">
|
<a href="dashboard" class="logo logo-light text-center">
|
||||||
<span class="logo-sm">
|
<span class="logo-sm" style="background: white;">
|
||||||
<img src="<?= $favicon;; ?>" alt="<?= $company_short_name; ?>" height="24">
|
<img src="<?= $favicon; ?>" alt="<?= $company_short_name; ?>" height="24">
|
||||||
</span>
|
</span>
|
||||||
<span class="logo-lg">
|
<span class="logo-lg" style="background: white;">
|
||||||
<!-- <img src="<?= base_url()."public/uploads/default.png" ?>" alt="<?= $company_name; ?>" height="24"> -->
|
<!-- <img src="<?= base_url()."public/uploads/default.png" ?>" alt="<?= $company_name; ?>" height="24"> -->
|
||||||
<img src="<?= $company_logo_large; ?>" alt="<?= $company_name; ?>" height="50">
|
<img src="<?= $company_logo_large; ?>" alt="<?= $company_name; ?>" height="50">
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@ -188,10 +188,10 @@
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
<a href="dashboard" class="logo logo-light text-center">
|
<a href="dashboard" class="logo logo-light text-center">
|
||||||
<span class="logo-sm">
|
<span class="logo-sm" style="background: white;">
|
||||||
<img src="<?= $company_logo_small; ?>" alt="<?= $company_short_name; ?>" height="24">
|
<img src="<?= $company_logo_small; ?>" alt="<?= $company_short_name; ?>" height="24">
|
||||||
</span>
|
</span>
|
||||||
<span class="logo-lg">
|
<span class="logo-lg" style="background: white;">
|
||||||
<!-- <img src="<?= base_url()."public/uploads/default.png" ?>" alt="<?= $company_name; ?>" height="24"> -->
|
<!-- <img src="<?= base_url()."public/uploads/default.png" ?>" alt="<?= $company_name; ?>" height="24"> -->
|
||||||
<img src="<?= $company_logo_large; ?>" alt="<?= $company_name; ?>" height="50">
|
<img src="<?= $company_logo_large; ?>" alt="<?= $company_name; ?>" height="50">
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user