From d2d591d13f56e69e965c7d62fa3a5b4d1844cb74 Mon Sep 17 00:00:00 2001 From: Srinivas-Saravanan Date: Wed, 18 Dec 2024 17:10:56 +0530 Subject: [PATCH] FIX_SHIPPING ADDRESS LABEL NAME --- app/Controllers/Customer.php | 4 ++-- app/Controllers/Invoice.php | 1 - app/Models/InvoiceModel.php | 2 +- app/Views/invoice_form.php | 22 +++++++++++----------- app/Views/invoice_pdf_template.php | 8 ++++---- app/Views/report_expired_customers.php | 11 +++++++++-- 6 files changed, 27 insertions(+), 21 deletions(-) diff --git a/app/Controllers/Customer.php b/app/Controllers/Customer.php index ed175683..49a76d19 100755 --- a/app/Controllers/Customer.php +++ b/app/Controllers/Customer.php @@ -196,8 +196,8 @@ class Customer extends BaseController // $address_array[$x]['company'] = ""; $address_array[$x]['email'] = $requestData['cmail']; $address_array[$x]['mobile_no'] = $requestData['cmobile']; - $saddress1_name = $requestData['saddress1_name'][0]; - $address_array[$x]['address_1'] = $saddress1_name.','. $baddress1[$x]; + $saddress1_name = $requestData['saddress1_name'][$x]; + $address_array[$x]['address_1'] = $addressType == 1? $baddress1[$x]: $saddress1_name .','. $baddress1[$x]; $address_array[$x]['address_2'] = $baddress2[$x]; $address_array[$x]['city'] = $bcity[$x]; $address_array[$x]['state'] = $bcountry[$x] === 'IN' ? $bdropdownstate[$x] : $binputstate[$x] ; diff --git a/app/Controllers/Invoice.php b/app/Controllers/Invoice.php index 2974e91d..37b7e89a 100755 --- a/app/Controllers/Invoice.php +++ b/app/Controllers/Invoice.php @@ -1650,7 +1650,6 @@ public function create_or_update_subscription($invoice_id,$invoice_status, $msg_ public function getActiveMembers(){ $Invoice_Model = new InvoiceModel(); $response['data'] = $Invoice_Model->getActiveMembers(); - // log_message('error',json_encode($response));die(); return $this->response->setJSON($response); } diff --git a/app/Models/InvoiceModel.php b/app/Models/InvoiceModel.php index 19a882a7..b7e97f61 100755 --- a/app/Models/InvoiceModel.php +++ b/app/Models/InvoiceModel.php @@ -606,7 +606,7 @@ public function getActiveMembers(){ ->join('customers as C', 'C.customer_id = S.customer_id', 'left') ->join('books as B', 'B.book_id = S.scheme_id', 'left') ->where('S.isactive', 1) - ->where('S.status',1) + ->where('S.to_subscription>now()') ->orderBy('S.to_subscription', 'ASC') ->get(); return $result->getResultArray(); diff --git a/app/Views/invoice_form.php b/app/Views/invoice_form.php index ef56d522..c294fcf3 100755 --- a/app/Views/invoice_form.php +++ b/app/Views/invoice_form.php @@ -219,7 +219,7 @@ if (isset($invoice_item_details[0]['to_subscription']) && !empty($invoice_item_d
-
@@ -2420,25 +2420,25 @@ $('#saveButton').click(function() { var shipping_address_name = $('#shipping_name').val(); var isValid = true; - var errorMessage = 'Please fill in the following required fields:\n'; + var errorMessage = 'Please fill in the following required fields:\n\n'; if (cus_id === '') { errorMessage += 'Please Select the Customer.\n'; isValid = false; } if (QB_AddressLine === '') { - errorMessage += 'Billing address,\n'; + errorMessage += 'Billing address,'; isValid = false; } if (QB_Country === '') { - errorMessage += 'Billing country,\n'; + errorMessage += 'Billing country,'; isValid = false; } if (QB_State === '') { - errorMessage += 'Billing state,\n'; + errorMessage += 'Billing state,'; isValid = false; } if (QB_City === '') { - errorMessage += 'Billing city,\n'; + errorMessage += 'Billing city,'; isValid = false; } if (QB_PostalCode === '') { @@ -2446,23 +2446,23 @@ $('#saveButton').click(function() { isValid = false; } if (QS_AddressLine === '') { - errorMessage += 'Shipping address,\n'; + errorMessage += 'Shipping address,'; isValid = false; } if (QS_Country === '') { - errorMessage += 'Shipping country,\n'; + errorMessage += 'Shipping country,'; isValid = false; } if (QS_State === '') { - errorMessage += 'Shipping state,\n'; + errorMessage += 'Shipping state,'; isValid = false; } if (QS_City === '') { - errorMessage += 'Shipping city,\n'; + errorMessage += 'Shipping city,'; isValid = false; } if (QS_PostalCode === '') { - errorMessage += 'Shipping postal.\n'; + errorMessage += 'Shipping postal code.'; isValid = false; } diff --git a/app/Views/invoice_pdf_template.php b/app/Views/invoice_pdf_template.php index 6ea28bbc..57ef42a8 100755 --- a/app/Views/invoice_pdf_template.php +++ b/app/Views/invoice_pdf_template.php @@ -367,7 +367,7 @@ - +
status != 'Approved') : ?> @@ -383,13 +383,13 @@
- +
-
+
Authorized Signatory
-
+
diff --git a/app/Views/report_expired_customers.php b/app/Views/report_expired_customers.php index 92847f7a..ff659a0a 100755 --- a/app/Views/report_expired_customers.php +++ b/app/Views/report_expired_customers.php @@ -88,8 +88,10 @@ Sri Kasi, 12, M.V. Naidu Street, Chetpet,Chennai - text: 'CSV', title: '', exportOptions: { - columns: ':not(:first-child)' - } + columns: function (index, data, node) { + return index !== 0; + }, + }, }, { text: 'Active Members', @@ -104,6 +106,10 @@ Sri Kasi, 12, M.V. Naidu Street, Chetpet,Chennai - targets: [1, 2, 3, 4, 5, 6], orderable: false, + }, + { + targets: 0, + visible: false, } ] @@ -162,6 +168,7 @@ Sri Kasi, 12, M.V. Naidu Street, Chetpet,Chennai - ('0' + (to_subscription.getMonth() + 1)).slice(-2) + '/' + to_subscription.getFullYear(); table.row.add([ + item.sub_id, item.first_name + ' ' + ((typeof item.last_name !== 'undefined' && item.last_name !== null) ? item.last_name : ''), item.membership_id, from_subscription_formatted,