latest commit 16-05-2025
This commit is contained in:
parent
4ea83bb174
commit
161b4754c9
@ -158,14 +158,32 @@ class Login extends BaseController
|
|||||||
$message = urlencode($msg);
|
$message = urlencode($msg);
|
||||||
|
|
||||||
$ch = curl_init();
|
$ch = curl_init();
|
||||||
curl_setopt($ch, CURLOPT_URL, "https://smsapi.24x7sms.com/api_2.0/SendSMS.aspx?APIKEY=xegCdYUIMf3&MobileNo=" . $mobile . "&SenderID=VNBAIT&Message=" . $message . "&ServiceName=PROMOTIONAL_HIGH");
|
|
||||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
|
$url = "https://smsapi.24x7sms.com/api_2.0/SendSMS.aspx?APIKEY=xegCdYUIMf3"
|
||||||
|
. "&MobileNo=" . urlencode($mobile)
|
||||||
|
. "&SenderID=VNBAIT"
|
||||||
|
. "&Message=" . urlencode($message)
|
||||||
|
. "&ServiceName=PROMOTIONAL_HIGH";
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_URL, $url);
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
|
||||||
|
|
||||||
$output = curl_exec($ch);
|
$output = curl_exec($ch);
|
||||||
|
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||||
|
$curlError = curl_error($ch);
|
||||||
|
|
||||||
curl_close($ch);
|
curl_close($ch);
|
||||||
|
|
||||||
|
// Debug output
|
||||||
|
// echo "HTTP Code: " . $httpCode . "<br>";
|
||||||
|
// echo "cURL Error: " . ($curlError ? $curlError : 'None') . "<br>";
|
||||||
|
// echo "Response: " . htmlentities($output);
|
||||||
|
|
||||||
|
|
||||||
$resetpassword = password_hash($password, PASSWORD_DEFAULT);
|
$resetpassword = password_hash($password, PASSWORD_DEFAULT);
|
||||||
|
|
||||||
$updatepassword = $this->login_model->updatepassword($result[0]->userId, $resetpassword);
|
$this->login_model->updatepassword($result[0]->userId, $resetpassword);
|
||||||
|
|
||||||
session()->setFlashdata('success', 'Password sent successfully. Please check your mobile .');
|
session()->setFlashdata('success', 'Password sent successfully. Please check your mobile .');
|
||||||
return redirect()->to('/login');
|
return redirect()->to('/login');
|
||||||
|
|||||||
@ -3331,73 +3331,54 @@ function daybeforetotal($yesterday){
|
|||||||
$endDate = $year . "-" . $monthNum . "-" . date('t', strtotime($startDate));
|
$endDate = $year . "-" . $monthNum . "-" . date('t', strtotime($startDate));
|
||||||
|
|
||||||
$sql = "SELECT
|
$sql = "SELECT
|
||||||
salesRegister.hsnOrSac AS hsnOrSac,
|
salesRegister.hsnOrSac AS hsnOrSac,
|
||||||
(salesRegister.quantity - IFNULL(creditNoteRegister.quantity, 0)) AS quantity,
|
(salesRegister.quantity - IFNULL(creditNoteRegister.quantity, 0)) AS quantity,
|
||||||
(salesRegister.totalTaxableAmount - IFNULL(creditNoteRegister.totalTaxableAmount, 0)) AS totalTaxableAmount,
|
(salesRegister.totalTaxableAmount - IFNULL(creditNoteRegister.totalTaxableAmount, 0)) AS totalTaxableAmount,
|
||||||
(salesRegister.cgst - IFNULL(creditNoteRegister.cgst, 0)) AS cgst,
|
(salesRegister.cgst - IFNULL(creditNoteRegister.cgst, 0)) AS cgst,
|
||||||
(salesRegister.sgst - IFNULL(creditNoteRegister.sgst, 0)) AS sgst,
|
(salesRegister.sgst - IFNULL(creditNoteRegister.sgst, 0)) AS sgst,
|
||||||
(salesRegister.igst - IFNULL(creditNoteRegister.igst, 0)) AS igst,
|
(salesRegister.igst - IFNULL(creditNoteRegister.igst, 0)) AS igst,
|
||||||
(salesRegister.netInvoiceAmount - IFNULL(creditNoteRegister.netInvoiceAmount, 0)) AS netInvoiceAmount,
|
(salesRegister.netInvoiceAmount - IFNULL(creditNoteRegister.netInvoiceAmount, 0)) AS netInvoiceAmount,
|
||||||
salesRegister.rateOfTax AS rateOfTax
|
salesRegister.rateOfTax AS rateOfTax
|
||||||
|
|
||||||
FROM
|
FROM (
|
||||||
|
SELECT
|
||||||
(
|
in_itms.hsn_or_sac AS hsnOrSac,
|
||||||
SELECT
|
SUM(in_itms.item_quantity) AS quantity,
|
||||||
in_itms.hsn_or_sac as hsnOrSac,
|
SUM(in_itms_amts.item_subtotal) AS totalTaxableAmount,
|
||||||
SUM(in_itms.item_quantity) as quantity,
|
SUM(in_itms_amts.item_cgst_amt) AS cgst,
|
||||||
SUM(in_itms_amts.item_subtotal) as totalTaxableAmount,
|
SUM(in_itms_amts.item_sgst_amt) AS sgst,
|
||||||
SUM(in_itms_amts.item_cgst_amt) as cgst,
|
SUM(in_itms_amts.item_igst_amt) AS igst,
|
||||||
SUM(in_itms_amts.item_sgst_amt) as sgst,
|
SUM(in_itms_amts.item_total) AS netInvoiceAmount,
|
||||||
SUM(in_itms_amts.item_igst_amt) as igst,
|
in_tr.tax_rate_percent AS rateOfTax
|
||||||
SUM(in_itms_amts.item_total) as netInvoiceAmount,
|
FROM ip_invoice_items in_itms
|
||||||
in_tr.tax_rate_percent as rateOfTax
|
JOIN ip_invoice_item_amounts in_itms_amts ON in_itms_amts.item_id = in_itms.item_id
|
||||||
|
JOIN ip_tax_rates in_tr
|
||||||
FROM ip_invoice_items in_itms
|
ON in_tr.tax_rate_id = in_itms.Sgst_item_tax_rate_id
|
||||||
|
OR in_tr.tax_rate_id = in_itms.Igst_item_tax_rate_id
|
||||||
join ip_invoice_item_amounts in_itms_amts ON in_itms_amts.item_id = in_itms.item_id
|
WHERE in_itms.item_date_added >= '$startDate' AND in_itms.item_date_added <= '$endDate'
|
||||||
|
GROUP BY in_itms.hsn_or_sac
|
||||||
join ip_tax_rates in_tr ON ( in_tr.tax_rate_id = in_itms.Sgst_item_tax_rate_id OR in_tr.tax_rate_id = in_itms.Igst_item_tax_rate_id)
|
) AS salesRegister
|
||||||
|
|
||||||
WHERE in_itms.item_date_added >= '$startDate' AND in_itms.item_date_added <= '$endDate'
|
|
||||||
AND in_itms.hsn_or_sac <> 0
|
|
||||||
group by in_itms.hsn_or_sac
|
|
||||||
order by in_itms.hsn_or_sac asc
|
|
||||||
)
|
|
||||||
AS salesRegister
|
|
||||||
|
|
||||||
LEFT JOIN (
|
LEFT JOIN (
|
||||||
SELECT
|
SELECT
|
||||||
salesRegister.hsnOrSac AS hsnOrSac,
|
in_cn_itms.hsn_or_sac AS hsnOrSac,
|
||||||
SUM(in_cn.item_quantity) AS quantity,
|
SUM(in_cn.item_quantity) AS quantity,
|
||||||
SUM(in_cn.item_total_price) AS totalTaxableAmount,
|
SUM(in_cn.item_total_price) AS totalTaxableAmount,
|
||||||
SUM((in_cn.item_total_price * in_cn_itms.tax_percentage / 100) / 2) AS cgst,
|
SUM((in_cn.item_total_price * in_cn_itms.tax_percentage / 100) / 2) AS cgst,
|
||||||
SUM((in_cn.item_total_price * in_cn_itms.tax_percentage / 100) / 2) AS sgst,
|
SUM((in_cn.item_total_price * in_cn_itms.tax_percentage / 100) / 2) AS sgst,
|
||||||
0 AS igst,
|
0 AS igst,
|
||||||
SUM(in_cn.item_total) AS netInvoiceAmount,
|
SUM(in_cn.item_total) AS netInvoiceAmount,
|
||||||
(in_cn_itms.tax_percentage /2) AS rateOfTax
|
in_cn_itms.tax_percentage AS rateOfTax
|
||||||
|
FROM ip_credit_notes_items in_cn_itms
|
||||||
FROM ip_credit_notes_items in_cn_itms
|
JOIN ip_credit_notes in_cn
|
||||||
JOIN ip_credit_notes in_cn
|
ON in_cn.creditnote_id = in_cn_itms.creditnote_id
|
||||||
ON in_cn.creditnote_id = in_cn_itms.creditnote_id
|
WHERE DATE(in_cn_itms.created_at) >= '$startDate' AND DATE(in_cn_itms.created_at) <= '$endDate'
|
||||||
RIGHT JOIN (
|
GROUP BY in_cn_itms.hsn_or_sac, in_cn_itms.tax_percentage
|
||||||
SELECT
|
) AS creditNoteRegister
|
||||||
Distinct in_itms.hsn_or_sac as hsnOrSac
|
ON salesRegister.hsnOrSac = creditNoteRegister.hsnOrSac
|
||||||
FROM ip_invoice_items in_itms
|
|
||||||
WHERE in_itms.item_date_added >= '$startDate' AND in_itms.item_date_added <= '$endDate'
|
|
||||||
AND in_itms.hsn_or_sac <> 0
|
|
||||||
order by in_itms.hsn_or_sac asc
|
|
||||||
) AS salesRegister
|
|
||||||
ON salesRegister.hsnOrSac = in_cn_itms.hsn_or_sac
|
|
||||||
AND DATE(in_cn_itms.created_at) >= '$startDate' AND DATE(in_cn_itms.created_at) <= '$endDate'
|
|
||||||
GROUP BY salesRegister.hsnOrSac, in_cn_itms.tax_percentage
|
|
||||||
order by salesRegister.hsnOrSac asc
|
|
||||||
)
|
|
||||||
AS creditNoteRegister
|
|
||||||
|
|
||||||
ON salesRegister.hsnOrSac = creditNoteRegister.hsnOrSac
|
order by salesRegister.hsnOrSac asc
|
||||||
|
|
||||||
order by salesRegister.hsnOrSac asc
|
|
||||||
|
|
||||||
";
|
";
|
||||||
|
|
||||||
|
|||||||
@ -196,7 +196,7 @@
|
|||||||
var table = $('#cc').DataTable({
|
var table = $('#cc').DataTable({
|
||||||
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
|
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
|
||||||
buttons: [
|
buttons: [
|
||||||
'copy', 'csv' // Export buttons
|
'excel' // Export buttons
|
||||||
],
|
],
|
||||||
pageLength: 10, // Default rows per page
|
pageLength: 10, // Default rows per page
|
||||||
lengthMenu: [
|
lengthMenu: [
|
||||||
|
|||||||
@ -43,7 +43,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<table id="phdays" class="table dt-responsive nowrap w-100 ria_data_table">
|
<table id="phdays" class="table dt-responsive nowrap w-100 ">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<!-- <th>S.No</th> -->
|
<!-- <th>S.No</th> -->
|
||||||
@ -175,10 +175,7 @@
|
|||||||
var H_date = $('#hdate').val();
|
var H_date = $('#hdate').val();
|
||||||
|
|
||||||
if (H_name != '' && H_date != '') {
|
if (H_name != '' && H_date != '') {
|
||||||
// Destroy DataTable if initialized
|
|
||||||
if ($.fn.DataTable.isDataTable('#phdays')) {
|
|
||||||
$('#phdays').DataTable().destroy();
|
|
||||||
}
|
|
||||||
|
|
||||||
var template = `
|
var template = `
|
||||||
<tr id="${index}" data-is-new="true">
|
<tr id="${index}" data-is-new="true">
|
||||||
|
|||||||
@ -871,7 +871,7 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
|
|||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- td:eq(4) supplier_name -->
|
<!-- td:eq(4) supplier_name -->
|
||||||
<td class="celda_normal">
|
<td class="celda_normal" style="min-width :250px !important; text-align: left;">
|
||||||
<?php foreach ($supplierData as $key => $value) {
|
<?php foreach ($supplierData as $key => $value) {
|
||||||
if ($a['supplier_name'] == $value->SupplierID) {
|
if ($a['supplier_name'] == $value->SupplierID) {
|
||||||
echo $value->SupplierName;
|
echo $value->SupplierName;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user