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);
|
||||
|
||||
$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);
|
||||
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
$curlError = curl_error($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);
|
||||
|
||||
$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 .');
|
||||
return redirect()->to('/login');
|
||||
|
||||
@ -3331,73 +3331,54 @@ function daybeforetotal($yesterday){
|
||||
$endDate = $year . "-" . $monthNum . "-" . date('t', strtotime($startDate));
|
||||
|
||||
$sql = "SELECT
|
||||
salesRegister.hsnOrSac AS hsnOrSac,
|
||||
(salesRegister.quantity - IFNULL(creditNoteRegister.quantity, 0)) AS quantity,
|
||||
(salesRegister.totalTaxableAmount - IFNULL(creditNoteRegister.totalTaxableAmount, 0)) AS totalTaxableAmount,
|
||||
(salesRegister.cgst - IFNULL(creditNoteRegister.cgst, 0)) AS cgst,
|
||||
(salesRegister.sgst - IFNULL(creditNoteRegister.sgst, 0)) AS sgst,
|
||||
(salesRegister.igst - IFNULL(creditNoteRegister.igst, 0)) AS igst,
|
||||
(salesRegister.netInvoiceAmount - IFNULL(creditNoteRegister.netInvoiceAmount, 0)) AS netInvoiceAmount,
|
||||
salesRegister.rateOfTax AS rateOfTax
|
||||
salesRegister.hsnOrSac AS hsnOrSac,
|
||||
(salesRegister.quantity - IFNULL(creditNoteRegister.quantity, 0)) AS quantity,
|
||||
(salesRegister.totalTaxableAmount - IFNULL(creditNoteRegister.totalTaxableAmount, 0)) AS totalTaxableAmount,
|
||||
(salesRegister.cgst - IFNULL(creditNoteRegister.cgst, 0)) AS cgst,
|
||||
(salesRegister.sgst - IFNULL(creditNoteRegister.sgst, 0)) AS sgst,
|
||||
(salesRegister.igst - IFNULL(creditNoteRegister.igst, 0)) AS igst,
|
||||
(salesRegister.netInvoiceAmount - IFNULL(creditNoteRegister.netInvoiceAmount, 0)) AS netInvoiceAmount,
|
||||
salesRegister.rateOfTax AS rateOfTax
|
||||
|
||||
FROM
|
||||
|
||||
(
|
||||
SELECT
|
||||
in_itms.hsn_or_sac as hsnOrSac,
|
||||
SUM(in_itms.item_quantity) as quantity,
|
||||
SUM(in_itms_amts.item_subtotal) as totalTaxableAmount,
|
||||
SUM(in_itms_amts.item_cgst_amt) as cgst,
|
||||
SUM(in_itms_amts.item_sgst_amt) as sgst,
|
||||
SUM(in_itms_amts.item_igst_amt) as igst,
|
||||
SUM(in_itms_amts.item_total) as netInvoiceAmount,
|
||||
in_tr.tax_rate_percent as rateOfTax
|
||||
|
||||
FROM ip_invoice_items in_itms
|
||||
|
||||
join ip_invoice_item_amounts in_itms_amts ON in_itms_amts.item_id = in_itms.item_id
|
||||
|
||||
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)
|
||||
|
||||
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
|
||||
FROM (
|
||||
SELECT
|
||||
in_itms.hsn_or_sac AS hsnOrSac,
|
||||
SUM(in_itms.item_quantity) AS quantity,
|
||||
SUM(in_itms_amts.item_subtotal) AS totalTaxableAmount,
|
||||
SUM(in_itms_amts.item_cgst_amt) AS cgst,
|
||||
SUM(in_itms_amts.item_sgst_amt) AS sgst,
|
||||
SUM(in_itms_amts.item_igst_amt) AS igst,
|
||||
SUM(in_itms_amts.item_total) AS netInvoiceAmount,
|
||||
in_tr.tax_rate_percent AS rateOfTax
|
||||
FROM ip_invoice_items in_itms
|
||||
JOIN ip_invoice_item_amounts in_itms_amts ON in_itms_amts.item_id = in_itms.item_id
|
||||
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
|
||||
WHERE in_itms.item_date_added >= '$startDate' AND in_itms.item_date_added <= '$endDate'
|
||||
GROUP BY in_itms.hsn_or_sac
|
||||
) AS salesRegister
|
||||
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
salesRegister.hsnOrSac AS hsnOrSac,
|
||||
SUM(in_cn.item_quantity) AS quantity,
|
||||
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 sgst,
|
||||
0 AS igst,
|
||||
SUM(in_cn.item_total) AS netInvoiceAmount,
|
||||
(in_cn_itms.tax_percentage /2) AS rateOfTax
|
||||
|
||||
FROM ip_credit_notes_items in_cn_itms
|
||||
JOIN ip_credit_notes in_cn
|
||||
ON in_cn.creditnote_id = in_cn_itms.creditnote_id
|
||||
RIGHT JOIN (
|
||||
SELECT
|
||||
Distinct in_itms.hsn_or_sac as 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
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
in_cn_itms.hsn_or_sac AS hsnOrSac,
|
||||
SUM(in_cn.item_quantity) AS quantity,
|
||||
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 sgst,
|
||||
0 AS igst,
|
||||
SUM(in_cn.item_total) AS netInvoiceAmount,
|
||||
in_cn_itms.tax_percentage AS rateOfTax
|
||||
FROM ip_credit_notes_items in_cn_itms
|
||||
JOIN ip_credit_notes in_cn
|
||||
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'
|
||||
GROUP BY in_cn_itms.hsn_or_sac, in_cn_itms.tax_percentage
|
||||
) AS creditNoteRegister
|
||||
ON salesRegister.hsnOrSac = creditNoteRegister.hsnOrSac
|
||||
|
||||
ON salesRegister.hsnOrSac = creditNoteRegister.hsnOrSac
|
||||
order by salesRegister.hsnOrSac asc
|
||||
|
||||
order by salesRegister.hsnOrSac asc
|
||||
|
||||
";
|
||||
|
||||
|
||||
@ -196,7 +196,7 @@
|
||||
var table = $('#cc').DataTable({
|
||||
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
|
||||
buttons: [
|
||||
'copy', 'csv' // Export buttons
|
||||
'excel' // Export buttons
|
||||
],
|
||||
pageLength: 10, // Default rows per page
|
||||
lengthMenu: [
|
||||
|
||||
@ -43,7 +43,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<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>
|
||||
<tr>
|
||||
<!-- <th>S.No</th> -->
|
||||
@ -175,10 +175,7 @@
|
||||
var H_date = $('#hdate').val();
|
||||
|
||||
if (H_name != '' && H_date != '') {
|
||||
// Destroy DataTable if initialized
|
||||
if ($.fn.DataTable.isDataTable('#phdays')) {
|
||||
$('#phdays').DataTable().destroy();
|
||||
}
|
||||
|
||||
|
||||
var template = `
|
||||
<tr id="${index}" data-is-new="true">
|
||||
|
||||
@ -871,7 +871,7 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
|
||||
</td>
|
||||
|
||||
<!-- 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) {
|
||||
if ($a['supplier_name'] == $value->SupplierID) {
|
||||
echo $value->SupplierName;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user