GWM : POS added in the flow
This commit is contained in:
parent
f705ec2708
commit
43b4c66ae6
@ -48,6 +48,7 @@ $routes->group('api', ['filter' => 'appSignature'], function ($routes) {
|
|||||||
$routes->post('master/createPaymentMode', 'MasterController::createPaymentMode');
|
$routes->post('master/createPaymentMode', 'MasterController::createPaymentMode');
|
||||||
$routes->post('master/updatePaymentMode/(:num)', 'MasterController::updatePaymentMode/$1');
|
$routes->post('master/updatePaymentMode/(:num)', 'MasterController::updatePaymentMode/$1');
|
||||||
$routes->post('master/updatePaymentModeStatus/(:num)', 'MasterController::updatePaymentModeStatus/$1');
|
$routes->post('master/updatePaymentModeStatus/(:num)', 'MasterController::updatePaymentModeStatus/$1');
|
||||||
|
$routes->get('master/getAllPOS', 'MasterController::getAllPOS');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -100,7 +100,8 @@ class AgentController extends ResourceController
|
|||||||
'manager_id' => $data['manager_id'],
|
'manager_id' => $data['manager_id'],
|
||||||
'sales_executive_id' => $data['sales_executive_id'],
|
'sales_executive_id' => $data['sales_executive_id'],
|
||||||
'certificate_file_name' => $certificateFileName,
|
'certificate_file_name' => $certificateFileName,
|
||||||
'created_by' => $data['created_by']
|
'created_by' => $data['created_by'],
|
||||||
|
'pos_id' => $data['pos_id']
|
||||||
];
|
];
|
||||||
|
|
||||||
$this->AgentModel->insert($insertData);
|
$this->AgentModel->insert($insertData);
|
||||||
@ -141,6 +142,7 @@ class AgentController extends ResourceController
|
|||||||
'agent_code' => $data['agent_code'] ?? null,
|
'agent_code' => $data['agent_code'] ?? null,
|
||||||
'sales_executive_id' => $data['sales_executive_id'] ?? null,
|
'sales_executive_id' => $data['sales_executive_id'] ?? null,
|
||||||
'updated_by' => $data['updated_by'] ?? null,
|
'updated_by' => $data['updated_by'] ?? null,
|
||||||
|
'pos_id' => $data['pos_id'] ?? null
|
||||||
];
|
];
|
||||||
|
|
||||||
if ($certificateFile && $certificateFile->isValid()) {
|
if ($certificateFile && $certificateFile->isValid()) {
|
||||||
|
|||||||
@ -12,6 +12,7 @@ use App\Models\InsurersModel;
|
|||||||
use App\Models\StaffModel;
|
use App\Models\StaffModel;
|
||||||
use App\Models\PartnerBrokerModel;
|
use App\Models\PartnerBrokerModel;
|
||||||
use App\Models\PaymentModeModel;
|
use App\Models\PaymentModeModel;
|
||||||
|
use App\Models\PartnerPosModel;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -28,6 +29,7 @@ class MasterController extends ResourceController
|
|||||||
protected $StaffModel;
|
protected $StaffModel;
|
||||||
protected $PartnerBrokerModel;
|
protected $PartnerBrokerModel;
|
||||||
protected $PaymentModeModel;
|
protected $PaymentModeModel;
|
||||||
|
protected $PartnerPosModel;
|
||||||
|
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
@ -42,6 +44,7 @@ class MasterController extends ResourceController
|
|||||||
$this->StaffModel = new StaffModel();
|
$this->StaffModel = new StaffModel();
|
||||||
$this->PartnerBrokerModel = new PartnerBrokerModel();
|
$this->PartnerBrokerModel = new PartnerBrokerModel();
|
||||||
$this->PaymentModeModel = new PaymentModeModel();
|
$this->PaymentModeModel = new PaymentModeModel();
|
||||||
|
$this->PartnerPosModel = new PartnerPosModel();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -351,6 +354,21 @@ class MasterController extends ResourceController
|
|||||||
//---------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
//POS CRUD---------------------------------------------------------------------------
|
||||||
|
public function getAllPOS()
|
||||||
|
{
|
||||||
|
|
||||||
|
$is_active = $this->request->getGet('is_active');
|
||||||
|
|
||||||
|
$data = $this->PartnerPosModel->where('is_active', $is_active)->findAll();
|
||||||
|
|
||||||
|
return $this->respond(['status' => 200,'message' => 'success','data' => $data]);
|
||||||
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -342,8 +342,9 @@ class PolicyController extends ResourceController
|
|||||||
}
|
}
|
||||||
|
|
||||||
//fetch enquiry_id & agent_id
|
//fetch enquiry_id & agent_id
|
||||||
$quotData = $this->QuotationModel->select('partner_quotation.*,E.agent_id,E.name')
|
$quotData = $this->QuotationModel->select('partner_quotation.*,E.agent_id,E.name , A.pos_id')
|
||||||
->join('partner_enquiry E', 'E.id = partner_quotation.enquiry_id', 'left')
|
->join('partner_enquiry E', 'E.id = partner_quotation.enquiry_id', 'left')
|
||||||
|
->join('partner_agent A', 'A.id = E.agent_id', 'left')
|
||||||
->where('partner_quotation.id',$data['quotation_id'])
|
->where('partner_quotation.id',$data['quotation_id'])
|
||||||
->first();
|
->first();
|
||||||
|
|
||||||
@ -383,7 +384,8 @@ class PolicyController extends ResourceController
|
|||||||
'manager_id' => $data['manager_id'],
|
'manager_id' => $data['manager_id'],
|
||||||
'agent_id' => $quotData['agent_id'],
|
'agent_id' => $quotData['agent_id'],
|
||||||
'policy_pdf_file_name' => $pdfFileName,
|
'policy_pdf_file_name' => $pdfFileName,
|
||||||
'created_by' => $data['created_by']
|
'created_by' => $data['created_by'],
|
||||||
|
'pos_id' => $quotData['pos_id']
|
||||||
];
|
];
|
||||||
|
|
||||||
$policyId = $this->PolicyModel->insert($insertData);
|
$policyId = $this->PolicyModel->insert($insertData);
|
||||||
|
|||||||
@ -126,6 +126,7 @@ if (!function_exists('createBDS')) {
|
|||||||
'bro_payable_by' => 1,
|
'bro_payable_by' => 1,
|
||||||
'agent_id' => $policyData['agent_id'],
|
'agent_id' => $policyData['agent_id'],
|
||||||
'agent_code' => $policyData['agent_code'],
|
'agent_code' => $policyData['agent_code'],
|
||||||
|
'pos_id' => $policyData['pos_id'],
|
||||||
];
|
];
|
||||||
$policyTransactionId = $policyTransactionModel->insert($policyTransactionData, true);
|
$policyTransactionId = $policyTransactionModel->insert($policyTransactionData, true);
|
||||||
$log[] = "Policy transaction created (ID: {$policyTransactionId})";
|
$log[] = "Policy transaction created (ID: {$policyTransactionId})";
|
||||||
|
|||||||
@ -24,7 +24,8 @@ class AgentModel extends Model
|
|||||||
'created_by',
|
'created_by',
|
||||||
'created_on',
|
'created_on',
|
||||||
'updated_by',
|
'updated_by',
|
||||||
'updated_on'
|
'updated_on',
|
||||||
|
'pos_id'
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $useTimestamps = false; // we manually handle created_on & updated_on
|
protected $useTimestamps = false; // we manually handle created_on & updated_on
|
||||||
|
|||||||
@ -52,6 +52,7 @@ class PolicyModel extends Model
|
|||||||
'broker_name',
|
'broker_name',
|
||||||
'commission_amount',
|
'commission_amount',
|
||||||
'is_data_accuracy_checked',
|
'is_data_accuracy_checked',
|
||||||
|
'pos_id'
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $useTimestamps = false;
|
protected $useTimestamps = false;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user