CST Field Added
This commit is contained in:
parent
340439c85a
commit
0fa2cc5e71
@ -159,9 +159,21 @@ class supplier extends BaseController
|
|||||||
$PaymentTerms = $this->input->post('PaymentTerms');
|
$PaymentTerms = $this->input->post('PaymentTerms');
|
||||||
$Payment = $this->input->post('Payment');
|
$Payment = $this->input->post('Payment');
|
||||||
$PayableAT = $this->input->post('PayableAT');
|
$PayableAT = $this->input->post('PayableAT');
|
||||||
|
$CSTNo = $this->input->post('CSTNo');
|
||||||
|
|
||||||
|
$CSTDt = $this->input->post('dateofCST');
|
||||||
|
|
||||||
|
if($CSTDt != '')
|
||||||
|
{
|
||||||
|
$CSTDate = $this->getDateformat($CSTDt);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$CSTDate = null;
|
||||||
|
}
|
||||||
$Createdby = $this->session->userdata ( 'userId' );
|
$Createdby = $this->session->userdata ( 'userId' );
|
||||||
|
|
||||||
$supplier = array('SupplierName'=>$SupplierName, 'Address'=>$Address, 'ContactNumber'=>$ContactNumber, 'AlternateContactNumber'=> $AlternateContactNumber,'EmailAddress'=>$EmailAddress,'Exiseregistration'=>$Exiseregistration,'TIN'=>$TIN,'PAN'=>$PAN,'GSTNo'=>$GSTNo,'GSTRange'=>$GSTRange,'CollectrateAddress'=>$CollectrateAddress,'UANumber'=>$UANumber,'PaymentTerms'=>$PaymentTerms,'PaymentDays'=>$Payment,'PayableAT'=>$PayableAT,'Createdby'=>$Createdby);
|
$supplier = array('SupplierName'=>$SupplierName, 'Address'=>$Address, 'ContactNumber'=>$ContactNumber, 'AlternateContactNumber'=> $AlternateContactNumber,'EmailAddress'=>$EmailAddress,'Exiseregistration'=>$Exiseregistration,'TIN'=>$TIN,'PAN'=>$PAN,'GSTNo'=>$GSTNo,'GSTRange'=>$GSTRange,'CollectrateAddress'=>$CollectrateAddress,'UANumber'=>$UANumber,'PaymentTerms'=>$PaymentTerms,'PaymentDays'=>$Payment,'PayableAT'=>$PayableAT,'CSTNo'=>$CSTNo,'CSTDate'=>$CSTDate,'Createdby'=>$Createdby);
|
||||||
|
|
||||||
$result = $this->supplier_model->addNewsupplier($supplier);
|
$result = $this->supplier_model->addNewsupplier($supplier);
|
||||||
|
|
||||||
@ -180,6 +192,12 @@ class supplier extends BaseController
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getDateformat($Val)
|
||||||
|
{
|
||||||
|
$date = new DateTime($Val);
|
||||||
|
$retDate = $date->format('Y-m-d H:i:s');
|
||||||
|
return $retDate;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* This function is used to edit the Supplier information
|
* This function is used to edit the Supplier information
|
||||||
*/
|
*/
|
||||||
@ -230,9 +248,22 @@ class supplier extends BaseController
|
|||||||
{
|
{
|
||||||
$IsActive = '0';
|
$IsActive = '0';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$CSTNo = $this->input->post('CSTNo');
|
||||||
|
|
||||||
|
$CSTDt = $this->input->post('dateofCST');
|
||||||
|
|
||||||
|
if($CSTDt != '')
|
||||||
|
{
|
||||||
|
$CSTDate = $this->getDateformat($CSTDt);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$CSTDate = null;
|
||||||
|
}
|
||||||
$supplier = array();
|
$supplier = array();
|
||||||
|
|
||||||
$supplier = array('SupplierName'=>$SupplierName, 'Address'=>$Address, 'ContactNumber'=>$ContactNumber, 'AlternateContactNumber'=> $AlternateContactNumber,'EmailAddress'=>$EmailAddress,'Exiseregistration'=>$Exiseregistration,'TIN'=>$TIN,'PAN'=>$PAN,'GSTNo'=>$GSTNo,'GSTRange'=>$GSTRange,'CollectrateAddress'=>$CollectrateAddress,'UANumber'=>$UANumber,'PaymentTerms'=>$PaymentTerms,'PaymentDays'=>$Payment,'PayableAT'=>$PayableAT,'UpdatedBy'=>$UpdatedBy,'IsActive'=>$IsActive);
|
$supplier = array('SupplierName'=>$SupplierName, 'Address'=>$Address, 'ContactNumber'=>$ContactNumber, 'AlternateContactNumber'=> $AlternateContactNumber,'EmailAddress'=>$EmailAddress,'Exiseregistration'=>$Exiseregistration,'TIN'=>$TIN,'PAN'=>$PAN,'GSTNo'=>$GSTNo,'GSTRange'=>$GSTRange,'CollectrateAddress'=>$CollectrateAddress,'UANumber'=>$UANumber,'PaymentTerms'=>$PaymentTerms,'PaymentDays'=>$Payment,'PayableAT'=>$PayableAT,'UpdatedBy'=>$UpdatedBy,'IsActive'=>$IsActive,'CSTNo'=>$CSTNo,'CSTDate'=>$CSTDate);
|
||||||
|
|
||||||
$result = $this->supplier_model->UpdateSupplier($supplier, $supplierID);
|
$result = $this->supplier_model->UpdateSupplier($supplier, $supplierID);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user