invoice create issue : GWM
This commit is contained in:
parent
6f9422f08c
commit
3e5ee5f2e7
@ -35,9 +35,13 @@ class InvoiceController extends ResourceController
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
|
||||||
$data = $this->InvoiceModel->select('partner_invoice.*, PB.name as broker_name, pos.name as pos_name,
|
$data = $this->InvoiceModel
|
||||||
|
->select('partner_invoice.*,
|
||||||
|
PB.name as broker_name,
|
||||||
|
pos.name as pos_name,
|
||||||
FORMAT(partner_invoice.invoice_amount, 2, "en_IN") AS invoice_amount_indian_format,
|
FORMAT(partner_invoice.invoice_amount, 2, "en_IN") AS invoice_amount_indian_format,
|
||||||
DATE_FORMAT(partner_invoice.invoice_date, "%d-%m-%Y") AS invoice_date_ui_format')
|
DATE_FORMAT(partner_invoice.invoice_date, "%d-%m-%Y") AS invoice_date_ui_format,
|
||||||
|
')
|
||||||
->join('partner_brokers PB', 'PB.id = partner_invoice.broker_id', 'left')
|
->join('partner_brokers PB', 'PB.id = partner_invoice.broker_id', 'left')
|
||||||
->join('partner_pos pos', 'pos.id = partner_invoice.pos_id', 'left')
|
->join('partner_pos pos', 'pos.id = partner_invoice.pos_id', 'left')
|
||||||
->where('partner_invoice.is_active', 1)
|
->where('partner_invoice.is_active', 1)
|
||||||
|
|||||||
@ -995,9 +995,9 @@ class PolicyController extends ResourceController
|
|||||||
$type = $this->request->getGet('type');
|
$type = $this->request->getGet('type');
|
||||||
$policyId = $this->request->getGet('policy_id');
|
$policyId = $this->request->getGet('policy_id');
|
||||||
|
|
||||||
if($type == 'commission')
|
if($type == 'read')
|
||||||
{
|
{
|
||||||
$readDoc = $this->calculateCommission($policyId , false);
|
$readDoc = $this->checkPolicyDoc($policyId , false);
|
||||||
if($readDoc['status'] == 'success')
|
if($readDoc['status'] == 'success')
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -1061,9 +1061,9 @@ class PolicyController extends ResourceController
|
|||||||
return $this->respond(['status'=>$readDoc['status'], 'data'=> $readDoc ], 200);
|
return $this->respond(['status'=>$readDoc['status'], 'data'=> $readDoc ], 200);
|
||||||
|
|
||||||
|
|
||||||
}else if($type == 'read')
|
}else if($type == 'commission')
|
||||||
{
|
{
|
||||||
return $this->checkPolicyDoc($policyId , true);
|
return $this->calculateCommission($policyId , true);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user