| Line 75... |
Line 75... |
| 75 |
* @return void
|
75 |
* @return void
|
| 76 |
*/
|
76 |
*/
|
| 77 |
public function admin_add() {
|
77 |
public function admin_add() {
|
| 78 |
if ($this->request->is('post')) {
|
78 |
if ($this->request->is('post')) {
|
| 79 |
$data = $this->request->data['Skuscheme'];
|
79 |
$data = $this->request->data['Skuscheme'];
|
| 80 |
//$data['startDate'] = 1000*strtotime($data['startDate']);
|
- |
|
| 81 |
//$data['endDate'] = 1000*strtotime($data['endDate']);
|
- |
|
| 82 |
$url = $this->apihost."discountInfo/addSkuSchemeDetails";
|
80 |
$url = $this->apihost."discountInfo/addSkuSchemeDetails";
|
| - |
|
81 |
$url = $this->generateMultiUrl($url,$data);
|
| 83 |
$jsonVar = json_encode($data, JSON_NUMERIC_CHECK );
|
82 |
$jsonVar = json_encode($data, JSON_NUMERIC_CHECK );
|
| 84 |
$response = $this->make_request($url,$jsonVar);
|
83 |
$response = $this->make_request($url,$jsonVar);
|
| 85 |
if (key($response)) {
|
84 |
if (key($response)) {
|
| 86 |
$this->Session->setFlash(current($response));
|
85 |
$this->Session->setFlash(current($response));
|
| 87 |
return $this->redirect(array('action' => 'index'));
|
86 |
return $this->redirect(array('action' => 'index'));
|
| Line 155... |
Line 154... |
| 155 |
|
154 |
|
| 156 |
public function admin_adddp() {
|
155 |
public function admin_adddp() {
|
| 157 |
if ($this->request->is('post')) {
|
156 |
if ($this->request->is('post')) {
|
| 158 |
$data = $this->request->data['Skuscheme'];
|
157 |
$data = $this->request->data['Skuscheme'];
|
| 159 |
$url = $this->apihost."dealerPrices/addDealerPrice";
|
158 |
$url = $this->apihost."dealerPrices/addDealerPrice";
|
| - |
|
159 |
$url = $this->generateMultiUrl($url,$data);
|
| 160 |
$jsonVar = json_encode($data, JSON_NUMERIC_CHECK );
|
160 |
$jsonVar = json_encode($data, JSON_NUMERIC_CHECK );
|
| 161 |
$response = $this->make_request($url,$jsonVar);
|
161 |
$response = $this->make_request($url,$jsonVar);
|
| 162 |
if (key($response)) {
|
162 |
if (key($response)) {
|
| 163 |
$this->Session->setFlash(current($response));
|
163 |
$this->Session->setFlash(current($response));
|
| 164 |
return $this->redirect(array('action' => 'admin_dp'));
|
164 |
return $this->redirect(array('action' => 'admin_dp'));
|