| Line 319... |
Line 319... |
| 319 |
if(!empty($creditedCashbacks)){
|
319 |
if(!empty($creditedCashbacks)){
|
| 320 |
foreach ($creditedCashbacks['data'] as $key => $value) {
|
320 |
foreach ($creditedCashbacks['data'] as $key => $value) {
|
| 321 |
$creditedAmount += $value['userAmount'];
|
321 |
$creditedAmount += $value['userAmount'];
|
| 322 |
$data = array('subOrders.batchId'=>$value['batch']);
|
322 |
$data = array('subOrders.batchId'=>$value['batch']);
|
| 323 |
$jsonVar = json_encode($data);
|
323 |
$jsonVar = json_encode($data);
|
| 324 |
$url = $this->apihost."storeorder/user/".$this->Auth->User('id')."?page=1&window=50&searchMap=$jsonVar";
|
324 |
// $url = $this->apihost."storeorder/user/".$this->Auth->User('id')."?page=1&window=50&searchMap=$jsonVar";
|
| - |
|
325 |
$url = $this->apihost."storeorder/user/".$userId."?page=1&window=50&searchMap=$jsonVar";
|
| 325 |
$creditedOrders[$value['batch']] = $this->make_request($url,null);
|
326 |
$creditedOrders[$value['batch']] = $this->make_request($url,null);
|
| 326 |
$total_credited_amount =$total_credited_amount + $value['userAmount'];
|
327 |
$total_credited_amount =$total_credited_amount + $value['userAmount'];
|
| 327 |
if($value['type']== 'Order')
|
328 |
if($value['type']== 'Order')
|
| 328 |
{
|
329 |
{
|
| 329 |
$creditValueArray['amount'] = $value['userAmount'];
|
330 |
$creditValueArray['amount'] = $value['userAmount'];
|