outputreport.blade.php 3.03 KB
<div class="container">
	 <div style="text-align:center">
    	<h2>Output Report</h2>
    	<p></p>
 	 </div>

	<div class="row">
    	<div class="column">
<form class="form-horizontal"  id="output-report" name="output-report">
<div class="table-responsive" style="background: #fff;">

					<table class="table">	
						<thead>
							<tr>
								<th>No.of Attempts</th>
								<th><?php echo $data['noOfAttempts'];  ?>
									<input type="hidden" name="noOfAttempts" value="<?php echo $data['noOfAttempts']; ?>">
								 </th>
							</tr>
							<tr>
								<th>No.of Contacts</th>
								<th><?php echo $data['noOfContacts']; ?>
									<input type="hidden" name="noOfContacts" value="<?php echo $data['noOfContacts']; ?>">
								</th>
							</tr>
							<tr>
								<th>Unique Contacts</th>
								<th><?php $data['uniqueContacts'] ?>
									<input type="hidden" name="uniqueContacts" value="<?php $data['uniqueContacts'] ?>">
								</th>
							</tr>
							<tr>
								<th>Income Achievement</th>
								<th><?php echo $data['totalIncome']; ?></th>
							</tr>
							<tr>
								<th>Product</th>
								<th>LG</th>
								<th>Expected Amount(If Applicable)</th>
								<th>LC</th>
								<th>Amount(If Applicable)</th>
							</tr>
						</thead>
						<tbody>
							<?php							 
	//include(resource_path().'/views/layout/module/virtualchannel/VirtualFieldsArray.php'); 
	$i=1;						
	foreach ($data['products'] as $key => $value) {
		//print_r($value);
		//print_r($ProductType);
		
	 ?>
	 				<tr>
	 					<td> <input type="hidden" name="products[<?= $i ?>][productId]" value="<?php echo $value->productId; ?>">
	 					 <input type="hidden" name="products[<?= $i ?>][product]" value="<?php echo $value->name; ?>" ><?php echo $value->name; ?></td>
	 					<td><input type="number" name="products[<?= $i ?>][lg]" value="<?php echo $value->lead_generated; ?>"></td>
	 					<td><input type="number" min="0" step="0.01" name="products[<?= $i ?>][lgAmt]"  value="<?php echo $value->lead_generated_amount; ?>"></td>
	 					<td><input type="number" name="products[<?= $i ?>][lc]" value="<?php echo $value->lead_closed; ?>"></td>
	 					<td><input type="number" min="0" step="0.01" name="products[<?= $i ?>][lcAmt]" value="<?php echo $value->lead_closed_amount; ?>"></td>
	 				</tr>
	 			<?php 

	 			$i++;
	 			} ?>

	 				<tr>
	 					<td><button type="submit" class="btn btn-primary" onclick='createOutputReport();return false;'>Save</button></td></tr>
	 			</tbody>
					</table>
					
				</div>
</form>

<script>

function createOutputReport()
{
	var putdata = $('#output-report').serialize();
	//console.log("--->"+putdata);
	  doAjax('outputreport?action=createOutputReport',putdata,'__fake__div__','ajax_create_output_report','singlethis','POST',function(retstr)
	  {
			if(retstr.responseText.indexOf('Error')<0)
			{
				simpleNotification("success","topRight","User Created Successfully");
				menuAction('outputreport/reportdata');
			}
			else
			{
				simpleNotification("error","topRight",retstr.responseText);
			}
	  });
}

</script>


</div>
</div>
</div>