Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
TimeOutAdmin
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TimeOut
TimeOutAdmin
Commits
82e360c0
Commit
82e360c0
authored
Mar 20, 2019
by
Tobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dc
parent
8ba0434a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
317 additions
and
2 deletions
+317
-2
Payment.php
application/controllers/Payment.php
+65
-0
viewSettings.php
application/views/Settings/viewSettings.php
+1
-1
left-menu.php
application/views/Templates/left-menu.php
+5
-1
payment_details.php
application/views/payment/payment_details.php
+246
-0
No files found.
application/controllers/Payment.php
0 → 100644
View file @
82e360c0
<?php
defined
(
'BASEPATH'
)
OR
exit
(
'No direct script access allowed'
);
class
Payment
extends
CI_Controller
{
public
function
__construct
()
{
parent
::
__construct
();
date_default_timezone_set
(
"Asia/Kolkata"
);
$this
->
load
->
model
(
'Provider_model'
);
if
(
!
$this
->
session
->
userdata
(
'logged_in'
))
{
redirect
(
base_url
(
'Login'
));
}
}
function
getPayDetails
(){
$provider_id
=
''
;
if
(
$this
->
session
->
userdata
(
'user_type'
)
==
1
){
$provider_id
=
(
isset
(
$_POST
[
'provider_id'
])
&&!
empty
(
$_POST
[
'provider_id'
]))
?
$_POST
[
'provider_id'
]
:
''
;
}
else
{
$provider_id
=
$this
->
session
->
userdata
(
'id'
);
$template
[
'provider_id'
]
=
$provider_id
;
}
$template
[
'page'
]
=
'Payment/payment_details'
;
$template
[
'page_desc'
]
=
"Payment Details"
;
$template
[
'page_title'
]
=
"Payment Management"
;
$template
[
'menu'
]
=
"Payment Management"
;
$template
[
'sub_menu'
]
=
"Payment Details"
;
$template
[
'provider_id'
]
=
$provider_id
;
$template
[
'user_type'
]
=
$this
->
session
->
userdata
(
'user_type'
);
$template
[
'company_data'
]
=
$this
->
Provider_model
->
getProviderData
();
$template
[
'payment_details'
]
=
$this
->
Provider_model
->
getPayDetails
(
$provider_id
);
$template
[
'broker_pay_details'
]
=
$this
->
Provider_model
->
getBrokerPayDetails
(
$provider_id
);
$this
->
load
->
view
(
'template'
,
$template
);
}
function
updatePaymentDate
(){
$retStatus
=
array
(
'status'
=>
'0'
);
if
(
!
isset
(
$_POST
)
||
empty
(
$_POST
)
||
!
isset
(
$_POST
[
'broker_id'
])
||
empty
(
$_POST
[
'broker_id'
])
||
!
isset
(
$_POST
[
'last_paid_date'
])
||
empty
(
$_POST
[
'last_paid_date'
])){
echo
json_encode
(
$retStatus
);
exit
;
}
$_POST
[
'broker_id'
]
=
decode_param
(
$_POST
[
'broker_id'
]);
$_POST
[
'provider_id'
]
=
$this
->
session
->
userdata
[
'id'
];
$_POST
[
'last_paid_date'
]
=
date
(
'Y-m-d 00:00:00'
,
strtotime
(
$_POST
[
'last_paid_date'
]));
$retStatus
[
'status'
]
=
$this
->
Provider_model
->
updatePaymentDate
(
$_POST
);
if
(
$retStatus
[
'status'
]){
$data
=
$this
->
Provider_model
->
getBrokerPayDetails
(
$_POST
[
'provider_id'
]);
if
(
!
isset
(
$data
[
$_POST
[
'broker_id'
]])
||
empty
(
$data
[
$_POST
[
'broker_id'
]])){
$retStatus
[
'status'
]
=
0
;
}
else
{
$data
[
$_POST
[
'broker_id'
]][
'last_paid_date'
]
=
date
(
'd-M-Y'
,
strtotime
(
$data
[
$_POST
[
'broker_id'
]][
'last_paid_date'
]));
$retStatus
[
'data'
]
=
$data
[
$_POST
[
'broker_id'
]];
}
}
echo
json_encode
(
$retStatus
);
exit
;
}
}
?>
\ No newline at end of file
application/views/Settings/viewSettings.php
View file @
82e360c0
...
@@ -93,7 +93,7 @@
...
@@ -93,7 +93,7 @@
</div>
</div>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"form-group col-xs-4"
>
<div
class=
"form-group col-xs-4"
>
<label>
Service Charge
</label>
<label>
Commission Per Booking
</label>
<input
type=
"text"
name=
"service_charge"
class=
"form-control required"
placeholder=
"Enter Service Charge"
value=
"
<?=
$data
[
'service_charge'
]
?>
"
>
<input
type=
"text"
name=
"service_charge"
class=
"form-control required"
placeholder=
"Enter Service Charge"
value=
"
<?=
$data
[
'service_charge'
]
?>
"
>
</div>
</div>
</div>
</div>
...
...
application/views/Templates/left-menu.php
View file @
82e360c0
<aside
class=
"main-sidebar"
>
x
<aside
class=
"main-sidebar"
>
<section
class=
"sidebar"
>
<section
class=
"sidebar"
>
<div
class=
"user-panel"
>
<div
class=
"user-panel"
>
<div
class=
"pull-left image"
>
<div
class=
"pull-left image"
>
...
@@ -137,6 +137,10 @@
...
@@ -137,6 +137,10 @@
<img
src=
"
<?=
base_url
(
"assets/images/m8.png"
)
?>
"
>
<img
src=
"
<?=
base_url
(
"assets/images/m8.png"
)
?>
"
>
<span>
Booking Details
</span></a>
<span>
Booking Details
</span></a>
</li>
</li>
<li><a
href=
"
<?=
base_url
(
'Payment/getPayDetails'
)
?>
"
>
<img
src=
"
<?=
base_url
(
"assets/images/m2.png"
)
?>
"
>
<span>
Transaction Management
</span></a>
</li>
<li>
<li>
<a
href=
"
<?=
base_url
(
'CMS'
)
?>
"
>
<a
href=
"
<?=
base_url
(
'CMS'
)
?>
"
>
<img
src=
"
<?=
base_url
(
"assets/images/m5.png"
)
?>
"
>
<img
src=
"
<?=
base_url
(
"assets/images/m5.png"
)
?>
"
>
...
...
application/views/payment/payment_details.php
0 → 100644
View file @
82e360c0
<div
class=
"content-wrapper"
>
<section
class=
"content-header"
>
<h1>
<?=
$page_title
?>
<small>
<?=
$page_desc
?>
</small>
</h1>
<ol
class=
"breadcrumb"
>
<li><a
href=
"
<?=
base_url
()
?>
"
><i
class=
"fa fa-star-o"
aria-hidden=
"true"
></i>
Home
</a></li>
<li>
<?=
$menu
?>
</li>
<li
class=
"active"
>
<?=
$sub_menu
?>
</li>
</ol>
</section>
<section
class=
"content"
>
<div
class=
"row"
>
<div
class=
"col-sm-12"
>
<?php
if
(
$this
->
session
->
flashdata
(
'message'
))
{
$flashdata
=
$this
->
session
->
flashdata
(
'message'
);
?>
<div
class=
"alert alert-
<?=
$flashdata
[
'class'
]
?>
"
>
<button
class=
"close"
data-dismiss=
"alert"
type=
"button"
>
×
</button>
<?=
$flashdata
[
'message'
]
?>
</div>
<?php
}
?>
</div>
<?php
if
(
$this
->
session
->
userdata
[
'user_type'
]
==
1
){
?>
<div
class=
"col-sm-12"
>
<div
class=
"box box-warning"
>
<div
class=
"box-header with-border"
>
<h3
class=
"box-title"
>
Transaction Management
</h3>
</div>
<div
class=
"box-body"
>
<form
role=
"form"
id=
"cmpyPayDetlsForm"
action=
"
<?=
base_url
(
'Payment/getPayDetails'
)
?>
"
method=
"post"
class=
"validate"
data-parsley-validate=
""
enctype=
"multipart/form-data"
>
<div
class=
"col-sm-12"
>
<div
class=
"form-group"
>
<label>
Select Company
</label>
<select
name=
"company_id"
class=
"form-control required"
data-parsley-trigger=
"change"
onchange=
"getCmpyPayDetls()"
dmClick=
"0"
required
>
<option
selected
disabled
>
Select Company
</option>
<?php
if
(
!
empty
(
$company_data
)){
foreach
(
$company_data
as
$company
)
{
$chkFlg
=
(
$company_id
==
$company
->
company_id
)
?
'selected'
:
''
;
echo
'<option value="'
.
$company
->
company_id
.
'" '
.
$chkFlg
.
'>
'
.
$company
->
company_name
.
'</option>'
;
}
}
?>
</select>
</div>
</div>
</form>
</div>
</div>
</div>
<?php
}
?>
<?php
if
(
!
empty
(
$payment_details
)){
?>
<div
class=
"col-sm-12"
>
<div
class=
"box box-warning"
>
<div
class=
"box-header with-border"
>
<h3
class=
"box-title"
>
Transaction Charges
</h3>
</div>
<div
class=
"box-body"
>
<div
class=
"col-sm-12"
>
<div
class=
"col-sm-6"
>
<div
class=
"col-sm-5"
>
Booking Charge
</div>
<div
class=
"col-sm-1"
>
<span
style=
"padding-right:30px;"
>
:
</span><strong>
<?=
$payment_details
->
booking_charge
?>
</strong>
</div>
</div>
<div
class=
"col-sm-6"
>
<div
class=
"col-sm-5"
>
SMS Charge
</div>
<div
class=
"col-sm-1"
>
<span
style=
"padding-right:30px;"
>
:
</span><strong>
<?=
$payment_details
->
sms_charge
?>
</strong>
</div>
</div>
</div>
<div
class=
"col-sm-12"
>
<div
class=
"col-sm-6"
>
<div
class=
"col-sm-5"
>
Notification Charge
</div>
<div
class=
"col-sm-1"
>
<span
style=
"padding-right:30px;"
>
:
</span><strong>
<?=
$payment_details
->
push_charge
?>
</strong>
</div>
</div>
<div
class=
"col-sm-6"
>
<div
class=
"col-sm-5"
>
Report Charge
</div>
<div
class=
"col-sm-1"
>
<span
style=
"padding-right:30px;"
>
:
</span><strong>
<?=
$payment_details
->
report_charge
?>
</strong>
</div>
</div>
</div>
</div>
<br>
<div
class=
"box-header with-border"
>
<h3
class=
"box-title"
>
Payment Details
</h3>
</div>
<div
class=
"box-body"
>
<div
class=
"col-sm-12"
>
<div
class=
"col-sm-6"
>
<div
class=
"col-sm-5"
>
Booking Count
</div>
<div
class=
"col-sm-1"
>
<span
style=
"padding-right:30px;"
>
:
</span><strong>
<?=
$payment_details
->
booking_count
?>
</strong>
</div>
</div>
<div
class=
"col-sm-6"
>
<div
class=
"col-sm-5"
>
SMS Send
</div>
<div
class=
"col-sm-1"
>
<span
style=
"padding-right:30px;"
>
:
</span><strong>
<?=
$payment_details
->
sms_count
?>
</strong>
</div>
</div>
</div>
<div
class=
"col-sm-12"
>
<div
class=
"col-sm-6"
>
<div
class=
"col-sm-5"
>
Notification Send
</div>
<div
class=
"col-sm-1"
>
<span
style=
"padding-right:30px;"
>
:
</span><strong>
<?=
$payment_details
->
push_count
?>
</strong>
</div>
</div>
<div
class=
"col-sm-6"
>
<div
class=
"col-sm-5"
>
Report Generated
</div>
<div
class=
"col-sm-1"
>
<span
style=
"padding-right:30px;"
>
:
</span><strong>
<?=
$payment_details
->
report_count
?>
</strong>
</div>
</div>
</div>
<div
class=
"col-sm-12"
style=
"padding-top:10px;"
>
<div
class=
"col-sm-6"
>
<div
class=
"col-sm-5"
>
Total Earning
</div>
<div
class=
"col-sm-1"
>
<span
style=
"padding-right:30px;"
>
:
</span><strong>
<?=
$payment_details
->
total_earnings
?>
</strong>
</div>
</div>
<div
class=
"col-sm-6"
>
<div
class=
"col-sm-5"
>
Total Paid
</div>
<div
class=
"col-sm-1"
>
<span
style=
"padding-right:30px;"
>
:
</span><strong>
<?=
$payment_details
->
paid_amount
?>
</strong>
</div>
</div>
</div>
<div
class=
"col-sm-12"
style=
"padding-top:10px;"
>
<div
class=
"col-sm-6"
>
<div
class=
"col-sm-5"
>
Last Payment On
</div>
<div
class=
"col-sm-5"
style=
"padding-left:0px;"
>
<strong>
<?=
(
!
empty
(
$payment_details
->
last_paid_date
))
?
date
(
'd-M-Y G:i'
,
$payment_details
->
last_paid_date
)
:
''
?>
</strong>
</div>
</div>
</div>
<div
class=
"col-sm-12"
>
<div
class=
"col-sm-6"
>
<div
class=
"col-sm-5"
>
Outstanding Amount
</div>
<div
class=
"col-sm-1"
>
<span
style=
"padding-right:30px;"
>
:
</span><strong>
<?=
$payment_details
->
outstanding_amount
?>
</strong>
</div>
</div>
</div>
<?php
if
(
$this
->
session
->
userdata
[
'user_type'
]
!=
1
&&
$payment_details
->
outstanding_amount
>
0
){
?>
<div
class=
"col-sm-12"
style=
"padding-left: 47px;margin-top: 10px;"
>
<button
type=
"submit"
class=
"btn btn-success"
>
Pay Now
</button>
</div>
<?php
}
?>
</div>
<?php
if
(
$this
->
session
->
userdata
[
'user_type'
]
!=
1
&&
!
empty
(
$broker_pay_details
)){
?>
<br>
<div
class=
"box-header with-border"
>
<h3
class=
"box-title"
>
Broker Payment Details
</h3>
</div>
<?php
$count
=
1
;
foreach
(
$broker_pay_details
AS
$brk_data
){
$brk_data
[
'broker_id'
]
=
encode_param
(
$brk_data
[
'broker_id'
]);
?>
<div
class=
"box-body"
>
<b
class=
"box-title"
style=
"padding-left:20px;padding-bottom:10px;"
>
<?=
$count
?>
.
<span
style=
"padding-left:10px;"
>
<?=
$brk_data
[
'broker_name'
]
?>
</span>
</b>
<div
class=
"col-sm-12"
style=
"padding-top:10px;"
>
<div
class=
"col-sm-6"
>
<div
class=
"col-sm-5"
>
Total Booking Received
</div>
<div
class=
"col-sm-1"
>
<span
style=
"padding-right:30px;"
>
:
</span><strong
id=
"all_trans_count_
<?=
$brk_data
[
'broker_id'
]
?>
"
>
<?=
$brk_data
[
'all_trans_count'
]
?>
</strong>
</div>
</div>
<div
class=
"col-sm-6"
>
<div
class=
"col-sm-5"
>
Total Booking Processed
</div>
<div
class=
"col-sm-1"
>
<span
style=
"padding-right:30px;"
>
:
</span><strong
id=
"pro_trans_count_
<?=
$brk_data
[
'broker_id'
]
?>
"
>
<?=
$brk_data
[
'pro_trans_count'
]
?>
</strong>
</div>
</div>
</div>
<div
class=
"col-sm-12"
>
<div
class=
"col-sm-6"
>
<div
class=
"col-sm-5"
>
Total Paid Bookings
</div>
<div
class=
"col-sm-1"
>
<span
style=
"padding-right:30px;"
>
:
</span><strong
id=
"tot_paid_booking_
<?=
$brk_data
[
'broker_id'
]
?>
"
>
<?=
$brk_data
[
'pro_trans_count'
]
-
$brk_data
[
'pending_trans_count'
]
?>
</strong>
</div>
</div>
<div
class=
"col-sm-6"
>
<div
class=
"col-sm-5"
>
Bookings To Be Paid
</div>
<div
class=
"col-sm-1"
>
<span
style=
"padding-right:30px;"
>
:
</span><strong
id=
"pending_trans_count_
<?=
$brk_data
[
'broker_id'
]
?>
"
>
<?=
$brk_data
[
'pending_trans_count'
]
?>
</strong>
</div>
</div>
</div>
<div
class=
"col-sm-12"
style=
"padding-top:10px;"
>
<div
class=
"col-sm-2"
style=
"padding-left:31px;"
>
Last Payment Date
</div>
<div
class=
"col-sm-10"
>
<span
style=
"padding-left:45px;padding-right:30px;"
>
:
</span><strong
id=
"brkPayDate_
<?=
$brk_data
[
'broker_id'
]
?>
"
>
<?=
(
empty
(
$brk_data
[
'last_paid_date'
]))
?
' -- '
:
date
(
'd-M-Y'
,
strtotime
(
$brk_data
[
'last_paid_date'
]))
?>
</strong>
</div>
</div>
<div
class=
"col-sm-12"
style=
"padding-top:10px;"
>
<div
class=
"col-sm-3"
style=
"padding-left:31px;top:7px;"
>
Update Last Payment Date
</div>
<div
class=
"col-sm-3"
>
<div
class=
"input-group date"
data-provide=
"datepicker"
>
<input
id=
"datepicker"
type=
"text"
class=
"form-control required"
data-parsley-trigger=
"change"
data-parsley-minlength=
"2"
required=
""
name=
"payment_date_
<?=
$brk_data
[
'broker_id'
]
?>
"
placeholder=
"Pick Last Paid Date"
autocomplete=
"off"
>
<div
class=
"input-group-addon"
>
<i
class=
"fa fa-calendar"
></i>
</div>
</div>
</div>
<div
class=
"col-sm-2"
style=
"padding-bottom:10px;padding-left:30px;"
>
<button
id=
"updateBrkPayDate_
<?=
$brk_data
[
'broker_id'
]
?>
"
type=
"submit"
class=
"btn btn-info"
broker_id=
"
<?=
$brk_data
[
'broker_id'
]
?>
"
>
Update
</button>
</div>
</div>
<!--
<div class="col-sm-12" style="padding-bottom:10px;padding-left:48px;">
<button id="updateBrkPayDate_
<?=
$brk_data
[
'broker_id'
]
?>
" type="submit" class="btn btn-info" broker_id="
<?=
$brk_data
[
'broker_id'
]
?>
">Update</button>
</div> -->
</div>
<?php
$count
++
;
}
?>
</div>
<?php
}
?>
</div>
</div>
<?php
}
?>
</div>
</section>
</div>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment