Purchase Departmen
This commit is contained in:
parent
b4c609b0a1
commit
28ac34ab9f
@ -317,14 +317,20 @@ class requisitionform extends BaseController
|
|||||||
|
|
||||||
|
|
||||||
$IsExists = $this->requistion_model->RequistionIsExists($Requestedby);
|
$IsExists = $this->requistion_model->RequistionIsExists($Requestedby);
|
||||||
|
// print_r($IsExists);
|
||||||
|
|
||||||
if(count( $IsExists) == 0)
|
if(count( $IsExists) == 0)
|
||||||
{
|
{
|
||||||
$Request = array('ReqType'=>$RequestType, 'Requestedby'=>$Requestedby,'ReqDate'=>$createddt,'Status'=>$Status,'CreatedDate'=>$createddt,'CreatedBy'=>$CreateBy,'CostCenterCode'=>$CostCenter);
|
//echo 'Not Exists';
|
||||||
|
$Request = array('ReqType'=>$RequestType, 'Requestedby'=>$Requestedby,'ReqDate'=>$createddt,'CostCenterCode'=>$CostCenter,'Status'=>$Status,'CreatedDate'=>$createddt,'CreatedBy'=>$CreateBy);
|
||||||
|
|
||||||
|
print_r($Request);
|
||||||
|
|
||||||
$Req = $this->requistion_model->addRequistion($Request);
|
$Req = $this->requistion_model->addRequistion($Request);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
//echo 'Exists';
|
||||||
$Request = array('ReqType'=>$RequestType, 'Requestedby'=>$Requestedby,'ReqDate'=>$createddt,'Status'=>$Status,'CreatedDate'=>$createddt,'CreatedBy'=>$CreateBy,'CostCenterCode'=>$CostCenter);
|
$Request = array('ReqType'=>$RequestType, 'Requestedby'=>$Requestedby,'ReqDate'=>$createddt,'Status'=>$Status,'CreatedDate'=>$createddt,'CreatedBy'=>$CreateBy,'CostCenterCode'=>$CostCenter);
|
||||||
$UpdateReq = $this->requistion_model->UpdateRequistion($Request,$IsExists[0]['ReqNo']);
|
$UpdateReq = $this->requistion_model->UpdateRequistion($Request,$IsExists[0]['ReqNo']);
|
||||||
}
|
}
|
||||||
@ -374,7 +380,7 @@ class requisitionform extends BaseController
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
echo 'Successfully Created the Requistion details';
|
echo 'Successfully Created the Requistion details';
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -501,7 +507,7 @@ class requisitionform extends BaseController
|
|||||||
$AvilBudAmt = '0';
|
$AvilBudAmt = '0';
|
||||||
if(count($AvlBudget)>0)
|
if(count($AvlBudget)>0)
|
||||||
{
|
{
|
||||||
$AvilBudAmt = $AvlBudget[0]['BudgetAmount'] - $result[0]['Totalvalue'];
|
$AvilBudAmt = $AvlBudget[0]['BudgetAmount'] - $AvlBudget[0]['Totalvalue'];
|
||||||
}
|
}
|
||||||
//echo $AvilBudAmt;
|
//echo $AvilBudAmt;
|
||||||
die(json_encode(array('Items' =>$HTML,'Requist'=>$ReqList,'AvilBudAmount'=>number_format($AvilBudAmt,2))));
|
die(json_encode(array('Items' =>$HTML,'Requist'=>$ReqList,'AvilBudAmount'=>number_format($AvilBudAmt,2))));
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user