CHANGE_job_card_template_aligment:ss

This commit is contained in:
sriramv 2024-05-07 13:52:05 +05:30
parent 9937a4f5c1
commit 573fe1de87
4 changed files with 18 additions and 19 deletions

View File

@ -140,9 +140,8 @@ $routes->get('dashboard', 'Users::dashboard');
// Model //
$routes->get('bike_model_index/(:any)', 'Model::index/$1');
$routes->post('create_model', 'Model::create_model');
$routes->post('create_model/(:any)', 'Model::create_model/(:any)');
$routes->get('delete_model/(:any)', 'Model::delete_model/$1');
// $routes->post('create_model/(:any)', 'Model::create_model/$1');
$routes->post('status_model', 'Model::status_model');
// Model End's//

View File

@ -152,7 +152,7 @@ class Jobcard extends BaseController
// Generate the PDF content (HTML) with data
$html = view('invoice_pdf_template_jobcard', $data);
// echo $html;die;
echo $html;die;
// Load HTML into the mPDF instance
$mpdf->WriteHTML($html);

View File

@ -59,7 +59,7 @@ class Model extends BaseController
}
public function create_model()
public function create_model($model_id)
{
try {
$make_id = $this->request->getPost('make_id');
@ -71,7 +71,7 @@ class Model extends BaseController
'model_name' => $model_name
];
// if (!$model_id) {
if (!$model_id) {
try {
$inserted = $BikemodelsModel->insert($data);
@ -88,17 +88,17 @@ class Model extends BaseController
$result = "No Match's";
return $this->respond(['status' => 'failed','code' => 404,'data' => $result],404);
}
// }
// else{
// $updated = $BikemodelsModel->update($model_id ,$data);
// if ($updated) {
// $result = $data;
// return $this->respond(['status' => 'success','code' => 200,'data' => $result],200);
// } else {
// $result = "No Match's";
// return $this->respond(['status' => 'failed','code' => 404,'data' => $result],404);
// }
// }
}
else{
$updated = $BikemodelsModel->update($model_id ,$data);
if ($updated) {
$result = $data;
return $this->respond(['status' => 'success','code' => 200,'data' => $result],200);
} else {
$result = "No Match's";
return $this->respond(['status' => 'failed','code' => 404,'data' => $result],404);
}
}
} catch (\Exception $exception) {
return $this->respond(['status' => 'failed','code' => 500,'data' => $exception],500);

View File

@ -61,7 +61,7 @@
table.invoice-info-table th,
table.invoice-info-table td {
border: 1px solid;
text-align: right;
text-align: left;
}
/* Style for the addresses table */
@ -190,11 +190,11 @@ p {
<td><?= $vehicle[0]['reg_no'] ?></td>
</tr>
<tr>
<td>Contact Number</td>
<td>Contact No</td>
<td><?= $vehicle[0]['mobile_no'] ?></td>
</tr>
<tr>
<td>Job Card Number</td>
<td>Job Card No</td>
<td><?= $vehicle[0]['order_number'] ?></td>
</tr>
<tr>