daybook,sms change
This commit is contained in:
parent
68b6afc879
commit
3aab4ba19e
@ -270,7 +270,7 @@ class Broadcast_model extends CI_Model {
|
|||||||
$this->db->insert_batch('T_BroadcastStatus', $data);
|
$this->db->insert_batch('T_BroadcastStatus', $data);
|
||||||
if ($this->db->affected_rows() >= 1) {
|
if ($this->db->affected_rows() >= 1) {
|
||||||
$result['msgStatus'] = true;
|
$result['msgStatus'] = true;
|
||||||
$result['message'] = "Successfully Messages Sended!!";
|
$result['message'] = "Successfully Messages Sent!!";
|
||||||
} else {
|
} else {
|
||||||
$result['msgStatus'] = false;
|
$result['msgStatus'] = false;
|
||||||
$result['message'] = "error!!";
|
$result['message'] = "error!!";
|
||||||
@ -408,7 +408,7 @@ class Broadcast_model extends CI_Model {
|
|||||||
|
|
||||||
$message = urlencode($msg);
|
$message = urlencode($msg);
|
||||||
$ch = curl_init();
|
$ch = curl_init();
|
||||||
curl_setopt($ch, CURLOPT_URL, "https://smsapi.24x7sms.com/api_2.0/SendSMS.aspx?APIKEY=xegCdYUIMf3&MobileNo=" . $number . "&SenderID=APOLLO&Message=" . $message . "&ServiceName=PROMOTIONAL_HIGH");
|
curl_setopt($ch, CURLOPT_URL, "https://smsapi.24x7sms.com/api_2.0/SendSMS.aspx?APIKEY=xegCdYUIMf3&MobileNo=" . $number . "&SenderID=APODEC&Message=" . $message . "&ServiceName=PROMOTIONAL_HIGH");
|
||||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
|
||||||
$output = curl_exec($ch);
|
$output = curl_exec($ch);
|
||||||
curl_close($ch);
|
curl_close($ch);
|
||||||
@ -483,6 +483,51 @@ class Broadcast_model extends CI_Model {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public function addPhone($details)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
$this->db->select('ID');
|
||||||
|
$this->db->from('T_Groups_Numbers');
|
||||||
|
$this->db->where('Phone_No', $details['Phone_No']);
|
||||||
|
$this->db->where('Parent_ID', $details['Parent_ID']);
|
||||||
|
$query = $this->db->get();
|
||||||
|
$resultt['details'] = $query->result();
|
||||||
|
if(count($resultt['details'])>0)
|
||||||
|
{
|
||||||
|
$res['status']=false;
|
||||||
|
$res['message'] = 'Phone Number Already Exists';
|
||||||
|
}
|
||||||
|
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$result= $this->db->insert('T_Groups_Numbers',$details);
|
||||||
|
|
||||||
|
// print_r($result);
|
||||||
|
|
||||||
|
if($result>0)
|
||||||
|
{
|
||||||
|
$res['status']=true;
|
||||||
|
$res['message'] = 'Phone Number Added';
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$res['status']=false;
|
||||||
|
$res['message'] = 'Phone Number Adding Failed';
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return $res;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public function GetAllGroups($reqBranch)
|
public function GetAllGroups($reqBranch)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@ -673,9 +673,9 @@ class DayBook_model extends CI_Model
|
|||||||
FROM
|
FROM
|
||||||
T_DayBookMaster AS p
|
T_DayBookMaster AS p
|
||||||
join T_PickListDetails on T_PickListDetails.ListCode = p.name
|
join T_PickListDetails on T_PickListDetails.ListCode = p.name
|
||||||
where str_to_date(Date,?)>=? and str_to_date(Date,?)<=? and p.IsActive=? and (p.Name=? or p.Name=?)
|
where str_to_date(Date,?)>=? and str_to_date(Date,?)<=? and p.IsActive=? and (p.Name=? or p.Name=?) and Status !=?
|
||||||
GROUP BY p.`Name`';
|
GROUP BY p.`Name`';
|
||||||
$query = $this->db->query($subQuery,array($incomecode,$expensecode,$incomecode,$expensecode,'%d-%m-%Y',$fromd,'%d-%m-%Y',$tod,'1','I001','I002'));
|
$query = $this->db->query($subQuery,array($incomecode,$expensecode,$incomecode,$expensecode,'%d-%m-%Y',$fromd,'%d-%m-%Y',$tod,'1','I001','I002','Cancel'));
|
||||||
$expense = $query->result();
|
$expense = $query->result();
|
||||||
|
|
||||||
if(count($query)>0)
|
if(count($query)>0)
|
||||||
@ -709,9 +709,9 @@ class DayBook_model extends CI_Model
|
|||||||
$subQuery='select Name,sum(Amount) as Total,T_DayBookMaster.ID,T_Income_Outcome_Master.ID as SubID,T_Income_Outcome_Master.TypeID as OrgType,T_Income_Outcome_Master.TypeName,T_DayBookMaster.Date,Reason,T_DayBookMaster.Description,ListName from T_DayBookMaster
|
$subQuery='select Name,sum(Amount) as Total,T_DayBookMaster.ID,T_Income_Outcome_Master.ID as SubID,T_Income_Outcome_Master.TypeID as OrgType,T_Income_Outcome_Master.TypeName,T_DayBookMaster.Date,Reason,T_DayBookMaster.Description,ListName from T_DayBookMaster
|
||||||
left join T_Income_Outcome_Master on T_Income_Outcome_Master.ID = T_DayBookMaster.Type
|
left join T_Income_Outcome_Master on T_Income_Outcome_Master.ID = T_DayBookMaster.Type
|
||||||
join T_PickListDetails on T_PickListDetails.ListCode = T_Income_Outcome_Master.TypeID
|
join T_PickListDetails on T_PickListDetails.ListCode = T_Income_Outcome_Master.TypeID
|
||||||
where str_to_date(date,?)>=? and str_to_date(date,?)<=? group by Type,Name';
|
where str_to_date(date,?)>=? and str_to_date(date,?)<=? and Status!=? group by Type,Name';
|
||||||
|
|
||||||
$query = $this->db->query($subQuery,array('%d-%m-%Y',$fromd,'%d-%m-%Y',$tod));
|
$query = $this->db->query($subQuery,array('%d-%m-%Y',$fromd,'%d-%m-%Y',$tod,'Cancel'));
|
||||||
|
|
||||||
|
|
||||||
//print_r( $this->db->last_query());
|
//print_r( $this->db->last_query());
|
||||||
|
|||||||
@ -836,7 +836,16 @@ $scope.cancel_save=function()
|
|||||||
|
|
||||||
$scope.AddGroup = {
|
$scope.AddGroup = {
|
||||||
submit: function (form,myModel) {
|
submit: function (form,myModel) {
|
||||||
//alert()
|
|
||||||
|
var group = myModel.GroupName;
|
||||||
|
|
||||||
|
if(group == '')
|
||||||
|
{
|
||||||
|
swal("Group Name Needed ",'', "error");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
var GroupName = myModel.GroupName;
|
var GroupName = myModel.GroupName;
|
||||||
|
|
||||||
var addgroup = {
|
var addgroup = {
|
||||||
@ -865,7 +874,10 @@ $scope.cancel_save=function()
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user