Subversion Repositories SmartDukaan

Rev

Rev 19499 | Rev 19667 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 19499 Rev 19552
Line 149... Line 149...
149
				{
149
				{
150
					$creditValueArray['amount'] = $value['userAmount'];
150
					$creditValueArray['amount'] = $value['userAmount'];
151
					$creditValueArray['type'] = $value['type'];
151
					$creditValueArray['type'] = $value['type'];
152
					$creditValueArray['fortbatchid'] = $value['batch'];
152
					$creditValueArray['fortbatchid'] = $value['batch'];
153
					$creditValueArray['creditedDate'] = date('Y-m-d',strtotime($value['timestamp']));
153
					$creditValueArray['creditedDate'] = date('Y-m-d',strtotime($value['timestamp']));
-
 
154
					$creditValueArray['description'] = '';
154
					// $creditKeyArray[date('Y-m-d',strtotime($value['timestamp']))] = $creditValueArray;
155
					// $creditKeyArray[date('Y-m-d',strtotime($value['timestamp']))] = $creditValueArray;
155
					$creditKeyArray[date('Y-m-d',strtotime($value['timestamp'])).$value['type']] = $creditValueArray;
156
					$creditKeyArray[$value['batch'].$value['type']] = $creditValueArray;
156
				}
157
				}
157
				elseif($value['type']== 'Refund'){
158
				elseif($value['type']== 'Refund'){
158
					$creditValueArray['amount'] = $value['userAmount'];
159
					$creditValueArray['amount'] = $value['userAmount'];
159
					$creditValueArray['type'] = $value['type'];
160
					$creditValueArray['type'] = $value['type'];
160
					$creditValueArray['fortbatchid'] = $value['batch'];
161
					$creditValueArray['fortbatchid'] = $value['batch'];
161
					$creditValueArray['creditedDate'] = date('Y-m-d',strtotime($value['timestamp']));
162
					$creditValueArray['creditedDate'] = date('Y-m-d',strtotime($value['timestamp']));
162
					$creditValueArray['description'] = $value['description'];
163
					$creditValueArray['description'] = $value['description'];
163
					$creditKeyArray[date('Y-m-d',strtotime($value['timestamp'])).$value['type']] = $creditValueArray;
164
					$creditKeyArray[$value['batch'].$value['type']] = $creditValueArray;
164
					
165
					
165
				}
166
				}
166
				elseif($value['type']== 'Adjustment'){
167
				elseif($value['type']== 'Adjustment'){
167
					$creditValueArray['amount'] = $value['userAmount'];
168
					$creditValueArray['amount'] = $value['userAmount'];
168
					$creditValueArray['type'] = $value['type'];
169
					$creditValueArray['type'] = $value['type'];
169
					$creditValueArray['fortbatchid'] = $value['batch'];
170
					$creditValueArray['fortbatchid'] = $value['batch'];
170
					$creditValueArray['creditedDate'] = date('Y-m-d',strtotime($value['timestamp']));
171
					$creditValueArray['creditedDate'] = date('Y-m-d',strtotime($value['timestamp']));
171
					$creditValueArray['description'] = $value['description'];
172
					$creditValueArray['description'] = $value['description'];
172
					$creditKeyArray[date('Y-m-d',strtotime($value['timestamp'])).$value['type']] = $creditValueArray;
173
					$creditKeyArray[$value['batch'].$value['type']] = $creditValueArray;
173
				}
174
				}
174
			}
175
			}
175
		}
176
		}
176
		$storemapping = Configure::read('storemapping');
177
		$storemapping = Configure::read('storemapping');
177
		$activestores = Configure::read('activestores');
178
		$activestores = Configure::read('activestores');
Line 230... Line 231...
230
			$creditValueArray['amount'] = $value['amount'];
231
			$creditValueArray['amount'] = $value['amount'];
231
			// $total_credited_amount = $total_credited_amount + $value['amount'];
232
			// $total_credited_amount = $total_credited_amount + $value['amount'];
232
			$creditValueArray['type'] = 'App';
233
			$creditValueArray['type'] = 'App';
233
			$creditValueArray['fortbatchid'] = $value['fortnightOfYear'];
234
			$creditValueArray['fortbatchid'] = $value['fortnightOfYear'];
234
			$creditValueArray['creditedDate'] = $value['creditedDate'];
235
			$creditValueArray['creditedDate'] = $value['creditedDate'];
-
 
236
			$creditValueArray['description'] = '';
235
			$creditKeyArray[$value['creditedDate'].'App'] = $creditValueArray;
237
			$creditKeyArray[$value['batchCreditId'].'App'] = $creditValueArray;
236
			// echo "total credit",$total_credited_amount;
238
			// echo "total credit",$total_credited_amount;
237
			// echo $url;
239
			// echo $url;
238
		}
240
		}
239
		
241
		
240
		ksort($creditKeyArray);
242
		ksort($creditKeyArray);
Line 340... Line 342...
340
					$creditValueArray['amount'] = $value['userAmount'];
342
					$creditValueArray['amount'] = $value['userAmount'];
341
					$creditValueArray['type'] = $value['type'];
343
					$creditValueArray['type'] = $value['type'];
342
					$creditValueArray['fortbatchid'] = $value['batch'];
344
					$creditValueArray['fortbatchid'] = $value['batch'];
343
					$creditValueArray['creditedDate'] = date('Y-m-d',strtotime($value['timestamp']));
345
					$creditValueArray['creditedDate'] = date('Y-m-d',strtotime($value['timestamp']));
344
					// $creditKeyArray[date('Y-m-d',strtotime($value['timestamp']))] = $creditValueArray;
346
					// $creditKeyArray[date('Y-m-d',strtotime($value['timestamp']))] = $creditValueArray;
-
 
347
					$creditValueArray['description'] = '';
345
					$creditKeyArray[date('Y-m-d',strtotime($value['timestamp'])).$value['type']] = $creditValueArray;
348
					$creditKeyArray[$value['batch'].$value['type']] = $creditValueArray;
346
				}
349
				}
347
				elseif($value['type']== 'Refund'){
350
				elseif($value['type']== 'Refund'){
348
					$creditValueArray['amount'] = $value['userAmount'];
351
					$creditValueArray['amount'] = $value['userAmount'];
349
					$creditValueArray['type'] = $value['type'];
352
					$creditValueArray['type'] = $value['type'];
350
					$creditValueArray['fortbatchid'] = $value['batch'];
353
					$creditValueArray['fortbatchid'] = $value['batch'];
351
					$creditValueArray['creditedDate'] = date('Y-m-d',strtotime($value['timestamp']));
354
					$creditValueArray['creditedDate'] = date('Y-m-d',strtotime($value['timestamp']));
352
					$creditValueArray['description'] = $value['description'];
355
					$creditValueArray['description'] = $value['description'];
353
					$creditKeyArray[date('Y-m-d',strtotime($value['timestamp'])).$value['type']] = $creditValueArray;
356
					$creditKeyArray[$value['batch'].$value['type']] = $creditValueArray;
354
						
357
						
355
				}
358
				}
356
				elseif($value['type']== 'Adjustment'){
359
				elseif($value['type']== 'Adjustment'){
357
					$creditValueArray['amount'] = $value['userAmount'];
360
					$creditValueArray['amount'] = $value['userAmount'];
358
					$creditValueArray['type'] = $value['type'];
361
					$creditValueArray['type'] = $value['type'];
359
					$creditValueArray['fortbatchid'] = $value['batch'];
362
					$creditValueArray['fortbatchid'] = $value['batch'];
360
					$creditValueArray['creditedDate'] = date('Y-m-d',strtotime($value['timestamp']));
363
					$creditValueArray['creditedDate'] = date('Y-m-d',strtotime($value['timestamp']));
361
					$creditValueArray['description'] = $value['description'];
364
					$creditValueArray['description'] = $value['description'];
362
					$creditKeyArray[date('Y-m-d',strtotime($value['timestamp'])).$value['type']] = $creditValueArray;
365
					$creditKeyArray[$value['batch'].$value['type']] = $creditValueArray;
363
				}
366
				}
364
				
367
				
365
			}
368
			}
366
		}
369
		}
367
 
370
 
Line 422... Line 425...
422
			$creditValueArray['amount'] = $value['amount'];
425
			$creditValueArray['amount'] = $value['amount'];
423
			// $total_credited_amount = $total_credited_amount + $value['amount'];
426
			// $total_credited_amount = $total_credited_amount + $value['amount'];
424
			$creditValueArray['type'] = 'App';
427
			$creditValueArray['type'] = 'App';
425
			$creditValueArray['fortbatchid'] = $value['fortnightOfYear'];
428
			$creditValueArray['fortbatchid'] = $value['fortnightOfYear'];
426
			$creditValueArray['creditedDate'] = $value['creditedDate'];
429
			$creditValueArray['creditedDate'] = $value['creditedDate'];
-
 
430
			$creditValueArray['description'] = '';
427
			$creditKeyArray[$value['creditedDate'].'App'] = $creditValueArray;
431
			$creditKeyArray[$value['batchCreditId'].'App'] = $creditValueArray;
428
			// echo "total credit",$total_credited_amount;
432
			// echo "total credit",$total_credited_amount;
429
			// echo $url;
433
			// echo $url;
430
		}
434
		}
431
		
435
		
432
		ksort($creditKeyArray);
436
		ksort($creditKeyArray);